emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 46822e9c5e: Fix key binding buffer issue in describe-function bet


From: Lars Ingebrigtsen
Subject: master 46822e9c5e: Fix key binding buffer issue in describe-function better
Date: Sun, 5 Jun 2022 16:48:41 -0400 (EDT)

branch: master
commit 46822e9c5e96147c068b324a545b530c4818097a
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    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'.
---
 lisp/help-fns.el | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index 8b4905aed1..0b496e635e 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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]