Merge from origin/emacs-28
b4067394dc
Set `default-directory' of Tramp archive connection buffer2529e82002
; * doc/lispref/functions.texi (Declare Form): Fix typo.54c4ceb009
Update the documentation of 'declare' forms7263631dca
Fix bookmark support for Help functions in native-compilat... # Conflicts: # lisp/help.el
This commit is contained in:
commit
a463dccdd0
5 changed files with 50 additions and 12 deletions
|
@ -981,7 +981,9 @@ corresponding compiler @option{-O0}, @option{-O1}, etc.@: command-line
|
|||
options of the compiler. The value @minus{}1 means disable
|
||||
native-compilation: functions and files will be only byte-compiled;
|
||||
however, the @file{*.eln} files will still be produced, they will just
|
||||
contain the compiled code in bytecode form.
|
||||
contain the compiled code in bytecode form. (This can be achieved at
|
||||
function granularity by using the @w{@code{(declare (speed -1))}}
|
||||
form, @pxref{Declare Form}.)
|
||||
The default value is 2.
|
||||
@end defopt
|
||||
|
||||
|
|
|
@ -2497,6 +2497,30 @@ the current buffer.
|
|||
@item (modes @var{modes})
|
||||
Specify that this command is meant to be applicable for @var{modes}
|
||||
only.
|
||||
|
||||
@item (pure @var{val})
|
||||
If @var{val} is non-@code{nil}, this function is @dfn{pure}
|
||||
(@pxref{What Is a Function}). This is the same as the @code{pure}
|
||||
property of the function's symbol (@pxref{Standard Properties}).
|
||||
|
||||
@item (side-effect-free @var{val})
|
||||
If @var{val} is non-@code{nil}, this function is free of side effects,
|
||||
so the byte compiler can ignore calls whose value is ignored. This is
|
||||
the same as the @code{side-effect-free} property of the function's
|
||||
symbol, @pxref{Standard Properties}.
|
||||
|
||||
@item (speed @var{n})
|
||||
Specify the value of @code{native-comp-speed} in effect for native
|
||||
compilation of this function (@pxref{Native-Compilation Variables}).
|
||||
This allows function-level control of the optimization level used for
|
||||
native code emitted for the function. In particular, if @var{n} is
|
||||
@minus{}1, native compilation of the function will emit bytecode
|
||||
instead of native code for the function.
|
||||
|
||||
@item no-font-lock-keyword
|
||||
This is valid for macros only. Macros with this declaration are
|
||||
highlighted by font-lock (@pxref{Font Lock Mode}) as normal functions,
|
||||
not specially as macros.
|
||||
@end table
|
||||
|
||||
@end defmac
|
||||
|
|
|
@ -266,13 +266,9 @@ handling of autoloaded functions."
|
|||
(current-buffer)))
|
||||
(help-buffer-under-preparation t))
|
||||
|
||||
(help-setup-xref
|
||||
(list (lambda (function buffer)
|
||||
(let ((describe-function-orig-buffer
|
||||
(if (buffer-live-p buffer) buffer)))
|
||||
(describe-function function)))
|
||||
function describe-function-orig-buffer)
|
||||
(called-interactively-p 'interactive))
|
||||
(help-setup-xref (list #'describe-function--helper
|
||||
function describe-function-orig-buffer)
|
||||
(called-interactively-p 'interactive))
|
||||
|
||||
(save-excursion
|
||||
(with-help-window (help-buffer)
|
||||
|
|
17
lisp/help.el
17
lisp/help.el
|
@ -906,6 +906,18 @@ Describe the following key, mouse click, or menu item: "
|
|||
;; Defined in help-fns.el.
|
||||
(defvar describe-function-orig-buffer)
|
||||
|
||||
;; These two are named functions because lambda-functions cannot be
|
||||
;; serialized in a native-compilation build, which breaks bookmark
|
||||
;; support in help-mode.el.
|
||||
(defun describe-key--helper (key-list buf)
|
||||
(describe-key key-list
|
||||
(if (buffer-live-p buf) buf)))
|
||||
|
||||
(defun describe-function--helper (func buf)
|
||||
(let ((describe-function-orig-buffer
|
||||
(if (buffer-live-p buf) buf)))
|
||||
(describe-function func)))
|
||||
|
||||
(defun describe-key (&optional key-list buffer up-event)
|
||||
"Display documentation of the function invoked by KEY-LIST.
|
||||
KEY-LIST can be any kind of a key sequence; it can include keyboard events,
|
||||
|
@ -959,10 +971,7 @@ current buffer."
|
|||
`(,seq ,brief-desc ,defn ,locus)))
|
||||
key-list))
|
||||
2)))
|
||||
(help-setup-xref (list (lambda (key-list buf)
|
||||
(describe-key key-list
|
||||
(if (buffer-live-p buf) buf)))
|
||||
key-list buf)
|
||||
(help-setup-xref (list #'describe-key--helper key-list buf)
|
||||
(called-interactively-p 'interactive))
|
||||
(if (and (<= (length info-list) 1)
|
||||
(help--binding-undefined-p (nth 2 (car info-list))))
|
||||
|
|
|
@ -348,6 +348,13 @@ arguments to pass to the OPERATION."
|
|||
(tramp-archive-run-real-handler
|
||||
#'file-directory-p (list archive)))
|
||||
(tramp-archive-run-real-handler operation args)
|
||||
;; The default directory of the Tramp connection buffer
|
||||
;; cannot be accessed. (Bug#56628)
|
||||
;; FIXME: It is superfluous to set it every single loop.
|
||||
;; But there is no place to set it when creating the buffer.
|
||||
(with-current-buffer
|
||||
(tramp-get-buffer (tramp-archive-dissect-file-name filename))
|
||||
(setq default-directory (file-name-as-directory archive)))
|
||||
;; Now run the handler.
|
||||
(let ((tramp-methods (cons `(,tramp-archive-method) tramp-methods))
|
||||
(tramp-gvfs-methods tramp-archive-all-gvfs-methods)
|
||||
|
|
Loading…
Add table
Reference in a new issue