[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 3f388d7929: Make `C-h f' look up key bindings in the current buff
From: |
Lars Ingebrigtsen |
Subject: |
master 3f388d7929: Make `C-h f' look up key bindings in the current buffer again |
Date: |
Sun, 5 Jun 2022 15:48:36 -0400 (EDT) |
branch: master
commit 3f388d7929346f39c99b7d801e8f62a9b71c4b73
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
Make `C-h f' look up key bindings in the current buffer again
* lisp/help-fns.el (describe-function): Pass in the correct buffer
to look up key bindings in.
(describe-function-1): Use it.
---
lisp/help-fns.el | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index f200077fae..8b4905aed1 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -259,6 +259,7 @@ handling of autoloaded functions."
(let ((describe-function-orig-buffer
(or describe-function-orig-buffer
(current-buffer)))
+ (key-buffer (current-buffer))
(help-buffer-under-preparation t))
(help-setup-xref
@@ -277,7 +278,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)
+ (describe-function-1 function key-buffer)
(with-current-buffer standard-output
;; Return the text we displayed.
(buffer-string))))))
@@ -1025,7 +1026,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)
+(defun describe-function-1 (function &optional key-bindings-buffer)
(let ((pt1 (with-current-buffer standard-output (point))))
(help-fns-function-description-header function)
(with-current-buffer standard-output
@@ -1047,7 +1048,7 @@ Returns a list of the form (REAL-FUNCTION DEF ALIASED
REAL-DEF)."
(documentation function t)
;; E.g. an alias for a not yet defined function.
((invalid-function void-function) nil)))
- (key-bindings-buffer (current-buffer)))
+ (key-bindings-buffer (or key-bindings-buffer (current-buffer))))
;; If the function is autoloaded, and its docstring has
;; key substitution constructs, load the library.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 3f388d7929: Make `C-h f' look up key bindings in the current buffer again,
Lars Ingebrigtsen <=