emacs-diffs
[Top][All Lists]
Advanced

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

master c641848bce: Simplify describe-function.


From: Gregory Heytings
Subject: master c641848bce: Simplify describe-function.
Date: Mon, 5 Sep 2022 17:30:36 -0400 (EDT)

branch: master
commit c641848bce91fd0a67ba564669cc2602bba19791
Author: Gregory Heytings <gregory@heytings.org>
Commit: Gregory Heytings <gregory@heytings.org>

    Simplify describe-function.
    
    * lisp/help-fns.el (describe-function-1): Do not pass
    'describe-function-orig-buffer' as argument to...
    (help-fns--key-bindings): but use it directly there instead.
    This simplifies 1d1158397b.
---
 lisp/help-fns.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index 6d635ec9ee..e223b10ba8 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -510,13 +510,13 @@ the C sources, too."
             (src-file (locate-library file-name t nil 'readable)))
        (and src-file (file-readable-p src-file) src-file))))))
 
-(defun help-fns--key-bindings (function orig-buffer)
+(defun help-fns--key-bindings (function)
   (when (commandp function)
     (let ((pt2 (with-current-buffer standard-output (point)))
           (remapped (command-remapping function)))
       (unless (memq remapped '(ignore undefined))
         (let* ((all-keys
-                (with-current-buffer (or orig-buffer (current-buffer))
+                (with-current-buffer describe-function-orig-buffer
                   (where-is-internal
                    (or remapped function) overriding-local-map nil nil)))
                (seps (seq-group-by
@@ -1131,7 +1131,7 @@ Returns a list of the form (REAL-FUNCTION DEF ALIASED 
REAL-DEF)."
          (string-match "\\([^\\]=\\|[^=]\\|\\`\\)\\\\[[{<]" doc-raw)
          (autoload-do-load real-def))
 
-    (help-fns--key-bindings function describe-function-orig-buffer)
+    (help-fns--key-bindings function)
     (with-current-buffer standard-output
       (let ((doc (condition-case nil
                      ;; FIXME: Maybe `help-fns--signature' should return `doc'



reply via email to

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