From: Stefan Kangas Date: Sun, 24 Jul 2022 07:55:01 +0000 (+0200) Subject: Merge from origin/emacs-28 X-Git-Tag: emacs-29.0.90~1447^2~770 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a463dccdd0b33fd329419601eecddb109057233e;p=emacs.git Merge from origin/emacs-28 b4067394dc Set `default-directory' of Tramp archive connection buffer 2529e82002 ; * doc/lispref/functions.texi (Declare Form): Fix typo. 54c4ceb009 Update the documentation of 'declare' forms 7263631dca Fix bookmark support for Help functions in native-compilat... # Conflicts: # lisp/help.el --- a463dccdd0b33fd329419601eecddb109057233e diff --cc lisp/help-fns.el index efee44f7b30,656e7b7da24..768023b54c2 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@@ -263,16 -249,11 +263,12 @@@ handling of autoloaded functions. ;; calling that. (let ((describe-function-orig-buffer (or describe-function-orig-buffer - (current-buffer)))) + (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 --cc lisp/help.el index d9e553e4e10,0701bf178aa..65c537d1191 --- a/lisp/help.el +++ b/lisp/help.el @@@ -903,9 -881,19 +903,21 @@@ Describe the following key, mouse click (setq yank-menu (copy-sequence saved-yank-menu)) (fset 'yank-menu (cons 'keymap yank-menu)))))) +;; 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))) + -(defvar describe-function-orig-buffer) + (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,