summaryrefslogtreecommitdiff
path: root/lisp/help-fns.el
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2022-06-05 22:48:28 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2022-06-05 22:48:28 +0200
commit46822e9c5e96147c068b324a545b530c4818097a (patch)
tree8955410783e167ef842b0322ba505ab55dff6eca /lisp/help-fns.el
parentb1ed72fd707ddd81bf79b6937bf0a50ced4f025d (diff)
downloademacs-46822e9c5e96147c068b324a545b530c4818097a.tar.gz
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'.
Diffstat (limited to 'lisp/help-fns.el')
-rw-r--r--lisp/help-fns.el13
1 files changed, 5 insertions, 8 deletions
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index 8b4905aed15..0b496e635ed 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -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)