diff --git a/doc/lispref/compile.texi b/doc/lispref/compile.texi index 9bb7b590a2c..60fc11a22ed 100644 --- a/doc/lispref/compile.texi +++ b/doc/lispref/compile.texi @@ -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 diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi index e3de6009e90..8e8cc5fd9c0 100644 --- a/doc/lispref/functions.texi +++ b/doc/lispref/functions.texi @@ -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 diff --git a/lisp/help-fns.el b/lisp/help-fns.el index efee44f7b30..768023b54c2 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -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) diff --git a/lisp/help.el b/lisp/help.el index d9e553e4e10..65c537d1191 100644 --- a/lisp/help.el +++ b/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)))) diff --git a/lisp/net/tramp-archive.el b/lisp/net/tramp-archive.el index 119ac54dd29..47f14861e38 100644 --- a/lisp/net/tramp-archive.el +++ b/lisp/net/tramp-archive.el @@ -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)