Fix key binding buffer issue in describe-function better
* lisp/help-fns.el (describe-function): Revert previous change here. (describe-function-1): Just use describe-function-orig-buffer instead of the key-buffer binding -- this will also make the rendering results correct when hitting `g' and `l'.
This commit is contained in:
parent
b1ed72fd70
commit
46822e9c5e
1 changed files with 5 additions and 8 deletions
|
@ -258,9 +258,7 @@ handling of autoloaded functions."
|
|||
;; calling that.
|
||||
(let ((describe-function-orig-buffer
|
||||
(or describe-function-orig-buffer
|
||||
(current-buffer)))
|
||||
(key-buffer (current-buffer))
|
||||
(help-buffer-under-preparation t))
|
||||
(current-buffer))))
|
||||
|
||||
(help-setup-xref
|
||||
(list (lambda (function buffer)
|
||||
|
@ -278,7 +276,7 @@ handling of autoloaded functions."
|
|||
;; Use " is " instead of a colon so that
|
||||
;; it is easier to get out the function name using forward-sexp.
|
||||
(princ " is ")
|
||||
(describe-function-1 function key-buffer)
|
||||
(describe-function-1 function)
|
||||
(with-current-buffer standard-output
|
||||
;; Return the text we displayed.
|
||||
(buffer-string))))))
|
||||
|
@ -1026,7 +1024,7 @@ Returns a list of the form (REAL-FUNCTION DEF ALIASED REAL-DEF)."
|
|||
(unless (eq ?\n (char-before (1- (point)))) (insert "\n")))
|
||||
|
||||
;;;###autoload
|
||||
(defun describe-function-1 (function &optional key-bindings-buffer)
|
||||
(defun describe-function-1 (function)
|
||||
(let ((pt1 (with-current-buffer standard-output (point))))
|
||||
(help-fns-function-description-header function)
|
||||
(with-current-buffer standard-output
|
||||
|
@ -1047,8 +1045,7 @@ Returns a list of the form (REAL-FUNCTION DEF ALIASED REAL-DEF)."
|
|||
;; for invalid functions i.s.o. signaling an error.
|
||||
(documentation function t)
|
||||
;; E.g. an alias for a not yet defined function.
|
||||
((invalid-function void-function) nil)))
|
||||
(key-bindings-buffer (or key-bindings-buffer (current-buffer))))
|
||||
((invalid-function void-function) nil))))
|
||||
|
||||
;; If the function is autoloaded, and its docstring has
|
||||
;; key substitution constructs, load the library.
|
||||
|
@ -1065,7 +1062,7 @@ Returns a list of the form (REAL-FUNCTION DEF ALIASED REAL-DEF)."
|
|||
(help-fns--signature
|
||||
function doc-raw
|
||||
(if (subrp def) (indirect-function real-def) real-def)
|
||||
real-function key-bindings-buffer)
|
||||
real-function describe-function-orig-buffer)
|
||||
;; E.g. an alias for a not yet defined function.
|
||||
((invalid-function void-function) doc-raw))))
|
||||
(help-fns--ensure-empty-line)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue