mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
Fix bookmark support for Help functions in native-compilation builds
* lisp/help.el (describe-key--helper, describe-function--helper): New helper functions. (describe-key): Call 'describe-key--helper' instead of a lambda-function. * lisp/help-fns.el (describe-function): Call 'describe-function--helper' instead of a lambda-function. (Bug#56643)
This commit is contained in:
parent
ba7a75e052
commit
7263631dca
2 changed files with 17 additions and 11 deletions
18
lisp/help.el
18
lisp/help.el
|
|
@ -881,6 +881,19 @@ Describe the following key, mouse click, or menu item: "
|
|||
(setq yank-menu (copy-sequence saved-yank-menu))
|
||||
(fset 'yank-menu (cons 'keymap yank-menu))))))
|
||||
|
||||
;; 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,
|
||||
|
|
@ -926,10 +939,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))))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue