1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

Merge branch 'master' into feature/pgtk

This commit is contained in:
Yuuki Harano 2020-11-29 02:12:15 +09:00
commit d46a223d85
164 changed files with 2135 additions and 907 deletions

View file

@ -41,7 +41,7 @@ if [ "x$subdirs" = x ]; then
rm -f subdirs.el
else
rm -f subdirs.el~
echo ";; In load-path, after this directory should come
echo ";; In load-path, after this directory should come -*- lexical-binding: t -*-
;; certain of its subdirectories. Here we specify them.
(normal-top-level-add-to-load-path '($subdirs))
;; Local" "Variables:

View file

@ -362,7 +362,7 @@ through the possibilities.
that was yanked and replaces it with the text from an earlier kill.
So, to recover the text of the next-to-the-last kill, first use
@kbd{C-y} to yank the last kill, and then use @kbd{M-y} to replace it
with the previous kill. @kbd{M-y} is allowed only after a @kbd{C-y}
with the previous kill. This works only after a @kbd{C-y}
or another @kbd{M-y}.
You can understand @kbd{M-y} in terms of a last-yank pointer which
@ -394,6 +394,15 @@ pointer remains at the same place in the kill ring, so repeating
When you call @kbd{C-y} with a numeric argument, that also sets the
last-yank pointer to the entry that it yanks.
Alternatively, when the previous command was not a yank command,
@kbd{M-y} activates the minibuffer where you can browse previous kills
using the minibuffer history commands (@pxref{Minibuffer History}), or
you can use completion commands (@pxref{Completion}) on a list of
previously killed blocks of text from the kill ring. Exiting the
minibuffer will insert the selected text to the buffer. With a plain
prefix argument (@kbd{C-u M-y}), this command leaves the cursor in
front of the inserted text, and sets the mark at the end.
@node Appending Kills
@subsection Appending Kills

View file

@ -295,9 +295,12 @@ from point to the @var{n}th occurrence of the specified character.
appends the current kill to the search string. @kbd{M-y}
(@code{isearch-yank-pop}), if called after @kbd{C-y}, replaces that
appended text with an earlier kill, similar to the usual @kbd{M-y}
(@code{yank-pop}) command (@pxref{Yanking}). Clicking @kbd{mouse-2}
in the echo area appends the current X selection (@pxref{Primary
Selection}) to the search string (@code{isearch-yank-x-selection}).
(@code{yank-pop}) command. When @kbd{M-y} is called not after
@kbd{C-y}, then it activates the minibuffer where you can select
a previous kill to append to the search string (@pxref{Earlier
Kills}). Clicking @kbd{mouse-2} in the echo area appends the current
X selection (@pxref{Primary Selection}) to the search string
(@code{isearch-yank-x-selection}).
@kindex C-M-d @r{(Incremental search)}
@kindex C-M-y @r{(Incremental search)}

View file

@ -199,7 +199,7 @@ $ ls -l push*
@end example
@end deffn
@deffn Command byte-recompile-directory directory &optional flag force
@deffn Command byte-recompile-directory directory &optional flag force follow-symlinks
@cindex library compilation
This command recompiles every @samp{.el} file in @var{directory} (or
its subdirectories) that needs recompilation. A file needs
@ -218,6 +218,10 @@ Interactively, @code{byte-recompile-directory} prompts for
If @var{force} is non-@code{nil}, this command recompiles every
@samp{.el} file that has a @samp{.elc} file.
This command will normally not compile @samp{.el} files that are
symlinked. If the optional @var{follow-symlink} parameter is
non-@code{nil}, symlinked @samp{.el} will also be compiled.
The returned value is unpredictable.
@end deffn

View file

@ -3754,6 +3754,20 @@ Additional typographic style information for the font, such as
The charset registry and encoding of the font, such as
@samp{iso8859-1}. The value should be a string or a symbol.
@item :dpi
The resolution in dots per inch for which the font is designed. The
value must be a non-negative number.
@item :spacing
The spacing of the font: proportional, dual, mono, or charcell. The
value should be either an integer (0 for proportional, 90 for dual,
100 for mono, 110 for charcell) or a one-letter symbol (one of
@code{P}, @code{D}, @code{M}, or @code{C}).
@item :avgwidth
The average width of the font in 1/10 pixel units. The value should
be a non-negative number.
@item :script
The script that the font must support (a symbol).

View file

@ -877,8 +877,8 @@ If non-@code{nil}, Edebug binds @code{print-circle} to this value while
printing results. The default value is @code{t}.
@end defopt
See @xref{Output Functions} for further details about how printing
can be customized.
For further details about how printing can be customized, see
@pxref{Output Functions}.
@node Trace Buffer
@subsection Trace Buffer

View file

@ -676,8 +676,9 @@ If this variable is non-@code{nil}, its value is a form to evaluate
whenever the character @code{help-char} is read. If evaluating the form
produces a string, that string is displayed.
A command that calls @code{read-event}, @code{read-char-choice}, or
@code{read-char} probably should bind @code{help-form} to a
A command that calls @code{read-event}, @code{read-char-choice},
@code{read-char}, @code{read-char-from-minibuffer}, or
@code{y-or-n-p} probably should bind @code{help-form} to a
non-@code{nil} expression while it does input. (The time when you
should not do this is when @kbd{C-h} has some other meaning.)
Evaluating this expression should result in a string that explains

View file

@ -1798,6 +1798,13 @@ buffer. This function must accept one argument, a completion, and
should either return @code{nil} or a string to be displayed next to
the completion.
@item :affixation-function
The value should be a function to add prefixes and suffixes to
completions. This function must accept one argument, a list of
completions, and should return such a list of completions where
each element contains a list of three elements: a completion,
a prefix string, and a suffix string.
@item :exit-function
The value should be a function to run after performing completion.
The function should accept two arguments, @var{string} and
@ -1897,6 +1904,15 @@ function should take one argument, @var{string}, which is a possible
completion. It should return a string, which is displayed after the
completion @var{string} in the @file{*Completions*} buffer.
@item affixation-function
The value should be a function for adding prefixes and suffixes to
completions. The function should take one argument,
@var{completions}, which is a list of possible completions. It should
return such a list of @var{completions} where each element contains a list
of three elements: a completion, a prefix which is displayed before
the completion string in the @file{*Completions*} buffer, and
a suffix displayed after the completion string.
@item display-sort-function
The value should be a function for sorting completions. The function
should take one argument, a list of completion strings, and return a
@ -2109,6 +2125,11 @@ special responses @code{recenter}, @code{scroll-up},
@kbd{C-v}, @kbd{M-v}, @kbd{C-M-v} and @kbd{C-M-S-v} in
@code{query-replace-map}), this function performs the specified window
recentering or scrolling operation, and poses the question again.
If you bind @code{help-form} (@pxref{Help Functions}) to
a non-@code{nil} value while calling @code{y-or-n-p}, then pressing
@code{help-char} causes it to evaluate @code{help-form} and display
the result. @code{help-char} is automatically added to @var{prompt}.
@end defun
@defun y-or-n-p-with-timeout prompt seconds default
@ -2317,6 +2338,11 @@ character. Optionally, it ignores any input that is not a member of
@var{chars}, a list of accepted characters. The @var{history}
argument specifies the history list symbol to use; if it is omitted or
@code{nil}, this function doesn't use the history.
If you bind @code{help-form} (@pxref{Help Functions}) to
a non-@code{nil} value while calling @code{read-char-from-minibuffer},
then pressing @code{help-char} causes it to evaluate @code{help-form}
and display the result.
@end defun
@node Reading a Password

View file

@ -1077,12 +1077,19 @@ directories in a search path (as found in an environment variable). Its
value is @code{":"} for Unix and GNU systems, and @code{";"} for MS systems.
@end defvar
@defun path-separator
This function returns the connection-local value of variable
@code{path-separator}. That is @code{";"} for MS systems and a local
@code{default-directory}, and @code{":"} for Unix and GNU systems, or
a remote @code{default-directory}.
@end defun
@defun parse-colon-path path
This function takes a search path string such as the value of
the @env{PATH} environment variable, and splits it at the separators,
returning a list of directories. @code{nil} in this list means
the current directory. Although the function's name says
``colon'', it actually uses the value of @code{path-separator}.
``colon'', it actually uses the value of variable @code{path-separator}.
@example
(parse-colon-path ":/foo:/bar")
@ -1155,6 +1162,19 @@ in the system's terminal driver, before Emacs was started.
@c The value is @code{nil} if Emacs is running under a window system.
@end defvar
@defvar null-device
This variable holds the system null device. Its value is
@code{"/dev/null"} for Unix and GNU systems, and @code{"NUL"} for MS
systems.
@end defvar
@defun null-device
This function returns the connection-local value of variable
@code{null-device}. That is @code{"NUL"} for MS systems and a local
@code{default-directory}, and @code{"/dev/null"} for Unix and GNU
systems, or a remote @code{default-directory}.
@end defun
@node User Identification
@section User Identification
@cindex user identification

View file

@ -1484,8 +1484,8 @@ Corresponding string regexp: @samp{\_>}
@cindex @code{submatch} in rx
Match the @var{rx}s, making the matched text and position accessible
in the match data. The first group in a regexp is numbered 1;
subsequent groups will be numbered one higher than the previous
group.@*
subsequent groups will be numbered one above the previously
highest-numbered group in the pattern so far.@*
Corresponding string regexp: @samp{\(@dots{}\)}
@item (group-n @var{n} @var{rx}@dots{})

View file

@ -1100,7 +1100,7 @@ one, it rotates the kill ring to place the yanked string at the front.
This command replaces the just-yanked entry from the kill ring with a
different entry from the kill ring.
This is allowed only immediately after a @code{yank} or another
This works only immediately after a @code{yank} or another
@code{yank-pop}. At such a time, the region contains text that was just
inserted by yanking. @code{yank-pop} deletes that text and inserts in
its place a different piece of killed text. It does not add the deleted

View file

@ -735,7 +735,7 @@ context menu.
Classes can be marked for operations similar to the standard Emacs
commands @kbd{M-x tags-search} and @kbd{M-x tags-query-replace} (see
also @xref{Tags-like Functions}.)
also @pxref{Tags-like Functions}.)
@table @kbd
@cindex toggle mark

View file

@ -652,7 +652,7 @@ Eshell solves this problem by running such programs in Emacs's
terminal emulator.
Programs that need a terminal to display output properly are referred
to in this manual as ``visual commands,'' because they are not simply
to in this manual as ``visual commands'', because they are not simply
line-oriented. You must tell Eshell which commands are visual, by
adding them to @code{eshell-visual-commands}; for commands that are
visual for only certain @emph{sub}-commands -- e.g., @samp{git log} but

View file

@ -262,6 +262,12 @@ fetching images that originate from the same source as the
retrieving these images'' and @code{t} means ``always send cookies
when retrieving these images''.
@vindex eww-use-browse-url
When following links in EWW, @acronym{URL}s that match the
@code{eww-use-browse-url} regexp will be passed to @code{browse-url}
instead of EWW handling them itself. The action can be further
customized by altering @code{browse-url-handlers}.
@vindex eww-header-line-format
@cindex Header
The header line of the EWW buffer can be changed by customizing

View file

@ -5361,6 +5361,15 @@ articles with the same subject, go to the first unread article.
This variable is not particularly useful if you use a threaded display.
@item gnus-paging-select-next
@vindex gnus-paging-select-next
Control whether to select the next/previous article when paging (with
commands like @kbd{SPC} or @kbd{DEL}). If non-@code{nil}, select the
next article when reaching the end of the article (or the previous
article when paging backwards).
If @code{nil}, don't do anything at the end/start of the articles.
@item gnus-summary-check-current
@vindex gnus-summary-check-current
If non-@code{nil}, all the ``unread'' movement commands will not proceed
@ -29151,7 +29160,7 @@ again and again. @xref{MIME Commands}.
@item
The new hooks @code{gnus-gcc-pre-body-encode-hook} and
@code{gnus-gcc-post-body-encode-hook} are run before/after encoding
the message body of the Gcc copy of a sent message. See
the message body of the Gcc copy of a sent message.
@xref{Archived Messages}.
@end itemize

View file

@ -2180,7 +2180,7 @@ be recomputed. To force @value{tramp} to recompute afresh, call
Per default, @value{tramp} uses the command @command{/bin/sh} for
starting a shell on the remote host. This can be changed by setting
the connection property @t{"remote-shell"}, see @xref{Predefined
the connection property @t{"remote-shell"}; see @pxref{Predefined
connection information}. If you want, for example, use
@command{/usr/bin/zsh} on a remote host, you might apply

View file

@ -103,7 +103,7 @@ unsystematic behavior, which mixed these two is no longer available.
+++
** New system for displaying documentation for groups of functions.
This can either be used by saying 'M-x shortdoc-display-group' and
choosing a group, or clicking a button in the *Help* buffers when
choosing a group, or clicking a button in the "*Help*" buffers when
looking at the doc string of a function that belongs to one of these
groups.
@ -187,6 +187,11 @@ space characters.
freenode IRC network for years now. Occurrences of "irc.freenode.net"
have been replaced with "chat.freenode.net" throughout Emacs.
+++
** New functions 'null-device' and 'path-separator'.
These functions return the connection local value of the respective
variables. This can be used for remote hosts.
* Editing Changes in Emacs 28.1
@ -203,6 +208,13 @@ This command would previously not redefine values defined by these
forms, but this command has now been changed to work more like
'eval-defun', and reset the values as specified.
+++
** Standalone 'M-y' uses the minibuffer to complete previous kills.
When 'M-y' is typed not after a yank command, it activates the minibuffer
where you can browse previous kills using the minibuffer history or
completion. In Isearch 'C-s M-y' uses the minibuffer with completion
on previous kills to read a string and append it to the search string.
---
** New user options 'copy-region-blink-delay' and 'delete-pair-blink-delay'.
'copy-region-blink-delay' specifies a delay to indicate the region
@ -288,7 +300,7 @@ indentation is done using SMIE or with the old ad-hoc code.
When a warning is displayed to the user, the resulting buffer now has
buttons which allow making permanent changes to the treatment of that
warning. Automatic showing of the warning can be disabled (although
it is still logged to the *Messages* buffer), or the warning can be
it is still logged to the "*Messages*" buffer), or the warning can be
disabled entirely.
** mspool.el
@ -477,13 +489,19 @@ tags to be considered as well.
** Gnus
+++
*** New gnus-search library
*** New user option 'gnus-paging-select-next'.
This controls what happens when using commands like `SPC' and `DEL' to
page the current article. If non-nil (the default), go to the
next/prev article, but if nil, do nothing at the end/start of the article.
+++
*** New gnus-search library.
A new unified search syntax which can be used across multiple
supported search engines. Set 'gnus-search-use-parsed-queries' to
non-nil to enable.
+++
*** New value for user option 'smiley-style'
*** New value for user option 'smiley-style'.
Smileys can now be rendered with emojis instead of small images when
using the new 'emoji' value in 'smiley-style'.
@ -716,11 +734,11 @@ To revert to the previous behavior,
*** Most customize commands now hide obsolete user options.
Obsolete user options are no longer shown in the listings produced by
the commands `customize', `customize-group', `customize-apropos' and
`customize-changed-options'.
the commands 'customize', 'customize-group', 'customize-apropos' and
'customize-changed-options'.
To customize obsolete user options, use `customize-option' or
`customize-saved'.
To customize obsolete user options, use 'customize-option' or
'customize-saved'.
** Edebug
@ -886,7 +904,7 @@ Customize 'gdb-max-source-window-count' to use more than one window.
Control source file display by 'gdb-display-source-buffer-action'.
+++
*** The default value of gdb-mi-decode-strings is now t.
*** The default value of 'gdb-mi-decode-strings' is now t.
This means that the default coding-system is now used to decode strings
and source file names from GDB.
@ -1094,6 +1112,10 @@ background colors or transparency, such as xbm, pbm, svg, png and gif.
** EWW
+++
*** New user option 'eww-use-browse-url'.
This is a regexp that can be set to alter how links are followed in eww.
+++
*** New user option 'eww-retrieve-command'.
This can be used to download data via an external command. If nil
@ -1155,8 +1177,8 @@ project's root directory, respectively.
** xref
---
*** Prefix arg of 'xref-goto-xref' quits the *xref* buffer.
So typing 'C-u RET' in the *xref* buffer quits its window
*** Prefix arg of 'xref-goto-xref' quits the "*xref*" buffer.
So typing 'C-u RET' in the "*xref*" buffer quits its window
before navigating to the selected location.
** json.el
@ -1319,6 +1341,13 @@ This new command (bound to 'C-c C-l') regenerates the current hunk.
** Miscellaneous
*** New user option 'completions-detailed'.
When non-nil, some commands like 'describe-symbol' show more detailed
completions with more information in completion prefix and suffix.
---
*** User option 'completions-format' supports a new value 'one-column'.
---
*** New user option 'bibtex-unify-case-convert'.
This new option allows the user to customize how case is converted
@ -1339,7 +1368,7 @@ buffers. This can be controlled by customizing the variable
---
*** New user option 'compilation-search-all-directories'.
When doing parallel builds, directories and compilation errors may
arrive in the *compilation* buffer out-of-order. If this variable is
arrive in the "*compilation*" buffer out-of-order. If this variable is
non-nil (the default), Emacs will now search backwards in the buffer
for any directory the file with errors may be in. If nil, this won't
be done (and this restores how this previously worked).
@ -1494,6 +1523,18 @@ mouse now pops up a TTY menu by default instead of running the command
'tmm-menubar'. To restore the old behavior, set the user option
'tty-menu-open-use-tmm' to non-nil.
** text-scale-mode
---
*** text-scale-mode can now adjust font size of the header line.
When the new buffer local variable 'text-scale-remap-header-line'
is non-nil, 'text-scale-adjust' will also scale the text in the header
line when displaying that buffer.
This is useful for major modes that arrange their display in a tabular
form below the header line. It is enabled by default in
'tabulated-list-mode' and its derived modes.
** xwidget-webkit mode
*** New xwidget commands.
@ -1670,6 +1711,7 @@ parameter.
'previous-system-time-locale' have been removed, as they were created
by mistake and were not useful to Lisp code.
---
** The 'load-dangerous-libraries' variable is now obsolete.
It was used to allow loading Lisp libraries compiled by XEmacs, a
modified version of Emacs which is no longer actively maintained.
@ -1684,6 +1726,7 @@ Use macro 'with-current-buffer-window' with action alist entry 'body-function'.
To load the file after byte-compiling, add a call to 'load' from Lisp
or use 'M-x emacs-lisp-byte-compile-and-load' interactively.
---
** The metamail.el library is now marked obsolete.
---
@ -1768,6 +1811,23 @@ ledit.el, lmenu.el, lucid.el and old-whitespace.el.
* Lisp Changes in Emacs 28.1
---
** `defvar` detects the error of defining a variable currently lexically bound.
Such mixes are always signs that the outer lexical binding was an
error and should have used dynamic binding instead.
+++
** New completion function 'affixation-function' to add prefix/suffix.
It accepts a list of completions and should return a list where
each element is a list with three elements: a completion,
a prefix string, and a suffix string.
+++
** 'read-char-from-minibuffer' and 'y-or-n-p' support 'help-form'.
If you bind 'help-form' to a non-nil value while calling these functions,
then pressing 'C-h' (help-char) causes the function to evaluate 'help-form'
and display the result.
+++
** 'set-window-configuration' now takes an optional 'dont-set-frame'
parameter which, when non-nil, instructs the function not to select
@ -1957,6 +2017,10 @@ to lexical binding, where dynamic (special) variables bound in one
file can affect code in another. For details, see the manual section
"(Elisp) Converting to Lexical Binding".
+++
** 'byte-recompile-directory' can now compile symlinked .el files.
This is achieved by giving a non-nil FOLLOW-SYMLINKS parameter.
---
** 'unload-feature' now also tries to undo additions to buffer-local hooks.
@ -2016,7 +2080,7 @@ image API via 'M-x report-emacs-bug'.
--
** On macOS, 's-<left>' and 's-<right>' are now bound to
'move-beginning-of-line' and 'move-end-of-line' respectively. The commands
'move-beginning-of-line' and 'move-end-of-line' respectively. The commands
to select previous/next frame are still bound to 's-~' and 's-`'.

View file

@ -48,7 +48,7 @@ skip leading or trailing empty lines of the buffer.
** Tramp
*** The user option 'tramp-completion-reread-directory-timeout' is made obsolete.
*** The user option 'tramp-completion-reread-directory-timeout' is now obsolete.
* New Modes and Packages in Emacs 27.2
@ -62,6 +62,13 @@ skip leading or trailing empty lines of the buffer.
* Changes in Emacs 27.2 on Non-Free Operating Systems
** Emacs now ignores modifier keys when IME input is used.
By default, pressing Ctrl, Shift, and Alt keys while using IME input
will no longer apply the modifiers to the produced characters, as
there are IMEs which use keys with modifiers to input some
characters. Customize the variable 'w32-ignore-modifiers-on-IME-input'
to nil to get back the old behavior.
* Installation Changes in Emacs 27.1

View file

@ -1,13 +1,13 @@
Emacs tutorial. See end for copying conditions.
Emacs commands generally involve the CONTROL key (sometimes labeled
CTRL or CTL) or the META key (sometimes labeled EDIT or ALT). Rather than
write that in full each time, we'll use the following abbreviations:
Emacs commands generally involve the CONTROL key (often labeled CTRL)
or the META key (usually labeled ALT). Rather than writing that
in full each time, we'll use the following abbreviations:
C-<chr> means hold the CONTROL key while typing the character <chr>
Thus, C-f would be: hold the CONTROL key and type f.
M-<chr> means hold the META or EDIT or ALT key down while typing <chr>.
If there is no META, EDIT or ALT key, instead press and release the
M-<chr> means hold the META or ALT key down while typing <chr>.
If there is no META or ALT key, instead press and release the
ESC key and then type <chr>. We write <ESC> for the ESC key.
Important note: to end the Emacs session, type C-x C-c. (Two characters.)
@ -33,7 +33,7 @@ that is called "editing" and that's what Emacs is for.
The first thing that you need to know is how to move around from place
to place in the text. You already know how to move forward one screen,
with C-v. To move backwards one screen, type M-v (hold down the META key
and type v, or type <ESC>v if you do not have a META, EDIT, or ALT key).
and type v, or type <ESC>v if you do not have a META or ALT key).
>> Try typing M-v and then C-v, a few times.
@ -196,7 +196,7 @@ easily learn to use other advanced cursor motion commands as well.
Most Emacs commands accept a numeric argument; for most commands, this
serves as a repeat-count. The way you give a command a repeat count
is by typing C-u and then the digits before you type the command. If
you have a META (or EDIT or ALT) key, there is another, alternative way
you have a META (or ALT) key, there is another, alternative way
to enter a numeric argument: type the digits while holding down the
META key. We recommend learning the C-u method because it works on
any terminal. The numeric argument is also called a "prefix argument",
@ -676,7 +676,7 @@ another in the buffer. When you type M-x, Emacs prompts you at the
bottom of the screen with M-x and you should type the name of the
command; in this case, "replace-string". Just type "repl s<TAB>" and
Emacs will complete the name. (<TAB> is the Tab key, usually found
above the CapsLock or Shift key near the left edge of the keyboard.)
above the Caps Lock or Shift key near the left edge of the keyboard.)
Submit the command name with <Return>.
The replace-string command requires two arguments--the string to be
@ -1024,7 +1024,7 @@ very brief documentation--sufficient to remind you of commands you
have already learned.
Multi-character commands such as C-x C-s and <ESC>v (instead of M-v,
if you have no META or EDIT or ALT key) are also allowed after C-h c.
if you have no META or ALT key) are also allowed after C-h c.
To get more information about a command, use C-h k instead of C-h c.

View file

@ -1,8 +1,8 @@
Einführung in Emacs. Siehe Dateiende für Vervielfältigungsbedingungen.
Emacs-Befehle beinhalten im allgemeinen die CONTROL-Taste (manchmal
auch als CTRL, CTL oder STRG beschriftet) sowie die META-Taste (auch
EDIT oder ALT genannt). Folgende Abkürzungen werden verwendet:
auch als CTRL oder STRG beschriftet) sowie die META-Taste (oft
ALT genannt). Folgende Abkürzungen werden verwendet:
C-<Zeichen> bedeutet, dass die CONTROL-Taste gedrückt sein muss,
während man das Zeichen <Zeichen> eingibt. Beispiel:
@ -264,7 +264,7 @@ Die meisten Emacs-Befehle akzeptieren ein numerisches Argument, das in
der Regel als Wiederholungszähler dient (d.h., wie oft der Befehl
ausgeführt werden soll). Eingegeben wird diese Zahl mit C-u, dann die
Ziffern und dann der Befehl selbst. Alternativ können Sie die
META-Taste (bzw. EDIT- oder ALT-Taste) gedrückt halten und dann die
META-Taste (oder ALT-Taste) gedrückt halten und dann die
Ziffern des Wiederholungszählers eingeben. Wir empfehlen allerdings,
die C-u-Methode zu lernen, da sie mit jedem Terminal funktioniert.
Das numerische Argument wird auch »Präfix-Argument« genannt, da man es

View file

@ -2,16 +2,16 @@ Tutorial de Emacs. Vea al final las condiciones de copiado.
Generalmente los comandos de Emacs involucran la tecla CONTROL
(algunas veces llamada CTRL O CTL) o la tecla meta (algunas veces
llamada EDIT o ALT). En lugar de escribir completamente esto en cada
llamada ALT). En lugar de escribir completamente esto en cada
ocasión, usaremos las siguientes abreviaturas.
C-<car> significa mantener presionada la tecla CONTROL mientras
teclea el carácter <car>. Por lo tanto C-f será: Mantenga
presionada la tecla CONTROL y teclee f.
M-<car> significa mantener presionada la tecla META o EDIT o ALT
mientras teclea <car>. Si no hay teclas META, EDIT o ALT, en
su lugar presione y libere la tecla ESC y luego teclee
<car>. Escribimos <ESC> para referirnos a la tecla ESC.
M-<car> significa mantener presionada la tecla META o ALT mientras
teclea <car>. Si no hay teclas META o ALT, en su lugar
presione y libere la tecla ESC y luego teclee <car>.
Escribimos <ESC> para referirnos a la tecla ESC.
Nota importante: para terminar la sesión de Emacs teclee C-x C-c (dos
caracteres). Para cancelar un comando parcialmente introducido,
@ -32,7 +32,7 @@ texto.
Lo primero que necesita saber es cómo moverse de un lugar a otro en el
texto. Ya sabe cómo avanzar una pantalla, con C-v. Para retroceder
una pantalla teclee M-v (mantenga oprimida la tecla META y teclee v, o
teclee <ESC>v si no tiene las teclas META, EDIT o ALT).
teclee <ESC>v si no tiene las teclas META o ALT).
>> Intente teclear M-v y luego C-v, varias veces.
@ -203,12 +203,12 @@ La mayoría de comandos de Emacs aceptan un argumento numérico; para la
mayoría de comandos esto sirve como un factor de repetición. La
manera de pasarle un factor de repetición a un comando es tecleando
C-u y luego los dígitos antes de introducir los comandos. Si tiene
una tecla META (o EDIT o ALT), hay una manera alternativa para
ingresar un argumento numérico: teclear los dígitos mientras presiona
la tecla META. Recomendamos aprender el método C-u porque éste
funciona en cualquier terminal. El argumento numérico es también
llamado un «argumento prefijo», porque usted teclea el argumento antes
del comando al que se aplica.
una tecla META (o ALT), hay una manera alternativa para ingresar un
argumento numérico: teclear los dígitos mientras presiona la tecla
META. Recomendamos aprender el método C-u porque éste funciona en
cualquier terminal. El argumento numérico es también llamado un
«argumento prefijo», porque usted teclea el argumento antes del
comando al que se aplica.
Por ejemplo, C-u 8 C-f mueve hacia adelante ocho caracteres.
@ -1075,8 +1075,8 @@ como una breve documentación: suficiente para recordarle los comandos
que ha aprendido.
Los comandos de múltiples caracteres tales como C-x C-s y (si no tiene
las teclas META o EDIT o ALT) <ESC>v también están permitidos después
de C-h c.
las teclas META o ALT) <ESC>v también están permitidos después de
C-h c.
Para conseguir más información sobre un comando use C-h k en vez de
C-h c.

View file

@ -1,13 +1,13 @@
Didacticiel d'Emacs. Voir la fin de ce document pour les conditions.
Les commandes Emacs utilisent généralement la touche CONTROLE (souvent
désignée par CTRL ou CTL) ou la touche META (souvent désignée par EDIT
ou ALT). Pour ces touches, nous utiliserons les abréviations suivantes :
désignée par CTRL) ou la touche META (plus souvent désignée par ALT).
Pour ces touches, nous utiliserons les abréviations suivantes :
C-<car> signifie qu'il faut maintenir la touche CONTROLE appuyée tout
en tapant le caractère <car>. Ainsi, C-f signifie : presser
sur la touche CONTROLE tout en pressant la touche f.
M-<car> signifie qu'il faut maintenir la touche META ou EDIT ou ALT
M-<car> signifie qu'il faut maintenir la touche META ou ALT
appuyée tout en tapant le caractère <car>. Si aucune de ces
touches n'existe, pressez puis relâchez la touche ESC et
tapez <car>. Nous écrirons <ESC> pour désigner la touche ESC.
@ -31,7 +31,7 @@ La première chose que vous devez savoir est comment vous déplacer à
travers le texte. Vous savez déjà comment avancer d'un écran avec
C-v. Pour revenir un écran en arrière, tapez M-v (pressez la touche
META tout en appuyant sur v ou faites <ESC>v si vous n'avez pas de
touche META, EDIT ou ALT).
touche META ou ALT).
>> Faites M-v, puis C-v plusieurs fois.
@ -208,7 +208,7 @@ La plupart des commandes Emacs acceptent un paramètre numérique qui,
la plupart du temps, indique un nombre de répétitions. Pour indiquer à
une commande le nombre de fois que l'on souhaite la répéter, on
utilise C-u suivi du nombre avant de taper la commande. Si vous avez
une touche META (ou EDIT ou ALT), il existe une autre façon d'entrer
une touche META (ou ALT), il existe une autre façon d'entrer
un paramètre numérique : tapez le nombre tout en pressant la touche
META. Nous vous conseillons d'apprendre à utiliser la méthode C-u car
elle fonctionne sur tous les types de terminaux. Le paramètre
@ -1101,7 +1101,7 @@ suffisant pour vous rappeler les commandes que vous avez déjà
apprises.
Les commandes multi-caractères, comme C-x C-s et (si vous n'avez ni
touche META, ni touche EDIT, ni touche ALT) <ESC>v sont également
touche META, ni touche ALT) <ESC>v sont également
possibles après C-h c.
Pour obtenir plus d'informations sur une commande, faites C-h k au

View file

@ -1,13 +1,13 @@
שיעור ראשון בשימוש ב־Emacs. זכויות שימוש ראה בסוף המסמך.
פקודות רבות של Emacs משתמשות במקש CONTROL (לפעמים הוא מסומן ב־CTRL או CTL)
או במקש META (לפעמים מסומן EDIT או ALT). במקום לציין את כל השמות האפשריים
פקודות רבות של Emacs משתמשות במקש CONTROL (בדרך־כלל מסומן ב־CTRL)
או במקש META (בדרך־כלל מסומן ALT). במקום לציין את כל השמות האפשריים
בכל פעם, נשתמש בקיצורים הבאים:
<תו>-C משמעותו לחץ והחזק מקש CONTROL ואז הקש על מקש <תו>.
לדוגמא, C-f משמעותו: לחץ והחזק CONTROL והקש על f.
<תו>-M משמעותו לחץ והחזק מקש META או EDIT או ALT ואז הקש על מקש <תו>.
אם במקלדת אין אף אחד ממקשי META או EDIT או ALT, אפשר להקיש
<תו>-M משמעותו לחץ והחזק מקש META או ALT ואז הקש על מקש <תו>.
אם במקלדת אין אף אחד ממקשי META או ALT, אפשר להקיש
ולשחרר מקש ESC ואז להקיש <תו>. אנו נכתוב <ESC> עבור מקש ESC.
הערה חשובה: כדי לצאת מ־Emacs יש להקיש C-x C-c (שני תוים, משמאל לימין).
@ -32,7 +32,7 @@ Emacs.
דבר ראשון שעליכם ללמוד הוא כיצד לנוע ממקום אחד למשנהו בתוך הטקסט. אתם
כבר יודעים כיצד להתקדם לעמוד הבא, עם C-v. לחזרה לעמוד הקודם הקישו M-v
(החזיקו מקש META והקישו v או הקישו <ESC>v אם אין במקלדת מקש META
או EDIT או ALT).
או ALT).
>> נסו עתה כמה פעמים להקיש M-v ואחר־כך C-v.
@ -181,7 +181,7 @@ M-f עובר את המילה הבאה ונעצר בסופה. M-b פועל באו
רוב הפקודות של Emacs מקבלות ארגומנט נומרי; עבור רוב הפקודות הארגומנט
משמש כמונה של מספר החזרות על הפקודה. כדי לספק ארגומנט לפקודה, יש להקיש
C-u ואחר־כך ספרות, וזאת לפני שמקישים את הפקודה עצמה. עם במקלדת קיים
מקש META (או EDIT או ALT), יש גם אפשרות אחרת לציין ארגומנט נומרי:
מקש META (או ALT), יש גם אפשרות אחרת לציין ארגומנט נומרי:
הקישו את הספרות תוך כדי החזקת מקש META. אנו ממליצים על C-u משום שהוא
יעבוד עם כל מקלדת. הארגומנט הנומרי נקרא גם "ארגומנט קידומת" (prefix
argument) משום מקישים אותו לפני הפקודה אליה הוא מתייחס.
@ -605,7 +605,7 @@ replace-string (החלף מחרוזת) אשר מחליפה מחרוזת אחת
אחרי שתקישו M-x, Emacs מציג M-x בתחתית התצוגה ומחכה שתקישו את שם
הפקודה, במקרה זה "replace-string". מספיק שתקישו "repl s<TAB>" ו־Emacs
ישלים את השם המלא. (<TAB> הוא מקש Tab, בדרך כלל תמצאו אותו מעל מקש
ה־CapsLock או Shift, ליד הקצה השמאלי של המקלדת.) סיימו את הזנת הפקודה
ה־Caps Lock או Shift, ליד הקצה השמאלי של המקלדת.) סיימו את הזנת הפקודה
ע״י הקשת <Return>.
הפקודה להחלפת מחרוזת זקוקה לשני ארגומנטים -- המחרוזת שתוחלף וזו שתחליף
@ -919,8 +919,7 @@ M-x help <Return> כתחליף.)
לכם את הפקודות שלמדתם בעבר.
ניתן לציין אחרי C-h c גם פקודות שמופעלות ע״י סדרת מקשים באורך גדול
מאחד, כגון C-x C-s או <ESC> v (כתחליף ל־M-v, אם אין מקש META או EDIT
או ALT).
מאחד, כגון C-x C-s או <ESC> v (כתחליף ל־M-v, אם אין מקש META או ALT).
לקבלת מידע מפורט יותר על פקודה, השתמשו בפקודה C-h k במקום C-h c.

View file

@ -1,18 +1,18 @@
Esercitazione di Emacs. Condizioni d'uso alla fine del file.
I comandi di Emacs comportano generalmente l'uso del tasto CONTROL (a
volte indicato con CTRL o CTL) o del tasto META (a volte indicato con
EDIT o ALT). Piuttosto che indicarli per esteso ogni volta, useremo
I comandi di Emacs comportano generalmente l'uso del tasto CONTROL
(spesso indicato con CTRL) o del tasto META (di solito indicato con
ALT). Piuttosto che indicarli per esteso ogni volta, useremo
le seguenti abbreviazioni:
C-<car> significa che bisogna tenere abbassato il tasto CONTROL
mentre si preme il carattere <car>. Quindi C-f significa:
tieni premuto CONTROL e batti f.
M-<car> significa che bisogna tenere abbassato il tasto META o EDIT
o ALT mentre si preme il carattere <car>. Se non ci sono
tasti META, EDIT o ALT, al loro posto si può premere e poi
rilasciare il tasto ESC e quindi premere <car>. Useremo
<ESC> per indicare il tasto ESC.
M-<car> significa che bisogna tenere abbassato il tasto META o ALT
mentre si preme il carattere <car>. Se non ci sono tasti
META o ALT, al loro posto si può premere e poi rilasciare
il tasto ESC e quindi premere <car>. Useremo <ESC> per
indicare il tasto ESC.
Nota importante: per chiudere una sessione di lavoro di Emacs usa C-x
C-c (due caratteri).
@ -20,7 +20,7 @@ Per annullare un comando inserito parzialmente usa C-g.
Per terminare l'esercitazione, usa C-x k quindi <Invio> al prompt.
I caratteri “>>” posti al margine sinistro indicano le direttive per
provare a usare un comando. Per esempio:
<<Blank lines inserted here by startup of help-with-tutorial>>
<<Blank lines inserted around following line by help-with-tutorial>>
[Spaziatura inserita a scopo didattico. Il testo continua sotto]
>> Adesso premi C-v (vedi schermata successiva) per spostarti alla
prossima schermata (vai avanti, tieni premuto il tasto
@ -33,11 +33,12 @@ alla schermata successiva, favorendo così la continuità di lettura.
La prima cosa che bisogna imparare è come raggiungere un certo punto
del testo. Sai già come andare avanti di una schermata, con C-v. Per
andare indietro di una schermata, premi M-v (tieni premuto il tasto
META e poi premi v, oppure usa <ESC>v se non c'è un tasto META, EDIT o
ALT).
META e poi premi v, oppure usa <ESC>v se non c'è un tasto META o ALT).
>> Ora prova: premi M-v e quindi C-v alcune volte.
Puoi ovviamente spostarti avanti e indietro in questo testo in altri
modi, se li conosci.
* SOMMARIO
----------
@ -207,11 +208,11 @@ Molti comandi di Emacs accettano un argomento numerico che spesso
serve a conteggiare per quante volte vanno ripetuti. Il modo in cui
si può fornire ad un comando il numero di ripetizioni è il seguente:
si usa C-u e quindi si indicano le cifre prima di impartire il comando
stesso. Se esiste un tasto META (o EDIT o ALT) c'è un modo
alternativo: si battono le cifre tenendo premuto il tasto META. Noi
consigliamo di imparare il metodo con C-u perché funziona su tutti i
terminali. L'argomento numerico è anche chiamato “argomento
prefisso”, perché viene indicato prima del comando a cui si riferisce.
stesso. Se esiste un tasto META (o ALT) c'è un modo alternativo: si
battono le cifre tenendo premuto il tasto META. Noi consigliamo di
imparare il metodo con C-u perché funziona su tutti i terminali.
L'argomento numerico è anche chiamato “argomento prefisso”, perché
viene indicato prima del comando a cui si riferisce.
Per esempio, C-u 8 C-f sposta il cursore in avanti di otto caratteri.
@ -502,9 +503,10 @@ usare per annullare l'inserimento del testo).
>> Elimina questa riga con C-k poi usa C-/ e dovrebbe ricomparire.
C-_ è un comando di annullamento alternativo, funziona esattamente
come C-/. Su alcuni terminali, la sequenza C-/ invia effettivamente
C-_ a Emacs. Alternativamente, anche C-x u ha la stessa funzione di
C-/, ma è leggermente più scomoda da inserire.
come C-/. Su alcune tastiere non è necessario usare il tasto shift
per inserire C-_. Su alcuni terminali, la sequenza C-/ invia
effettivamente C-_ a Emacs. Alternativamente, anche C-x u ha la
stessa funzione di C-/, ma è leggermente più scomoda da inserire.
Un argomento numerico per C-/, C-_ o C-x u agisce come numero delle
ripetizioni da effettuare.
@ -651,11 +653,12 @@ la possibilità di salvare il buffer del primo file: sarebbe fastidioso
dover prima passare a quel buffer per salvarlo con C-x C-s. Così c'è
il comando
C-x s Salva alcuni buffer
C-x s Salva alcuni buffer nei loro file
C-x s chiede conferma del salvataggio per ogni buffer che contiene
testo modificato e non ancora salvato. Chiede, per ognuno di quei
buffer, se si voglia salvarne il contenuto nel file corrispondente.
C-x s chiede conferma del salvataggio per ogni buffer associato ad un
file che contiene testo modificato e non ancora salvato. Chiede, per
ognuno di quei buffer, se si voglia salvarne il contenuto nel file
corrispondente.
>> Inserisci una riga di testo e poi premi C-x s.
Dovrebbe chiederti se vuoi salvare il file chiamato “...TUTORIAL”.
@ -701,14 +704,14 @@ gestisce la posta.
Ci sono molti comandi C-x. Ecco una lista di quelli già conosciuti:
C-x C-f Apri un file.
C-x C-s Salva un file.
C-x s Salva alcuni buffer.
C-x C-b Elenca buffer.
C-x b Passa a un altro buffer.
C-x C-c Chiudi Emacs.
C-x 1 Elimina tutte le finestre tranne una.
C-x u Annulla.
C-x C-f Apri un file
C-x C-s Salva il buffer sul file
C-x s Salva alcuni buffer sui loro file
C-x C-b Elenca buffer
C-x b Passa a un altro buffer
C-x C-c Chiudi Emacs
C-x 1 Elimina tutte le finestre tranne una
C-x u Annulla
I comandi estesi con nome sono usati ancora meno spesso, oppure sono
usati solo in certe modalità. Un esempio è il comando replace-string
@ -749,7 +752,7 @@ salvataggio automatico.
Se il computer si blocca si può recuperare il file salvato
automaticamente aprendo il file in modo normale (il file che si stava
scrivendo, non quello di salvataggio automatico) e usando poi M-x
recover-file<Invio>. Quando viene chiesta la conferma si risponda
recover-this-file<Invio>. Quando viene chiesta la conferma si risponda
con yes<Invio> per procedere con il recupero dei dati salvati
automaticamente.
@ -1091,8 +1094,8 @@ quindi anche come breve descrizione, sufficiente per ricordarsi di
comandi già imparati.
I comandi con più caratteri come ad esempio C-x C-s e (se non c'è il
tasto META o EDIT o ALT) <ESC>v sono permessi allo stesso modo dopo
una richiesta di aiuto fatta con C-h c.
tasto META o ALT) <ESC>v sono permessi allo stesso modo dopo una
richiesta di aiuto fatta con C-h c.
Per avere ulteriori informazioni su un comando si usa C-h k invece che
C-h c.
@ -1156,7 +1159,7 @@ Puoi imparare di più su Emacs leggendo il suo manuale, sia nella forma
stampata piuttosto che da dentro Emacs stesso (usa il menu Help oppure
C-h r). Due funzionalità che possono farti comodo sono il
completamento automatico, che consente di ridurre il numero di
caratteri da digitare, e dired, che semplifica la gestione dei file.
caratteri da digitare, e Dired, che semplifica la gestione dei file.
Il completamento è un modo per evitare la pressione di tasti quando
non sia necessario. Ad esempio, quando vuoi passare al buffer

View file

@ -1,14 +1,16 @@
Emacs användarhandledning. I slutet finns kopieringsvillkoren.
Emacs-kommandon innebär ofta användning av kontrolltangenten (vanligen
märkt CTRL eller CTL) eller META-tangenten ( vissa tangentbord märkt
ALT eller EDIT). Vi använder här följande förkortningar:
Emacs-kommandon använder ofta kontrolltangenten (ofta märkt CONTROL
eller CTRL) eller META-tangenten (vanligen märkt ALT).
Istället för att skriva ut deras namn varje gång använder vi följande
förkortningar:
C-<chr> håll ner kontrolltangenten samtidigt som du skriver bokstaven
<chr>. C-f betyder: håll ner kontrolltangenten och tryck f.
M-<chr> håll ner META-tangenten samtidigt som du skriver <chr>. Om
META-tangent saknas trycker du <ESC>, ESC-tangenten, släpper
den och trycker sedan <chr>.
C-<tkn> håll ner kontrolltangenten samtidigt som du skriver tecknet
<tkn>. C-f betyder: håll ner kontrolltangenten och tryck f.
M-<tkn> håll ner META- eller ALT-tangenten samtidigt som du skriver
<tkn>. Om det inte finns någon META- eller ALT-tangent
trycker du ESC-tangenten, släpper den och trycker sedan
<tkn>. När vi skriver <ESC> menar vi ESC-tangenten (eller Escape).
Viktigt: För att avsluta Emacs trycker du C-x C-c (två tecken).
För att avsluta kommandon som inte skrivits in fullt, tryck C-g.
@ -18,28 +20,28 @@ Tecknen ">>" i vänstermarginalen anger att du kan prova ett
kommando. Till exempel:
<<Tomma rader sätts in runt nästa rad när help-with-tutorial aktiveras>>
[Tomma rader av pedagogiska skäl. Texten fortsätter nedanför.]
>> Tryck C-v (View next screen) för att rulla nedåt i handledningen.
>> Tryck C-v för att rulla nedåt i handledningen.
Prova nu. Håll ned kontrolltangenten och tryck v. Gör i
fortsättningen när du når slutet av en skärmbild.
Notera att det är ett överlapp två rader när du rullar en hel sida.
Detta är för att behålla sammanhanget när du bläddrar framåt i texten.
Observera att det är ett överlapp två rader när du rullar en hel sida.
Detta sker för att behålla sammanhanget när du bläddrar framåt i texten.
Det här är en kopia av Emacs användarhandledning, som anpassats något
för dig. Längre fram kommer vi att instruera dig att prova olika
kommandon som ändrar i texten. Var inte orolig om du ändrar texten
innan vi säger till dig att göra det. Det kallas för att redigera och
det är det som Emacs är till för.
Det här är ett exemplar av Emacs användarhandledning som har anpassats
något för dig. Längre fram kommer vi att be dig att prova olika kommandon
som ändrar i texten. Var inte orolig om du ändrar texten innan vi säger
till dig att göra det. Det kallas för att redigera och det är det som
Emacs är till för.
Det första du behöver veta är hur du manövrerar från plats till plats
i texten. Du har redan lärt dig hur du flyttar en skärmbild framåt,
med C-v. För att flytta dig en skärmbild bakåt trycker du M-v. (Håll
ned META-tangenten och tryck v eller tryck <ESC>v om du inte har
META-, EDIT- eller ALT-tangent.)
en META- eller ALT-tangent.)
>> Prova att trycka M-v och C-v några gånger.
Det är OK att rulla texten andra sätt om du vet hur.
Det går bra att rulla texten andra sätt som du kanske känner till.
* SAMMANFATTNING
----------------
@ -53,12 +55,12 @@ Följande kommandon är bra för att se hela skärmbilder:
KONTROLL-1.)
>> Leta reda markören och se vad som står där. Tryck sedan C-l.
Hitta markören igen och notera att det är samma text som står kring
markören nu, men nu mitt skärmen. Om du trycker C-l igen
Hitta markören igen och observera att det är samma text som står
kring markören nu, men nu mitt skärmen. Om du trycker C-l igen
flyttas texten högst upp skärmen. Tryck C-l igen och den flyttas
ner till botten.
Du kan också använda PageUp och PageDn tangenterna, om din terminal
Du kan också använda tangenterna PageUp och PageDn, om din terminal
har dem, för att flytta en hel skärmbild åt gången, men du redigerar
effektivare om du använder C-v och M-v.
@ -86,10 +88,10 @@ fyra piltangenterna. Så här:
och C-p. Använd sedan C-l för att centrera diagrammet
skärmbilden.
Detta är enklare att komma ihåg om du tänker dessa förkortningar: P
för föregående (previous), N för nästa (next), B för bakåt (backward)
och F för framåt (forward). Du kommer att använda dessa grundläggande
kommandona hela tiden.
Kommandona är enklare att komma ihåg om man tänker vad de står för:
P för föregående (eng. "previous"), N för nästa, B för bakåt
och F för framåt.
Du kommer att använda dessa grundläggande kommandon hela tiden.
>> Gör några C-n att du kommer ned till den här raden.
@ -102,8 +104,8 @@ avslutas också vanligtvis med ett radslut men Emacs kräver inte att
den gör det.
>> Prova med C-b i början av en rad. Detta gör att markören
flyttas till slutet av den tidigare raden. Detta är för att den
flyttar markören över radslutstecknet.
flyttas till slutet av den tidigare raden. Detta beror att
markören flyttas över radslutstecknet.
C-f flyttar också över radslut, precis som C-b.
@ -138,12 +140,13 @@ motsatt riktning.
Lägg märke till likheten mellan C-f och C-b å ena sidan och M-f och
M-b å den andra. Ofta används META-kommandon till språkrelaterade
operationer (ord, stycken, avsnitt), medan kontrollkommandon används
till grundläggande operationer som inte beror av vad man redigerar
till grundläggande operationer som inte beror vad man redigerar
(bokstäver, rader, etc.).
Denna likhet finns också mellan rader och stycken: C-a och C-e flyttar
markören till början av en rad eller till slutet av en rad, medan M-a
och M-e flyttar den till början respektive slutet av ett stycke.
markören till början och till slutet av en rad, medan M-a och M-e
flyttar den till början respektive slutet av ett stycke.
(Minnesregel: A och E för (tyska) Anfang och Ende.)
>> Prova några C-a och sedan några C-e.
Prova också några M-a och sedan några M-e.
@ -153,8 +156,8 @@ M-a fortsätter att flytta markören till nästa stycke. Även om detta
inte verkar självklart är det ganska naturligt.
Platsen där markören är i texten kallas också för "arbetspunkt"
(point). Eller omskrivet: Markören visar skärmen var arbetspunkten
är i texten.
(point). Eller med andra ord: markören visar skärmen var
arbetspunkten är i texten.
Här är en kort sammanfattning av de enklaste markörförflyttnings-
kommandona, inklusive ord- och styckesförflyttningskommandon:
@ -181,10 +184,10 @@ Två andra viktiga markörrörelsekommandon är M-< (META mindre-än), som
flyttar markören till början av texten, och M-> (META större-än), som
flyttar den till slutet av texten.
en del tangentbord är "<" placerad över komma, att man måste
svenska tangentbord är ">" placerad över "<", att man måste
använda skift för att fram den. dessa tangentbord måste man
också använda skift för att skriva M-<. Utan skifttangenten skulle det
bli M-komma.
också använda skift för att skriva M->. Utan skifttangenten skulle det
bli M-<.
>> Prova M-< nu för att flytta markören till början av vägledningen.
Använd sedan C-v för att flytta markören tillbaka hit igen.
@ -195,7 +198,7 @@ bli M-komma.
Du kan också flytta markören med hjälp av piltangenterna, om
terminalen har piltangenter. Vi föreslår att du lär dig C-b, C-f, C-n
och C-p av tre skäl. För det första kommer de att fungera alla
slags terminaler. För det andra kommer du att finna, när du har fått
slags terminaler. För det andra kommer du att märka, när du har fått
lite träning i att använda Emacs, att det går mycket snabbare att
använda kontrollfunktionerna än piltangenterna (för att du undviker
att ändra fingersättningen). Den tredje anledningen är att när man har
@ -203,14 +206,13 @@ lärt sig att använda kontrolltangenten blir det lättare att lära sig
de mer avancerade kontrollfunktionerna.
De flesta kommandon i Emacs tar ett numeriskt argument och för de
flesta kommandon leder detta till att de repeteras. Ett numeriskt
flesta kommandon leder detta till att de upprepas. Ett numeriskt
argument anges genom att du skriver C-u och sedan talet, innan du
skriver kommandot. Om du har en META- (eller EDIT- eller ALT-) tangent
finns det ett annat alternativ för att ge numeriska argument: skriv
talet medan du håller ned META-tangenten. Vi föreslår att du använder
C-u för det fungerar alla slags terminaler. Det numeriska
argumentet kallas också för "prefixargument" eftersom det skrivs före
kommandot.
skriver kommandot. Om du har en META- eller ALT-tangent finns det
ett annat alternativ för att ge numeriska argument: skriv talet medan
du håller ned META-tangenten. Vi föreslår att du använder C-u eftersom
det fungerar alla slags terminaler. Det numeriska argumentet kallas
också för "prefixargument" eftersom det skrivs före kommandot.
Till exempel: C-u 8 C-f flyttar markören åtta steg framåt.
@ -218,8 +220,8 @@ Till exempel: C-u 8 C-f flyttar markören åtta steg framåt.
kommer nära den här raden som möjligt med ett enda kommando.
De flesta kommandon använder det numeriska argumentet för ett
repeterat utförande men det finns kommandon som använder det
annorlunda. Flera kommandon, men inga av dem du lärt dig hittills,
upprepat utförande men det finns kommandon som använder det
andra sätt. Flera kommandon, men inga av dem du lärt dig hittills,
använder det som en flagga. Med ett prefixargument, och oberoende av
dess värde, gör kommandot något annat.
@ -231,7 +233,7 @@ uppåt.
>> Prova C-u 8 C-v nu.
Detta borde ha flyttat skärmbilden 8 rader uppåt. Om du önskar flytta
Detta borde ha flyttat skärmbilden 8 rader uppåt. Om du vill flytta
tillbaka igen är det bara att ge samma argument till M-v.
Om du använder ett fönstersystem, som X eller MS-Windows, finns det
@ -239,7 +241,7 @@ troligen ett rektangulärt område på sidan av Emacs-fönstret, en så
kallad rullningslist. Genom att klicka i den med musen kan du rulla
texten.
Om din mus har ett rullningshjul kan även den användas för att rulla
Om din mus har ett rullningshjul kan även det användas för att rulla
texten.
@ -263,15 +265,15 @@ Om du av misstag slår <ESC> blir du kvitt detta med ett C-g.
* SPÄRRADE KOMMANDON
--------------------
En del Emacs-kommandon är "spärrade" att nybörjare inte skall
En del Emacs-kommandon är "spärrade" för att inte nybörjare skall
använda dem av misstag.
Om du provar ett av dessa spärrade kommandon kommer Emacs ge ett
meddelande som berättar vilket kommando det är och kommer att fråga om
meddelande som berättar vilket kommando det är och fråga om
du verkligen vill fortsätta och utföra detta kommando.
Om du verkligen önskar att utföra kommandot skriver du <SPC>,
(mellanslagstangenten) som svar frågan. Normalt, om du inte önskar
Om du verkligen önskar att utföra kommandot trycker du
mellanslagstangenten som svar frågan. Normalt, om du inte önskar
att utföra detta kommando, svarar du "n" frågan.
>> Skriv C-x C-l (som är ett spärrat kommando).
@ -295,7 +297,7 @@ tas bort.
>> Flytta markören till den här raden och tryck C-u 0 C-l.
>> Tryck C-h k C-f.
Se hur det här fönstret krymper samtidigt som ett nytt uppträder
för att visa dokumentationen av C-f-kommandot.
för att visa dokumentationen av kommandot C-f.
>> Slå C-x 1 och se hur dokumentationsfönstret nu försvinner.
@ -309,13 +311,13 @@ kommandon är två, tre eller fyra tecken långa.
Om du önskar att sätta in text är det bara att skriva in texten.
Vanliga tecken, som A, 7, *, etc., sätts in direkt när du skriver dem.
Tryck <Return> för att sätta in en radbrytning. (Det är den tangent
tangentbordet som ibland är märkt med "Enter")
Tryck <Return>, returtangenten, för att sätta in en radbrytning.
(Den är vanligen märkt "Return" eller "Enter" eller med en krokpil bakåt.)
För att radera tecknet omedelbart före aktuell markörposition, tryck
<DEL>. Det är tangenten tangentbordet som vanligtvis är markerad
med "Backspace" -- det är samma tangent som du normal använder för att
radera det sist inmatade tecknet utanför Emacs.
med en lång vänsterpil eller "Backspace" -- det är samma tangent som du
normalt använder för att radera det sist inmatade tecknet utanför Emacs.
Det kan finnas en annan tangent ditt tangentbordet som är märkt med
"Delete", men det är inte den vi menar med <DEL>.
@ -326,9 +328,9 @@ Det kan finnas en annan tangent på ditt tangentbordet som är märkt med
är bara en lokal kopia.
När en rad blir för lång för att rymmas en skärmbredd fortsätter
den raden under. Om du använder ett fönstersystem, visas små böjda
den raden under. Om du använder ett fönstersystem visas små böjda
pilar i det lilla utrymmet bägge sidor om textmassan (i vänster och
höger marginal) för att ange var en rad fortsätter, Om du använder
höger marginal) för att ange var en rad fortsätter. Om du använder
en textterminal anges med ett bakstreck (\) i kolumnen längst till
höger att raden fortsätter.
@ -339,7 +341,7 @@ höger att raden fortsätter.
>> Använd <DEL> för att radera texten tills raden ryms en
skärmbredd igen. Fortsättningstecknet kommer att försvinna.
Du kan radera radbrytning precis som andra tecken. Genom att radera
Du kan radera radbrytningar precis som andra tecken. Genom att radera
radbrytningen mellan två rader slås dessa samman till en. Om
resultatet av denna sammanslagning blir för stor för att passa inom en
skärmbredd, kommer den att visas med ett fortsättningstecken.
@ -363,7 +365,7 @@ Du bör se att efter att den nya raden satts in, sätter Emacs in
blanktecken att markören flyttas fram under "T" i "Tryck".
Tänk att de flesta Emacs-kommandon kan ta numeriska argument. Detta
gäller också texttecken. Genom att repetera ett texttecken kommer det
gäller också texttecken. Genom att upprepa ett texttecken kommer det
skrivas flera gånger.
>> Prova det nu: Skriv C-u 8 * för att sätta in ********.
@ -402,11 +404,11 @@ tryck C-w. Detta tar bort texten mellan de två positionerna.
>> Tryck C-w. Detta tar bort texten från och med D fram till just före
o.
Skillnaden mellan att "ta bort" (killing) och "radera" (deleting) text
Skillnaden mellan att "ta bort" (kill) och "radera" (delete) text
är att "borttagen" text kan sättas tillbaka (var som helst), medan
raderad text inte kan det det sättet. (Du kan dock ångra en
radering--se nedan.) Återinsättning av borttagen text kallas
"återhämtning" (yanking). Generellt kan man säga att kommandon som
"återhämtning" (yank). Generellt kan man säga att kommandon som
tar bort fler än ett tecken sparar undan texten ( att den kan
återhämtas) medan kommandon som bara raderar ett tecken, eller bara
raderar tomma rader och mellanrum inte sparar någonting (och den
@ -422,7 +424,7 @@ Lägg märke till att ett enstaka C-k bara raderar texten på raden och
att det andra C-k raderar själva raden och flyttar upp texten raden
under ett steg. C-k hanterar numeriska argument lite speciellt. Den
raderar många rader OCH innehållet i dem. Detta är alltså inte bara
en repetition av kommandot. C-u 2 C-k raderar två rader samt de tomma
en upprepning av kommandot. C-u 2 C-k raderar två rader samt de tomma
raderna, medan C-k två gånger inte kommer att göra det.
Du kan antingen hämta tillbaka borttagen text till samma plats som där
@ -438,7 +440,7 @@ tillbaka den sist borttagna texten och placerar den där markören är.
>> Prova: Gör C-y för att tillbaka texten.
Om du gör flera C-k i rad kommer all bortagen text att sparas
Om du gör flera C-k i rad kommer all borttagen text att sparas
samlat att ett C-y återhämtar alla raderna en gång.
>> Prova detta. Tryck C-k ett par gånger.
@ -450,11 +452,11 @@ Och hämta så tillbaka igen:
Men vad gör du om du har en text du önskar att hämta tillbaka men du
har redan tagit bort något nytt? C-y skulle hämta tillbaka den senaste
texten som blev borttagen men tidigare bortagen text är inte
texten som blev borttagen men tidigare borttagen text är inte
förlorad. Du kan tillbaka den med kommandot M-y. Efter att du har
använt C-y för att hämta tillbaka den sist borttagna texten kommer M-y
ersätta denna text med tidigare borttagen text. Genom att göra M-y om
och om igen hämtas allt tidigare borttagen text tillbaka. När du har
och om igen hämtas all tidigare borttagen text tillbaka. När du har
nått den önskade texten behöver du inte göra något ytterligare för att
behålla den. Fortsätt bara med din redigeringen och lämna den
återtagna texten där den är.
@ -477,25 +479,25 @@ Om du gör en förändring i texten och sedan ångrar dig, så kan du
upphäva ändringen med ångra-kommandot C-/.
Normalt kommer C-/ upphäva förändringen som gjordes av det sist
utförda kommandot. Om du repeterar C-/ flera gånger kommer varje
repetition upphäva ett kommando till.
utförda kommandot. Om du upprepar C-/ flera gånger kommer varje
upprepning upphäva ett kommando till.
Det finns två undantag. Kommandon som inte förändrar texten räknas
inte (detta inkluderar markörförflyttningar och bläddringskommandon),
och inskrivna enkelbokstäver blir vanligtvis grupperade i grupper om
upp till 20 tecken. Detta är för att reducera antalet C-/ som behövs
och inskrivna enkelbokstäver blir vanligtvis samlade i grupper om
upp till 20 tecken. Detta görs för att reducera antalet C-/ som behövs
för att ångra inskriven text.
>> Ta bort den här raden med C-k, hämta sedan tillbaka den med C-/.
C-_ är ett alternativt ångra-kommandot. Den fungerar exakt samma
C-_ är ett alternativt ångra-kommando. Det fungerar exakt samma
sätt som C-/. vissa textterminaler skickar C-/ faktiskt C-_ till
Emacs. Även C-x u fungerar precis som C-/, men är inte lika enkelt att
skriva.
Ett numeriskt argument till C-/, C-_ eller C-x u medför upprepning.
Du kan ångra radering av text precis samma sätt som du kan ångra
Du kan ångra radering av text precis samma sätt som att du kan ångra
att du tagit bort text. Skillnaden mellan att ta bort och att radera
någonting påverkar endast om du kan hämta tillbaka det med C-y. För
ångerfunktionen spelar det ingen roll hur texten försvunnit.
@ -514,19 +516,18 @@ sätt är det som om du förändrar själva filen men förändringen du gör
kommer inte bli permanent förrän filen sparas (save). Detta är för att
undvika att halvförändrade filer sparas när du inte vill det. Till och
med när du sparar filen kommer Emacs att behålla originalet under ett
nytt namn, som backup, ifall du senare ångrar alltihop.
nytt namn, som säkerhetskopia, ifall du senare ångrar alltihop.
Om du tittar nästan längst ner skärmbilden kommer du se en rad
som börjar med minustecken, och som startar med "-:--- TUTORIAL.sv"
som börjar med minustecken, och som startar med "U:--- TUTORIAL.sv"
eller något snarlikt. Denna del av skärmbilden visar normalt namnet
filen du besöker. Just nu besöker du din personlig kopia av
filen du besöker. Just nu besöker du ditt personliga exemplar av
vägledningen till Emacs, vilken heter "TUTORIAL.sv". Vilken fil du än
är inne i kommer filnamnet stå där.
En annan sak med kommandot för att finna filer är att du måste ange
vilket filnamn du önskar. Vi säger att kommandot "läser ett
argument". I detta fall är argumentet namnet på filen. Efter att du
gett kommandot
vilket filnamn du önskar. Vi säger att kommandot "läser ett argument".
I detta fall är argumentet namnet filen. Efter att du gett kommandot
C-x C-f Finn en fil
@ -569,7 +570,7 @@ för att titta på den. Du kan också finna en fil som inte existerar.
Det är man skapar nya filer med Emacs: finn filen, som är tom till
att börja med, och sätt igång med att skriva texten som skall in i
filen. Först när du sparar filen kommer Emacs att verkligen skapa
filen med den text du har skrivit. Från och med detta editerar du en
filen med den text du har skrivit. Från och med detta redigerar du en
fil som existerar.
@ -599,16 +600,16 @@ När du har flera buffertar så är bara en av dem "gällande" åt gången.
Det är den buffert du redigerar. Om du vill redigera en annan buffert
måste du byta till den. Om du vill byta till en buffert som
motsvarar en fil kan du göra det genom att besöka den igen med C-x
C-f. Det finns dock ett enklare sätt: använd C-x b kommandot. I det
C-f. Det finns dock ett enklare sätt: använd kommandot C-x b. I det
kommandot anger du buffertens namn.
>> Skapa en fil med namnet "foo" genom att trycka C-x C-f foo <Return>.
>> Skapa en fil med namnet "abc" genom att trycka C-x C-f abc <Return>.
Skriv sedan C-x b TUTORIAL.sv <Return> för att komma tillbaka till
den här handledningen.
Mestadels är buffertens namn densamma som filens namn (utan
katalogdel.) Det är dock inte alltid . Bufferlistan du skapar med
C-x C-b visar alltid namnen varje buffert.
Mestadels är buffertens namn densamma som filens namn (utan katalogdel).
Det är dock inte alltid . Bufferlistan som du skapar med C-x C-b
visar alltid namnen varje buffert.
En del buffertar är inte knutna till någon fil, till exempel bufferten
"*Buffer List*". Det är den buffert som innehåller buffertlistan som
@ -641,7 +642,7 @@ vill spara eller ej.
* UTVIDGNING AV KOMMANDOMÄNGDEN
-------------------------------
Det finns mycket fler Emacs-kommandon än antalet KONTROLL- eller
Det finns många fler Emacs-kommandon än antalet KONTROLL- eller
META-tangenter. För att komma förbi denna begränsning har Emacs ett
"X"- (eXtend) kommando. Detta finns i två varianter:
@ -669,8 +670,8 @@ Emacsprocessen förstörs. I de flesta vanliga kommandoskalen så kan man
återgå till Emacs med kommandot 'fg' eller med '%emacs'.
C-x C-c används när du skall avsluta Emacs. Det är klokt att avsluta
Emacs om den har startats av ett mail-program eller andra
applikationer.
Emacs om den har startats av ett e-post-program eller annan
applikation.
Det finns många C-x kommandon. Här är en lista över de du har lärt dig
hittills:
@ -686,14 +687,13 @@ hittills:
Namngivna utvidgade kommandon är kommandon som används mycket sällan
eller bara i vissa lägen. Ett exempel ett sådant kommando är
replace-string, som globalt ersätter en teckensträng med en annan. När
replace-string, som överallt ersätter en teckensträng med en annan. När
du skriver M-x kommer Emacs visa en prompt nederst i skärmbilden med
M-x där du skall skriva in kommandot du önskar att köra, i det här
fallet "replace-string". Det är bara att skriva "repl s<TAB>" och
Emacs kommer att fylla i kommandonamnet. (<TAB> är
tabulatortangenten, som vanligtvis finns över CapsLock- eller
skifttangenten nära den vänstra kanten tangentbordet.) Kör
kommandot med <Return>.
tabulatortangenten, som vanligtvis finns över skiftlåstangenten
nära den vänstra kanten tangentbordet.) Kör kommandot med <Return>.
Kommandot replace-string kräver två argument, teckensträngen som skall
ersättas och teckensträngen som den skall ersättas med. Du måste
@ -715,7 +715,7 @@ När du har gjort förändringar i en fil men inte sparat den, så kommer
detta sparar Emacs periodiskt ändringarna i en autosparfil för varje
fil du redigerar. Denna fil har ett # i början och slutet av
filnamnet. Om du till exempel har en fil med namnet "hej.c" kommer
namnet autosparfilen bli "#hej.c#". När du sparar filen vanlig
namnet autosparfilen bli "#hej.c#". När du sparar filen vanligt
sätt kommer Emacs radera autosparfilen.
Om maskinen kraschar kan du återfå dina automatiskt sparade ändringar
@ -828,7 +828,7 @@ genom ett numeriskt argument.
att använda C-x f en gång till.
Om du gör förändringar mitt i en rad kommer inte sidoläget Auto
Fill att kunna omformattera raderna för dig.
Fill att kunna formatera om raderna för dig.
För att göra detta kan du trycka M-q med markören inne i det avsnittet
du önskar att omformatera.
@ -946,7 +946,7 @@ sig och inte en äkta "modifierare".
Om du hade skrivit C-x 1 i det nedre fönstret skulle det övre ha
försvunnit. Tänk detta kommando som "Behåll bara ett fönster, det
som markören står i."
som markören står i".
Du måste inte ha samma buffert i bägge fönstren. Du kan använda C-x
C-f för att finna en ny fil i ett av fönstren samtidigt som det andra
@ -964,7 +964,7 @@ filer:
1 för att bli kvitt det nedre igen.
* MULTIPLA RAMAR
* FLERA RAMAR
----------------
Emacs kan också skapa flera "ramar". En ram är vad vi kallar en
@ -1042,8 +1042,7 @@ beskrivande namn kan de också fungera som en enkel dokumentation,
tillräckligt för att påminna dig om kommandon du redan lärt dig.
Flerteckenskommandon, som C-x C-s och <ESC>v (i stället för M-v, om
du inte har META, EDIT eller ALT tangenten) är också tillåtna efter
C-h c.
du inte har META- eller ALT-tangenten) är också tillåtna efter C-h c.
För att mer information om ett kommando kan du använda C-h k
istället för C-h c.
@ -1052,7 +1051,7 @@ istället för C-h c.
Detta kommer visa funktionens dokumentation och namn i ett eget
fönster. För att avsluta hjälpfönstret kan du trycka C-x 1. Du behöver
inte göra det omedelbart. Du kan editera med hjälptexten som stöd för
inte göra det omedelbart. Du kan redigera med hjälptexten som stöd för
att först senare ta bort fönstret med C-x 1.
Här är fler varianter C-h:
@ -1107,17 +1106,17 @@ Två finesser som du kan komma att gilla speciellt är komplettering
filhantering.
Komplettering är ett sätt att undvika onödiga tangenttryckningar. Till
exempel, om du vill byta till *Messages* bufferten, kan du du skriva
exempel, om du vill byta till bufferten *Messages* kan du du skriva
C-x b *M<Tab> och Emacs kommer fylla i resten av buffertnamnet
långt den kan räkna ut det från det du redan skrivit. Komplettering
finns beskrivet i Emacs-manualen i noden "Completion".
Dired gör det möjligt att lista filer i en katalog (och även dess
subkataloger), flytta runt i listan, besöka, byta namn, ta bort och
underkataloger), flytta runt i listan, besöka, byta namn, ta bort och
operera olika sätt filerna. Dired finns beskrivet i Info i
Emacs-manualen i noden "Dired".
Manualen beskriver även många andra Emacs funktioner.
Manualen beskriver även många andra funktioner i Emacs.
* SLUTORD
@ -1135,7 +1134,7 @@ själv, klaga!
Denna vägledning härstammar från en hel rad Emacs-vägledningar och den
första skrevs av Stuart Cracraft för den ursprungliga Emacs. Mats
Lidell översatte den till Svenska.
Lidell översatte den till svenska.
This version of the tutorial, like GNU Emacs, is copyrighted, and
comes with permission to distribute copies on certain conditions:

View file

@ -1621,8 +1621,7 @@ So `allout-post-command-business' should not reactivate it...")
cur)
(while menus
(setq cur (car menus)
menus (cdr menus))
(easy-menu-add cur))))
menus (cdr menus)))))
;;;_ > allout-overlay-preparations
(defun allout-overlay-preparations ()
"Set the properties of the allout invisible-text overlay and others."

View file

@ -1058,27 +1058,43 @@ return nil. Otherwise point is returned."
(archive-goto-file short))
next))
(defun archive-copy-file (file new-name)
"Copy FILE to a location specified by NEW-NAME.
Interactively, FILE is the file at point, and the function prompts
for NEW-NAME."
(defun archive-copy-file (files new-name)
"Copy FILES to a location specified by NEW-NAME.
FILES can be a single file or a list of files.
Interactively, FILES is the list of marked files, or the file at
point if nothing is marked, and the function prompts for
NEW-NAME."
(interactive
(let ((name (archive--file-desc-ext-file-name (archive-get-descr))))
(list name
(read-file-name (format "Copy %s to: " name)))))
(when (file-directory-p new-name)
(setq new-name (expand-file-name file new-name)))
(when (and (file-exists-p new-name)
(not (yes-or-no-p (format "%s already exists; overwrite? "
new-name))))
(user-error "Not overwriting %s" new-name))
(let* ((descr (archive-get-descr))
(archive (buffer-file-name))
(extractor (archive-name "extract"))
(ename (archive--file-desc-ext-file-name descr)))
(with-temp-buffer
(archive--extract-file extractor archive ename)
(write-region (point-min) (point-max) new-name))))
(let ((names
(mapcar
#'archive--file-desc-ext-file-name
(or (archive-get-marked ?*) (list (archive-get-descr))))))
(list names
(read-file-name (format "Copy %s to: " (string-join names ", "))))))
(unless (consp files)
(setq files (list files)))
(when (and (> (length files) 1)
(not (file-directory-p new-name)))
(user-error "Can't copy a list of files to a single file"))
(save-excursion
(dolist (file files)
(let ((write-to (if (file-directory-p new-name)
(expand-file-name file new-name)
new-name)))
(when (and (file-exists-p write-to)
(not (yes-or-no-p (format "%s already exists; overwrite? "
write-to))))
(user-error "Not overwriting %s" write-to))
(archive-goto-file file)
(let* ((descr (archive-get-descr))
(archive (buffer-file-name))
(extractor (archive-name "extract"))
(ename (archive--file-desc-ext-file-name descr)))
(with-temp-buffer
(set-buffer-multibyte nil)
(archive--extract-file extractor archive ename)
(write-region (point-min) (point-max) write-to)))))))
(defun archive-extract (&optional other-window-p event)
"In archive mode, extract this entry of the archive into its own buffer."

View file

@ -180,7 +180,7 @@ MFILENAME is the makefile to generate."
;;
;; NOTE: This is GNU Make specific.
(if (and (oref this automatic-dependencies) df)
(insert "DEPS_MAGIC := $(shell mkdir .deps > /dev/null "
(insert "DEPS_MAGIC := $(shell mkdir .deps > " null-device " "
"2>&1 || :)\n"
"-include $(DEP_FILES)\n\n"))
;;

View file

@ -1258,7 +1258,8 @@ common grammar menu."
(unless (boundp ',symbol)
(easy-menu-define ,symbol nil
"Grammar Menu" (copy-sequence semantic-grammar-menu)))
(easy-menu-add ,symbol)
(when (featurep 'xemacs)
(easy-menu-add ,symbol))
(let ((,items (cdr ,mode-menu))
(,path (list (car ,symbol))))
(when ,items

View file

@ -2900,14 +2900,20 @@ Modified means that the widget that holds the value has been edited by the user
in a customize buffer.
To check for other states, call `custom-variable-state'."
(catch 'get-error
(let* ((symbol (widget-get widget :value))
(let* ((form (widget-get widget :custom-form))
(symbol (widget-get widget :value))
(get (or (get symbol 'custom-get) 'default-value))
(value (if (default-boundp symbol)
(condition-case nil
(funcall get symbol)
(error (throw 'get-error t)))
(symbol-value symbol))))
(not (equal value (widget-value (car (widget-get widget :children))))))))
(symbol-value symbol)))
(orig-value (widget-value (car (widget-get widget :children)))))
(not (equal (if (memq form '(lisp mismatch))
;; Mimic `custom-variable-value-create'.
(custom-quote value)
value)
orig-value)))))
(defun custom-variable-state-set (widget &optional state)
"Set the state of WIDGET to STATE.
@ -5130,7 +5136,6 @@ Erase customizations; set options
Entry to this mode calls the value of `Custom-mode-hook'
if that value is non-nil."
(use-local-map custom-mode-map)
(easy-menu-add Custom-mode-menu)
(setq-local tool-bar-map
(or custom-tool-bar-map
;; Set up `custom-tool-bar-map'.

View file

@ -157,7 +157,9 @@ set to nil, as the value is no longer rogue."
(if (keywordp doc)
(error "Doc string is missing"))
(let ((initialize #'custom-initialize-reset)
(requests nil))
(requests nil)
;; Whether automatically buffer-local.
buffer-local)
(unless (memq :group args)
(custom-add-to-group (custom-current-group) symbol 'custom-variable))
(while args
@ -183,7 +185,7 @@ set to nil, as the value is no longer rogue."
(put symbol 'safe-local-variable value))
((eq keyword :local)
(when (memq value '(t permanent))
(make-variable-buffer-local symbol))
(setq buffer-local t))
(when (eq value 'permanent)
(put symbol 'permanent-local t)))
((eq keyword :type)
@ -205,7 +207,9 @@ set to nil, as the value is no longer rogue."
(put symbol 'custom-requests requests)
;; Do the actual initialization.
(unless custom-dont-initialize
(funcall initialize symbol default)))
(funcall initialize symbol default))
(when buffer-local
(make-variable-buffer-local symbol)))
(run-hooks 'custom-define-hook)
symbol)

View file

@ -274,6 +274,8 @@ to `delete-selection-mode'."
(put 'quoted-insert 'delete-selection t)
(put 'yank 'delete-selection 'yank)
(put 'yank-pop 'delete-selection 'yank)
(put 'yank-from-kill-ring 'delete-selection 'yank)
(put 'clipboard-yank 'delete-selection 'yank)
(put 'insert-register 'delete-selection t)
;; delete-backward-char and delete-forward-char already delete the selection by

View file

@ -1746,7 +1746,7 @@ Files in subdirectories of DIRECTORY are processed also."
(byte-recompile-directory directory nil t))
;;;###autoload
(defun byte-recompile-directory (directory &optional arg force)
(defun byte-recompile-directory (directory &optional arg force follow-symlinks)
"Recompile every `.el' file in DIRECTORY that needs recompilation.
This happens when a `.elc' file exists but is older than the `.el' file.
Files in subdirectories of DIRECTORY are processed also.
@ -1759,7 +1759,11 @@ compile it. A nonzero ARG also means ask about each subdirectory
before scanning it.
If the third argument FORCE is non-nil, recompile every `.el' file
that already has a `.elc' file."
that already has a `.elc' file.
This command will normally not follow symlinks when compiling
files. If FOLLOW-SYMLINKS is non-nil, symlinked `.el' files will
also be compiled."
(interactive "DByte recompile directory: \nP")
(if arg (setq arg (prefix-numeric-value arg)))
(if noninteractive
@ -1792,7 +1796,8 @@ that already has a `.elc' file."
(if (file-directory-p source)
(and (not (member file '("RCS" "CVS")))
(not (eq ?\. (aref file 0)))
(not (file-symlink-p source))
(or follow-symlinks
(not (file-symlink-p source)))
;; This file is a subdirectory. Handle them differently.
(or (null arg) (eq 0 arg)
(y-or-n-p (concat "Check " source "? ")))

View file

@ -488,17 +488,14 @@ To implement dynamic menus, either call this from
`menu-bar-update-hook' or use a menu filter."
(easy-menu-add-item map path (easy-menu-create-menu name items) before))
;; XEmacs needs the following two functions to add and remove menus.
;; In Emacs this is done automatically when switching keymaps, so
;; here easy-menu-remove and easy-menu-add are a noops.
(defalias 'easy-menu-remove 'ignore
(define-obsolete-function-alias 'easy-menu-remove #'ignore "28.1"
"Remove MENU from the current menu bar.
Contrary to XEmacs, this is a nop on Emacs since menus are automatically
\(de)activated when the corresponding keymap is (de)activated.
\(fn MENU)")
(defalias 'easy-menu-add #'ignore
(define-obsolete-function-alias 'easy-menu-add #'ignore "28.1"
"Add the menu to the menubar.
On Emacs this is a nop, because menus are already automatically
activated when the corresponding keymap is activated. On XEmacs

View file

@ -591,7 +591,8 @@ Honor `eldoc-echo-area-use-multiline-p' and
;; format the *eldoc* buffer, using as most of its
;; contents as we know will fit.
(with-current-buffer (eldoc--format-doc-buffer docs)
(eldoc--echo-area-substring available)))
(save-excursion
(eldoc--echo-area-substring available))))
(t ;; this is the "truncate brutally" situation
(let ((string
(with-current-buffer (eldoc--format-doc-buffer docs)

View file

@ -1418,6 +1418,7 @@ into a plain rx-expression, collecting names into `rx--pcase-vars'."
(cons head (mapcar #'rx--pcase-transform rest)))
(_ rx)))
;;;###autoload
(pcase-defmacro rx (&rest regexps)
"A pattern that matches strings against `rx' REGEXPS in sexp form.
REGEXPS are interpreted as in `rx'. The pattern matches any

View file

@ -767,6 +767,7 @@ as the ewoc pretty-printer."
(setq-local revert-buffer-function #'tabulated-list-revert)
(setq-local glyphless-char-display
(tabulated-list-make-glyphless-char-display-table))
(setq-local text-scale-remap-header-line t)
;; Avoid messing up the entries' display just because the first
;; column of the first entry happens to begin with a R2L letter.
(setq bidi-paragraph-direction 'left-to-right)

View file

@ -114,22 +114,19 @@ ERC menu yet.")
;; make sure the menu only gets defined once, since Emacs 22
;; activates it immediately
(easy-menu-define erc-menu erc-mode-map "ERC menu" erc-menu-definition)
(setq erc-menu-defined t))
(erc-menu-add))
((erc-menu-remove)
;; `easy-menu-remove' is a no-op in Emacs 22
(setq erc-menu-defined t)))
(;; `easy-menu-remove' is a no-op in Emacs 22
(message "You might have to restart Emacs to remove the ERC menu")))
;; silence byte-compiler warning
(defvar erc-menu)
(defun erc-menu-add ()
"Add the ERC menu to the current buffer."
(easy-menu-add erc-menu erc-mode-map))
(declare (obsolete nil "28.1"))
nil)
(defun erc-menu-remove ()
"Remove the ERC menu from the current buffer."
(easy-menu-remove erc-menu))
(declare (obsolete nil "28.1"))
nil)
(provide 'erc-menu)

View file

@ -382,8 +382,7 @@ it defaults to `insert'."
"Set handle INDEX, using MODE, to point to TARGET."
(when target
(if (and (stringp target)
(or (string= target null-device)
(string= target "/dev/null")))
(string= target (null-device)))
(aset eshell-current-handles index nil)
(let ((where (eshell-get-target target mode))
(current (car (aref eshell-current-handles index))))

View file

@ -229,6 +229,28 @@ Each positive or negative step scales the default face height by this amount."
(defvar text-scale-mode-amount 0)
(make-variable-buffer-local 'text-scale-mode-amount)
(defvar text-scale-remap-header-line nil
"If non-nil, text scaling may change font size of header lines too.")
(make-variable-buffer-local 'text-scale-header-line)
(defun face-remap--clear-remappings ()
(dolist (remapping
;; This is a bit messy to stay backwards compatible.
;; In the future, this can be simplified to just use
;; `text-scale-mode-remapping'.
(if (consp (car-safe text-scale-mode-remapping))
text-scale-mode-remapping
(list text-scale-mode-remapping)))
(face-remap-remove-relative remapping))
(setq text-scale-mode-remapping nil))
(defun face-remap--remap-face (sym)
(push (face-remap-add-relative sym
:height
(expt text-scale-mode-step
text-scale-mode-amount))
text-scale-mode-remapping))
(define-minor-mode text-scale-mode
"Minor mode for displaying buffer text in a larger/smaller font.
@ -240,21 +262,32 @@ face size by the value of the variable `text-scale-mode-step'
The `text-scale-increase', `text-scale-decrease', and
`text-scale-set' functions may be used to interactively modify
the variable `text-scale-mode-amount' (they also enable or
disable `text-scale-mode' as necessary)."
disable `text-scale-mode' as necessary).
If `text-scale-remap-header-line' is non-nil, also change
the font size of the header line."
:lighter (" " text-scale-mode-lighter)
(when text-scale-mode-remapping
(face-remap-remove-relative text-scale-mode-remapping))
(face-remap--clear-remappings)
(setq text-scale-mode-lighter
(format (if (>= text-scale-mode-amount 0) "+%d" "%d")
text-scale-mode-amount))
(setq text-scale-mode-remapping
(and text-scale-mode
(face-remap-add-relative 'default
:height
(expt text-scale-mode-step
text-scale-mode-amount))))
(when text-scale-mode
(face-remap--remap-face 'default)
(when text-scale-remap-header-line
(face-remap--remap-face 'header-line)))
(force-window-update (current-buffer)))
(defun text-scale--refresh (symbol newval operation where)
"Watcher for `text-scale-remap-header-line'.
See `add-variable-watcher'."
(when (and (eq symbol 'text-scale-remap-header-line)
(eq operation 'set)
text-scale-mode)
(with-current-buffer where
(let ((text-scale-remap-header-line newval))
(text-scale-mode 1)))))
(add-variable-watcher 'text-scale-remap-header-line #'text-scale--refresh)
(defun text-scale-min-amount ()
"Return the minimum amount of text-scaling we allow."
;; When the resulting pixel-height of characters will become smaller

View file

@ -730,6 +730,16 @@ Execute BODY, and unwind connection-local variables."
;; No connection-local variables to apply.
,@body))
;;;###autoload
(defun path-separator ()
"The connection-local value of `path-separator'."
(with-connection-local-variables path-separator))
;;;###autoload
(defun null-device ()
"The connection-local value of `null-device'."
(with-connection-local-variables null-device))
(provide 'files-x)

View file

@ -2310,53 +2310,52 @@ the various files."
;; hexl-mode or image-mode.
(memq major-mode '(hexl-mode image-mode)))
(if (buffer-modified-p)
(if (y-or-n-p
(format
(if rawfile
"The file %s is already visited normally,
(if (let ((help-form
(format-message
(if rawfile "\
The file %s is already visited normally,
and you have edited the buffer. Now you have asked to visit it literally,
meaning no coding system handling, format conversion, or local variables.
Emacs can visit a file in only one way at a time.
Do you want to save the file, and visit it literally instead? "
"The file %s is already visited literally,
Emacs can visit a file in only one way at a time."
"\
The file %s is already visited literally,
meaning no coding system handling, format conversion, or local variables.
You have edited the buffer. Now you have asked to visit the file normally,
but Emacs can visit a file in only one way at a time.
Do you want to save the file, and visit it normally instead? ")
(file-name-nondirectory filename)))
but Emacs can visit a file in only one way at a time.")
(file-name-nondirectory filename))))
(y-or-n-p
(if rawfile "\
Do you want to save the file, and visit it literally instead? " "\
Do you want to save the file, and visit it normally instead? ")))
(progn
(save-buffer)
(find-file-noselect-1 buf filename nowarn
rawfile truename number))
(if (y-or-n-p
(format
(if rawfile
"\
Do you want to discard your changes, and visit the file literally now? "
"\
Do you want to discard your changes, and visit the file normally now? ")))
(if rawfile "\
Do you want to discard your changes, and visit the file literally now? " "\
Do you want to discard your changes, and visit the file normally now? "))
(find-file-noselect-1 buf filename nowarn
rawfile truename number)
(error (if rawfile "File already visited non-literally"
"File already visited literally"))))
(if (y-or-n-p
(format
(if rawfile
"The file %s is already visited normally.
(if (let ((help-form
(format-message
(if rawfile "\
The file %s is already visited normally.
You have asked to visit it literally,
meaning no coding system decoding, format conversion, or local variables.
But Emacs can visit a file in only one way at a time.
Do you want to revisit the file literally now? "
"The file %s is already visited literally,
But Emacs can visit a file in only one way at a time."
"\
The file %s is already visited literally,
meaning no coding system decoding, format conversion, or local variables.
You have asked to visit it normally,
but Emacs can visit a file in only one way at a time.
Do you want to revisit the file normally now? ")
(file-name-nondirectory filename)))
but Emacs can visit a file in only one way at a time.")
(file-name-nondirectory filename))))
(y-or-n-p
(if rawfile "\
Do you want to revisit the file literally now? " "\
Do you want to revisit the file normally now? ")))
(find-file-noselect-1 buf filename nowarn
rawfile truename number)
(error (if rawfile "File already visited non-literally"
@ -2679,6 +2678,7 @@ since only a single case-insensitive search through the alist is made."
("\\.dir-locals\\(?:-2\\)?\\.el\\'" . lisp-data-mode)
("eww-bookmarks\\'" . lisp-data-mode)
("tramp\\'" . lisp-data-mode)
("/archive-contents\\'" . lisp-data-mode)
("places\\'" . lisp-data-mode)
("\\.emacs-places\\'" . lisp-data-mode)
("\\.el\\'" . emacs-lisp-mode)

View file

@ -203,8 +203,8 @@ key is supported."
(defun filesets-select-command (cmd-list)
"Select one command from CMD-LIST -- a string with space separated names."
(let ((this (shell-command-to-string
(format "which --skip-alias %s 2> /dev/null | head -n 1"
cmd-list))))
(format "which --skip-alias %s 2> %s | head -n 1"
cmd-list null-device))))
(if (equal this "")
nil
(file-name-nondirectory (substring this 0 (- (length this) 1))))))
@ -1718,9 +1718,12 @@ Assume MODE (see `filesets-entry-mode'), if provided."
(filesets-entry-get-master entry)))))
(cons entry (filesets-ingroup-cache-get entry))))
(:tree
(let ((dir (nth 0 entry))
(patt (nth 1 entry)))
(filesets-directory-files dir patt ':files t)))
(let* ((dirpatt (filesets-entry-get-tree entry))
(dir (nth 0 dirpatt))
(patt (nth 1 dirpatt))
(depth (or (filesets-entry-get-tree-max-level entry)
filesets-tree-max-level)))
(filesets-files-under 0 depth entry dir patt)))
(:pattern
(let ((dirpatt (filesets-entry-get-pattern entry)))
(if dirpatt
@ -1734,6 +1737,34 @@ Assume MODE (see `filesets-entry-mode'), if provided."
(lambda (file)
(not (filesets-filetype-property file event))))))
(defun filesets-files-under (level depth entry dir patt &optional relativep)
"Files under DIR that match PATT.
LEVEL is the current level under DIR.
DEPTH is the maximal tree scanning depth for ENTRY.
ENTRY is a fileset.
DIR is a directory.
PATT is a regexp that included file names must match.
RELATIVEP non-nil means use relative file names."
(and (or (= depth 0) (< level depth))
(let* ((dir (file-name-as-directory dir))
(files-here (filesets-directory-files
dir patt nil (not relativep)
(filesets-entry-get-filter-dirs-flag entry)))
(subdirs (filesets-filter-dir-names files-here))
(files
(filesets-filter-dir-names
(apply #'append
files-here
(mapcar
(lambda (subdir)
(let* ((subdir (file-name-as-directory subdir))
(full-subdir (concat dir subdir)))
(filesets-files-under (+ level 1) depth entry
full-subdir patt)))
subdirs))
t)))
files)))
(defun filesets-open (&optional mode name lookup-name)
"Open the fileset called NAME.
Use LOOKUP-NAME for searching additional data if provided."
@ -1878,7 +1909,7 @@ User will be queried, if no fileset name is provided."
(substring (elt submenu 0) 2))))
(if (listp submenu)
(cons name (cdr submenu))
(apply 'vector (list name (cdr (append submenu nil)))))))
(apply 'vector (list name (cadr (append submenu nil)))))))
; (vconcat `[,name] (subseq submenu 1)))))
(defun filesets-wrap-submenu (submenu-body)

View file

@ -7251,7 +7251,6 @@ This is an extended text-mode.
'(message-font-lock-keywords t))
(set (make-local-variable 'mail-header-separator) "")
(set (make-local-variable 'gnus-article-edit-mode) t)
(easy-menu-add message-mode-field-menu message-mode-map)
(mml-mode)
(setq buffer-read-only nil)
(buffer-enable-undo)

View file

@ -286,8 +286,8 @@ colors of the displayed X-Faces."
(setq file (car file))
(with-temp-buffer
(shell-command
(format "pnmcut -left 110 -top 30 -width 144 -height 144 '%s' | ppmnorm 2>/dev/null | pnmscale -width 48 | ppmtopgm | pgmtopbm -threshold -value 0.92 | pbmtoxbm | compface"
file)
(format "pnmcut -left 110 -top 30 -width 144 -height 144 '%s' | ppmnorm 2>%s | pnmscale -width 48 | ppmtopgm | pgmtopbm -threshold -value 0.92 | pbmtoxbm | compface"
file null-device)
(current-buffer))
;;(sleep-for 3)
(delete-file file)

View file

@ -1030,6 +1030,13 @@ Responsible for handling and, or, and parenthetical expressions.")
(declare-function nnimap-buffer "nnimap" ())
(declare-function nnimap-command "nnimap" (&rest args))
(defvar gnus-search-imap-search-keys
'(body cc bcc from header keyword larger smaller subject text to uid x-gm-raw
answered before deleted draft flagged on since recent seen sentbefore
senton sentsince unanswered undeleted undraft unflagged unkeyword
unseen all)
"Known IMAP search keys.")
;; imap interface
(cl-defmethod gnus-search-run-search ((engine gnus-search-imap)
srv query groups)
@ -1059,6 +1066,15 @@ Responsible for handling and, or, and parenthetical expressions.")
(setq q-string
(gnus-search-make-query-string engine query))
;; A bit of backward-compatibility slash convenience: if the
;; query string doesn't start with any known IMAP search
;; keyword, assume it is a "TEXT" search.
(unless (and (string-match "\\`[[:word:]]+" q-string)
(memql (intern-soft (downcase
(match-string 0 q-string)))
gnus-search-imap-search-keys))
(setq q-string (concat "TEXT " q-string)))
;; If it's a thread query, make sure that all message-id
;; searches are also references searches.
(when (alist-get 'thread query)
@ -1115,12 +1131,6 @@ Other capabilities could be tested here."
(nnimap-get-response call)))
(t (nnimap-command "UID SEARCH %s" query)))))
;; TODO: Don't exclude booleans and date keys, just check for them
;; before checking for general keywords.
(defvar gnus-search-imap-search-keys
'(body cc bcc from header keyword larger smaller subject text to uid x-gm-raw)
"Known IMAP search keys, excluding booleans and date keys.")
(cl-defmethod gnus-search-transform ((_ gnus-search-imap)
(_query null))
"ALL")
@ -1303,6 +1313,7 @@ of whichever date elements are present."
(pcase flag
("flag" "flagged")
("read" "seen")
("replied" "answered")
(_ flag)))
(if (member flag '("seen" "answered" "deleted" "draft" "flagged"))
(upcase flag)
@ -1365,10 +1376,13 @@ Returns a list of [group article score] vectors."
server query &optional groups)
(let ((prefix (slot-value engine 'remove-prefix))
(group-regexp (when groups
(regexp-opt
(mapcar
(lambda (x) (gnus-group-real-name x))
groups))))
(mapconcat
(lambda (x)
(replace-regexp-in-string
;; Accept any of [.\/] as path separators.
"[.\\/]" "[.\\\\/]"
(gnus-group-real-name x)))
groups "\\|")))
artlist vectors article group)
(goto-char (point-min))
(while (not (eobp))
@ -1383,16 +1397,16 @@ Returns a list of [group article score] vectors."
;; Are we running an additional grep query?
(when-let ((grep-reg (alist-get 'grep query)))
(setq artlist (gnus-search-grep-search engine artlist grep-reg)))
;; Prep prefix.
(when (and prefix (null (string-empty-p prefix)))
(setq prefix (file-name-as-directory (expand-file-name prefix))))
;; Turn (file-name score) into [group article score].
(pcase-dolist (`(,f-name ,score) artlist)
(setq article (file-name-nondirectory f-name))
(setq article (file-name-nondirectory f-name)
group (file-name-directory f-name))
;; Remove prefix.
(when (and prefix
(file-name-absolute-p prefix)
(string-match (concat "^"
(file-name-as-directory prefix))
f-name))
(setq group (replace-match "" t t (file-name-directory f-name))))
(when prefix
(setq group (string-remove-prefix prefix group)))
;; Break the directory name down until it's something that
;; (probably) can be used as a group name.
(setq group

View file

@ -442,6 +442,16 @@ will go to the next group without confirmation."
(const slightly-quietly)
(sexp :menu-tag "on" t)))
(defcustom gnus-paging-select-next t
"Control whether to select the next/prev article when paging.
If non-nil, select the next article when reaching the end of the
article (or the previous article when paging backwards).
If nil, don't do anything at the end/start of the articles."
:version "28.1"
:group 'gnus-summary-maneuvering
:type 'boolean)
(defcustom gnus-auto-select-same nil
"If non-nil, select the next article with the same subject.
If there are no more articles with the same subject, go to
@ -7898,7 +7908,8 @@ Also see the variable `gnus-article-skip-boring'."
(gnus-message 3 "End of message"))
(circular
(gnus-summary-beginning-of-article))
(lines
((or lines
(not gnus-paging-select-next))
(gnus-message 3 "End of message"))
((null lines)
(if (and (eq gnus-summary-goto-unread 'never)
@ -7929,7 +7940,8 @@ the beginning of the buffer."
(gnus-eval-in-buffer-window gnus-article-buffer
(setq endp (gnus-article-prev-page lines)))
(when (and move endp)
(cond (lines
(cond ((or lines
(not gnus-paging-select-next))
(gnus-message 3 "Beginning of message"))
((null lines)
(if (and (eq gnus-summary-goto-unread 'never)

View file

@ -3109,8 +3109,6 @@ Like `text-mode', but with these additional commands:
'(message-font-lock-keywords t))
(if (boundp 'tool-bar-map)
(set (make-local-variable 'tool-bar-map) (message-make-tool-bar)))
(easy-menu-add message-mode-menu message-mode-map)
(easy-menu-add message-mode-field-menu message-mode-map)
;; Mmmm... Forbidden properties...
(add-hook 'after-change-functions #'message-strip-forbidden-properties
nil 'local)

View file

@ -735,8 +735,9 @@ If set, it overrides the setting of `mml2015-sign-with-sender'."
(let* ((coding-system-for-write 'binary)
(coding-system-for-read 'binary)
(data (shell-command-to-string
(format "%s --list-options no-show-photos --attribute-fd 3 --list-keys %s 3>&1 >/dev/null 2>&1"
(shell-quote-argument epg-gpg-program) key-id))))
(format "%s --list-options no-show-photos --attribute-fd 3 --list-keys %s 3>&1 >%s 2>&1"
(shell-quote-argument epg-gpg-program)
key-id null-device))))
(when (> (length data) 0)
(insert (substring data 16))
(condition-case nil

View file

@ -398,7 +398,7 @@ Any details (stdout and stderr) are left in the buffer specified by
`smime-details-buffer'."
(smime-new-details-buffer)
(if (apply 'smime-call-openssl-region b e (list smime-details-buffer t)
"smime" "-verify" "-noverify" "-out" '("/dev/null"))
"smime" "-verify" "-noverify" "-out" `(,null-device))
t
(insert-buffer-substring smime-details-buffer)
nil))

View file

@ -126,17 +126,48 @@ with the current prefix. The files are chosen according to
:group 'help
:version "26.3")
(defun help--symbol-completion-table-affixation (completions)
(mapcar (lambda (c)
(let* ((s (intern c))
(doc (condition-case nil (documentation s) (error nil)))
(doc (and doc (substring doc 0 (string-match "\n" doc)))))
(list c (propertize
(concat (cond ((commandp s)
"c") ; command
((eq (car-safe (symbol-function s)) 'macro)
"m") ; macro
((fboundp s)
"f") ; function
((custom-variable-p s)
"u") ; user option
((boundp s)
"v") ; variable
((facep s)
"a") ; fAce
((and (fboundp 'cl-find-class)
(cl-find-class s))
"t") ; CL type
(" ")) ; something else
" ") ; prefix separator
'face 'completions-annotations)
(if doc (propertize (format " -- %s" doc)
'face 'completions-annotations)
""))))
completions))
(defun help--symbol-completion-table (string pred action)
(when help-enable-completion-autoload
(let ((prefixes (radix-tree-prefixes (help-definition-prefixes) string)))
(help--load-prefixes prefixes)))
(let ((prefix-completions
(and help-enable-completion-autoload
(mapcar #'intern (all-completions string definition-prefixes)))))
(complete-with-action action obarray string
(if pred (lambda (sym)
(or (funcall pred sym)
(memq sym prefix-completions)))))))
(if (and completions-detailed (eq action 'metadata))
'(metadata (affixation-function . help--symbol-completion-table-affixation))
(when help-enable-completion-autoload
(let ((prefixes (radix-tree-prefixes (help-definition-prefixes) string)))
(help--load-prefixes prefixes)))
(let ((prefix-completions
(and help-enable-completion-autoload
(mapcar #'intern (all-completions string definition-prefixes)))))
(complete-with-action action obarray string
(if pred (lambda (sym)
(or (funcall pred sym)
(memq sym prefix-completions))))))))
(defvar describe-function-orig-buffer nil
"Buffer that was current when `describe-function' was invoked.

View file

@ -3084,13 +3084,11 @@ on encoding."
(puthash "BELL (BEL)" ?\a names)
(setq ucs-names names))))
(defun mule--ucs-names-annotation (name)
;; FIXME: It would be much better to add this annotation before rather than
;; after the char name, so the annotations are aligned.
;; FIXME: The default behavior of displaying annotations in italics
;; doesn't work well here.
(let ((char (gethash name ucs-names)))
(when char (format " (%c)" char))))
(defun mule--ucs-names-affixation (names)
(mapcar (lambda (name)
(let ((char (gethash name ucs-names)))
(list name (concat (if char (format "%c" char) " ") "\t") "")))
names))
(defun char-from-name (string &optional ignore-case)
"Return a character as a number from its Unicode name STRING.
@ -3133,13 +3131,14 @@ octal). Treat otherwise-ambiguous strings like \"BED\" (U+1F6CF)
as names, not numbers."
(let* ((enable-recursive-minibuffers t)
(completion-ignore-case t)
(completion-tab-width 4)
(input
(completing-read
prompt
(lambda (string pred action)
(if (eq action 'metadata)
'(metadata
(annotation-function . mule--ucs-names-annotation)
(affixation-function . mule--ucs-names-affixation)
(category . unicode-name))
(complete-with-action action (ucs-names) string pred)))))
(char

View file

@ -2500,11 +2500,18 @@ If search string is empty, just beep."
"Replace just-yanked search string with previously killed string."
(interactive)
(if (not (memq last-command '(isearch-yank-kill isearch-yank-pop)))
;; Fall back on `isearch-yank-kill' for the benefits of people
;; who are used to the old behavior of `M-y' in isearch mode. In
;; future, this fallback may be changed if we ever change
;; `yank-pop' to do something like the kill-ring-browser.
(isearch-yank-kill)
;; Yank string from kill-ring-browser.
(with-isearch-suspended
(let ((string (read-from-kill-ring)))
(if (and isearch-case-fold-search
(eq 'not-yanks search-upper-case))
(setq string (downcase string)))
(if isearch-regexp (setq string (regexp-quote string)))
(setq isearch-yank-flag t)
(setq isearch-new-string (concat isearch-string string)
isearch-new-message (concat isearch-message
(mapconcat 'isearch-text-char-description
string "")))))
(isearch-pop-state)
(isearch-yank-string (current-kill 1))))

View file

@ -1,4 +1,4 @@
;;; arabic.el --- Quail package for inputting Arabic -*- coding: utf-8;-*-
;;; arabic.el --- Quail package for inputting Arabic -*- coding: utf-8; lexical-binding:t -*-
;; Copyright (C) 2007-2020 Free Software Foundation, Inc.

View file

@ -1,4 +1,4 @@
;;; croatian.el -- Quail package for inputting Croatian -*-coding: utf-8;-*-
;;; croatian.el -- Quail package for inputting Croatian -*-coding: utf-8; lexical-binding:t -*-
;; Copyright (C) 2003-2020 Free Software Foundation, Inc.

View file

@ -1,4 +1,4 @@
;;; cyril-jis.el --- Quail package for inputting JISX0208 Cyrillic letters
;;; cyril-jis.el --- Quail package for inputting JISX0208 Cyrillic letters -*- lexical-binding: t -*-
;; Copyright (C) 2001-2020 Free Software Foundation, Inc.
;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,

View file

@ -1,4 +1,4 @@
;;; cyrillic.el --- Quail package for inputting Cyrillic characters
;;; cyrillic.el --- Quail package for inputting Cyrillic characters -*- lexical-binding: t -*-
;; Copyright (C) 1997-1998, 2001-2020 Free Software Foundation, Inc.
;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,

View file

@ -1,4 +1,4 @@
;;; czech.el --- Quail package for inputting Czech -*-coding: utf-8;-*-
;;; czech.el --- Quail package for inputting Czech -*-coding: utf-8; lexical-binding:t -*-
;; Copyright (C) 1998, 2001-2020 Free Software Foundation, Inc.

View file

@ -1,4 +1,4 @@
;;; ethiopic.el --- Quail package for inputting Ethiopic characters -*-coding: utf-8-emacs;-*-
;;; ethiopic.el --- Quail package for inputting Ethiopic characters -*-coding: utf-8-emacs; lexical-binding:t -*-
;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
;; 2006, 2007, 2008, 2009, 2010, 2011

View file

@ -1,4 +1,4 @@
;;; georgian.el --- Quail package for inputting Georgian characters -*-coding: utf-8;-*-
;;; georgian.el --- Quail package for inputting Georgian characters -*- coding: utf-8; lexical-binding:t -*-
;; Copyright (C) 2001-2020 Free Software Foundation, Inc.

View file

@ -1,4 +1,4 @@
;;; greek.el --- Quail package for inputting Greek -*-coding: utf-8-*-
;;; greek.el --- Quail package for inputting Greek -*- coding: utf-8; lexical-binding:t -*-
;; Copyright (C) 2001-2020 Free Software Foundation, Inc.
;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,

View file

@ -1,4 +1,4 @@
;;; hanja-jis.el --- Quail package for inputting Korean Hanja (JISX0208)
;;; hanja-jis.el --- Quail package for inputting Korean Hanja (JISX0208) -*- lexical-binding: t -*-
;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
;; 2006, 2007, 2008, 2009, 2010, 2011

View file

@ -1,4 +1,4 @@
;;; hanja.el --- Quail-package for Korean Hanja (KSC5601) -*-coding: utf-8;-*-
;;; hanja.el --- Quail-package for Korean Hanja (KSC5601) -*-coding: utf-8; lexical-binding: t -*-
;; Copyright (C) 1997, 2001-2020 Free Software Foundation, Inc.
;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,

View file

@ -1,4 +1,4 @@
;;; hanja3.el --- Quail-package for Korean Hanja (KSC5601) -*-coding: utf-8;-*-
;;; hanja3.el --- Quail-package for Korean Hanja (KSC5601) -*-coding: utf-8; lexical-binding: t -*-
;; Copyright (C) 1997, 1999, 2001-2020 Free Software Foundation, Inc.

View file

@ -1,4 +1,4 @@
;; hebrew.el --- Quail package for inputting Hebrew characters -*-coding: utf-8;-*-
;; hebrew.el --- Quail package for inputting Hebrew characters -*- coding: utf-8; lexical-binding: t -*-
;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
;; 2008, 2009, 2010, 2011

View file

@ -1,4 +1,4 @@
;;; ipa-praat.el --- Inputting IPA characters with the conventions of Praat
;;; ipa-praat.el --- Inputting IPA characters with the conventions of Praat -*- lexical-binding: t -*-
;; Copyright (C) 2011-2020 Free Software Foundation, Inc.

View file

@ -1,4 +1,4 @@
;;; latin-alt.el --- Quail package for inputting various European characters -*-coding: utf-8;-*-
;;; latin-alt.el --- Quail package for inputting various European characters -*-coding: utf-8; lexical-binding: t -*-
;; Copyright (C) 1997-1998, 2001-2020 Free Software Foundation, Inc.
;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,

View file

@ -1,4 +1,4 @@
;;; latin-post.el --- Quail packages for inputting various European characters -*-coding: utf-8;-*-
;;; latin-post.el --- Quail packages for inputting various European characters -*-coding: utf-8; lexical-binding: t -*-
;; Copyright (C) 1997-1998, 2001-2020 Free Software Foundation, Inc.
;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,

View file

@ -1,4 +1,4 @@
;;; latin-pre.el --- Quail packages for inputting various European characters -*-coding: utf-8;-*-
;;; latin-pre.el --- Quail packages for inputting various European characters -*-coding: utf-8; lexical-binding: t -*-
;; Copyright (C) 1997-2020 Free Software Foundation, Inc.
;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,

View file

@ -1,4 +1,4 @@
;;; persian.el --- Quail package for inputting Persian/Farsi keyboard -*- coding: utf-8;-*-
;;; persian.el --- Quail package for inputting Persian/Farsi keyboard -*- coding: utf-8; lexical-binding: t -*-
;; Copyright (C) 2011-2020 Free Software Foundation, Inc.

View file

@ -1,4 +1,4 @@
;;; programmer-dvorak.el --- Quail package for the programmer Dvorak layout
;;; programmer-dvorak.el --- Quail package for the programmer Dvorak layout -*- lexical-binding: t -*-
;; Copyright (C) 2015-2020 Free Software Foundation, Inc.

View file

@ -1,4 +1,4 @@
;;; py-punct.el --- Quail packages for Chinese (pinyin + extra symbols)
;;; py-punct.el --- Quail packages for Chinese (pinyin + extra symbols) -*- lexical-binding: t -*-
;; Copyright (C) 2001-2020 Free Software Foundation, Inc.
;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,

View file

@ -1,4 +1,4 @@
;;; pypunct-b5.el --- Quail packages for Chinese (pinyin + extra symbols)
;;; pypunct-b5.el --- Quail packages for Chinese (pinyin + extra symbols) -*- lexical-binding: t -*-
;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
;; 2006, 2007, 2008, 2009, 2010, 2011

View file

@ -1,4 +1,4 @@
;;; rfc1345.el --- Quail method for RFC 1345 mnemonics -*- coding: utf-8 -*-
;;; rfc1345.el --- Quail method for RFC 1345 mnemonics -*- coding: utf-8; lexical-binding: t -*-
;; Copyright (C) 2001-2020 Free Software Foundation, Inc.

View file

@ -1,4 +1,4 @@
;;; sami.el --- Quail package for inputting Sámi -*-coding: utf-8;-*-
;;; sami.el --- Quail package for inputting Sámi -*-coding: utf-8; lexical-binding: t -*-
;; Copyright (C) 2019-2020 Free Software Foundation, Inc.

View file

@ -1,4 +1,4 @@
;;; sgml-input.el --- Quail method for Unicode entered as SGML entities -*- coding: utf-8 -*-
;;; sgml-input.el --- Quail method for Unicode entered as SGML entities -*- coding: utf-8; lexical-binding: t -*-
;; Copyright (C) 2001-2020 Free Software Foundation, Inc.

View file

@ -1,4 +1,4 @@
;;; slovak.el --- Quail package for inputting Slovak -*-coding: utf-8;-*-
;;; slovak.el --- Quail package for inputting Slovak -*-coding: utf-8; lexical-binding: t -*-
;; Copyright (C) 1998, 2001-2020 Free Software Foundation, Inc.

View file

@ -1,4 +1,4 @@
;;; symbol-ksc.el --- Quail-package for Korean Symbol (KSC5601) -*-coding: utf-8;-*-
;;; symbol-ksc.el --- Quail-package for Korean Symbol (KSC5601) -*-coding: utf-8; lexical-binding: t -*-
;; Copyright (C) 1997, 2001-2020 Free Software Foundation, Inc.
;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,

View file

@ -1,4 +1,4 @@
;;; tamil-dvorak.el --- Quail package for Tamil input with Dvorak keyboard
;;; tamil-dvorak.el --- Quail package for Tamil input with Dvorak keyboard -*- lexical-binding: t -*-
;; Copyright (C) 2015-2020 Free Software Foundation, Inc.

View file

@ -1,4 +1,4 @@
;;; vntelex.el --- Quail package for Vietnamese by Telex method
;;; vntelex.el --- Quail package for Vietnamese by Telex method -*- lexical-binding: t -*-
;; Copyright (C) 2001-2020 Free Software Foundation, Inc.

View file

@ -1,4 +1,4 @@
;;; vnvni.el --- Quail package for Vietnamese by VNI method
;;; vnvni.el --- Quail package for Vietnamese by VNI method -*- lexical-binding: t -*-
;; Copyright (C) 2001-2020 Free Software Foundation, Inc.

View file

@ -1,4 +1,4 @@
;;; welsh.el --- Quail package for inputting Welsh characters -*-coding: utf-8;-*-
;;; welsh.el --- Quail package for inputting Welsh characters -*- coding: utf-8; lexical-binding: t -*-
;; Copyright (C) 2001-2020 Free Software Foundation, Inc.

View file

@ -656,9 +656,10 @@ perform the operation on all messages in that region.
(mh-funcall-if-exists hl-line-mode 1)
(setq revert-buffer-function 'mh-undo-folder)
(add-to-list 'minor-mode-alist '(mh-showing-mode " Show"))
(easy-menu-add mh-folder-sequence-menu)
(easy-menu-add mh-folder-message-menu)
(easy-menu-add mh-folder-folder-menu)
(mh-do-in-xemacs
(easy-menu-add mh-folder-sequence-menu)
(easy-menu-add mh-folder-message-menu)
(easy-menu-add mh-folder-folder-menu))
(mh-inc-spool-make)
(mh-set-help mh-folder-mode-help-messages)
(if (and (featurep 'xemacs)

View file

@ -91,7 +91,7 @@ See `mh-identity-add-menu'."
"Add the current Identity menu.
See `mh-identity-make-menu'."
(if mh-identity-menu
(easy-menu-add mh-identity-menu)))
(mh-do-in-xemacs (easy-menu-add mh-identity-menu))))
(defvar mh-identity-local nil
"Buffer-local variable that holds the identity currently in use.")

View file

@ -330,7 +330,7 @@ order).
(t
;; ...or the header only
(setq font-lock-defaults '((mh-show-font-lock-keywords) t))))
(easy-menu-add mh-letter-menu)
(mh-do-in-xemacs (easy-menu-add mh-letter-menu))
;; Maybe we want to use the existing Mail menu from mail-mode in
;; 9.0; in the mean time, let's remove it since the redundancy will
;; only produce confusion.

View file

@ -618,7 +618,7 @@ The hook `mh-search-mode-hook' is called upon entry to this mode.
\\{mh-search-mode-map}"
(easy-menu-add mh-pick-menu)
(mh-do-in-xemacs (easy-menu-add mh-pick-menu))
(mh-set-help mh-search-mode-help-messages))

View file

@ -863,9 +863,10 @@ See also `mh-folder-mode'.
(when mh-decode-mime-flag
(mh-make-local-hook 'kill-buffer-hook)
(add-hook 'kill-buffer-hook 'mh-mime-cleanup nil t))
(easy-menu-add mh-show-sequence-menu)
(easy-menu-add mh-show-message-menu)
(easy-menu-add mh-show-folder-menu)
(mh-do-in-xemacs
(easy-menu-add mh-show-sequence-menu)
(easy-menu-add mh-show-message-menu)
(easy-menu-add mh-show-folder-menu))
(make-local-variable 'mh-show-folder-buffer)
(buffer-disable-undo)
(use-local-map mh-show-mode-map))

View file

@ -83,7 +83,6 @@
;; - add support for ** to pcm.
;; - Add vc-file-name-completion-table to read-file-name-internal.
;; - A feature like completing-help.el.
;;; Code:
@ -121,6 +120,10 @@ This metadata is an alist. Currently understood keys are:
- `annotation-function': function to add annotations in *Completions*.
Takes one argument (STRING), which is a possible completion and
returns a string to append to STRING.
- `affixation-function': function to prepend/append a prefix/suffix to
entries. Takes one argument (COMPLETIONS) and should return a list
of completions with a list of three elements: completion, its prefix
and suffix.
- `display-sort-function': function to sort entries in *Completions*.
Takes one argument (COMPLETIONS) and should return a new list
of completions. Can operate destructively.
@ -1131,6 +1134,7 @@ completion candidates than this number."
(defvar-local completion-all-sorted-completions nil)
(defvar-local completion--all-sorted-completions-location nil)
(defvar completion-cycling nil) ;Function that takes down the cycling map.
(defvar completion-tab-width nil)
(defvar completion-fail-discreetly nil
"If non-nil, stay quiet when there is no match.")
@ -1669,18 +1673,27 @@ Return nil if there is no valid completion, else t."
(#b000 nil)
(_ t))))
(defface completions-annotations '((t :inherit italic))
(defface completions-annotations '((t :inherit (italic shadow)))
"Face to use for annotations in the *Completions* buffer.")
(defcustom completions-format 'horizontal
"Define the appearance and sorting of completions.
If the value is `vertical', display completions sorted vertically
in columns in the *Completions* buffer.
If the value is `horizontal', display completions sorted
horizontally in alphabetical order, rather than down the screen."
:type '(choice (const horizontal) (const vertical))
If the value is `horizontal', display completions sorted in columns
horizontally in alphabetical order, rather than down the screen.
If the value is `one-column', display completions down the screen
in one column."
:type '(choice (const horizontal) (const vertical) (const one-column))
:version "23.2")
(defcustom completions-detailed nil
"When non-nil, display completions with details added as prefix/suffix.
Some commands might provide a detailed view with more information prepended
or appended to completions."
:type 'boolean
:version "28.1")
(defun completion--insert-strings (strings)
"Insert a list of STRINGS into the current buffer.
Uses columns to keep the listing readable but compact.
@ -1689,8 +1702,7 @@ It also eliminates runs of equal strings."
(let* ((length (apply #'max
(mapcar (lambda (s)
(if (consp s)
(+ (string-width (car s))
(string-width (cadr s)))
(apply #'+ (mapcar #'string-width s))
(string-width s)))
strings)))
(window (get-buffer-window (current-buffer) 0))
@ -1707,6 +1719,11 @@ It also eliminates runs of equal strings."
(row 0)
(first t)
(laststring nil))
(unless (or tab-stop-list (null completion-tab-width)
(zerop (mod colwidth completion-tab-width)))
;; Align to tab positions for the case
;; when the caller uses tabs inside prefix.
(setq colwidth (- colwidth (mod colwidth completion-tab-width))))
;; The insertion should be "sensible" no matter what choices were made
;; for the parameters above.
(dolist (str strings)
@ -1715,10 +1732,12 @@ It also eliminates runs of equal strings."
;; FIXME: `string-width' doesn't pay attention to
;; `display' properties.
(let ((length (if (consp str)
(+ (string-width (car str))
(string-width (cadr str)))
(apply #'+ (mapcar #'string-width str))
(string-width str))))
(cond
((eq completions-format 'one-column)
;; Nothing special
)
((eq completions-format 'vertical)
;; Vertical format
(when (> row rows)
@ -1745,23 +1764,46 @@ It also eliminates runs of equal strings."
;; already past the goal column, there is still
;; a space displayed.
(set-text-properties (1- (point)) (point)
;; We can't just set tab-width, because
;; completion-setup-function will kill
;; all local variables :-(
;; We can set tab-width using
;; completion-tab-width, but
;; the caller can prefer using
;; \t to align prefixes.
`(display (space :align-to ,column)))
nil))))
(setq first nil)
(if (not (consp str))
(put-text-property (point) (progn (insert str) (point))
'mouse-face 'highlight)
(put-text-property (point) (progn (insert (car str)) (point))
'mouse-face 'highlight)
(let ((beg (point))
(end (progn (insert (cadr str)) (point))))
(put-text-property beg end 'mouse-face nil)
(font-lock-prepend-text-property beg end 'face
'completions-annotations)))
;; If `str' is a list that has 2 elements,
;; then the second element is a suffix annotation.
;; If `str' has 3 elements, then the second element
;; is a prefix, and the third element is a suffix.
(let* ((prefix (when (nth 2 str) (nth 1 str)))
(suffix (or (nth 2 str) (nth 1 str))))
(when prefix
(let ((beg (point))
(end (progn (insert prefix) (point))))
(put-text-property beg end 'mouse-face nil)
;; When both prefix and suffix are added
;; by the caller via affixation-function,
;; then allow the caller to decide
;; what faces to put on prefix and suffix.
(unless prefix
(font-lock-prepend-text-property
beg end 'face 'completions-annotations))))
(put-text-property (point) (progn (insert (car str)) (point))
'mouse-face 'highlight)
(let ((beg (point))
(end (progn (insert suffix) (point))))
(put-text-property beg end 'mouse-face nil)
;; Put the predefined face only when suffix
;; is added via annotation-function.
(unless prefix
(font-lock-prepend-text-property
beg end 'face 'completions-annotations)))))
(cond
((eq completions-format 'one-column)
(insert "\n"))
((eq completions-format 'vertical)
;; Vertical format
(if (> column 0)
@ -1880,6 +1922,11 @@ These include:
completion). The function can access the completion data via
`minibuffer-completion-table' and related variables.
`:affixation-function': Function to prepend/append a prefix/suffix to
completions. The function must accept one argument, a list of
completions, and return a list where each element is a list of
three elements: a completion, a prefix and a suffix.
`:exit-function': Function to run after completion is performed.
The function must accept two arguments, STRING and STATUS.
@ -1962,10 +2009,13 @@ variables.")
base-size md
minibuffer-completion-table
minibuffer-completion-predicate))
(afun (or (completion-metadata-get all-md 'annotation-function)
(plist-get completion-extra-properties
:annotation-function)
completion-annotate-function))
(ann-fun (or (completion-metadata-get all-md 'annotation-function)
(plist-get completion-extra-properties
:annotation-function)
completion-annotate-function))
(aff-fun (or (completion-metadata-get all-md 'affixation-function)
(plist-get completion-extra-properties
:affixation-function)))
(mainbuf (current-buffer))
;; If the *Completions* buffer is shown in a new
;; window, mark it as softly-dedicated, so bury-buffer in
@ -2006,12 +2056,15 @@ variables.")
(if sort-fun
(funcall sort-fun completions)
(sort completions 'string-lessp))))
(when afun
(when ann-fun
(setq completions
(mapcar (lambda (s)
(let ((ann (funcall afun s)))
(let ((ann (funcall ann-fun s)))
(if ann (list s ann) s)))
completions)))
(when aff-fun
(setq completions
(funcall aff-fun completions)))
(with-current-buffer standard-output
(set (make-local-variable 'completion-base-position)
@ -3034,19 +3087,6 @@ the commands start with a \"-\" or a SPC."
:version "24.1"
:type 'boolean)
(defcustom minibuffer-default-prompt-format " (default %s)"
"Format string used to output \"default\" values.
When prompting for input, there will often be a default value,
leading to prompts like \"Number of articles (default 50): \".
The \"default\" part of that prompt is controlled by this
variable, and can be set to, for instance, \" [%s]\" if you want
a shorter displayed prompt, or \"\", if you don't want to display
the default at all.
This variable is used by the `format-prompt' function."
:version "28.1"
:type 'string)
(defun completion-pcm--pattern-trivial-p (pattern)
(and (stringp (car pattern))
;; It can be followed by `point' and "" and still be trivial.
@ -3864,6 +3904,19 @@ the minibuffer was activated, and execute the forms."
(with-minibuffer-selected-window
(scroll-other-window-down arg)))
(defcustom minibuffer-default-prompt-format " (default %s)"
"Format string used to output \"default\" values.
When prompting for input, there will often be a default value,
leading to prompts like \"Number of articles (default 50): \".
The \"default\" part of that prompt is controlled by this
variable, and can be set to, for instance, \" [%s]\" if you want
a shorter displayed prompt, or \"\", if you don't want to display
the default at all.
This variable is used by the `format-prompt' function."
:version "28.1"
:type 'string)
(defun format-prompt (prompt default &rest format-args)
"Format PROMPT with DEFAULT according to `minibuffer-default-prompt-format'.
If FORMAT-ARGS is nil, PROMPT is used as a plain string. If

View file

@ -56,6 +56,13 @@
:group 'eww
:type 'string)
(defcustom eww-use-browse-url "\\`mailto:"
"eww will use `browse-url' when following links that match this regexp.
The action to be taken can further be customized via
`browse-url-handlers'."
:version "28.1"
:type 'regexp)
(defun erc--download-directory ()
"Return the name of the download directory.
If ~/Downloads/ exists, that will be used, and if not, the
@ -1731,7 +1738,7 @@ If EXTERNAL is double prefix, browse in new buffer."
(cond
((not url)
(message "No link under point"))
((string-match-p "\\`mailto:" url)
((string-match-p eww-use-browse-url url)
;; This respects the user options `browse-url-handlers'
;; and `browse-url-mailto-function'.
(browse-url url))

View file

@ -143,8 +143,7 @@ require \"fileinto\";
(define-derived-mode sieve-manage-mode special-mode "Sieve-manage"
"Mode used for sieve script management."
(buffer-disable-undo (current-buffer))
(setq truncate-lines t)
(easy-menu-add sieve-manage-mode-menu sieve-manage-mode-map))
(setq truncate-lines t))
;; Commands used in sieve-manage mode:

View file

@ -363,7 +363,8 @@ ARGUMENTS to pass to the OPERATION."
;; by GNU Coreutils. Force "ls" to print one column and set
;; time-style to imitate other "ls" flavors.
((tramp-adb-send-command-and-check
vec "ls --time-style=long-iso /dev/null")
vec (concat "ls --time-style=long-iso "
(tramp-get-remote-null-device vec)))
"ls -1 --time-style=long-iso")
;; Can't disable coloring explicitly for toybox ls command. We
;; also must force "ls" to print just one column.
@ -371,7 +372,8 @@ ARGUMENTS to pass to the OPERATION."
;; On CyanogenMod based system BusyBox is used and "ls" output
;; coloring is enabled by default. So we try to disable it when
;; possible.
((tramp-adb-send-command-and-check vec "ls --color=never -al /dev/null")
((tramp-adb-send-command-and-check
vec (concat "ls --color=never -al " (tramp-get-remote-null-device vec)))
"ls --color=never")
(t "ls"))))
@ -611,13 +613,13 @@ But handle the case, if the \"test\" command is not available."
;; (introduced in POSIX.1-2008) fails.
(tramp-adb-send-command-and-check
v (format
(concat "touch -d %s %s %s 2>/dev/null || "
"touch -d %s %s %s 2>/dev/null || "
(concat "touch -d %s %s %s 2>%s || "
"touch -d %s %s %s 2>%s || "
"touch -t %s %s %s")
(format-time-string "%Y-%m-%dT%H:%M:%S.%NZ" time t)
nofollow quoted-name
nofollow quoted-name (tramp-get-remote-null-device v)
(format-time-string "%Y-%m-%dT%H:%M:%S" time t)
nofollow quoted-name
nofollow quoted-name (tramp-get-remote-null-device v)
(format-time-string "%Y%m%d%H%M.%S" time t)
nofollow quoted-name)))))
@ -791,7 +793,7 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored."
(cons program args) " "))
;; Determine input.
(if (null infile)
(setq input "/dev/null")
(setq input (tramp-get-remote-null-device v))
(setq infile (expand-file-name infile))
(if (tramp-equal-remote default-directory infile)
;; INFILE is on the same remote host.
@ -833,7 +835,7 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored."
tmpstderr (tramp-make-tramp-file-name v stderr))))
;; stderr to be discarded.
((null (cadr destination))
(setq stderr "/dev/null"))))
(setq stderr (tramp-get-remote-null-device v)))))
;; 't
(destination
(setq outbuf (current-buffer))))
@ -1316,23 +1318,24 @@ connection if a previous connection has died for some reason."
;; Mark it as connected.
(tramp-set-connection-property p "connected" t)))))))
;; Default settings for connection-local variables.
(defconst tramp-adb-connection-local-default-profile
'((shell-file-name . "/system/bin/sh")
(shell-command-switch . "-c"))
"Default connection-local variables for remote adb connections.")
;;; Default connection-local variables for Tramp:
;; `connection-local-set-profile-variables' and
;; `connection-local-set-profiles' exists since Emacs 26.1.
(defconst tramp-adb-connection-local-default-shell-variables
'((shell-file-name . "/system/bin/sh")
(shell-command-switch . "-c"))
"Default connection-local shell variables for remote adb connections.")
(tramp-compat-funcall
'connection-local-set-profile-variables
'tramp-adb-connection-local-default-shell-profile
tramp-adb-connection-local-default-shell-variables)
(with-eval-after-load 'shell
(tramp-compat-funcall
'connection-local-set-profile-variables
'tramp-adb-connection-local-default-profile
tramp-adb-connection-local-default-profile)
(tramp-compat-funcall
'connection-local-set-profiles
`(:application tramp :protocol ,tramp-adb-method)
'tramp-adb-connection-local-default-profile))
'tramp-adb-connection-local-default-shell-profile))
(add-hook 'tramp-unload-hook
(lambda ()

View file

@ -43,6 +43,7 @@
;; `temporary-file-directory' as function is introduced with Emacs 26.1.
(declare-function tramp-handle-temporary-file-directory "tramp")
(declare-function tramp-tramp-file-p "tramp")
(defvar tramp-temp-name-prefix)
(defconst tramp-compat-emacs-compiled-version (eval-when-compile emacs-version)
@ -333,6 +334,13 @@ A nil value for either argument stands for the current time."
(null (tramp-compat-directory-files
dir nil directory-files-no-dot-files-regexp t 1))))))
;; Function `null-device' is new in Emacs 28.1.
(defalias 'tramp-compat-null-device
(if (fboundp 'null-device)
#'null-device
(lambda ()
(if (tramp-tramp-file-p default-directory) "/dev/null" null-device))))
(add-hook 'tramp-unload-hook
(lambda ()
(unload-feature 'tramp-loaddefs 'force)

View file

@ -262,23 +262,39 @@ NAME must be equal to `tramp-current-connection'."
(info-lookup->topic-cache 'symbol))))))))
;;; Default connection-local variables for Tramp:
(defconst tramp-connection-local-default-profile
'((shell-file-name . "/bin/sh")
(shell-command-switch . "-c"))
"Default connection-local variables for remote connections.")
;; `connection-local-set-profile-variables' and
;; `connection-local-set-profiles' exists since Emacs 26.1.
(defconst tramp-connection-local-default-system-variables
'((path-separator . ":")
(null-device . "/dev/null"))
"Default connection-local system variables for remote connections.")
(tramp-compat-funcall
'connection-local-set-profile-variables
'tramp-connection-local-default-system-profile
tramp-connection-local-default-system-variables)
(tramp-compat-funcall
'connection-local-set-profiles
`(:application tramp)
'tramp-connection-local-default-system-profile)
(defconst tramp-connection-local-default-shell-variables
'((shell-file-name . "/bin/sh")
(shell-command-switch . "-c"))
"Default connection-local shell variables for remote connections.")
(tramp-compat-funcall
'connection-local-set-profile-variables
'tramp-connection-local-default-shell-profile
tramp-connection-local-default-shell-variables)
(with-eval-after-load 'shell
(tramp-compat-funcall
'connection-local-set-profile-variables
'tramp-connection-local-default-profile
tramp-connection-local-default-profile)
(tramp-compat-funcall
'connection-local-set-profiles
`(:application tramp)
'tramp-connection-local-default-profile))
'tramp-connection-local-default-shell-profile))
(add-hook 'tramp-unload-hook
(lambda () (unload-feature 'tramp-integration 'force)))

View file

@ -244,14 +244,14 @@ The string is used in `tramp-methods'.")
(add-to-list 'tramp-methods
`("telnet"
(tramp-login-program "telnet")
(tramp-login-args (("%h") ("%p") ("2>/dev/null")))
(tramp-login-args (("%h") ("%p") ("%n")))
(tramp-remote-shell ,tramp-default-remote-shell)
(tramp-remote-shell-login ("-l"))
(tramp-remote-shell-args ("-c"))))
(add-to-list 'tramp-methods
`("nc"
(tramp-login-program "telnet")
(tramp-login-args (("%h") ("%p") ("2>/dev/null")))
(tramp-login-args (("%h") ("%p") ("%n")))
(tramp-remote-shell ,tramp-default-remote-shell)
(tramp-remote-shell-login ("-l"))
(tramp-remote-shell-args ("-c"))
@ -262,8 +262,7 @@ The string is used in `tramp-methods'.")
;; We use "-p" as required for newer busyboxes. For older
;; busybox/nc versions, the value must be (("-l") ("%r")). This
;; can be achieved by tweaking `tramp-connection-properties'.
(tramp-remote-copy-args (("-l") ("-p" "%r")
("2>/dev/null")))))
(tramp-remote-copy-args (("-l") ("-p" "%r") ("%n")))))
(add-to-list 'tramp-methods
`("su"
(tramp-login-program "su")
@ -763,7 +762,7 @@ This string is passed to `format', so percent characters need to be doubled.")
;; These two use base64 encoding.
(defconst tramp-perl-encode-with-module
"%s -MMIME::Base64 -0777 -ne 'print encode_base64($_)' 2>/dev/null"
"%s -MMIME::Base64 -0777 -ne 'print encode_base64($_)' %n"
"Perl program to use for encoding a file.
Escape sequence %s is replaced with name of Perl binary.
This string is passed to `format', so percent characters need to be doubled.
@ -771,7 +770,7 @@ This implementation requires the MIME::Base64 Perl module to be installed
on the remote host.")
(defconst tramp-perl-decode-with-module
"%s -MMIME::Base64 -0777 -ne 'print decode_base64($_)' 2>/dev/null"
"%s -MMIME::Base64 -0777 -ne 'print decode_base64($_)' %n"
"Perl program to use for decoding a file.
Escape sequence %s is replaced with name of Perl binary.
This string is passed to `format', so percent characters need to be doubled.
@ -812,7 +811,7 @@ while (read STDIN, $data, 54) {
(substr(unpack(q(B*), $data) . q(00000), 0, 432) =~ /....../g)),
$pad,
qq(\\n);
}' 2>/dev/null"
}' %n"
"Perl program to use for encoding a file.
Escape sequence %s is replaced with name of Perl binary.
This string is passed to `format', so percent characters need to be doubled.")
@ -856,7 +855,7 @@ while (my $data = <STDIN>) {
((join q(), map {$trans{$_} || q()} split //, $chunk) =~ /......../g);
last if $finished;
}' 2>/dev/null"
}' %n"
"Perl program to use for decoding a file.
Escape sequence %s is replaced with name of Perl binary.
This string is passed to `format', so percent characters need to be doubled.")
@ -938,7 +937,7 @@ BEGIN {
if (o) {
printf \"%%c\", o
} else {
system(\"dd if=/dev/zero bs=1 count=1 2>/dev/null\")
system(\"dd if=/dev/zero bs=1 count=1 %n\")
}
obc=0; o=0
}
@ -1785,7 +1784,7 @@ ID-FORMAT valid values are `string' and `integer'."
"cd %s && echo \"(\"; (%s %s -a | tr '\\n\\r' '\\000\\000' | "
"xargs -0 %s -c "
"'(%s%%n%s (%s%%N%s) %%h %s %s %%X %%Y %%Z %%s %s%%A%s t %%i -1)' "
"-- 2>/dev/null | sed -e 's/\"/\\\\\"/g' -e 's/%s/\"/g'); echo \")\"")
"-- 2>%s | sed -e 's/\"/\\\\\"/g' -e 's/%s/\"/g'); echo \")\"")
(tramp-shell-quote-argument localname)
(tramp-get-ls-command vec)
;; On systems which have no quoting style, file names with special
@ -1801,6 +1800,7 @@ ID-FORMAT valid values are `string' and `integer'."
"%g"
(eval-when-compile (concat tramp-stat-marker "%G" tramp-stat-marker)))
tramp-stat-marker tramp-stat-marker
(tramp-get-remote-null-device vec)
tramp-stat-quoted-marker)))
;; This function should return "foo/" for directories and "bar" for
@ -1827,14 +1827,16 @@ ID-FORMAT valid values are `string' and `integer'."
(tramp-shell-quote-argument localname)))
(format (concat
"(cd %s 2>&1 && %s -a 2>/dev/null"
"(cd %s 2>&1 && %s -a 2>%s"
" | while IFS= read f; do"
" if %s -d \"$f\" 2>/dev/null;"
" if %s -d \"$f\" 2>%s;"
" then \\echo \"$f/\"; else \\echo \"$f\"; fi; done"
" && \\echo ok) || \\echo fail")
(tramp-shell-quote-argument localname)
(tramp-get-ls-command v)
(tramp-get-test-command v))))
(tramp-get-remote-null-device v)
(tramp-get-test-command v)
(tramp-get-remote-null-device v))))
;; Now grab the output.
(with-current-buffer (tramp-get-buffer v)
@ -2362,7 +2364,8 @@ The method used must be an out-of-band method."
options (format-spec (tramp-ssh-controlmaster-options v) spec)
spec (format-spec-make
?h host ?u user ?p port ?r listener ?c options
?k (if keep-date " " ""))
?k (if keep-date " " "")
?n (concat "2>" (tramp-get-remote-null-device v)))
copy-program (tramp-get-method-parameter v 'tramp-copy-program)
copy-keep-date (tramp-get-method-parameter
v 'tramp-copy-keep-date)
@ -2629,12 +2632,13 @@ The method used must be an out-of-band method."
(if full-directory-p
(tramp-send-command
v
(format "%s %s %s 2>/dev/null"
(format "%s %s %s 2>%s"
(tramp-get-ls-command v)
switches
(if wildcard
localname
(tramp-shell-quote-argument (concat localname ".")))))
(tramp-shell-quote-argument (concat localname ".")))
(tramp-get-remote-null-device v)))
(tramp-barf-unless-okay
v
(format "cd %s" (tramp-shell-quote-argument
@ -2645,7 +2649,7 @@ The method used must be an out-of-band method."
(tramp-run-real-handler #'file-name-directory (list localname))))
(tramp-send-command
v
(format "%s %s %s 2>/dev/null"
(format "%s %s %s 2>%s"
(tramp-get-ls-command v)
switches
(if (or wildcard
@ -2655,7 +2659,8 @@ The method used must be an out-of-band method."
""
(tramp-shell-quote-argument
(tramp-run-real-handler
#'file-name-nondirectory (list localname)))))))
#'file-name-nondirectory (list localname))))
(tramp-get-remote-null-device v))))
(save-restriction
(let ((beg (point)))
@ -3146,7 +3151,7 @@ implementation will be used."
(mapconcat #'tramp-shell-quote-argument uenv " ") command)))
;; Determine input.
(if (null infile)
(setq input "/dev/null")
(setq input (tramp-get-remote-null-device v))
(setq infile (expand-file-name infile))
(if (tramp-equal-remote default-directory infile)
;; INFILE is on the same remote host.
@ -3188,7 +3193,7 @@ implementation will be used."
tmpstderr (tramp-make-tramp-file-name v stderr 'nohop))))
;; stderr to be discarded.
((null (cadr destination))
(setq stderr "/dev/null"))))
(setq stderr (tramp-get-remote-null-device v)))))
;; 't
(destination
(setq outbuf (current-buffer))))
@ -4117,7 +4122,10 @@ variable PATH."
(pipe-buf
(with-tramp-connection-property vec "pipe-buf"
(tramp-send-command-and-read
vec "getconf PIPE_BUF / 2>/dev/null || echo 4096" 'noerror)))
vec
(format "getconf PIPE_BUF / 2>%s || echo 4096"
(tramp-get-remote-null-device vec))
'noerror)))
tmpfile chunk chunksize)
(tramp-message vec 5 "Setting $PATH environment variable")
(if (< (length command) pipe-buf)
@ -4439,7 +4447,12 @@ process to set up. VEC specifies the connection."
(tramp-find-shell vec)
;; Disable unexpected output.
(tramp-send-command vec "mesg n 2>/dev/null; biff n 2>/dev/null" t)
(tramp-send-command
vec
(format "mesg n 2>%s; biff n 2>%s"
(tramp-get-remote-null-device vec)
(tramp-get-remote-null-device vec))
t)
;; IRIX64 bash expands "!" even when in single quotes. This
;; destroys our shell functions, we must disable it. See
@ -4454,7 +4467,8 @@ process to set up. VEC specifies the connection."
;; Set utf8 encoding. Needed for macOS, for example. This is
;; non-POSIX, so we must expect errors on some systems.
(tramp-send-command vec "stty iutf8 2>/dev/null" t)
(tramp-send-command
vec (concat "stty iutf8 2>" (tramp-get-remote-null-device vec)) t)
;; Set `remote-tty' process property.
(let ((tty (tramp-send-command-and-read vec "echo \\\"`tty`\\\"" 'noerror)))
@ -4570,7 +4584,8 @@ program will be transferred to the remote host, and it is
available as shell function with the same name. A \"%t\" format
specifier in the variable value denotes a temporary file.
\"%a\", \"%h\" and \"%o\" format specifiers are replaced by the
respective `awk', `hexdump' and `od' commands.
respective `awk', `hexdump' and `od' commands. \"%n\" is
replaced by \"2>/dev/null\".
The optional TEST command can be used for further tests, whether
ENCODING and DECODING are applicable.")
@ -4657,6 +4672,8 @@ Goes through the list `tramp-local-coding-commands' and
(format-spec-make
?a (tramp-get-remote-awk vec)
?h (tramp-get-remote-hexdump vec)
?n (concat
"2>" (tramp-get-remote-null-device vec))
?o (tramp-get-remote-od vec)))
value (replace-regexp-in-string "%" "%%" value)))
(tramp-maybe-send-script vec value name)
@ -4665,7 +4682,10 @@ Goes through the list `tramp-local-coding-commands' and
vec 5
"Checking remote encoding command `%s' for sanity" rem-enc)
(unless (tramp-send-command-and-check
vec (format "%s </dev/null" rem-enc) t)
vec
(format
"%s <%s" rem-enc (tramp-get-remote-null-device vec))
t)
(throw 'wont-work-remote nil))
(unless (stringp rem-dec)
@ -4681,6 +4701,8 @@ Goes through the list `tramp-local-coding-commands' and
(format-spec-make
?a (tramp-get-remote-awk vec)
?h (tramp-get-remote-hexdump vec)
?n (concat
"2>" (tramp-get-remote-null-device vec))
?o (tramp-get-remote-od vec)))
value (replace-regexp-in-string "%" "%%" value)))
(when (string-match-p "\\(^\\|[^%]\\)%t" value)
@ -4727,7 +4749,7 @@ Goes through the list `tramp-local-coding-commands' and
"Call the local encoding or decoding command.
If CMD contains \"%s\", provide input file INPUT there in command.
Otherwise, INPUT is passed via standard input.
INPUT can also be nil which means `/dev/null'.
INPUT can also be nil which means `null-device'.
OUTPUT can be a string (which specifies a file name), or t (which
means standard output and thus the current buffer), or nil (which
means discard it)."
@ -4957,7 +4979,7 @@ connection if a previous connection has died for some reason."
(setenv "PS1" tramp-initial-end-of-output)
(unless (stringp tramp-encoding-shell)
(tramp-error vec 'file-error "`tramp-encoding-shell' not set"))
(let* ((current-host (system-name))
(let* ((current-host tramp-system-name)
(target-alist (tramp-compute-multi-hops vec))
;; We will apply `tramp-ssh-controlmaster-options'
;; only for the first hop.
@ -5199,14 +5221,17 @@ status is 0, and nil otherwise.
If the optional argument SUBSHELL is non-nil, the command is
executed in a subshell, ie surrounded by parentheses. If
DONT-SUPPRESS-ERR is non-nil, stderr won't be sent to /dev/null.
DONT-SUPPRESS-ERR is non-nil, stderr won't be sent to \"/dev/null\".
Optional argument EXIT-STATUS, if non-nil, triggers the return of
the exit status."
(tramp-send-command
vec
(concat (if subshell "( " "")
command
(if command (if dont-suppress-err "; " " 2>/dev/null; ") "")
(if command
(if dont-suppress-err
"; " (format " 2>%s; " (tramp-get-remote-null-device vec)))
"")
"echo tramp_exit_status $?"
(if subshell " )" "")))
(with-current-buffer (tramp-get-connection-buffer vec)
@ -5416,7 +5441,11 @@ Nonexistent directories are removed from spec."
(when elt1
(or
(tramp-send-command-and-read
vec "echo \\\"`getconf PATH 2>/dev/null`\\\"" 'noerror)
vec
(format
"echo \\\"`getconf PATH 2>%s`\\\""
(tramp-get-remote-null-device vec))
'noerror)
;; Default if "getconf" is not available.
(progn
(tramp-message
@ -5520,7 +5549,8 @@ Nonexistent directories are removed from spec."
vec (format "%s -lnd /" result))
(when (tramp-send-command-and-check
vec (format
"%s --color=never -al /dev/null" result))
"%s --color=never -al %s"
result (tramp-get-remote-null-device vec)))
(setq result (concat result " --color=never")))
(throw 'ls-found result))
(setq dl (cdr dl))))))
@ -5541,7 +5571,9 @@ Nonexistent directories are removed from spec."
(format
"%s --help 2>&1 | grep -iq busybox" (tramp-get-ls-command vec))))
(tramp-send-command-and-check
vec (format "%s %s -al /dev/null" (tramp-get-ls-command vec) option))
vec (format
"%s %s -al %s"
(tramp-get-ls-command vec) option (tramp-get-remote-null-device vec)))
option)))
(defun tramp-get-test-command (vec)
@ -5820,7 +5852,7 @@ This command is returned only if `delete-by-moving-to-trash' is non-nil."
(command (format "%s %s" busybox "awk")))
(and busybox
(tramp-send-command-and-check
vec (concat command " {} </dev/null"))
vec (concat command " {} <" (tramp-get-remote-null-device vec)))
command)))))
(defun tramp-get-remote-hexdump (vec)
@ -5831,7 +5863,8 @@ This command is returned only if `delete-by-moving-to-trash' is non-nil."
(let* ((busybox (tramp-get-remote-busybox vec))
(command (format "%s %s" busybox "hexdump")))
(and busybox
(tramp-send-command-and-check vec (concat command " </dev/null"))
(tramp-send-command-and-check
vec (concat command " <" (tramp-get-remote-null-device vec)))
command)))))
(defun tramp-get-remote-od (vec)
@ -5843,7 +5876,8 @@ This command is returned only if `delete-by-moving-to-trash' is non-nil."
(command (format "%s %s" busybox "od")))
(and busybox
(tramp-send-command-and-check
vec (concat command " -A n </dev/null"))
vec
(concat command " -A n <" (tramp-get-remote-null-device vec)))
command)))))
(defun tramp-get-remote-chmod-h (vec)
@ -5865,7 +5899,9 @@ This command is returned only if `delete-by-moving-to-trash' is non-nil."
(tramp-message vec 5 "Checking, whether `env -u' works")
;; Option "-u" is a GNU extension.
(tramp-send-command-and-check
vec "env FOO=foo env -u FOO 2>/dev/null | grep -qv FOO" t)))
vec (format "env FOO=foo env -u FOO 2>%s | grep -qv FOO"
(tramp-get-remote-null-device vec))
t)))
;; Some predefined connection properties.
(defun tramp-get-inline-compress (vec prop size)

View file

@ -74,7 +74,7 @@
:version "24.4")
;;;###tramp-autoload
(defcustom tramp-smb-conf "/dev/null"
(defcustom tramp-smb-conf null-device
"Path of the \"smb.conf\" file.
If it is nil, no \"smb.conf\" will be added to the `tramp-smb-program'
call, letting the SMB client use the default one."
@ -797,7 +797,7 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored."
(setq
args
(append args (list (tramp-unquote-shell-quote-argument localname)
"2>/dev/null")))
(concat "2>" (tramp-get-remote-null-device v)))))
(unwind-protect
(with-temp-buffer

View file

@ -175,6 +175,12 @@ See the variable `tramp-encoding-shell' for more information."
:version "24.1"
:type '(choice (const nil) string))
;; Since Emacs 26.1, `system-name' can return `nil' at build time if
;; Emacs is compiled with "--no-build-details". We do expect it to be
;; a string. (Bug#44481)
(defconst tramp-system-name (or (system-name) "")
"The system name Tramp is running locally.")
(defvar tramp-methods nil
"Alist of methods for remote files.
This is a list of entries of the form (NAME PARAM1 PARAM2 ...).
@ -238,6 +244,7 @@ pair of the form (KEY VALUE). The following KEYs are defined:
- \"%k\" indicates the keep-date parameter of a program, if exists.
- \"%c\" adds additional `tramp-ssh-controlmaster-options'
options for the first hop.
- \"%n\" expands to \"2>/dev/null\".
The existence of `tramp-login-args', combined with the
absence of `tramp-copy-args', is an indication that the
@ -416,7 +423,7 @@ empty string for the method name."
(choice :tag " Host regexp" regexp sexp)
(choice :tag " User name" string (const nil)))))
(defcustom tramp-default-host (system-name)
(defcustom tramp-default-host tramp-system-name
"Default host to use for transferring files.
Useful for su and sudo methods mostly."
:type 'string)
@ -471,8 +478,8 @@ interpreted as a regular expression which always matches."
(defcustom tramp-restricted-shell-hosts-alist
(when (memq system-type '(windows-nt))
(list (format "\\`\\(%s\\|%s\\)\\'"
(regexp-quote (downcase (system-name)))
(regexp-quote (upcase (system-name))))))
(regexp-quote (downcase tramp-system-name))
(regexp-quote (upcase tramp-system-name)))))
"List of hosts, which run a restricted shell.
This is a list of regular expressions, which denote hosts running
a restricted shell like \"rbash\". Those hosts can be used as
@ -485,7 +492,7 @@ host runs a restricted shell, it shall be added to this list, too."
(concat
"\\`"
(regexp-opt
(list "localhost" "localhost6" (system-name) "127.0.0.1" "::1") t)
(list "localhost" "localhost6" tramp-system-name "127.0.0.1" "::1") t)
"\\'")
"Host names which are regarded as local host.
If the local host runs a chrooted environment, set this to nil."
@ -5325,7 +5332,9 @@ name of a process or buffer, or nil to default to the current buffer."
(tramp-compat-funcall
'tramp-send-command
(process-get proc 'vector)
(format "(\\kill -2 -%d || \\kill -2 %d) 2>/dev/null" pid pid))
(format "(\\kill -2 -%d || \\kill -2 %d) 2>%s"
pid pid
(tramp-get-remote-null-device (process-get proc 'vector))))
;; Wait, until the process has disappeared. If it doesn't,
;; fall back to the default implementation.
(while (tramp-accept-process-output proc 0))
@ -5339,6 +5348,15 @@ name of a process or buffer, or nil to default to the current buffer."
(lambda ()
(remove-hook 'interrupt-process-functions #'tramp-interrupt-process))))
(defun tramp-get-remote-null-device (vec)
"Return null device on the remote host identified by VEC.
If VEC is nil, return local null device."
(if (null vec)
null-device
(with-tramp-connection-property vec "null-device"
(let ((default-directory (tramp-make-tramp-file-name vec)))
(tramp-compat-null-device)))))
(defmacro tramp-skeleton-delete-directory (directory recursive trash &rest body)
"Skeleton for `tramp-*-handle-delete-directory'.
BODY is the backend specific code."

View file

@ -923,7 +923,8 @@ If INCLUDE-SEP is non-nil, return point after the separator."
;;;###autoload
(define-derived-mode todo-mode nil "TODO"
"Major mode for editing TODO lists."
(easy-menu-add todo-menu))
(when (featurep 'xemacs)
(easy-menu-add todo-menu)))
(with-suppressed-warnings ((lexical date entry))
(defvar date)

View file

@ -111,11 +111,11 @@ This function is called by `org-babel-execute-src-block'."
(cond
((or (member "code" result-params)
(member "pp" result-params))
(format "(pretty (out \"/dev/null\" %s))" full-body))
(format "(pretty (out \"%s\" %s))" null-device full-body))
((and (member "value" result-params) (not session))
(format "(print (out \"/dev/null\" %s))" full-body))
(format "(print (out \"%s\" %s))" null-device full-body))
((member "value" result-params)
(format "(out \"/dev/null\" %s)" full-body))
(format "(out \"%s\" %s)" null-device full-body))
(t full-body)))
(result
(if (not (string= session-name "none"))

View file

@ -62,7 +62,7 @@ In case you want to use a different screen than one selected by your $PATH")
(process-name (concat "org-babel: terminal (" session ")")))
(apply 'start-process process-name "*Messages*"
terminal `("-T" ,(concat "org-babel: " session) "-e" ,org-babel-screen-location
"-c" "/dev/null" "-mS" ,(concat "org-babel-session-" session)
"-c" ,null-device "-mS" ,(concat "org-babel-session-" session)
,cmd))
;; XXX: Is there a better way than the following?
(while (not (org-babel-screen-session-socketname session))

View file

@ -2236,7 +2236,6 @@ The following commands are available:
(setq mode-name "Org-Agenda")
(setq indent-tabs-mode nil)
(use-local-map org-agenda-mode-map)
(easy-menu-add org-agenda-menu)
(when org-startup-truncated (setq truncate-lines t))
(setq-local line-move-visual nil)
(add-hook 'post-command-hook 'org-agenda-update-agenda-type nil 'local)

Some files were not shown because too many files have changed in this diff Show more