1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

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
This commit is contained in:
Stefan Kangas 2022-07-24 09:55:01 +02:00
commit a463dccdd0
5 changed files with 50 additions and 12 deletions

View file

@ -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))))