mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-23 07:19:15 +00:00
Merge from savannah/emacs-30
68b7806c31
Support passing signals like 'SIGCODE' to 'tramp-signal-p...510ca5e84b
Merge branch 'emacs-30' of git.sv.gnu.org:/srv/git/emacs ...fe28ba5d55
; Replace quotes with @code{...} in texinfo filesecc8516d9c
; Replace (non-)nil with (non-)@code{nil} in texinfo files3407e27499
Don't save to history from 'eshell-command' when aborting
This commit is contained in:
commit
f54ad127ee
@ -2089,7 +2089,7 @@ code) obey the advice and other calls (from C code) do not.
|
||||
|
||||
@defmac define-advice symbol (where lambda-list &optional name depth) &rest body
|
||||
This macro defines a piece of advice and adds it to the function named
|
||||
@var{symbol}. If @var{name} is non-nil, the advice is named
|
||||
@var{symbol}. If @var{name} is non-@code{nil}, the advice is named
|
||||
@code{@var{symbol}@@@var{name}} and installed with the name @var{name}; otherwise,
|
||||
the advice is anonymous. See @code{advice-add} for explanation of
|
||||
other arguments.
|
||||
|
@ -2603,10 +2603,10 @@ operates on menu data structures, so you should write it so it can
|
||||
safely be called at any time.
|
||||
|
||||
@item :wrap @var{wrap-p}
|
||||
If @var{wrap-p} is non-nil inside a tool bar, the menu item is not
|
||||
displayed, but instead causes subsequent items to be displayed on a
|
||||
new line. This is not supported when Emacs uses the GTK+ or Nextstep
|
||||
toolkits.
|
||||
If @var{wrap-p} is non-@code{nil} inside a tool bar, the menu item is
|
||||
not displayed, but instead causes subsequent items to be displayed on
|
||||
a new line. This is not supported when Emacs uses the GTK+ or
|
||||
Nextstep toolkits.
|
||||
@end table
|
||||
|
||||
@node Menu Separators
|
||||
|
@ -1499,7 +1499,7 @@ case.
|
||||
The definition of a word is any sequence of consecutive characters that
|
||||
are assigned to the word constituent syntax class in the current syntax
|
||||
table (@pxref{Syntax Class Table}); if @code{case-symbols-as-words}
|
||||
is non-nil, characters assigned to the symbol constituent syntax
|
||||
is non-@code{nil}, characters assigned to the symbol constituent syntax
|
||||
class are also considered as word constituent.
|
||||
|
||||
When @var{string-or-char} is a character, this function does the same
|
||||
|
@ -6283,8 +6283,8 @@ returned if there's no template argument on the first line.
|
||||
|
||||
@defun c-lineup-template-args-indented-from-margin
|
||||
@findex lineup-template-args-indented-from-margin (c-)
|
||||
Indent a template argument line `c-basic-offset' from the left-hand
|
||||
margin of the line with the containing <.
|
||||
Indent a template argument line @code{c-basic-offset} from the
|
||||
left-hand margin of the line with the containing <.
|
||||
|
||||
@workswith @code{template-args-cont}.
|
||||
@end defun
|
||||
|
@ -388,10 +388,11 @@ This function prints an ellipsis (``@dots{}'') to @var{stream} (see
|
||||
above). When @var{stream} is a buffer, the ellipsis will be given the
|
||||
@code{cl-print-ellipsis} text property. The value of the text
|
||||
property will contain state (including @var{start}) in order to print
|
||||
the elided part of @var{object} later. @var{start} should be nil if
|
||||
the whole @var{object} is being elided, otherwise it should be an
|
||||
index or other pointer into the internals of @var{object} which can be
|
||||
passed to `cl-print-object-contents' at a later time.
|
||||
the elided part of @var{object} later. @var{start} should be
|
||||
@code{nil} if the whole @var{object} is being elided, otherwise it
|
||||
should be an index or other pointer into the internals of @var{object}
|
||||
which can be passed to @code{cl-print-object-contents} at a later
|
||||
time.
|
||||
@end defun
|
||||
|
||||
@defvar cl-print-expand-ellipsis-function
|
||||
|
@ -1428,7 +1428,7 @@ We are not an owner of the name @var{service}.
|
||||
@end table
|
||||
|
||||
When @var{service} is not a known name but a unique name, the function
|
||||
returns nil.
|
||||
returns @code{nil}.
|
||||
@end defun
|
||||
|
||||
When a name has been chosen, Emacs can offer its own methods, which
|
||||
|
@ -1761,8 +1761,8 @@ shells, there are also many differences. Don't let these similarities
|
||||
lull you into a false sense of familiarity.
|
||||
|
||||
When using command form (@pxref{Invocation}), Eshell will ignore any
|
||||
leading nil values, so if @var{foo} is @code{nil}, @samp{$@var{foo}
|
||||
echo hello} is equivalent to @samp{echo hello}.
|
||||
leading @code{nil} values, so if @var{foo} is @code{nil},
|
||||
@samp{$@var{foo} echo hello} is equivalent to @samp{echo hello}.
|
||||
|
||||
@table @code
|
||||
|
||||
@ -2422,8 +2422,9 @@ an @code{eshell-generic-target} as described above).
|
||||
@defun eshell-function-target-create output-function &optional close-function
|
||||
Create a new virtual target for Eshell that repeatedly calls
|
||||
@var{output-function} with the redirected output, as described above.
|
||||
If @var{close-function} is non-nil, Eshell will call it when closing the
|
||||
target, passing non-@code{nil} if the redirected command succeeded.
|
||||
If @var{close-function} is non-@code{nil}, Eshell will call it when
|
||||
closing the target, passing non-@code{nil} if the redirected command
|
||||
succeeded.
|
||||
@end defun
|
||||
|
||||
@node Pipelines
|
||||
|
@ -2565,8 +2565,8 @@ into the message headers as the SMTP Method. If @var{cond} is a
|
||||
function, it will be called in the message buffer without any
|
||||
arguments, and the corresponding @var{method} will be inserted into
|
||||
the message headers as the SMTP Method if the function returns a
|
||||
non-@code{nil} value; if @var{method} is nil, the value returned by
|
||||
the function @code{cond} is used instead.
|
||||
non-@code{nil} value; if @var{method} is @code{nil}, the value
|
||||
returned by the function @code{cond} is used instead.
|
||||
|
||||
@end table
|
||||
|
||||
|
@ -1060,9 +1060,10 @@ as a single argument, since you'll probably use it with @code{ses-range}.
|
||||
|
||||
Special cell values:
|
||||
@itemize
|
||||
@item nil prints typically the same as "", but allows previous cell to spill over.
|
||||
@item '*skip* replaces nil when the previous cell actually does spill over;
|
||||
nothing is printed for it.
|
||||
@item @code{nil} prints typically the same as "", but allows previous
|
||||
cell to spill over.
|
||||
@item '*skip* replaces @code{nil} when the previous cell actually does
|
||||
spill over; nothing is printed for it.
|
||||
@item '*error* indicates that the formula signaled an error instead of
|
||||
producing a value: the print cell is filled with hash marks (#).
|
||||
@end itemize
|
||||
|
@ -559,9 +559,9 @@ table.
|
||||
@defun vtable-insert-object table object &optional location before
|
||||
Insert @var{object} into @var{table}. @var{location} should be an
|
||||
object in the table, the new object is inserted after this object, or
|
||||
before it if @var{before} is non-nil. If @var{location} is @code{nil},
|
||||
@var{object} is appended to @var{table}, or prepended if @var{before} is
|
||||
non-@code{nil}.
|
||||
before it if @var{before} is non-@code{nil}. If @var{location} is
|
||||
@code{nil}, @var{object} is appended to @var{table}, or prepended if
|
||||
@var{before} is non-@code{nil}.
|
||||
|
||||
@var{location} can also be an integer, a zero-based index into the
|
||||
table. In this case, @var{object} is inserted at that index. If the
|
||||
|
@ -295,12 +295,8 @@ Returns nil if INPUT is prepended by blank space, otherwise non-nil."
|
||||
(setq-local eshell-hist--new-items 0)
|
||||
|
||||
(setq-local eshell-history-ring nil)
|
||||
(if (minibuffer-window-active-p (selected-window))
|
||||
(progn
|
||||
(setq-local eshell-history-append t)
|
||||
(add-hook 'minibuffer-exit-hook #'eshell-add-command-to-history nil t))
|
||||
(if eshell-history-file-name
|
||||
(eshell-read-history nil t)))
|
||||
(when eshell-history-file-name
|
||||
(eshell-read-history nil t))
|
||||
|
||||
(unless eshell-history-ring
|
||||
(setq eshell-history-ring (make-ring eshell-history-size)))
|
||||
@ -411,18 +407,6 @@ input."
|
||||
(setq eshell-save-history-index eshell-history-index)
|
||||
(setq eshell-history-index nil))
|
||||
|
||||
(defun eshell-add-command-to-history ()
|
||||
"Add the command entered at `eshell-command's prompt to the history ring.
|
||||
The command is added to the input history ring, if the value of
|
||||
variable `eshell-input-filter' returns non-nil when called on the
|
||||
command.
|
||||
|
||||
This function is supposed to be called from the minibuffer, presumably
|
||||
as a `minibuffer-exit-hook'."
|
||||
(eshell-add-input-to-history
|
||||
(buffer-substring (minibuffer-prompt-end) (point-max)))
|
||||
(eshell--save-history))
|
||||
|
||||
(defun eshell-add-to-history ()
|
||||
"Add last Eshell command to the history ring.
|
||||
The command is entered into the input history ring, if the value of
|
||||
|
@ -284,14 +284,26 @@ information on Eshell, see Info node `(eshell)Top'."
|
||||
(eshell-mode))
|
||||
buf))
|
||||
|
||||
(declare-function eshell-add-input-to-history "em-hist" (input))
|
||||
(declare-function eshell--save-history "em-hist" ())
|
||||
|
||||
(defun eshell-command-mode-exit ()
|
||||
"Exit the `eshell-commad-mode' minibuffer and save Eshell history."
|
||||
(interactive)
|
||||
(when (eshell-using-module 'eshell-hist)
|
||||
(eshell-add-input-to-history
|
||||
(buffer-substring (minibuffer-prompt-end) (point-max)))
|
||||
(eshell--save-history))
|
||||
(exit-minibuffer))
|
||||
|
||||
(define-minor-mode eshell-command-mode
|
||||
"Minor mode for `eshell-command' input.
|
||||
\\{eshell-command-mode-map}"
|
||||
:keymap (let ((map (make-sparse-keymap)))
|
||||
(define-key map [(control ?g)] 'abort-recursive-edit)
|
||||
(define-key map [(control ?m)] 'exit-minibuffer)
|
||||
(define-key map [(control ?j)] 'exit-minibuffer)
|
||||
(define-key map [(meta control ?m)] 'exit-minibuffer)
|
||||
(define-key map [(control ?g)] #'abort-recursive-edit)
|
||||
(define-key map [(control ?m)] #'eshell-command-mode-exit)
|
||||
(define-key map [(control ?j)] #'eshell-command-mode-exit)
|
||||
(define-key map [(meta control ?m)] #'eshell-command-mode-exit)
|
||||
map))
|
||||
|
||||
(define-obsolete-function-alias 'eshell-return-exits-minibuffer
|
||||
|
@ -6986,8 +6986,13 @@ SIGCODE may be an integer, or a symbol whose name is a signal name."
|
||||
(setq pid process
|
||||
vec (and (stringp remote) (tramp-dissect-file-name remote))))
|
||||
(t (signal 'wrong-type-argument (list #'processp process))))
|
||||
(unless (or (numberp sigcode) (symbolp sigcode))
|
||||
(signal 'wrong-type-argument (list #'numberp sigcode)))
|
||||
(cond
|
||||
((symbolp sigcode)
|
||||
(setq sigcode (upcase (symbol-name sigcode)))
|
||||
(when (string-prefix-p "SIG" sigcode)
|
||||
(setq sigcode (substring sigcode 3))))
|
||||
((not (numberp sigcode))
|
||||
(signal 'wrong-type-argument (list #'numberp sigcode))))
|
||||
;; If it's a Tramp process, send SIGCODE remotely.
|
||||
(when (and pid vec)
|
||||
(tramp-message
|
||||
|
Loading…
Reference in New Issue
Block a user