summaryrefslogtreecommitdiff
path: root/lisp/help.el
diff options
context:
space:
mode:
authorStefan Kangas <stefan@marxist.se>2022-07-24 09:55:01 +0200
committerStefan Kangas <stefan@marxist.se>2022-07-24 09:55:01 +0200
commita463dccdd0b33fd329419601eecddb109057233e (patch)
tree7cb5a254fe9e575ed344cff05d0be9ad83356647 /lisp/help.el
parent279eb4e6ab0fb99cacdb504d37953d9630fae8b4 (diff)
parentb4067394dcf33d64e0372bf553cec5b6f9c4af1c (diff)
downloademacs-a463dccdd0b33fd329419601eecddb109057233e.tar.gz
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
Diffstat (limited to 'lisp/help.el')
-rw-r--r--lisp/help.el17
1 files changed, 13 insertions, 4 deletions
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))))