Merge.
This commit is contained in:
commit
44b0225ed0
29 changed files with 864 additions and 1129 deletions
|
@ -1,3 +1,8 @@
|
|||
2012-01-14 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* FOR-RELEASE (Check the Emacs Tutorial): Mark TUTORIAL.he as
|
||||
updated and checked.
|
||||
|
||||
2011-11-26 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* grammars/bovine-grammar.el (bovine--grammar-newstyle-unquote):
|
||||
|
|
|
@ -107,7 +107,7 @@ TUTORIAL.de
|
|||
TUTORIAL.eo
|
||||
TUTORIAL.es
|
||||
TUTORIAL.fr
|
||||
TUTORIAL.he
|
||||
TUTORIAL.he eliz
|
||||
TUTORIAL.it
|
||||
TUTORIAL.ja
|
||||
TUTORIAL.ko
|
||||
|
@ -133,7 +133,7 @@ buffers.texi cyd
|
|||
building.texi cyd
|
||||
calendar.texi
|
||||
cal-xtra.texi
|
||||
cmdargs.texi
|
||||
cmdargs.texi cyd
|
||||
commands.texi cyd
|
||||
custom.texi cyd
|
||||
dired.texi cyd
|
||||
|
@ -144,7 +144,7 @@ emacs-xtra.texi
|
|||
emerge-xtra.texi
|
||||
entering.texi cyd
|
||||
files.texi cyd
|
||||
fixit.texi
|
||||
fixit.texi cyd
|
||||
fortran-xtra.texi
|
||||
frames.texi cyd
|
||||
glossary.texi
|
||||
|
@ -175,7 +175,7 @@ trouble.texi cyd
|
|||
vc-xtra.texi cyd
|
||||
vc1-xtra.texi cyd
|
||||
windows.texi cyd
|
||||
xresources.texi
|
||||
xresources.texi cyd
|
||||
|
||||
** Check the Lisp manual.
|
||||
|
||||
|
|
|
@ -1,3 +1,43 @@
|
|||
2012-01-15 Chong Yidong <cyd@gnu.org>
|
||||
|
||||
* xresources.texi (X Resources): Describe GTK+ case first.
|
||||
(Resources): Don't use borderWidth as an example, since it doesn't
|
||||
work with GTK+.
|
||||
(Table of Resources): Clarify role of several resources, including
|
||||
the Emacs 24 behavior of cursorBlink etc.
|
||||
(Face Resources): Node deleted. Recommend using Customize
|
||||
instead. Add paragraph to `Table of Resources' node summarizing
|
||||
how to use X resources for changing faces.
|
||||
(Lucid Resources): Rewrite, omitting description of font names,
|
||||
referring to the Fonts node instead.
|
||||
(LessTif Resources): Copyedits.
|
||||
(GTK resources): Rewrite, describing the difference between gtk2
|
||||
and gtk3.
|
||||
(GTK Resource Basics): New node.
|
||||
(GTK Widget Names, GTK Names in Emacs): Rewrite.
|
||||
(GTK styles): Just refer to Fonts node for GTK font format.
|
||||
|
||||
* display.texi (Faces): Document the cursor face.
|
||||
|
||||
2012-01-14 Chong Yidong <cyd@gnu.org>
|
||||
|
||||
* cmdargs.texi (Action Arguments): No need to mention
|
||||
EMACSLOADPATH.
|
||||
(General Variables): Add xref to Lisp Libraries.
|
||||
(Initial Options): Copyedits.
|
||||
(Resume Arguments): Node deleted; emacs.bash/csh are obsolete.
|
||||
(Environment): Clarify what getenv does.
|
||||
(General Variables): Clarify EMACSPATH etc. Emacs does not assume
|
||||
light backgrounds on xterms.
|
||||
(Misc Variables): TEMP and TMP are not Windows-specific.
|
||||
(Display X): Copyedits.
|
||||
(Colors X): -bd does nothing for GTK.
|
||||
(Icons X): Gnome 3 doesn't use taskbars.
|
||||
|
||||
* misc.texi (Shell): Document exec-path here.
|
||||
|
||||
* rmail.texi (Movemail): Add xref for exec-path.
|
||||
|
||||
2012-01-13 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* dired.texi (Dired and Find): Clarify find-ls-options.
|
||||
|
|
|
@ -3,135 +3,19 @@
|
|||
@c See file emacs.texi for copying conditions.
|
||||
|
||||
@node Antinews, Mac OS / GNUstep, X Resources, Top
|
||||
@appendix Emacs 22 Antinews
|
||||
@appendix Emacs 23 Antinews
|
||||
@c Update the emacs.texi Antinews menu entry with the above version number.
|
||||
|
||||
For those users who live backwards in time, here is information
|
||||
about downgrading to Emacs version 22.3. We hope you will enjoy the
|
||||
about downgrading to Emacs version 23.4. We hope you will enjoy the
|
||||
greater simplicity that results from the absence of many Emacs
|
||||
@value{EMACSVER} features.
|
||||
|
||||
@itemize @bullet
|
||||
|
||||
@item
|
||||
We have switched to a character representation specially designed for
|
||||
Emacs. Rather than forcing all the widely used scripts into artificial
|
||||
alignment, as Unicode does, Emacs treats them all equally, giving
|
||||
each one a place in the space of character codes. We have eliminated
|
||||
the confusing practice, in Emacs 23, whereby one character can belong
|
||||
to multiple character sets. Now each script has its own variant, and
|
||||
they all are different as far as Emacs is concerned. For example,
|
||||
there's a Latin-1 c-cedilla character, and there's a Latin-2
|
||||
c-cedilla; searching a buffer for the Latin-1 variant only finds that
|
||||
variant, but not the others.
|
||||
|
||||
@item
|
||||
Emacs now uses its own special internal encoding for non-@acronym{ASCII}
|
||||
characters, known as @samp{emacs-mule}. This was imperative to
|
||||
support several different variants of the same character, each one
|
||||
belonging to its own script: @samp{emacs-mule} marks each character
|
||||
with its script, to better discern them from one another.
|
||||
|
||||
@item
|
||||
For simplicity, the functions @code{encode-coding-region} and
|
||||
@code{decode-coding-region} no longer accept an argument saying where
|
||||
to store the result of their conversions. The result always replaces
|
||||
the original, so there's no need to look for it elsewhere.
|
||||
|
||||
@item
|
||||
Emacs no longer performs font anti-aliasing. If your fonts look ugly,
|
||||
try choosing a larger font and increasing the screen resolution.
|
||||
Admittedly, this becomes difficult as you go further back in time,
|
||||
since available screen resolutions will decrease.
|
||||
|
||||
@item
|
||||
The Fontconfig font library is no longer supported. To specify a
|
||||
font, you must use an XLFD (X Logical Font Descriptor). The other
|
||||
ways of specifying fonts---so-called ``Fontconfig'' and ``GTK'' font
|
||||
names---are redundant, so they have been removed.
|
||||
|
||||
@item
|
||||
Transient Mark mode is now disabled by default. Furthermore, some
|
||||
commands that operate specifically on the region when it is active and
|
||||
Transient Mark mode is enabled (such as @code{fill-paragraph}
|
||||
@code{ispell-word}, and @code{indent-for-tab-command}), no longer do
|
||||
so.
|
||||
|
||||
@item
|
||||
Holding @key{shift} while typing a motion command no longer creates a
|
||||
temporarily active region, since that's inconsistent with how Emacs
|
||||
normally handles keybindings. The variable @code{shift-select-mode}
|
||||
has been deleted. You can, however, still create temporarily active
|
||||
regions by dragging the mouse.
|
||||
|
||||
@item
|
||||
The line motion commands, @kbd{C-n} and @kbd{C-p}, now move by logical
|
||||
text lines, not screen lines. Even if a long text line is continued
|
||||
over multiple screen lines, @kbd{C-n} and @kbd{C-p} treat it as a
|
||||
single line, because that's ultimately what it is.
|
||||
|
||||
@item
|
||||
Visual Line mode, which provides ``word wrap'' functionality, has been
|
||||
removed. You can still use Long Lines mode to gain an approximation
|
||||
of word wrapping, though this has some drawbacks---for instance,
|
||||
syntax highlighting often doesn't work well on wrapped lines.
|
||||
|
||||
@item
|
||||
@kbd{C-l} now runs @code{recenter} instead of
|
||||
@code{recenter-top-bottom}. This always sets the current line at the
|
||||
center of the window, instead of cycling through the center, top, and
|
||||
bottom of the window on successive invocations. This lets you type
|
||||
@kbd{C-l C-l C-l C-l} to be @emph{absolutely sure} that you have
|
||||
recentered the line.
|
||||
|
||||
@item
|
||||
The way Emacs generates possible minibuffer completions is now much
|
||||
simpler to understand. It matches alternatives to the text before
|
||||
point, ignoring the text after point; it also does not attempt to
|
||||
perform partial completion if the first completion attempt fails.
|
||||
|
||||
@item
|
||||
Typing @kbd{M-n} at the start of the minibuffer history list no longer
|
||||
attempts to generate guesses of possible minibuffer input. It instead
|
||||
does the straightforward thing, by issuing the message @samp{End of
|
||||
history; no default available}.
|
||||
|
||||
@item
|
||||
Individual buffers can no longer display faces specially. The text
|
||||
scaling commands @kbd{C-x C-+}, @kbd{C-x C--}, and @kbd{C-x C-0} have
|
||||
been removed, and so has the buffer face menu bound to
|
||||
@kbd{S-down-mouse-1}.
|
||||
|
||||
@item
|
||||
VC no longer supports fileset-based operations on distributed version
|
||||
control systems (DVCSs) such as Arch, Bazaar, Subversion, Mercurial,
|
||||
and Git. For instance, multi-file commits will be performed by
|
||||
committing one file at a time. As you go further back in time, we
|
||||
will remove DVCS support entirely, so you should migrate your projects
|
||||
to CVS.
|
||||
|
||||
@item
|
||||
Rmail now uses a special file format, Babyl format, specifically designed
|
||||
for storing and editing mail. When you visit a file in Rmail, or get new
|
||||
mail, Rmail converts it automatically to Babyl format.
|
||||
|
||||
@item
|
||||
Emacs can no longer display frames on X windows and text terminals
|
||||
(ttys) simultaneously. If you start Emacs as an X application, it
|
||||
can only create X frames; if you start Emacs on a tty, it can only use
|
||||
that tty. No more confusion about which type of frame
|
||||
@command{emacsclient} will use in any given Emacs session!
|
||||
|
||||
@item
|
||||
Emacs can no longer be started as a daemon. You can be sure that if
|
||||
you don't see Emacs, then it's not running.
|
||||
|
||||
@item
|
||||
Emacs has added support for many soon-to-be-non-obsolete platforms,
|
||||
including VMS, DECstation, SCO Unix, and systems lacking alloca.
|
||||
Support for Sun windows has been added.
|
||||
FIXME
|
||||
|
||||
@item
|
||||
To keep up with decreasing computer memory capacity and disk space, many
|
||||
other functions and files have been eliminated in Emacs 22.3.
|
||||
other functions and files have been eliminated in Emacs 23.4.
|
||||
@end itemize
|
||||
|
|
|
@ -65,7 +65,6 @@ arguments.)
|
|||
and call functions.
|
||||
* Initial Options:: Arguments that take effect while starting Emacs.
|
||||
* Command Example:: Examples of using command line arguments.
|
||||
* Resume Arguments:: Specifying arguments when you resume a running Emacs.
|
||||
* Environment:: Environment variables that Emacs uses.
|
||||
* Display X:: Changing the default display and using remote login.
|
||||
* Font X:: Choosing a font for text, under X.
|
||||
|
@ -124,10 +123,9 @@ Visit @var{file} using @code{find-file}, then go to line number
|
|||
@opindex --load
|
||||
@cindex loading Lisp libraries, command-line argument
|
||||
Load a Lisp library named @var{file} with the function @code{load}.
|
||||
@xref{Lisp Libraries}. If @var{file} is not an absolute file name,
|
||||
the library can be found either in the current directory, or in the
|
||||
Emacs library search path as specified with @env{EMACSLOADPATH}
|
||||
(@pxref{General Variables}).
|
||||
If @var{file} is not an absolute file name, Emacs first looks for it
|
||||
in the current directory, then in the directories listed in
|
||||
@code{load-path} (@pxref{Lisp Libraries}).
|
||||
|
||||
@strong{Warning:} If previous command-line arguments have visited
|
||||
files, the current directory is the directory of the last file
|
||||
|
@ -186,11 +184,11 @@ specifically related to the X Window System appear in the following
|
|||
sections.
|
||||
|
||||
Some initial options affect the loading of the initialization file.
|
||||
The normal actions of Emacs are to first load @file{site-start.el} if
|
||||
it exists, then your own initialization file @file{~/.emacs} if it
|
||||
exists, and finally @file{default.el} if it exists. @xref{Init File}.
|
||||
Certain options prevent loading of some of these files or substitute
|
||||
other files for them.
|
||||
Normally, Emacs first loads @file{site-start.el} if it exists, then
|
||||
your own initialization file if it exists, and finally the default
|
||||
initialization file @file{default.el} if it exists (@pxref{Init
|
||||
File}). Certain options prevent loading of some of these files or
|
||||
substitute other files for them.
|
||||
|
||||
@table @samp
|
||||
@item -chdir @var{directory}
|
||||
|
@ -207,8 +205,8 @@ stopped. This makes desktop saving and restoring easier.
|
|||
@itemx --terminal=@var{device}
|
||||
@opindex --terminal
|
||||
@cindex device for Emacs terminal I/O
|
||||
Use @var{device} as the device for terminal input and output.
|
||||
@samp{--terminal} implies @samp{--no-window-system}.
|
||||
Use @var{device} as the device for terminal input and output. This
|
||||
option implies @samp{--no-window-system}.
|
||||
|
||||
@item -d @var{display}
|
||||
@opindex -d
|
||||
|
@ -252,7 +250,7 @@ terminal's standard input stream (@code{stdin}) instead.
|
|||
@samp{--batch} implies @samp{-q} (do not load an initialization file),
|
||||
but @file{site-start.el} is loaded nonetheless. It also causes Emacs
|
||||
to exit after processing all the command options. In addition, it
|
||||
disables auto-saving except in buffers for which it has been
|
||||
disables auto-saving except in buffers for which auto-saving is
|
||||
explicitly requested.
|
||||
|
||||
@item --script @var{file}
|
||||
|
@ -270,8 +268,8 @@ Emacs. They can start with this text on the first line
|
|||
|
||||
@noindent
|
||||
which will invoke Emacs with @samp{--script} and supply the name of
|
||||
the script file as @var{file}. Emacs Lisp then treats @samp{#!} as a
|
||||
comment delimiter.
|
||||
the script file as @var{file}. Emacs Lisp then treats the @samp{#!}
|
||||
on this first line as a comment delimiter.
|
||||
|
||||
@item -q
|
||||
@opindex -q
|
||||
|
@ -280,11 +278,10 @@ comment delimiter.
|
|||
@cindex bypassing init and @file{default.el} file
|
||||
@cindex init file, not loading
|
||||
@cindex @file{default.el} file, not loading
|
||||
Do not load your Emacs initialization file, and do not load the file
|
||||
@file{default.el} either (@pxref{Init File}). Regardless of this
|
||||
switch, @file{site-start.el} is still loaded. When Emacs is invoked
|
||||
like this, the Customize facility does not allow options to be saved
|
||||
(@pxref{Easy Customization}).
|
||||
Do not load any initialization file (@pxref{Init File}). When Emacs
|
||||
is invoked with this option, the Customize facility does not allow
|
||||
options to be saved (@pxref{Easy Customization}). This option does
|
||||
not disable loading @file{site-start.el}.
|
||||
|
||||
@item --no-site-file
|
||||
@opindex --no-site-file
|
||||
|
@ -371,45 +368,6 @@ also guarantees there will be no problem redirecting output to
|
|||
@file{log}, because Emacs will not assume that it has a display terminal
|
||||
to work with.
|
||||
|
||||
@node Resume Arguments
|
||||
@appendixsec Resuming Emacs with Arguments
|
||||
|
||||
You can specify action arguments for Emacs when you resume it after
|
||||
a suspension. To prepare for this, put the following code in your
|
||||
@file{.emacs} file (@pxref{Hooks}):
|
||||
|
||||
@c `resume-suspend-hook' is correct. It is the name of a function.
|
||||
@example
|
||||
(add-hook 'suspend-hook 'resume-suspend-hook)
|
||||
(add-hook 'suspend-resume-hook 'resume-process-args)
|
||||
@end example
|
||||
|
||||
As further preparation, you must execute the shell script
|
||||
@file{emacs.csh} (if you use csh as your shell) or @file{emacs.bash}
|
||||
(if you use bash as your shell). These scripts define an alias named
|
||||
@code{edit}, which will resume Emacs giving it new command line
|
||||
arguments such as files to visit. The scripts are found in the
|
||||
@file{etc} subdirectory of the Emacs distribution.
|
||||
|
||||
Only action arguments work properly when you resume Emacs. Initial
|
||||
arguments are not recognized---it's too late to execute them anyway.
|
||||
|
||||
Note that resuming Emacs (with or without arguments) must be done from
|
||||
within the shell that is the parent of the Emacs job. This is why
|
||||
@code{edit} is an alias rather than a program or a shell script. It is
|
||||
not possible to implement a resumption command that could be run from
|
||||
other subjobs of the shell; there is no way to define a command that could
|
||||
be made the value of @env{EDITOR}, for example. Therefore, this feature
|
||||
does not take the place of the Emacs Server feature (@pxref{Emacs
|
||||
Server}).
|
||||
|
||||
The aliases use the Emacs Server feature if you appear to have a
|
||||
server Emacs running. However, they cannot determine this with complete
|
||||
accuracy. They may think that a server is still running when in
|
||||
actuality you have killed that Emacs, because the file
|
||||
@file{/tmp/esrv@dots{}} still exists. If this happens, find that
|
||||
file and delete it.
|
||||
|
||||
@node Environment
|
||||
@appendixsec Environment Variables
|
||||
@cindex environment variables
|
||||
|
@ -424,19 +382,19 @@ letters only. The values are all text strings.
|
|||
environment automatically from their parent process. This means you
|
||||
can set up an environment variable in your login shell, and all the
|
||||
programs you run (including Emacs) will automatically see it.
|
||||
Subprocesses of Emacs (such as shells, compilers, and version-control
|
||||
software) inherit the environment from Emacs, too.
|
||||
Subprocesses of Emacs (such as shells, compilers, and version control
|
||||
programs) inherit the environment from Emacs, too.
|
||||
|
||||
@findex setenv
|
||||
@findex getenv
|
||||
@vindex initial-environment
|
||||
Inside Emacs, the command @kbd{M-x getenv} gets the value of an
|
||||
environment variable. @kbd{M-x setenv} sets a variable in the Emacs
|
||||
environment, and @kbd{C-u M-x setenv} removes a variable.
|
||||
(Environment variable substitutions with @samp{$} work in the value
|
||||
just as in file names; see @ref{File Names with $}.) The variable
|
||||
@code{initial-environment} stores the initial environment inherited by
|
||||
Emacs.
|
||||
Inside Emacs, the command @kbd{M-x getenv} reads the name of an
|
||||
environment variable, and prints its value in the echo area. @kbd{M-x
|
||||
setenv} sets a variable in the Emacs environment, and @kbd{C-u M-x
|
||||
setenv} removes a variable. (Environment variable substitutions with
|
||||
@samp{$} work in the value just as in file names; see @ref{File Names
|
||||
with $}.) The variable @code{initial-environment} stores the initial
|
||||
environment inherited by Emacs.
|
||||
|
||||
The way to set environment variables outside of Emacs depends on the
|
||||
operating system, and especially the shell that you are using. For
|
||||
|
@ -483,22 +441,25 @@ This is used to initialize the Lisp variable @code{data-directory}.
|
|||
Directory for the documentation string file, which is used to
|
||||
initialize the Lisp variable @code{doc-directory}.
|
||||
@item EMACSLOADPATH
|
||||
A colon-separated list of directories@footnote{
|
||||
Here and below, whenever we say ``colon-separated list of directories,''
|
||||
it pertains to Unix and GNU/Linux systems. On MS-DOS and MS-Windows,
|
||||
the directories are separated by semi-colons instead, since DOS/Windows
|
||||
file names might include a colon after a drive letter.}
|
||||
to search for Emacs Lisp files---used to initialize @code{load-path}.
|
||||
A colon-separated list of directories@footnote{ Here and below,
|
||||
whenever we say ``colon-separated list of directories,'' it pertains
|
||||
to Unix and GNU/Linux systems. On MS-DOS and MS-Windows, the
|
||||
directories are separated by semi-colons instead, since DOS/Windows
|
||||
file names might include a colon after a drive letter.} to search for
|
||||
Emacs Lisp files. If set, it overrides the usual initial value of the
|
||||
@code{load-path} variable (@pxref{Lisp Libraries}).
|
||||
@item EMACSPATH
|
||||
A colon-separated list of directories to search for executable
|
||||
files---used to initialize @code{exec-path}.
|
||||
A colon-separated list of directories to search for executable files.
|
||||
If set, Emacs uses this in addition to @env{PATH} (see below) when
|
||||
initializing the variable @code{exec-path} (@pxref{Shell}).
|
||||
@item EMAIL
|
||||
@vindex user-mail-address@r{, initialization}
|
||||
Your email address; used to initialize the Lisp variable
|
||||
@code{user-mail-address}, which the Emacs mail interface puts into
|
||||
the @samp{From} header of outgoing messages (@pxref{Mail Headers}).
|
||||
@code{user-mail-address}, which the Emacs mail interface puts into the
|
||||
@samp{From} header of outgoing messages (@pxref{Mail Headers}).
|
||||
@item ESHELL
|
||||
Used for shell-mode to override the @env{SHELL} environment variable.
|
||||
Used for shell-mode to override the @env{SHELL} environment variable
|
||||
(@pxref{Interactive Shell}).
|
||||
@item HISTFILE
|
||||
The name of the file that shell commands are saved in between logins.
|
||||
This variable defaults to @file{~/.bash_history} if you use Bash, to
|
||||
|
@ -554,23 +515,28 @@ environment and coding system. @xref{Language Environments}.
|
|||
The user's login name. See also @env{USER}.
|
||||
@item MAIL
|
||||
The name of your system mail inbox.
|
||||
@ifnottex
|
||||
@item MH
|
||||
Name of setup file for the mh system. (The default is @file{~/.mh_profile}.)
|
||||
Name of setup file for the mh system. @xref{Top,,MH-E,mh-e, The Emacs
|
||||
Interface to MH}.
|
||||
@end ifnottex
|
||||
@item NAME
|
||||
Your real-world name.
|
||||
Your real-world name. This is used to initialize the variable
|
||||
@code{user-full-name} (@pxref{Mail Headers}).
|
||||
@item NNTPSERVER
|
||||
The name of the news server. Used by the mh and Gnus packages.
|
||||
@item ORGANIZATION
|
||||
The name of the organization to which you belong. Used for setting the
|
||||
`Organization:' header in your posts from the Gnus package.
|
||||
@item PATH
|
||||
A colon-separated list of directories in which executables reside. This
|
||||
is used to initialize the Emacs Lisp variable @code{exec-path}.
|
||||
A colon-separated list of directories containing executable files.
|
||||
This is used to initialize the variable @code{exec-path}
|
||||
(@pxref{Shell}).
|
||||
@item PWD
|
||||
If set, this should be the default directory when Emacs was started.
|
||||
@item REPLYTO
|
||||
If set, this specifies an initial value for the variable
|
||||
@code{mail-default-reply-to}. @xref{Mail Headers}.
|
||||
@code{mail-default-reply-to} (@pxref{Mail Headers}).
|
||||
@item SAVEDIR
|
||||
The name of a directory in which news articles are saved by default.
|
||||
Used by the Gnus package.
|
||||
|
@ -578,23 +544,29 @@ Used by the Gnus package.
|
|||
The name of an interpreter used to parse and execute programs run from
|
||||
inside Emacs.
|
||||
@item SMTPSERVER
|
||||
The name of the outgoing mail server. Used by the SMTP library
|
||||
(@pxref{Top,,,smtpmail,Sending mail via SMTP}).
|
||||
The name of the outgoing mail server. This is used to initialize the
|
||||
variable @code{smtpmail-smtp-server} (@pxref{Mail Sending}).
|
||||
@cindex background mode, on @command{xterm}
|
||||
@item TERM
|
||||
The type of the terminal that Emacs is using. This variable must be
|
||||
set unless Emacs is run in batch mode. On MS-DOS, it defaults to
|
||||
@samp{internal}, which specifies a built-in terminal emulation that
|
||||
handles the machine's own display. If the value of @env{TERM} indicates
|
||||
that Emacs runs in non-windowed mode from @command{xterm} or a similar
|
||||
terminal emulator, the background mode defaults to @samp{light}, and
|
||||
Emacs will choose colors that are appropriate for a light background.
|
||||
handles the machine's own display.
|
||||
@item TERMCAP
|
||||
The name of the termcap library file describing how to program the
|
||||
terminal specified by the @env{TERM} variable. This defaults to
|
||||
terminal specified by @env{TERM}. This defaults to
|
||||
@file{/etc/termcap}.
|
||||
@item TMPDIR
|
||||
Used by the Emerge package as a prefix for temporary files.
|
||||
@itemx TMP
|
||||
@itemx TEMP
|
||||
These environment variables are used to initialize the variable
|
||||
@code{temporary-file-directory}, which specifies a directory in which
|
||||
to put temporary files (@pxref{Backup}). Emacs tries to use
|
||||
@env{TMPDIR} first; if that is unset, it tries @env{TMP}, then
|
||||
@env{TEMP}, and finally @file{/tmp}. But on MS-Windows and MS-DOS,
|
||||
Emacs tries @env{TEMP}, then @env{TMPDIR}, then @env{TMP}, and finally
|
||||
@file{c:/temp}.
|
||||
|
||||
@item TZ
|
||||
This specifies the current time zone and possibly also daylight
|
||||
saving time information. On MS-DOS, if @env{TZ} is not set in the
|
||||
|
@ -624,11 +596,6 @@ variable.
|
|||
On MS-DOS, this variable defaults to the value of the @env{USER}
|
||||
variable.
|
||||
|
||||
@item TEMP
|
||||
@itemx TMP
|
||||
On MS-DOS and MS-Windows, these specify the name of the directory for
|
||||
storing temporary files in.
|
||||
|
||||
@item EMACSTEST
|
||||
On MS-DOS, this specifies a file to use to log the operation of the
|
||||
internal terminal emulator. This feature is useful for submitting bug
|
||||
|
@ -710,27 +677,21 @@ of the settings which on X belong in the @file{.Xdefaults} file
|
|||
@cindex display name (X Window System)
|
||||
@cindex @env{DISPLAY} environment variable
|
||||
|
||||
The environment variable @env{DISPLAY} tells all X clients, including
|
||||
Emacs, where to display their windows. Its value is set by default
|
||||
in ordinary circumstances, when you start an X server and run jobs
|
||||
locally. Occasionally you may need to specify the display yourself; for
|
||||
example, if you do a remote login and want to run a client program
|
||||
remotely, displaying on your local screen.
|
||||
|
||||
With Emacs, the main reason people change the default display is to
|
||||
let them log into another system, run Emacs on that system, but have the
|
||||
window displayed at their local terminal. You might need to log in
|
||||
to another system because the files you want to edit are there, or
|
||||
because the Emacs executable file you want to run is there.
|
||||
The environment variable @env{DISPLAY} tells all X clients,
|
||||
including Emacs, where to display their windows. Its value is set by
|
||||
default in ordinary circumstances, when you start an X server and run
|
||||
jobs locally. You can specify the display yourself; one reason to do
|
||||
this is if you want to log into another system and run Emacs there,
|
||||
and have the window displayed at your local terminal.
|
||||
|
||||
@env{DISPLAY} has the syntax
|
||||
@samp{@var{host}:@var{display}.@var{screen}}, where @var{host} is the
|
||||
host name of the X Window System server machine, @var{display} is an
|
||||
arbitrarily-assigned number that distinguishes your server (X
|
||||
terminal) from other servers on the same machine, and @var{screen} is
|
||||
a rarely-used field that allows an X server to control multiple
|
||||
terminal screens. The period and the @var{screen} field are optional.
|
||||
If included, @var{screen} is usually zero.
|
||||
a field that allows an X server to control multiple terminal screens.
|
||||
The period and the @var{screen} field are optional. If included,
|
||||
@var{screen} is usually zero.
|
||||
|
||||
For example, if your host is named @samp{glasperle} and your server is
|
||||
the first (or perhaps the only) server listed in the configuration, your
|
||||
|
@ -744,9 +705,9 @@ by changing the @env{DISPLAY} variable, or with the option @samp{-d
|
|||
emacs --display=glasperle:0 &
|
||||
@end smallexample
|
||||
|
||||
You can inhibit the direct use of the window system and GUI with the
|
||||
@samp{-nw} option. It tells Emacs to display using ordinary @acronym{ASCII} on
|
||||
its controlling terminal. This is also an initial option.
|
||||
You can inhibit the use of the X window system with the @samp{-nw}
|
||||
option. Then Emacs uses its controlling text terminal for display.
|
||||
@xref{Initial Options}.
|
||||
|
||||
Sometimes, security arrangements prevent a program on a remote system
|
||||
from displaying on your local system. In this case, trying to run Emacs
|
||||
|
@ -778,17 +739,17 @@ font:
|
|||
Use @var{font} as the default font.
|
||||
@end table
|
||||
|
||||
When passing a font specification to Emacs on the command line, you
|
||||
may need to ``quote'' it, by enclosing it in quotation marks, if it
|
||||
contains characters that the shell treats specially (e.g.@: spaces).
|
||||
For example:
|
||||
When passing a font name to Emacs on the command line, you may need to
|
||||
``quote'' it, by enclosing it in quotation marks, if it contains
|
||||
characters that the shell treats specially (e.g.@: spaces). For
|
||||
example:
|
||||
|
||||
@smallexample
|
||||
emacs -fn "DejaVu Sans Mono-12"
|
||||
@end smallexample
|
||||
|
||||
@xref{Fonts}, for other ways to specify the default font and font name
|
||||
formats.
|
||||
@xref{Fonts}, for details about font names and other ways to specify
|
||||
the default font.
|
||||
|
||||
@node Colors X
|
||||
@appendixsec Window Color Options
|
||||
|
@ -819,7 +780,8 @@ Specify the background color, overriding the color specified by the
|
|||
@itemx --border-color=@var{color}
|
||||
@opindex --border-color
|
||||
@cindex border color, command-line argument
|
||||
Specify the color of the border of the X window.
|
||||
Specify the color of the border of the X window. This has no effect
|
||||
if Emacs is compiled with GTK+ support.
|
||||
@item -cr @var{color}
|
||||
@opindex -cr
|
||||
@itemx --cursor-color=@var{color}
|
||||
|
@ -844,11 +806,10 @@ Reverse video---swap the foreground and background colors.
|
|||
@opindex --color
|
||||
@cindex standard colors on a character terminal
|
||||
@cindex override character terminal color support
|
||||
For a character terminal only, specify the mode of color support.
|
||||
This option is intended for overriding the number of supported colors
|
||||
that the character terminal advertises in its @code{termcap} or
|
||||
@code{terminfo} database. The parameter @var{mode} can be one of the
|
||||
following:
|
||||
Set the @dfn{color support mode} when Emacs is run on a text terminal.
|
||||
This option overrides the number of supported colors that the
|
||||
character terminal advertises in its @code{termcap} or @code{terminfo}
|
||||
database. The parameter @var{mode} can be one of the following:
|
||||
@table @samp
|
||||
@item never
|
||||
@itemx no
|
||||
|
@ -1090,7 +1051,7 @@ Start Emacs in an iconified (``minimized'') state.
|
|||
@itemx --no-bitmap-icon
|
||||
@opindex --no-bitmap-icon
|
||||
@cindex Emacs icon, a gnu
|
||||
Do not display the Emacs icon.
|
||||
Disable the use of the Emacs icon.
|
||||
@end table
|
||||
|
||||
Most window managers allow you to ``iconify'' (or ``minimize'') an
|
||||
|
@ -1102,10 +1063,11 @@ The text frame doesn't appear until you deiconify (or ``un-minimize'')
|
|||
it.
|
||||
|
||||
By default, Emacs uses an icon containing the Emacs logo. On
|
||||
desktop environments such as Gnome, this icon is also displayed on the
|
||||
``taskbar''. The @samp{-nbi} or @samp{--no-bitmap-icon} option tells
|
||||
Emacs to let the window manager choose what sort of icon to
|
||||
use---usually just a small rectangle containing the frame's title.
|
||||
desktop environments such as Gnome, this icon is also displayed in
|
||||
other contexts, e.g.@: when switching into an Emacs frame. The
|
||||
@samp{-nbi} or @samp{--no-bitmap-icon} option tells Emacs to let the
|
||||
window manager choose what sort of icon to use---usually just a small
|
||||
rectangle containing the frame's title.
|
||||
|
||||
@node Misc X
|
||||
@appendixsec Other Display Options
|
||||
|
|
|
@ -489,10 +489,20 @@ support a limited range of colors.
|
|||
changes for future Emacs sessions. @xref{Face Customization}. A face
|
||||
does not have to specify every single attribute; often it inherits
|
||||
most attributes from another face. Any ultimately unspecified
|
||||
attribute is taken from a face named @code{default}, whose attributes
|
||||
are all specified. The @code{default} face is the default for
|
||||
displaying text, and its background color is also used as the frame's
|
||||
background color.
|
||||
attribute is taken from the face named @code{default}.
|
||||
|
||||
The @code{default} face is the default for displaying text, and all
|
||||
of its attributes are specified. Its background color is also used as
|
||||
the frame's background color.
|
||||
|
||||
@cindex cursor face
|
||||
Another special face is the @code{cursor} face. On graphical
|
||||
displays, the background color of this face is used to draw the text
|
||||
cursor. None of the other attributes of this face have any effect;
|
||||
the foreground color for text under the cursor is taken from the
|
||||
background color of the underlying text. On text terminals, the
|
||||
appearance of the text cursor is determined by the terminal, not by
|
||||
the @code{cursor} face.
|
||||
|
||||
You can also use X resources to specify attributes of any particular
|
||||
face. @xref{Resources}.
|
||||
|
|
|
@ -210,7 +210,7 @@ Appendices
|
|||
* GNU Free Documentation License:: The license for this documentation.
|
||||
* Emacs Invocation:: Hairy startup options.
|
||||
* X Resources:: X resources for customizing Emacs.
|
||||
* Antinews:: Information about Emacs version 22.
|
||||
* Antinews:: Information about Emacs version 23.
|
||||
* Mac OS / GNUstep:: Using Emacs under Mac OS and GNUstep.
|
||||
* Microsoft Windows:: Using Emacs on Microsoft Windows and MS-DOS.
|
||||
* Manifesto:: What's GNU? Gnu's Not Unix!
|
||||
|
@ -1104,7 +1104,6 @@ Command Line Arguments for Emacs Invocation
|
|||
and call functions.
|
||||
* Initial Options:: Arguments that take effect while starting Emacs.
|
||||
* Command Example:: Examples of using command line arguments.
|
||||
* Resume Arguments:: Specifying arguments when you resume a running Emacs.
|
||||
* Environment:: Environment variables that Emacs uses.
|
||||
* Display X:: Changing the default display and using remote login.
|
||||
* Font X:: Choosing a font for text, under X.
|
||||
|
@ -1125,15 +1124,15 @@ X Options and Resources
|
|||
|
||||
* Resources:: Using X resources with Emacs (in general).
|
||||
* Table of Resources:: Table of specific X resources that affect Emacs.
|
||||
* Face Resources:: X resources for customizing faces.
|
||||
* Lucid Resources:: X resources for Lucid menus.
|
||||
* LessTif Resources:: X resources for LessTif and Motif menus.
|
||||
* GTK resources:: Resources for GTK widgets.
|
||||
|
||||
GTK resources
|
||||
|
||||
* GTK widget names:: How widgets in GTK are named in general.
|
||||
* GTK Names in Emacs:: GTK widget names in Emacs.
|
||||
* GTK Resource Basics:: Basic usage of GTK+ resources.
|
||||
* GTK Widget Names:: How GTK+ widgets are named.
|
||||
* GTK Names in Emacs:: GTK+ widgets used by Emacs.
|
||||
* GTK styles:: What can be customized in a GTK widget.
|
||||
|
||||
Emacs and Mac OS / GNUstep
|
||||
|
|
|
@ -1871,10 +1871,9 @@ Add each file name in @var{directory} and all of its nested
|
|||
subdirectories to the file name cache, using @command{locate} to find
|
||||
them all.
|
||||
@item M-x file-cache-add-directory-list @key{RET} @var{variable} @key{RET}
|
||||
Add each file name in each directory listed in @var{variable}
|
||||
to the file name cache. @var{variable} should be a Lisp variable
|
||||
such as @code{load-path} or @code{exec-path}, whose value is a list
|
||||
of directory names.
|
||||
Add each file name in each directory listed in @var{variable} to the
|
||||
file name cache. @var{variable} should be a Lisp variable whose value
|
||||
is a list of directory names, like @code{load-path}.
|
||||
@item M-x file-cache-clear-cache @key{RET}
|
||||
Clear the cache; that is, remove all file names from it.
|
||||
@end table
|
||||
|
|
|
@ -465,6 +465,15 @@ then give commands interactively. Full terminal emulation is
|
|||
available.
|
||||
@end table
|
||||
|
||||
@vindex exec-path
|
||||
Whenever you specify a relative file name for an executable program
|
||||
(either in the @var{cmd} argument to one of the above commands, or in
|
||||
other contexts), Emacs searches for the program in the directories
|
||||
specified by the variable @code{exec-path}. The value of this
|
||||
variable must be a list of directory names; the default value is
|
||||
initialized from the environment variable @env{PATH} when Emacs is
|
||||
started (@pxref{General Variables}).
|
||||
|
||||
@kbd{M-x eshell} invokes a shell implemented entirely in Emacs. It
|
||||
is documented in its own manual.
|
||||
@ifnottex
|
||||
|
@ -551,11 +560,8 @@ to @command{gpg}. This will output the list of keys to the
|
|||
The above commands use the shell specified by the variable
|
||||
@code{shell-file-name}. Its default value is determined by the
|
||||
@env{SHELL} environment variable when Emacs is started. If the file
|
||||
name is relative, Emacs searches the directories in the list
|
||||
@code{exec-path}; this list is initialized based on the environment
|
||||
variable @env{PATH} when Emacs is started. Your init file can
|
||||
override either or both of these default initializations (@pxref{Init
|
||||
File}).
|
||||
name is relative, Emacs searches the directories listed in
|
||||
@code{exec-path} (@pxref{Shell}).
|
||||
|
||||
To specify a coding system for @kbd{M-!} or @kbd{M-|}, use the command
|
||||
@kbd{C-x @key{RET} c} immediately beforehand. @xref{Communication Coding}.
|
||||
|
|
|
@ -1428,8 +1428,8 @@ This is equivalent to specifying the @samp{file} protocol:
|
|||
@code{movemail} to use. If that is a string, it specifies the
|
||||
absolute file name of the @code{movemail} executable. If it is
|
||||
@code{nil}, Rmail searches for @code{movemail} in the directories
|
||||
listed in @code{rmail-movemail-search-path} and @code{exec-path}, then
|
||||
in @code{exec-directory}.
|
||||
listed in @code{rmail-movemail-search-path}, then in @code{exec-path}
|
||||
(@pxref{Shell}), then in @code{exec-directory}.
|
||||
|
||||
@node Remote Mailboxes
|
||||
@section Retrieving Mail from Remote Mailboxes
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,3 +1,8 @@
|
|||
2012-01-14 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* tutorials/TUTORIAL.he: Update to follow changes to TUTORIAL in
|
||||
2012-01-10T08:27:22Z!cyd@gnu.org.
|
||||
|
||||
2012-01-10 Chong Yidong <cyd@gnu.org>
|
||||
|
||||
* tutorials/TUTORIAL: Don't give instructions for old-style X
|
||||
|
|
|
@ -296,7 +296,7 @@ like A, 7, *, etc., are inserted as you type them. To insert a
|
|||
Newline character, type <Return> (this is the key on the keyboard
|
||||
which is sometimes labeled "Enter").
|
||||
|
||||
To delete <DEL> the character immediately before the current cursor
|
||||
To delete the character immediately before the current cursor
|
||||
position, type <DEL>. This is the key on the keyboard usually labeled
|
||||
"Backspace"--the same one you normally use, outside Emacs, to delete
|
||||
the last character typed.
|
||||
|
@ -839,8 +839,8 @@ go to the next occurrence of 'cursor' just type C-s again. If no such
|
|||
occurrence exists, Emacs beeps and tells you the search is currently
|
||||
"failing". C-g would also terminate the search.
|
||||
|
||||
If you are in the middle of an incremental search and type <DEL>, this
|
||||
the search "retreats" to an earlier location. If you type <DEL> just
|
||||
If you are in the middle of an incremental search and type <DEL>, the
|
||||
search "retreats" to an earlier location. If you type <DEL> just
|
||||
after you had typed C-s to advance to the next occurrence of a search
|
||||
string, the <DEL> moves the cursor back to an earlier occurrence. If
|
||||
there are no earlier occurrences, the <DEL> erases the last character
|
||||
|
|
|
@ -198,19 +198,9 @@ argument) משום מקישים אותו לפני הפקודה אליה הוא
|
|||
כתוצאה, התצוגה היתה צריכה לזוז ב־8 שורות. אם ברצונכם לגלול בחזרה,
|
||||
אפשר להשיג זאת ע"י מתן ארגומנט ל־M-v.
|
||||
|
||||
אם הפעלתם את Emacs על־גבי מערכת חלונאית כגון X או MS-Windows, אתם
|
||||
אם הפעלתם את Emacs על־גבי תצוגה גרפית כגון X או MS-Windows, אתם
|
||||
צריכים לראות פס צר וגבוה, ששמו פס גלילה (scroll bar) בצידו של החלון
|
||||
של Emacs. (שימו לב שבשני צידי החלון קיימים פסים נוספים. אלה נקראים
|
||||
"השוליים" -- "fringes" -- ומשמשים להצגת סימני המשך שורה וסימונים
|
||||
אחרים. פס הגלילה, לעומתם, מופיע רק בצד אחד והוא הכי קרוב לקצה החלון
|
||||
בצד ההוא.)
|
||||
|
||||
>> נסו עתה להקליק בכפתור האמצעי של העכבר בחלק העליון של האזור המודגש
|
||||
של פס הגלילה. פעולה זו אמורה לגלול את הטקסט בשיעור שתלוי במקום בו
|
||||
הקלקתם.
|
||||
|
||||
>> נסו לגרור את העכבר מעלה ומטה, תוך כדי לחיצה על הכפתור האמצעי.
|
||||
כתוצאה, Emacs יגלול את הטקסט מעלה ומטה בהתאם לתנועת העכבר.
|
||||
של Emacs. ניתן לגלול את הטקסט ע"י הקלקת עכבר בתוך פס הגלילה.
|
||||
|
||||
אם העכבר שלכם מצויד בגלגל, תוכלו להשתמש גם בו לגלילת הטקסט.
|
||||
|
||||
|
@ -255,9 +245,9 @@ argument) משום מקישים אותו לפני הפקודה אליה הוא
|
|||
מבטלת את שאר החלונות.
|
||||
|
||||
>> הניעו את הסמן לתוך שורה זו והקישו C-u 0 C-l.
|
||||
>> עתה הקישו CONTROL-h k CONTROL-f.
|
||||
>> עתה הקישו C-h k C-f.
|
||||
שימו לב כיצד החלון הנוכחי מצטמצם ומופיע חלון חדש שבו מוצג
|
||||
התיעוד של הפקודה CONTROL-f.
|
||||
התיעוד של הפקודה C-f.
|
||||
|
||||
>> הקישו C-x 1 ושימו לב שהחלון עם ההסבר על C-f נעלם.
|
||||
|
||||
|
@ -271,40 +261,37 @@ argument) משום מקישים אותו לפני הפקודה אליה הוא
|
|||
--------------
|
||||
|
||||
אם ברצונכם להכניס טקסט, פשוט הקישו על המקשים המתאימים. תוים רגילים,
|
||||
כגון A, א, 7, * וכד' מתפרשים ע"י Emacs כטקסט ומיד מתווספים לטקסט
|
||||
הקיים. הקישו <Return> (מקש חזרת גרר) כדי להכניס את תו השורה החדשה
|
||||
כגון A, א, 7, * וכד' מיד מתווספים לטקסט הקיים. הקישו <Return> (מקש
|
||||
חזרת גרר שלעתים נהוג לקרוא לו "Enter") כדי להכניס את תו השורה החדשה
|
||||
(Newline).
|
||||
|
||||
למחיקת התו האחרון שהקשתם הקישו <DelBack>. המקש שאנו קוראים לו <DelBack>
|
||||
יכול להתקרא בשמות שונים -- "Delete", "DEL" או "Backspace". בדרך כלל
|
||||
זהו מקש גדול ובולט שנמצא לא הרחק ממקש <Return>, והוא משמש אתכם למחיקת
|
||||
התו אחרון גם בתוכניות אחרות, לא רק ב־Emacs.
|
||||
למחיקת התו האחרון שהקשתם הקישו <DEL>. בדרך כלל זהו מקש שמסומן
|
||||
ב־"Backspace", והוא משמש אתכם למחיקת התו אחרון גם בתוכניות אחרות, לא
|
||||
רק ב־Emacs.
|
||||
|
||||
אם קיים במקלדת שלכם מקש גדול שעליו רשום <Backspace>, אז זהון המקש אשר
|
||||
ישמש כ־<DelBack>. גם אם יהיה מקש אחר המסומן ב־"Delete" במקום אחרת זה
|
||||
אינו ה־<DelBack> שלכם.
|
||||
|
||||
באופן כללי יותר, <DelBack> מוחק את התו שקודם למיקום הסמן.
|
||||
יתכן שבמקלדת שלכם קיים מקש שעליו רשום <Delete>, אך זה אינו המקש שאנו
|
||||
קוראים לו <DEL>.
|
||||
|
||||
>> הקישו עתה מספר תוים, ואחר־כך מחקו אותם ע"י הקשות אחדות
|
||||
על <DelBack>. אל תחששו לשנות את הקובץ הזה -- העותק המקורי
|
||||
על <DEL>. אל תחששו לשנות את הקובץ הזה -- העותק המקורי
|
||||
של השיעור יישאר ללא שינוי. אתם עובדים על העותק האישי שלכם.
|
||||
|
||||
כאשר שורה של טקסט נעשית ארוכה משורה אחת של תצוגה, חלק מהטקסט ממשיך
|
||||
בשורת תצוגה נוספת, היא "שורת ההמשך". תו לוכסן ("/") בסוף השורה (או
|
||||
חץ עקלקל קטן באזור השוליים -- "fringe") מסמל שלשורה יש שורת המשך.
|
||||
בשורת תצוגה נוספת, היא "שורת ההמשך". על תצוגה גרפית יופיע חץ עקלקל קטן
|
||||
באזור השוליים -- "fringe" שמסמל כי לשורה יש שורת המשך, ואילו על תצוגה
|
||||
טקסטואלית יופיע תו לוכסן ("/") לאותה תכלית בסוף השורה.
|
||||
|
||||
>> הקישו טקסט עד שתגיעו לקצה השורה, ואז תמשיכו להקיש עוד טקסט.
|
||||
כתוצאה, תראו שמופיעה שורת המשך.
|
||||
|
||||
>> עתה הקישו <DelBack> על־מנת למחוק טקסט עד שהשורה תיעשה קצרה מספיק
|
||||
>> עתה הקישו <DEL> על־מנת למחוק טקסט עד שהשורה תיעשה קצרה מספיק
|
||||
ותתאים לשורה בודדת על־גבי התצוגה. שורת ההמשך תיעלם.
|
||||
|
||||
ניתן למחוק את תו ה־Newline כמו כל תו אחר. מחיקת ה־Newline בין שתי
|
||||
שורות תמזג את השורות לשורה אחת. אם השורה המשולבת תהיה ארוכה מרוחב
|
||||
התצוגה, היא תוצג עם שורת המשך.
|
||||
|
||||
>> הניעו את הסמן לתחילת השורה והקישו <DelBack>. כתוצאה, השורה תתמזג
|
||||
>> הניעו את הסמן לתחילת השורה והקישו <DEL>. כתוצאה, השורה תתמזג
|
||||
אם קודמתה.
|
||||
|
||||
>> עתה הקישו <Return> כדי להחזיר את ה־Newline שמחקתם.
|
||||
|
@ -317,24 +304,24 @@ argument) משום מקישים אותו לפני הפקודה אליה הוא
|
|||
ובכן, למדתם את האופן הבסיסי ביותר להדפיס משהו ב־Emacs ולתקן שגיאות.
|
||||
אפשר למחוק גם מלים ואף שורות שלמות. להלן סיכום פקודות המחיקה:
|
||||
|
||||
<Delback> מחק תו שלפני הסמן
|
||||
<DEL> מחק תו שלפני הסמן
|
||||
C-d מחק תו מתחת או אחרי הסמן
|
||||
|
||||
M-<Delback> גזור מילה שלפני הסמן
|
||||
M-<DEL> גזור מילה שלפני הסמן
|
||||
M-d גזור מילה שאחרי הסמן
|
||||
|
||||
C-k גזור טקסט מהסמן ועד סוף השורה
|
||||
M-k גזור טקסט עד סוף המשפט הנוכחי.
|
||||
|
||||
שימו לב שהיחס בין <Delback> ו־C-d לעומת M-<Delback> ו־M-d ממשיכים את
|
||||
ההקבלה שבין C-f ו־M-f (אמנם <Delback> איננו תו בקרה, בוא נזניח את
|
||||
הנקודה הזו לעת־עתה). C-k ו־M-k דומים ל־C-e ו־M-e, אם נקביל שורות
|
||||
למשפטים.
|
||||
שימו לב שהיחס בין <DEL> ו־C-d לעומת M-<DEL> ו־M-d ממשיכים את ההקבלה
|
||||
שבין C-f ו־M-f (אמנם <DEL> איננו תו בקרה, אבל בוא נזניח את הנקודה הזו
|
||||
לעת־עתה). C-k ו־M-k דומים ל־C-e ו־M-e, אם נקביל שורות למשפטים.
|
||||
|
||||
בנוסף, קיימת שיטה אחידה שמאפשרת לגזור קטע כלשהו של טקסט. לשם כך, תגיעו
|
||||
לקצה האחד של חלק הטקסט והקישו C-@ או C-<SPC> (אחד מבין שני אלו).
|
||||
(<SPC> הוא מקש הרווח.) עתה הניעו את הסמן לקצה השני של חלק הטקסט והקישו
|
||||
C-w. כתוצאה, כל הטקסט בין שני המקומות הללו ייגזר.
|
||||
לקצה האחד של חלק הטקסט והקישו C-<SPC>. (<SPC> הוא מקש הרווח.) עתה
|
||||
הניעו את הסמן לקצה השני של חלק הטקסט אשר ברצונכם לגזור. תוך כדי תנועת
|
||||
הסמן Emacs צובע את הטקסט בין הסמן לבין המקום בו הקשתם C-<SPC>. לבסוף,
|
||||
הקישו C-w. כתוצאה, כל הטקסט בין שני המקומות הללו ייגזר.
|
||||
|
||||
>> הניעו את הסמן אל האות ב בתחילת הפיסקה הקודמת.
|
||||
>> הקישו C-<SPC>. Emacs צריך להציג הודעה האומרת "Mark set" בתחתית
|
||||
|
@ -348,7 +335,7 @@ C-w. כתוצאה, כל הטקסט בין שני המקומות הללו ייג
|
|||
הטקסט הגזור נקרא "הדבקה" ("yanking"). באופן כללי, פקודות אשר עלולות
|
||||
להעלים כמויות גדולות של טקסט תמיד גוזרות את הטקסט (כך שניתן יהיה בקלות
|
||||
לשחזרו) בעוד הפקודות שמורידות תו בודד או שורות ריקות ותוי רווח --
|
||||
מוחקות (כך שלא ניתן להדביק את הטקסט שנמחק). כך, <Delback> ו־C-d מוחקים
|
||||
מוחקות (כך שלא ניתן להדביק את הטקסט שנמחק). כך, <DEL> ו־C-d מוחקים
|
||||
כאשר מפעילים אותם ללא ארגומנט, אבל גוזרים כאשר מפעילים אותם עם ארגומנט.
|
||||
|
||||
>> הניעו את הסמן לתחילת שורה שאינה ריקה. אחר־כך הקישו C-k כדי לגזור
|
||||
|
@ -406,23 +393,22 @@ C-w. כתוצאה, כל הטקסט בין שני המקומות הללו ייג
|
|||
--------------
|
||||
|
||||
אם שיניתם את הטקסט ואז החלטתם שהשינוי היה טעות, תוכלו לבטל את השינוי
|
||||
בעזרת פקודת הביטול, C-x u.
|
||||
בעזרת פקודת הביטול, C-/.
|
||||
|
||||
בדרך כלל, C-x u מבטל את השינויים שבוצעו ע"י פקודה אחת. הפעלה חוזרת של
|
||||
C-x u ברצף מבטלת שינויים של פקודות קודמות, אחת אחרי השניה.
|
||||
בדרך כלל,C-/ מבטל את השינויים שבוצעו ע"י פקודה אחת. הפעלה חוזרת של
|
||||
C-/ ברצף מבטלת שינויים של פקודות קודמות, אחת אחרי השניה.
|
||||
|
||||
שני יוצאים מהכלל הזה: פקודות שאינן משנות טקסט (למשל פקודות הנעת הסמן
|
||||
ופקודות גלילה) אינן נספרות ותוים שמכניסים את עצמם מקובצים בקבוצות של
|
||||
עד 20, כדי להקטין את מספר הפעמים שיש להקיש C-x u כדי לבטל הכנסת טקסט.
|
||||
עד 20, כדי להקטין את מספר הפעמים שיש להקיש C-/ כדי לבטל הכנסת טקסט.
|
||||
|
||||
>> גזרו שורה זו עם C-k, אחר־כך הקישו C-x u והיא תופיע שוב.
|
||||
>> גזרו שורה זו עם C-k, אחר־כך הקישו C-/ והיא תופיע שוב.
|
||||
|
||||
C-_ הינה דרך חלופית להפעיל את פקודת הביטול. היא פועלת בדיוק כמו C-x u,
|
||||
אבל קלה יותר להקשה מספר פעמים בזו אחר זו. החסרון של C-_ הוא שבכמה
|
||||
מקלדות לא ברור מאליו כיצד להקיש זאת. זו הסיבה לקיומו של C-x u. במקלדות
|
||||
אחדות ניתן להקיש C-_ ע"י החזקת CONTROL והקשת לוכסן /.
|
||||
C-_ הינה דרך חלופית להפעיל את פקודת הביטול. היא פועלת בדיוק כמו C-/.
|
||||
במקלדות אחדות הקשה על C-/ שולחת ל־Emacs את התו C-_. חלופה נוספת היא
|
||||
C-x u, אם־כי היא פחות נוחה להקשה מספר פעמים בזו אחר זו.
|
||||
|
||||
ארגומנט נומרי ל־C-_ או ל־C-x u משמש כמספר החזרות על הפקודה.
|
||||
ארגומנט נומרי ל־C-/ או ל־C-_ או ל־C-x u משמש כמספר החזרות על הפקודה.
|
||||
|
||||
ניתן לבטל מחיקה של טקסט בדיוק כמו שניתן לבטל גזירה. ההבדלים בין מחיקה
|
||||
וגזירה משפיעים על יכולתכם להדביק את הטקסט הגזור עם C-y; הם אינם חשובים
|
||||
|
@ -442,15 +428,15 @@ C-x u ברצף מבטלת שינויים של פקודות קודמות, אחת
|
|||
שלם במערכת שלא כרצונכם. אפילו אם אתם שומרים את הקובץ, Emacs משאיר את
|
||||
התוכן המקורי בשם שונה למקרה שמאוחר יותר תחליטו שהשינויים נעשו בטעות.
|
||||
|
||||
אם תביטו בחלק התחתון של התצוגה, תראו שם שורה בולטת שמתחילה ומסתיימת
|
||||
במקפים וליד הקצה השמאלי שלה כתוב "TUTORIAL.he". חלק זה של התצוגה בדרך
|
||||
כלל מציג את שם הקובץ אותו אתם פוקדים. כרגע אתם פוקדים קובץ בשם
|
||||
"TUTORIAL.he" שהוא עותק הטיוטה האישי שלכם של שיעור השימוש ב־Emacs.
|
||||
פתיחת קובץ כלשהו ב־Emacs תציג את שמו של הקובץ במקום זה.
|
||||
אם תביטו בחלק התחתון של התצוגה, תראו שם שורה בולטת שמתחילה במקפים וליד
|
||||
הקצה השמאלי שלה כתוב "TUTORIAL.he". חלק זה של התצוגה בדרך כלל מציג את
|
||||
שם הקובץ אותו אתם פוקדים. כרגע אתם פוקדים קובץ בשם "TUTORIAL.he" שהוא
|
||||
עותק הטיוטה האישי שלכם של שיעור השימוש ב־Emacs. פתיחת קובץ כלשהו
|
||||
ב־Emacs תציג את שמו של הקובץ במקום זה.
|
||||
|
||||
היבט אחד מיוחד של פתיחת קובץ הוא שיש לציין את שם הקובץ אשר ברצונכם
|
||||
לפתוח. אנו אומרים שהפקודה "קוראת ארגומנט מהמסוף" (במקרה זה הארגומנט
|
||||
הוא שם הקובץ). אחרי שתקישו את הפקודה
|
||||
לפתוח. אנו אומרים שהפקודה "קוראת ארגומנט" (במקרה זה הארגומנט הוא שם
|
||||
הקובץ). אחרי שתקישו את הפקודה
|
||||
|
||||
C-x C-f פתח קובץ
|
||||
|
||||
|
@ -465,12 +451,11 @@ C-x u ברצף מבטלת שינויים של פקודות קודמות, אחת
|
|||
>> הקישו C-x C-f ואחר־כך הקישו C-g. זה מבטל את המיני־חוצץ וגם מבטל
|
||||
את הפקודה C-x C-f שהשתמשה במיני־חוצץ. התוצאה היא שאף קובץ לא נפתח.
|
||||
|
||||
משסיימתם להקיש את שם הקובץ, הקישו <Return> לסיים את הקלט. או־אז תיגש
|
||||
C-x C-f לעבודה ותמצא ותפתח את הקובץ שבחרתם. המיני־חוצץ נעלם כאשר
|
||||
פקודת ה־C-x C-f תסיים את עבודתה.
|
||||
|
||||
זמן קצר אחר־כך תוכן הקובץ יופיע על־גבי התצוגה ותוכלו לבצע בו שינויים.
|
||||
כשתחליטו לשמור את השינויים, הקישו את הפקודה הבאה:
|
||||
משסיימתם להקיש את שם הקובץ, הקישו <Return> לסיים את הקלט. או־אז
|
||||
המיני־חוצץ נעלם והפקודה C-x C-f תיגש לעבודה ותמצא ותפתח את הקובץ
|
||||
שבחרתם. כאשר פקודת ה־C-x C-f תסיים את עבודתה, תוכן הקובץ יופיע על־גבי
|
||||
התצוגה ותוכלו לבצע בו שינויים. כשתחליטו לשמור את השינויים, הקישו את
|
||||
הפקודה הבאה:
|
||||
|
||||
C-x C-s שמור את הקובץ
|
||||
|
||||
|
@ -482,8 +467,9 @@ C-x C-f לעבודה ותמצא ותפתח את הקובץ שבחרתם. המי
|
|||
לשמור לעתים מזומנות על־מנת להימנע מלאבד יותר מדי מהעבודה שלכם אם המחשב
|
||||
ייפול (ראה להלן פיסקה על שמירה אוטומטית).
|
||||
|
||||
>> הקישו C-x C-s כדי לשמור את העותק שלכם של השיעור.
|
||||
כתוצאה, תופיע ההודעה "Wrote ... TUTORIAL.he" בתחתית התצוגה.
|
||||
>> הקישו C-x C-s TUTORIAL.he ותסיימו בהקשת <Return>. כתוצאה, שיעור זה
|
||||
יישמר בקובץ בשם TUTORIAL.he ובתחתית התצוגה תופיע ההודעה
|
||||
"Wrote ...TUTORIAL.he".
|
||||
|
||||
ניתן לפתוח קובץ קיים על־מנת לצפות בו או לערוך אותו. ניתן גם לפתוח קובץ
|
||||
שאינו קיים. זו הדרך ליצור קבצים חדשים בעזרת Emacs: פתחו את הקובץ
|
||||
|
@ -498,10 +484,6 @@ Emacs ייצור את הקובץ עם הטקסט שהקשתם. מאותו רגע
|
|||
אם תפתחו קובץ נוסף עם C-x C-f, הקובץ הראשון עדיין נשאר פתוח ב־Emacs.
|
||||
תוכלו לחזור אליו ע"י C-x C-f. כך תוכלו לפתוח מספר רב של קבצים.
|
||||
|
||||
>> ניצור עתה קובץ בשם "foo" ע"י הקשת C-x C-f foo <Return>.
|
||||
אחר־כך הכניסו קצת טקסט, ערכו אותו ולבסוף שמרו בקובץ "foo"
|
||||
ע"י C-x C-s. עתה חזרו לשיעור בעזרת C-x C-f TUTORIAL.he <Return>.
|
||||
|
||||
Emacs מחזיק כל קובץ בתוך יישות בשם "חוצץ" ("buffer"). פתיחת קובץ יוצרת
|
||||
חוצץ חדש בתוך Emacs. כדי לראות את רשימת החוצצים הקיימים בתוך Emacs,
|
||||
הקישו
|
||||
|
@ -522,17 +504,19 @@ Emacs ייצור את הקובץ עם הטקסט שהקשתם. מאותו רגע
|
|||
ע"י C-x C-f שיפקוד את הקובץ בשנית. אבל קיימת דרך פשוטה יותר: שימוש
|
||||
בפקודה C-x b. פקודה זו תחייב אותכם להקיש את שם החוצץ.
|
||||
|
||||
>> הקישו C-x b foo <Return> כדי לחזור לחוצץ "foo" אשר מחזיק טקסט של
|
||||
הקובץ "foo". אחר־כך הקישו C-x b TUTORIAL.he <Return> כדי לשוב
|
||||
לשיעור זה.
|
||||
>> ניצור עתה קובץ בשם "foo" ע"י הקשת C-x C-f foo <Return>.
|
||||
עתה חזרו לשיעור זה בעזרת C-x b TUTORIAL.he <Return>.
|
||||
|
||||
ברוב המקרים שם החוצץ זהה לשם הקובץ (ללא שם התיקיה שלו). אבל אין זה
|
||||
תמיד כך. רשימת החוצצים שנוצרת ע"י C-x C-b תמיד תציג את שמות כל החוצצים
|
||||
הקיימים ב־Emacs.
|
||||
תמיד כך. רשימת החוצצים שנוצרת ע"י C-x C-b תציג הן את שם החוצץ והן את
|
||||
שם הקובץ עבור כל החוצצים הקיימים ב־Emacs.
|
||||
|
||||
כל טקסט שמוצג בחלון של Emacs הינו תמיד חלק של חוצץ כלשהו. קיימים
|
||||
חוצצים שאינם קשורים לשום קובץ. לדוגמא, החוצץ בשם "*Buffer List*" אינו
|
||||
מציג שום קובץ. זהו חוצץ המחזיק את רשימת החוצצים שנוצר ע"י C-x C-b.
|
||||
חוצצים שאינם קשורים לשום קובץ. לדוגמא, החוצץ בשם "*Buffer List*"
|
||||
המחזיק את רשימת החוצצים שנוצרה ע"י C-x C-b אינו מציג שום קובץ. גם
|
||||
לחוצץ הנוכחי ששמו TUTORIAL.he לא היה קובץ עד שהקשתם על C-x C-s כדי
|
||||
לשמור אותו בקובץ.
|
||||
|
||||
חוצץ בשם "*Messages*" אף הוא אינו קשור לשום קובץ; הוא מחזיק את ההודעות
|
||||
שהופיעו בשורה התחתונה במהלך עבודתכם בתוך Emacs.
|
||||
|
||||
|
@ -573,11 +557,11 @@ C-x C-s. לכן קיימת פקודה
|
|||
מ־Emacs -- C-x C-c. (כשאתם מפעילים C-x C-c, אל תדאגו לשינויים שטרם
|
||||
נשמרו; C-x C-c מציע לשמור כל קובץ ששיניתם לפני שהוא מסיים את Emacs.)
|
||||
|
||||
אם אתם משתמשים בצג גרפי אשר תומך במספר תוכניות במקביל, אינכם זקוקים
|
||||
לפקודה מיוחדת כדי לעבור מ־Emacs לתוכנית אחרת. אפשר לעשות זאת בעזרת
|
||||
העכבר או פקודות של מנהל החלונות. אולם, כאשר אתם משתמשים בתצוגה
|
||||
טקסטואלית שמסוגלת להציג רק תוכנית אחת בו־זמנית, תצטרכו "להשעות"
|
||||
("suspend") את Emacs על־מנת לעבור לתוכנית אחרת.
|
||||
אם אתם משתמשים בצג גרפי, אינכם זקוקים לפקודה מיוחדת כדי לעבור מ־Emacs
|
||||
לתוכנית אחרת. אפשר לעשות זאת בעזרת העכבר או פקודות של מנהל החלונות.
|
||||
אולם, כאשר אתם משתמשים בתצוגה טקסטואלית שמסוגלת להציג רק תוכנית אחת
|
||||
בו־זמנית, תצטרכו "להשעות" ("suspend") את Emacs על־מנת לעבור לתוכנית
|
||||
אחרת.
|
||||
|
||||
הפקודה C-z יוצאת מ־Emacs *באופן זמני* -- כך שתוכלו לשוב אליו מאוחר
|
||||
יותר ולהמשיך מאותה נקודה. כאשר Emacs רץ על תצוגת טקסט, C-z "משעה" את
|
||||
|
@ -587,8 +571,7 @@ Emacs: הוא מחזיר אתכם לשורת הפקודות הבסיסית של
|
|||
|
||||
הרגע הנכון להשתמש ב־C-x C-c הוא כאשר אתם עומדים להתנתק (log out).
|
||||
כמו־כן, תצטרכו להשתמש בו כדי לצאת מ־Emacs שהופעל ע"י תוכניות אחרות
|
||||
כגון קריאת דואר אלקטרוני -- תוכניות אלו לא תמיד יודעות להסתדר עם
|
||||
השעיית Emacs.
|
||||
כגון קריאת דואר אלקטרוני.
|
||||
|
||||
קיימות פקודות C-x רבות מאד. להלן רשימת אלו שכבר למדתם:
|
||||
|
||||
|
@ -607,7 +590,7 @@ replace-string (החלף מחרוזת) אשר מחליפה מחרוזת אחת
|
|||
אחרי שתקישו M-x, Emacs מציג M-x בתחתית התצוגה ומחכה שתקישו את שם
|
||||
הפקודה, במקרה זה "replace-string". מספיק שתקישו "repl s<TAB>" ו־Emacs
|
||||
ישלים את השם המלא. (<TAB> הוא מקש Tab, בדרך כלל תמצאו אותו מעל מקש
|
||||
ה־CapsLock או Shift, ליד הקצה השמאלי של המקלדת.) סיימו את שם הפקודה
|
||||
ה־CapsLock או Shift, ליד הקצה השמאלי של המקלדת.) סיימו את הזנת הפקודה
|
||||
ע"י הקשת <Return>.
|
||||
|
||||
הפקודה להחלפת מחרוזת זקוקה לשני ארגומנטים -- המחרוזת שתוחלף וזו שתחליף
|
||||
|
@ -651,15 +634,15 @@ replace-string (החלף מחרוזת) אשר מחליפה מחרוזת אחת
|
|||
השורה שמעל אזור תצוגת הד נקראת "שורת הסטטוס" (mode line). שורה זו
|
||||
מציגה משהו כמו:
|
||||
|
||||
-U:**- TUTORIAL.he 63% L651 (Fundamental)-----------------------
|
||||
U:**- TUTORIAL.he 63% L651 (Fundamental)
|
||||
|
||||
שורה זו מציגה מידע חשוב לגבי מצבו של Emacs ולגבי הטקסט שנמצא בעריכה.
|
||||
|
||||
אתם כבר יודעים מהי משמעותו של שם הקובץ -- זהו הקובץ שפתחתם. NN% מציין
|
||||
את מיקומכם הנוכחי בתוך הטקסט, לאמור כי NN אחוזים מהטקסט קודמים לטקסט
|
||||
המוצג כרגע בחלון. אם המוצג בחלון כולל את תחילת הטקסט, תראו שם "Top"
|
||||
במקום "0% ". אם המוצג בחלון כולל את סוף הטקסט, תראו שם "Bot" (bottom).
|
||||
אם הטקסט כל־כך קצר שכולו מוצג בחלון, שורת הסטטוס תציג "All".
|
||||
את מיקומכם הנוכחי בתוך הטקסט, לאמור כי NN אחוזים מתכולת החוצץ קודמים
|
||||
לטקסט המוצג כרגע בחלון. אם המוצג בחלון כולל את תחילת הטקסט, תראו שם
|
||||
"Top" במקום "0% ". אם המוצג בחלון כולל את סוף הטקסט, תראו שם "Bot"
|
||||
(bottom). אם הטקסט כל־כך קצר שכולו מוצג בחלון, שורת הסטטוס תציג "All".
|
||||
|
||||
האות L והמספר שאחריה מציינים את המיקום הנוכחי בדרך אחרת: הם מראים את
|
||||
מספר השורה שבה נמצא הסמן.
|
||||
|
@ -698,7 +681,7 @@ replace-string (החלף מחרוזת) אשר מחליפה מחרוזת אחת
|
|||
|
||||
לצפיה בתיעוד של האופן הראשי הנוכחי יש להקיש C-h m.
|
||||
|
||||
>> השתמשו ב־C-u C-v פעם אחת או יותר כדי להביא שורה זו לראשית התצוגה.
|
||||
>> הקישו C-l C-l כדי להביא שורה זו לראשית התצוגה.
|
||||
>> עתה הקישו C-h m כדי לראות במה Text mode שונה מה־Fundamental mode.
|
||||
>> לבסוף, הקישו C-x 1 כדי לסלק את התיעוד מהתצוגה.
|
||||
|
||||
|
@ -740,9 +723,9 @@ Auto Fill mode. כאשר אופן זה מופעל, Emacs אוטומטית פות
|
|||
* חיפוש
|
||||
-------
|
||||
|
||||
Emacs יכול לחפש מחרוזות (רצף של תווים או מילים) קדימה או אחורה בתוך
|
||||
הטקסט. חיפוש של מחרוזת הוא סוג של פקודה להנעת הסמן: הוא ממקם את הסמן
|
||||
היכן שנמצאה המחרוזת הבאה.
|
||||
Emacs יכול לחפש מחרוזות (רצף של תווים) קדימה או אחורה בתוך הטקסט.
|
||||
חיפוש של מחרוזת הוא סוג של פקודה להנעת הסמן: הוא ממקם את הסמן היכן
|
||||
שנמצאה המחרוזת הבאה.
|
||||
|
||||
החיפוש של Emacs הינו "מצטבר" ("incremental"). פירוש הדבר הוא שהחיפוש
|
||||
מתבצע במקביל להקשתכם את המחרוזת אותה ברצונכם למצוא.
|
||||
|
@ -759,7 +742,7 @@ Auto Fill mode. כאשר אופן זה מופעל, Emacs אוטומטית פות
|
|||
"סמן", עם הפסקה אחרי כל אות, ושימו לב להתנהגות הסמן.
|
||||
זה עתה מצאתם את המילה "סמן" פעם אחת.
|
||||
>> הקישו C-s שוב, כדי למצוא את "סמן" במקומות נוספים בטקסט.
|
||||
>> הקישו <Delback> שלוש פעמים ושימו לב לתנועת הסמן בכל הקשה.
|
||||
>> הקישו <DEL> שלוש פעמים ושימו לב לתנועת הסמן בכל הקשה.
|
||||
>> הקישו <Return> לסיום החיפוש.
|
||||
|
||||
האם שמתם לב למה שקרה? במהלך "חיפוש מצטבר" Emacs מנסה למצוא את המקום
|
||||
|
@ -768,16 +751,13 @@ Auto Fill mode. כאשר אופן זה מופעל, Emacs אוטומטית פות
|
|||
ומודיע שהחיפוש נכנס למצב של "כשלון" ("failing"). הקשה על C-g גם היא
|
||||
מסיימת את החיפוש.
|
||||
|
||||
(הערה: במערכות אחדות הקשה על C-s מקפיעה את תצוגת המסך, כך שלא תראו
|
||||
יותר שום פלט של Emacs. משמעות הדבר שתכונת מערכת ההפעלה ששמה "flow
|
||||
control" מופעלת ע"י C-s ואינה מעבירה את C-s ל־Emacs. לביטול הקפאת
|
||||
התצוגה במערכות אלו יש להקיש C-q.)
|
||||
|
||||
אם במהלך החיפוש תקישו על <Delback>, תראו שהתו האחרון של המחרוזת
|
||||
המבוקשת נמחק והחיפוש חוזר למקום הקודם בו נמצאה המחרוזת ללא התו האחרון.
|
||||
למשל, נניח שהקשתם "ס" על־מנת למצוא את המקום הבא בו מופיעה האות "ס". אם
|
||||
עכשיו תקישו "מ", הסמן יזוז למקום בו נמצא "סמ". עתה הקישו <Delback>.
|
||||
ה־"מ" נמחק מהמחרוזת והסמן חוזר למקום בו הוא מצא את "ס" לראשונה.
|
||||
אם במהלך החיפוש תקישו על <DEL>, החיפוש "נסוג" למצב קודם. אם הקשתם
|
||||
<DEL> מיד אחרי C-s, הקשת <DEL> מחזירה את הסמן למקום הקודם בו נמצאה
|
||||
המחרוזת. אם אין מקומות קודמים בהם מופיעה המחרוזת, הקשת <DEL> מוחקת את
|
||||
התו האחרון של המחרוזת המבוקשת. למשל, נניח שהקשתם "ס" על־מנת למצוא את
|
||||
המקום הבא בו מופיעה האות "ס". אם עכשיו תקישו "מ", הסמן יזוז למקום בו
|
||||
נמצא "סמ". עתה הקישו <DEL>. ה־"מ" נמחק מהמחרוזת והסמן חוזר למקום בו
|
||||
הוא מצא את "ס" לראשונה.
|
||||
|
||||
אם במהלך החיפוש תפעילו פקודה כלשהי ע"י הקשה על מקש תוך לחיצה על
|
||||
CONTROL או META, החיפוש יסתיים. (כמה תווים יוצאים מכלל זה -- אלו תווים
|
||||
|
@ -796,10 +776,10 @@ CONTROL או META, החיפוש יסתיים. (כמה תווים יוצאים מ
|
|||
שתוכניות אחרות מכנות "חלון". תבניות מתוארות בפסקה הבאה. תוכלו למצוא את
|
||||
רשימת המונחים של Emacs בפרק "Glossary" של מדריך משתמש.)
|
||||
|
||||
>> הביאו סמן לשורה זו והקישו C-u 0 C-l (CONTROL-L ולא CONTROL-1).
|
||||
>> הביאו סמן לשורה זו והקישו C-l C-l (CONTROL-L ולא CONTROL-1).
|
||||
|
||||
>> עתה הקישו C-x 2 וכתוצאה מכך החלון יתחלק לשניים. כל אחד משני החלונות
|
||||
מציג את השיעור הזה. הסמן נשאר בחלון העליוןץ
|
||||
מציג את השיעור הזה. הסמן נשאר בחלון העליון.
|
||||
|
||||
>> הקישו C-M-v כדי לגלול את החלון התחתון.
|
||||
(אם במקלדת שלכם אין מקש META אמיתי, הקישו <ESC> C-v כתחליף.)
|
||||
|
@ -812,19 +792,19 @@ CONTROL או META, החיפוש יסתיים. (כמה תווים יוצאים מ
|
|||
>> הקישו C-x o שוב לחזור לחלון העליון.
|
||||
הסמן בחלון העליון יישאר במקום בו הוא היה לפני־כן.
|
||||
|
||||
תוכלו להמשיך להשתמש ב־C-x o כדי לדלג בין שני החלונות. לכל חלון מיקום
|
||||
סמן משלו, אבל רק חלון אחד מציג את הסמן בכל רגע. כל פקודות העריכה
|
||||
הרגילות פועלות על החלון שבו מוצג הסמן. אנו קוראים לחלון זה "החלון
|
||||
הנבחר".
|
||||
תוכלו להמשיך להשתמש ב־C-x o כדי לדלג בין החלונות. "החלון הנבחר", אותו
|
||||
חלון בו הנכם עורכים טקסט, מזוהה ע"י סמן בולט שמהבהב בזמן שאינכם
|
||||
מקלידים. לכל החלונות האחרים מיקום סמן משלהם; אם הפעלתם את Emacs על צג
|
||||
גרפי, מיקום הסמן בחלונות האחרים מוצג כתיבה ריקה שאינה מהבהבת.
|
||||
|
||||
הפקודה C-M-v נוחה מאד כאשר הינכם עורכים טקסט בחלון אחד ומשתמשים בחלון
|
||||
אחר לייחוס. תוכלו בכל עת לשמור על הסמן בחלון בו אתם עורכים טקסט
|
||||
ולהתקדם בחלון השני בעזרת C-M-v.
|
||||
אחר לייחוס. תוכלו להתקדם בחלון השני בעזרת C-M-v מבלי לעזוב את החלון
|
||||
הנבחר.
|
||||
|
||||
C-M-v היא דוגמא אחת של פקודת CONTROL-META. אם במקלדת שלכם קיים מקש
|
||||
META אמיתי, תוכלו להקיש את הפקודה ע"י לחיצה והחזקה של מקשי CONTROL
|
||||
ו־META גם יחד ואז להקיש v. הסדר שבו תלחצו על CONTROL ו־META אינו משנה
|
||||
כי שני המקשים הללו פועלים ע"י שינוי התו המוקש יחד איתם.
|
||||
META (או Alt) אמיתי, תוכלו להקיש את הפקודה ע"י לחיצה והחזקה של מקשי
|
||||
CONTROL ו־META גם יחד ואז להקיש v. הסדר שבו תלחצו על CONTROL ו־META
|
||||
אינו משנה כי שני המקשים הללו פועלים ע"י שינוי התו המוקש יחד איתם.
|
||||
|
||||
אם אין במקלדת מקש META אמיתי ואתם משתמשים ב־<ESC> כתחליף, הסדר כן
|
||||
משנה: חייבים להקיש <ESC> ורק לאחר מכן CONTROL-v, וזאת משום
|
||||
|
@ -853,9 +833,10 @@ META אמיתי, תוכלו להקיש את הפקודה ע"י לחיצה והח
|
|||
* תבניות מרובות
|
||||
---------------
|
||||
|
||||
Emacs מסוגל לפתוח מספר "תבניות" ("frames") בתנאי שאינכם משתמשים בצג
|
||||
שמסוגל להציג רק טקסט. תבנית כוללת קבוצת חלונות, תפריט, פסי גלילה, אזור
|
||||
תצוגת הד וכו'. (תוכניות אחרות נוהגות לקרוא לזה "חלון".)
|
||||
Emacs מסוגל לפתוח מספר "תבניות" ("frames"). תבנית כוללת קבוצת חלונות,
|
||||
תפריט, פסי גלילה, אזור תצוגת הד וכו'. על צג גרפי מה שאנו קוראים
|
||||
"תבנית" נקרא בדרך־כלל "חלון". ניתן להציג תבניות אחדות על אותו צג גרפי
|
||||
בו־זמנית על צג טקסטואלי אפשר להציג רק תבנית אחת בכל עת.
|
||||
|
||||
>> הקישו M-x make-frame <Return>.
|
||||
כתוצאה, תבנית חדשה תופיע על המסך.
|
||||
|
@ -866,10 +847,10 @@ META אמיתי, תוכלו להקיש את הפקודה ע"י לחיצה והח
|
|||
>> הקישו M-x delete-frame <Return>.
|
||||
התבנית שבה הקשתם את הפקודה תיסגר ותיעלם מהמסך.
|
||||
|
||||
כמו־כן, ניתן לסגור תבנית בדרך הרגילה הנתמכת ע"י מנהל החלונות של המערכת
|
||||
שלכם (בדרך־כלל, ע"י הקלקה על הכפתור המסומן ב־"X" בפינה עליונה של
|
||||
התבנית.) שום מידע אינו הולך לעיבוד כאשר סוגרים תבנית (או חלון). המידע
|
||||
הזה פשוט יורד מהתצוגה, אבל ניתן לאחזרו מאוחר יותר.
|
||||
כמו־כן, ניתן לסגור תבנית בדרך הרגילה הנתמכת ע"י התצוגה הגרפית של
|
||||
המערכת שלכם (בדרך־כלל, ע"י הקלקה על הכפתור המסומן ב־"X" בפינה עליונה
|
||||
של התבנית.) שום מידע אינו הולך לעיבוד כאשר סוגרים תבנית (או חלון).
|
||||
המידע הזה פשוט יורד מהתצוגה, אבל ניתן לאחזרו מאוחר יותר.
|
||||
|
||||
|
||||
* רמות עריכה רקורסיביות
|
||||
|
@ -983,7 +964,7 @@ find-file.
|
|||
ושמות קבצים. תכונת ההשלמה מתוארת במלואה במדריך למשתמש Emacs בצומת
|
||||
(node) בשם "Completion".
|
||||
|
||||
Dired מאפשר להציג רשימת קבצים בתיקיה (וכאפציה גם בתת-תיקיות שלה), לנוע
|
||||
Dired מאפשר להציג רשימת קבצים בתיקיה (וכאפציה גם בתת־תיקיות שלה), לנוע
|
||||
בתוך הרשימה הזו, לפתוח קבצים, לשנות את שמותיהם, למחוק אותם ולבצע עליהם
|
||||
עוד פעולות רבות. Dired מתואר במלואו במדריך למשתמש בצומת בשם "Dired".
|
||||
|
||||
|
|
|
@ -12,8 +12,7 @@ Maintainer: Sun Yijiang <sunyijiang@gmail.com>
|
|||
* TUTORIAL.cs:
|
||||
Author: Milan Zamazal <pdm@zamazal.org>
|
||||
Pavel Janík <Pavel@Janik.cz>
|
||||
Maintainer: Milan Zamazal <pdm@zamazal.org>
|
||||
Pavel Janík <Pavel@Janik.cz>
|
||||
Maintainer: Maintainer needed.
|
||||
|
||||
* TUTORIAL.de:
|
||||
Author: Werner Lemberg <wl@gnu.org>
|
||||
|
@ -73,7 +72,7 @@ Maintainer: Alex Ott <ottalex@narod.ru>
|
|||
* TUTORIAL.sk:
|
||||
Author: Miroslav Vaško <vasko@debian.cz>
|
||||
Pavel Janík <Pavel@Janik.cz>
|
||||
Maintainer: Pavel Janík <Pavel@Janik.cz>
|
||||
Maintainer: Maintainer needed.
|
||||
|
||||
* TUTORIAL.sl:
|
||||
Author: Primož Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si>
|
||||
|
|
|
@ -1,5 +1,32 @@
|
|||
2012-01-15 Michael Albinus <michael.albinus@gmx.de>
|
||||
|
||||
* net/tramp-sh.el (tramp-remote-path): Set tramp-autoload cookie.
|
||||
|
||||
2012-01-14 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* info.el (Info-toc-build): If the Info file has no "Up" pointer,
|
||||
don't pass the (nil) value of `upnode' to string-match.
|
||||
|
||||
2012-01-14 Chong Yidong <cyd@gnu.org>
|
||||
|
||||
* startup.el (command-line): Fix X resource class for cursorColor.
|
||||
Fix values recognized by the cursorBlink resource.
|
||||
|
||||
2012-01-14 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
* epg.el (epg--make-temp-file): Avoid permission race condition
|
||||
when running on old Emacs versions (bug#10403).
|
||||
|
||||
2012-01-14 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* dired.el (dired-get-filename): Fix 'verbatim case of previous change.
|
||||
|
||||
2012-01-13 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* dired.el (dired-switches-escape-p): New function.
|
||||
(dired-insert-directory): Use dired-switches-escape-p.
|
||||
(dired-get-filename): Undo "\ " quoting if needed. (Bug#10469)
|
||||
|
||||
* find-dired.el (find-ls-option): Doc fix. (Bug#10262)
|
||||
|
||||
2012-01-12 Glenn Morris <rgm@gnu.org>
|
||||
|
|
|
@ -1,3 +1,20 @@
|
|||
2012-01-09 Eric Ludlam <zappo@gnu.org>
|
||||
|
||||
* ede.el (ede-project-directories): New option.
|
||||
(ede-directory-safe-p): Check it.
|
||||
(ede-initialize-state-current-buffer, ede, ede-new)
|
||||
(ede-check-project-directory, ede-rescan-toplevel)
|
||||
(ede-load-project-file, ede-parent-project, ede-current-project):
|
||||
(ede-target-parent): Avoid loading in a project unless it is safe,
|
||||
since it may involve malicious code. This security flaw was
|
||||
pointed out by Hiroshi Oota.
|
||||
|
||||
* ede/auto.el (ede-project-autoload): Add safe-p slot.
|
||||
(ede-project-class-files): Projects using Project.ede are unsafe.
|
||||
(ede-auto-load-project): New method.
|
||||
|
||||
* ede/simple.el (ede-project-class-files): Mark as unsafe.
|
||||
|
||||
2011-12-19 Sam Steingold <sds@gnu.org>
|
||||
|
||||
* semantic/edit.el (semantic-edits-incremental-parser): Add the
|
||||
|
|
|
@ -94,6 +94,42 @@ target willing to take the file. 'never means never perform the check."
|
|||
:group 'ede
|
||||
:type 'sexp) ; make this be a list of options some day
|
||||
|
||||
(defcustom ede-project-directories nil
|
||||
"Directories in which EDE may search for project files.
|
||||
If the value is t, EDE may search in any directory.
|
||||
|
||||
If the value is a function, EDE calls that function with one
|
||||
argument, the directory name; the function should return t iff
|
||||
EDE should look for project files in the directory.
|
||||
|
||||
Otherwise, the value should be a list of fully-expanded directory
|
||||
names. EDE searches for project files only in those directories.
|
||||
If you invoke the commands \\[ede] or \\[ede-new] on a directory
|
||||
that is not listed, Emacs will offer to add it to the list.
|
||||
|
||||
Any other value disables searching for EDE project files."
|
||||
:group 'ede
|
||||
:type '(choice (const :tag "Any directory" t)
|
||||
(repeat :tag "List of directories"
|
||||
(directory))
|
||||
(function :tag "Predicate"))
|
||||
:version "23.4"
|
||||
:risky t)
|
||||
|
||||
(defun ede-directory-safe-p (dir)
|
||||
"Return non-nil if DIR is a safe directory to load projects from.
|
||||
Projects that do not load a project definition as Emacs Lisp code
|
||||
are safe, and can be loaded automatically. Other project types,
|
||||
such as those created with Project.ede files, are safe only if
|
||||
specified by `ede-project-directories'."
|
||||
(setq dir (directory-file-name (expand-file-name dir)))
|
||||
;; Load only if allowed by `ede-project-directories'.
|
||||
(or (eq ede-project-directories t)
|
||||
(and (functionp ede-project-directories)
|
||||
(funcall ede-project-directories dir))
|
||||
(and (listp ede-project-directories)
|
||||
(member dir ede-project-directories))))
|
||||
|
||||
|
||||
;;; Management variables
|
||||
|
||||
|
@ -420,24 +456,42 @@ provided `global-ede-mode' is enabled."
|
|||
Sets buffer local variables for EDE."
|
||||
(let* ((ROOT nil)
|
||||
(proj (ede-directory-get-open-project default-directory
|
||||
'ROOT)))
|
||||
'ROOT))
|
||||
(projauto nil))
|
||||
|
||||
(when (or proj ROOT
|
||||
(ede-directory-project-p default-directory t))
|
||||
;; If there is no open project, look up the project
|
||||
;; autoloader to see if we should initialize.
|
||||
(setq projauto (ede-directory-project-p default-directory t)))
|
||||
|
||||
(when (not proj)
|
||||
;; @todo - this could be wasteful.
|
||||
(setq proj (ede-load-project-file default-directory 'ROOT)))
|
||||
(when (and (not proj) projauto)
|
||||
|
||||
(setq ede-object (ede-buffer-object (current-buffer)
|
||||
;; No project was loaded, but we have a project description
|
||||
;; object. This means that we can check if it is a safe
|
||||
;; project to load before requesting it to be loaded.
|
||||
|
||||
(when (or (oref projauto safe-p)
|
||||
;; The project style is not safe, so check if it is
|
||||
;; in `ede-project-directories'.
|
||||
(let ((top (ede-toplevel-project default-directory)))
|
||||
(ede-directory-safe-p top)))
|
||||
|
||||
;; The project is safe, so load it in.
|
||||
(setq proj (ede-load-project-file default-directory 'ROOT))))
|
||||
|
||||
;; Only initialize EDE state in this buffer if we found a project.
|
||||
(when proj
|
||||
|
||||
(setq ede-object (ede-buffer-object (current-buffer)
|
||||
'ede-object-project))
|
||||
|
||||
(setq ede-object-root-project
|
||||
(or ROOT (ede-project-root ede-object-project)))
|
||||
(setq ede-object-root-project
|
||||
(or ROOT (ede-project-root ede-object-project)))
|
||||
|
||||
(if (and (not ede-object) ede-object-project)
|
||||
(ede-auto-add-to-target))
|
||||
(if (and (not ede-object) ede-object-project)
|
||||
(ede-auto-add-to-target))
|
||||
|
||||
(ede-apply-target-options))))
|
||||
(ede-apply-target-options)))))
|
||||
|
||||
(defun ede-reset-all-buffers (onoff)
|
||||
"Reset all the buffers due to change in EDE.
|
||||
|
@ -557,13 +611,73 @@ of objects with the `ede-want-file-p' method."
|
|||
|
||||
;;; Interactive method invocations
|
||||
;;
|
||||
(defun ede (file)
|
||||
"Start up EDE on something.
|
||||
Argument FILE is the file or directory to load a project from."
|
||||
(interactive "fProject File: ")
|
||||
(if (not (file-exists-p file))
|
||||
(ede-new file)
|
||||
(ede-load-project-file (file-name-directory file))))
|
||||
(defun ede (dir)
|
||||
"Start up EDE for directory DIR.
|
||||
If DIR has an existing project file, load it.
|
||||
Otherwise, create a new project for DIR."
|
||||
(interactive
|
||||
;; When choosing a directory to turn on, and we see some directory here,
|
||||
;; provide that as the default.
|
||||
(let* ((top (ede-toplevel-project default-directory))
|
||||
(promptdflt (or top default-directory)))
|
||||
(list (read-directory-name "Project directory: "
|
||||
promptdflt promptdflt t))))
|
||||
(unless (file-directory-p dir)
|
||||
(error "%s is not a directory" dir))
|
||||
(when (ede-directory-get-open-project dir)
|
||||
(error "%s already has an open project associated with it" dir))
|
||||
|
||||
;; Check if the directory has been added to the list of safe
|
||||
;; directories. It can also add the directory to the safe list if
|
||||
;; the user chooses.
|
||||
(if (ede-check-project-directory dir)
|
||||
(progn
|
||||
;; If there is a project in DIR, load it, otherwise do
|
||||
;; nothing.
|
||||
(ede-load-project-file dir)
|
||||
|
||||
;; Check if we loaded anything on the previous line.
|
||||
(if (ede-current-project dir)
|
||||
|
||||
;; We successfully opened an existing project. Some open
|
||||
;; buffers may also be referring to this project.
|
||||
;; Resetting all the buffers will get them to also point
|
||||
;; at this new open project.
|
||||
(ede-reset-all-buffers 1)
|
||||
|
||||
;; ELSE
|
||||
;; There was no project, so switch to `ede-new' which is how
|
||||
;; a user can select a new kind of project to create.
|
||||
(let ((default-directory (expand-file-name dir)))
|
||||
(call-interactively 'ede-new))))
|
||||
|
||||
;; If the proposed directory isn't safe, then say so.
|
||||
(error "%s is not an allowed project directory in `ede-project-directories'"
|
||||
dir)))
|
||||
|
||||
(defun ede-check-project-directory (dir)
|
||||
"Check if DIR should be in `ede-project-directories'.
|
||||
If it is not, try asking the user if it should be added; if so,
|
||||
add it and save `ede-project-directories' via Customize.
|
||||
Return nil iff DIR should not be in `ede-project-directories'."
|
||||
(setq dir (directory-file-name (expand-file-name dir))) ; strip trailing /
|
||||
(or (eq ede-project-directories t)
|
||||
(and (functionp ede-project-directories)
|
||||
(funcall ede-project-directories dir))
|
||||
;; If `ede-project-directories' is a list, maybe add it.
|
||||
(when (listp ede-project-directories)
|
||||
(or (member dir ede-project-directories)
|
||||
(when (y-or-n-p (format "`%s' is not listed in `ede-project-directories'.
|
||||
Add it to the list of allowed project directories? "
|
||||
dir))
|
||||
(push dir ede-project-directories)
|
||||
;; If possible, save `ede-project-directories'.
|
||||
(if (or custom-file user-init-file)
|
||||
(let ((coding-system-for-read nil))
|
||||
(customize-save-variable
|
||||
'ede-project-directories
|
||||
ede-project-directories)))
|
||||
t)))))
|
||||
|
||||
(defun ede-new (type &optional name)
|
||||
"Create a new project starting from project type TYPE.
|
||||
|
@ -598,6 +712,11 @@ Optional argument NAME is the name to give this project."
|
|||
(error "Cannot create project in non-existent directory %s" default-directory))
|
||||
(when (not (file-writable-p default-directory))
|
||||
(error "No write permissions for %s" default-directory))
|
||||
(unless (ede-check-project-directory default-directory)
|
||||
(error "%s is not an allowed project directory in `ede-project-directories'"
|
||||
default-directory))
|
||||
;; Make sure the project directory is loadable in the future.
|
||||
(ede-check-project-directory default-directory)
|
||||
;; Create the project
|
||||
(let* ((obj (object-assoc type 'name ede-project-class-files))
|
||||
(nobj (let ((f (oref obj file))
|
||||
|
@ -631,6 +750,10 @@ Optional argument NAME is the name to give this project."
|
|||
(ede-add-subproject pp nobj)
|
||||
(ede-commit-project pp)))
|
||||
(ede-commit-project nobj))
|
||||
;; Once the project is created, load it again. This used to happen
|
||||
;; lazily, but with project loading occurring less often and with
|
||||
;; security in mind, this is now the safe time to reload.
|
||||
(ede-load-project-file default-directory)
|
||||
;; Have the menu appear
|
||||
(setq ede-minor-mode t)
|
||||
;; Allert the user
|
||||
|
@ -653,11 +776,16 @@ ARGS are additional arguments to pass to method SYM."
|
|||
(defun ede-rescan-toplevel ()
|
||||
"Rescan all project files."
|
||||
(interactive)
|
||||
(let ((toppath (ede-toplevel-project default-directory))
|
||||
(ede-deep-rescan t))
|
||||
(project-rescan (ede-load-project-file toppath))
|
||||
(ede-reset-all-buffers 1)
|
||||
))
|
||||
(if (not (ede-directory-get-open-project default-directory))
|
||||
;; This directory isn't open. Can't rescan.
|
||||
(error "Attempt to rescan a project that isn't open")
|
||||
|
||||
;; Continue
|
||||
(let ((toppath (ede-toplevel-project default-directory))
|
||||
(ede-deep-rescan t))
|
||||
|
||||
(project-rescan (ede-load-project-file toppath))
|
||||
(ede-reset-all-buffers 1))))
|
||||
|
||||
(defun ede-new-target (&rest args)
|
||||
"Create a new target specific to this type of project file.
|
||||
|
@ -893,7 +1021,7 @@ Optional ROOTRETURN will return the root project for DIR."
|
|||
;; Do the load
|
||||
;;(message "EDE LOAD : %S" file)
|
||||
(let* ((file dir)
|
||||
(path (expand-file-name (file-name-directory file)))
|
||||
(path (file-name-as-directory (expand-file-name dir)))
|
||||
(pfc (ede-directory-project-p path))
|
||||
(toppath nil)
|
||||
(o nil))
|
||||
|
@ -922,13 +1050,11 @@ Optional ROOTRETURN will return the root project for DIR."
|
|||
;; See if it's been loaded before
|
||||
(setq o (object-assoc (ede-dir-to-projectfile pfc toppath) 'file
|
||||
ede-projects))
|
||||
(if (not o)
|
||||
;; If not, get it now.
|
||||
(let ((ede-constructing pfc))
|
||||
(setq o (funcall (oref pfc load-type) toppath))
|
||||
(when (not o)
|
||||
(error "Project type error: :load-type failed to create a project"))
|
||||
(ede-add-project-to-global-list o)))
|
||||
|
||||
;; If not open yet, load it.
|
||||
(unless o
|
||||
(let ((ede-constructing pfc))
|
||||
(setq o (ede-auto-load-project pfc toppath))))
|
||||
|
||||
;; Return the found root project.
|
||||
(when rootreturn (set rootreturn o))
|
||||
|
@ -982,13 +1108,7 @@ Optional argument OBJ is an object to find the parent of."
|
|||
(and root
|
||||
(ede-find-subproject-for-directory root updir))
|
||||
;; Try the all structure based search.
|
||||
(ede-directory-get-open-project updir)
|
||||
;; Load up the project file as a last resort.
|
||||
;; Last resort since it uses file-truename, and other
|
||||
;; slow features.
|
||||
(and (ede-directory-project-p updir)
|
||||
(ede-load-project-file
|
||||
(file-name-as-directory updir))))))))))
|
||||
(ede-directory-get-open-project updir))))))))
|
||||
|
||||
(defun ede-current-project (&optional dir)
|
||||
"Return the current project file.
|
||||
|
@ -1002,11 +1122,7 @@ If optional DIR is provided, get the project for DIR instead."
|
|||
;; No current project.
|
||||
(when (not ans)
|
||||
(let* ((ldir (or dir default-directory)))
|
||||
(setq ans (ede-directory-get-open-project ldir))
|
||||
(or ans
|
||||
;; No open project, if this dir pass project-p, then load.
|
||||
(when (ede-directory-project-p ldir)
|
||||
(setq ans (ede-load-project-file ldir))))))
|
||||
(setq ans (ede-directory-get-open-project ldir))))
|
||||
;; Return what we found.
|
||||
ans))
|
||||
|
||||
|
@ -1061,12 +1177,13 @@ If TARGET belongs to a subproject, return that project file."
|
|||
"Return the project which is the parent of TARGET.
|
||||
It is recommended you track the project a different way as this function
|
||||
could become slow in time."
|
||||
;; @todo - use ede-object-project as a starting point.
|
||||
(let ((ans nil) (projs ede-projects))
|
||||
(while (and (not ans) projs)
|
||||
(setq ans (ede-target-in-project-p (car projs) target)
|
||||
projs (cdr projs)))
|
||||
ans))
|
||||
(or ede-object-project
|
||||
;; If not cached, derive it from the current directory of the target.
|
||||
(let ((ans nil) (projs ede-projects))
|
||||
(while (and (not ans) projs)
|
||||
(setq ans (ede-target-in-project-p (car projs) target)
|
||||
projs (cdr projs)))
|
||||
ans)))
|
||||
|
||||
(defmethod ede-find-target ((proj ede-project) buffer)
|
||||
"Fetch the target in PROJ belonging to BUFFER or nil."
|
||||
|
|
|
@ -58,6 +58,13 @@ associated with a single object class, based on the initializers used.")
|
|||
:initform t
|
||||
:documentation
|
||||
"Non-nil if this is an option when a user creates a project.")
|
||||
(safe-p :initarg :safe-p
|
||||
:initform t
|
||||
:documentation
|
||||
"Non-nil if the project load files are \"safe\".
|
||||
An unsafe project is one that loads project variables via Emacs
|
||||
Lisp code. A safe project is one that loads project variables by
|
||||
scanning files without loading Lisp code from them.")
|
||||
)
|
||||
"Class representing minimal knowledge set to run preliminary EDE functions.
|
||||
When more advanced functionality is needed from a project type, that projects
|
||||
|
@ -69,13 +76,15 @@ type is required and the load function used.")
|
|||
:name "Make" :file 'ede/proj
|
||||
:proj-file "Project.ede"
|
||||
:load-type 'ede-proj-load
|
||||
:class-sym 'ede-proj-project)
|
||||
:class-sym 'ede-proj-project
|
||||
:safe-p nil)
|
||||
(ede-project-autoload "edeproject-automake"
|
||||
:name "Automake" :file 'ede/proj
|
||||
:proj-file "Project.ede"
|
||||
:initializers '(:makefile-type Makefile.am)
|
||||
:load-type 'ede-proj-load
|
||||
:class-sym 'ede-proj-project)
|
||||
:class-sym 'ede-proj-project
|
||||
:safe-p nil)
|
||||
(ede-project-autoload "automake"
|
||||
:name "automake" :file 'ede/project-am
|
||||
:proj-file "Makefile.am"
|
||||
|
@ -84,6 +93,8 @@ type is required and the load function used.")
|
|||
:new-p nil))
|
||||
"List of vectors defining how to determine what type of projects exist.")
|
||||
|
||||
(put 'ede-project-class-files 'risky-local-variable t)
|
||||
|
||||
;;; EDE project-autoload methods
|
||||
;;
|
||||
(defmethod ede-project-root ((this ede-project-autoload))
|
||||
|
@ -122,6 +133,19 @@ Return nil if the project file does not exist."
|
|||
(when (and f (file-exists-p f))
|
||||
f)))
|
||||
|
||||
(defmethod ede-auto-load-project ((this ede-project-autoload) dir)
|
||||
"Load in the project associated with THIS project autoload description.
|
||||
THIS project description should be valid for DIR, where the project will
|
||||
be loaded."
|
||||
;; Last line of defense: don't load unsafe projects.
|
||||
(when (not (or (oref this :safe-p)
|
||||
(ede-directory-safe-p dir)))
|
||||
(error "Attempt to load an unsafe project (bug elsewhere in EDE)"))
|
||||
;; Things are good - so load the project.
|
||||
(let ((o (funcall (oref this load-type) dir)))
|
||||
(when (not o)
|
||||
(error "Project type error: :load-type failed to create a project"))
|
||||
(ede-add-project-to-global-list o)))
|
||||
|
||||
(provide 'ede/auto)
|
||||
|
||||
|
|
|
@ -50,7 +50,8 @@
|
|||
:name "Simple" :file 'ede/simple
|
||||
:proj-file 'ede-simple-projectfile-for-dir
|
||||
:load-type 'ede-simple-load
|
||||
:class-sym 'ede-simple-project)
|
||||
:class-sym 'ede-simple-project
|
||||
:safe-p nil)
|
||||
t)
|
||||
|
||||
(defcustom ede-simple-save-directory "~/.ede"
|
||||
|
|
|
@ -1111,6 +1111,11 @@ BEG..END is the line where the file info is located."
|
|||
|
||||
(defvar ls-lisp-use-insert-directory-program)
|
||||
|
||||
(defun dired-switches-escape-p (switches)
|
||||
"Return non-nil if the string SWITCHES contains -b or --escape."
|
||||
;; Do not match things like "--block-size" that happen to contain "b".
|
||||
(string-match "\\(\\`\\| \\)-[[:alnum:]]*b\\|--escape\\>" switches))
|
||||
|
||||
(defun dired-insert-directory (dir switches &optional file-list wildcard hdr)
|
||||
"Insert a directory listing of DIR, Dired style.
|
||||
Use SWITCHES to make the listings.
|
||||
|
@ -1152,7 +1157,7 @@ see `dired-use-ls-dired' for more details.")
|
|||
(dired-align-file beg (point))))
|
||||
(insert-directory dir switches wildcard (not wildcard)))
|
||||
;; Quote certain characters, unless ls quoted them for us.
|
||||
(if (not (string-match "b" dired-actual-switches))
|
||||
(if (not (dired-switches-escape-p dired-actual-switches))
|
||||
(save-excursion
|
||||
(setq end (point-marker))
|
||||
(goto-char opoint)
|
||||
|
@ -2099,7 +2104,18 @@ Otherwise, an error occurs in these cases."
|
|||
;; with quotation marks in their names.
|
||||
(while (string-match "\\(?:[^\\]\\|\\`\\)\\(\"\\)" file)
|
||||
(setq file (replace-match "\\\"" nil t file 1)))
|
||||
|
||||
;; Unescape any spaces escaped by ls -b (bug#10469).
|
||||
;; Other -b quotes, eg \t, \n, work transparently.
|
||||
(if (dired-switches-escape-p dired-actual-switches)
|
||||
(let ((start 0)
|
||||
(rep "")
|
||||
(shift -1))
|
||||
(if (eq localp 'verbatim)
|
||||
(setq rep "\\\\"
|
||||
shift +1))
|
||||
(while (string-match "\\(\\\\\\) " file start)
|
||||
(setq file (replace-match rep nil t file 1)
|
||||
start (+ shift (match-end 0))))))
|
||||
(when (eq system-type 'windows-nt)
|
||||
(save-match-data
|
||||
(let ((start 0))
|
||||
|
@ -2107,6 +2123,7 @@ Otherwise, an error occurs in these cases."
|
|||
(aset file (match-beginning 0) ?/)
|
||||
(setq start (match-end 0))))))
|
||||
|
||||
;; Hence we don't need to worry about converting `\\' back to `\'.
|
||||
(setq file (read (concat "\"" file "\"")))
|
||||
;; The above `read' will return a unibyte string if FILE
|
||||
;; contains eight-bit-control/graphic characters.
|
||||
|
|
|
@ -1951,7 +1951,8 @@ The returned file name (created by appending some random characters at the end
|
|||
of PREFIX, and expanding against `temporary-file-directory' if necessary),
|
||||
is guaranteed to point to a newly created empty file.
|
||||
You can then use `write-region' to write new data into the file."
|
||||
(let (tempdir tempfile)
|
||||
(let ((orig-modes (default-file-modes))
|
||||
tempdir tempfile)
|
||||
(setq prefix (expand-file-name prefix
|
||||
(if (featurep 'xemacs)
|
||||
(temp-directory)
|
||||
|
@ -1959,6 +1960,7 @@ You can then use `write-region' to write new data into the file."
|
|||
(unwind-protect
|
||||
(let (file)
|
||||
;; First, create a temporary directory.
|
||||
(set-default-file-modes #o700)
|
||||
(while (condition-case ()
|
||||
(progn
|
||||
(setq tempdir (make-temp-name
|
||||
|
@ -1969,14 +1971,12 @@ You can then use `write-region' to write new data into the file."
|
|||
(make-directory tempdir))
|
||||
;; let's try again.
|
||||
(file-already-exists t)))
|
||||
(set-file-modes tempdir 448)
|
||||
;; Second, create a temporary file in the tempdir.
|
||||
;; There *is* a race condition between `make-temp-name'
|
||||
;; and `write-region', but we don't care it since we are
|
||||
;; in a private directory now.
|
||||
(setq tempfile (make-temp-name (concat tempdir "/EMU")))
|
||||
(write-region "" nil tempfile nil 'silent)
|
||||
(set-file-modes tempfile 384)
|
||||
;; Finally, make a hard-link from the tempfile.
|
||||
(while (condition-case ()
|
||||
(progn
|
||||
|
@ -1986,6 +1986,7 @@ You can then use `write-region' to write new data into the file."
|
|||
;; let's try again.
|
||||
(file-already-exists t)))
|
||||
file)
|
||||
(set-default-file-modes orig-modes)
|
||||
;; Cleanup the tempfile.
|
||||
(and tempfile
|
||||
(file-exists-p tempfile)
|
||||
|
|
|
@ -2251,7 +2251,7 @@ Table of contents is created from the tree structure of menus."
|
|||
(match-string-no-properties 1)))
|
||||
(section "Top")
|
||||
menu-items)
|
||||
(when (string-match "(" upnode) (setq upnode nil))
|
||||
(when (and upnode (string-match "(" upnode)) (setq upnode nil))
|
||||
(when (and (not (Info-index-node nodename file))
|
||||
(re-search-forward "^\\* Menu:" bound t))
|
||||
(forward-line 1)
|
||||
|
|
|
@ -512,6 +512,7 @@ detected as prompt when being sent on echoing hosts, therefore.")
|
|||
;; GNU/Linux (Debian, Suse): /bin:/usr/bin
|
||||
;; FreeBSD: /usr/bin:/bin:/usr/sbin:/sbin: - beware trailing ":"!
|
||||
;; IRIX64: /usr/bin
|
||||
;;;###tramp-autoload
|
||||
(defcustom tramp-remote-path
|
||||
'(tramp-default-remote-path "/bin" "/usr/bin" "/usr/sbin" "/usr/local/bin"
|
||||
"/local/bin" "/local/freeware/bin" "/local/gnu/bin"
|
||||
|
|
|
@ -910,7 +910,7 @@ opening the first frame (e.g. open a connection to an X server).")
|
|||
(setq no-blinking-cursor t)))
|
||||
;; If the cursorColor X resource exists, alter the `cursor' face
|
||||
;; spec, but mark it as changed outside of Customize.
|
||||
(let ((color (x-get-resource "cursorColor" "CursorColor")))
|
||||
(let ((color (x-get-resource "cursorColor" "Foreground")))
|
||||
(when color
|
||||
(put 'cursor 'theme-face
|
||||
`((changed ((t :background ,color)))))
|
||||
|
@ -929,7 +929,7 @@ opening the first frame (e.g. open a connection to an X server).")
|
|||
emacs-basic-display
|
||||
(and (memq window-system '(x w32 ns))
|
||||
(not (member (x-get-resource "cursorBlink" "CursorBlink")
|
||||
'("off" "false")))))
|
||||
'("no" "off" "false" "0")))))
|
||||
(setq no-blinking-cursor t))
|
||||
|
||||
;; Re-evaluate predefined variables whose initial value depends on
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2012-01-14 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* sed4.inp (PATH_DUMPLOADSEARCH): Edit to "../lisp", for when the
|
||||
default in src/epaths.in will change, maybe.
|
||||
|
||||
2011-10-31 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* sed3v2.inp (insrcdir): Comment out definition.
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
#
|
||||
# ----------------------------------------------------------------------
|
||||
/^#define *PATH_LOADSEARCH/s/".*"/rootrelativepath ("lisp")/
|
||||
/^#define *PATH_DUMPLOADSEARCH/s/".*"/"..\/lisp"/
|
||||
/^#define *PATH_DATA/s/".*"/rootrelativepath ("etc")/
|
||||
/^#define *PATH_DOC/s/".*"/rootrelativepath ("etc")/
|
||||
/^#define *PATH_INFO/s/".*"/rootrelativepath ("info")/
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2012-01-14 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* w32fns.c (signal_user_input): Don't do a QUIT, to avoid
|
||||
thrashing the stack of the thread. (Bug#9087)
|
||||
|
||||
2012-01-12 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
* xdisp.c (rows_from_pos_range): Add parens as per gcc -Wparentheses.
|
||||
|
|
|
@ -2479,6 +2479,10 @@ signal_user_input (void)
|
|||
if (!NILP (Vthrow_on_input))
|
||||
{
|
||||
Vquit_flag = Vthrow_on_input;
|
||||
/* Doing a QUIT from this thread is a bad idea, since this
|
||||
unwinds the stack of the Lisp thread, and the Windows runtime
|
||||
rightfully barfs. Disabled. */
|
||||
#if 0
|
||||
/* If we're inside a function that wants immediate quits,
|
||||
do it now. */
|
||||
if (immediate_quit && NILP (Vinhibit_quit))
|
||||
|
@ -2486,6 +2490,7 @@ signal_user_input (void)
|
|||
immediate_quit = 0;
|
||||
QUIT;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue