[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [DISCUSSION] "quick-help" popup for org-columns (column view)
From: |
Philip Kaludercic |
Subject: |
Re: [DISCUSSION] "quick-help" popup for org-columns (column view) |
Date: |
Wed, 10 Apr 2024 08:26:08 +0000 |
Sławomir Grochowski <slawomir.grochowski@gmail.com> writes:
> Philip Kaludercic <philipk@posteo.net> writes:
>
>> We could add a `help-quick-use-map' variable and bind it to `global-map'
>> by default. You can then re-bind it in your command.
>
> I'm sorry, but I don't quite understand it.
Just this here:
diff --git a/lisp/help.el b/lisp/help.el
index 1ef46e394f3..5700f10fdc8 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -175,6 +175,9 @@ help-quick-sections
COMMAND is the symbol of a command and DESCRIPTION is its short
description, 10 to 15 char5acters at most.")
+(defvar help-quick-use-map global-map
+ "Keymap that `help-quick' should use to lookup bindings.")
+
(declare-function prop-match-value "text-property-search" (match))
;; Inspired by a mg fork (https://github.com/troglobit/mg)
@@ -193,7 +196,7 @@ help-quick
(let ((max-key-len 0) (max-cmd-len 0) keys)
(dolist (ent (reverse (cdr section)))
(catch 'skip
- (let* ((bind (where-is-internal (car ent) nil t))
+ (let* ((bind (where-is-internal (car ent) help-quick-use-map t))
(key (if bind
(propertize
(key-description bind)
You would then only have to rebind `help-quick-use-map' in your custom
command.
> It seems to me that the simplest way is to add a parameter to the
> function, like this:
>
> (defun help-quick (&optional keymap)
>
> Because it will not change the behavior for previous calls to this
> function. And it will allow to pass specific keymap, not need to pass
> and search in whole global-map.
>
> What do you think?
Eli said that we shouldn't change the signature of public functions, so
I don't think that this is an option.
--
Philip Kaludercic on peregrine
- Re: [DISCUSSION] "quick-help" popup for org-columns (column view), Sławomir Grochowski, 2024/04/06
- Re: [DISCUSSION] "quick-help" popup for org-columns (column view), chad, 2024/04/06
- Re: [DISCUSSION] "quick-help" popup for org-columns (column view), Philip Kaludercic, 2024/04/06
- Re: [DISCUSSION] "quick-help" popup for org-columns (column view), Eli Zaretskii, 2024/04/07
- Re: [DISCUSSION] "quick-help" popup for org-columns (column view), Sławomir Grochowski, 2024/04/08
- Re: [DISCUSSION] "quick-help" popup for org-columns (column view), Philip Kaludercic, 2024/04/08
- Re: [DISCUSSION] "quick-help" popup for org-columns (column view), Sławomir Grochowski, 2024/04/08
- Re: [DISCUSSION] "quick-help" popup for org-columns (column view),
Philip Kaludercic <=
- Re: [DISCUSSION] "quick-help" popup for org-columns (column view), Sławomir Grochowski, 2024/04/10
- Re: [DISCUSSION] "quick-help" popup for org-columns (column view), Philip Kaludercic, 2024/04/11
- Re: [DISCUSSION] "quick-help" popup for org-columns (column view), Philip Kaludercic, 2024/04/11
- Re: [DISCUSSION] "quick-help" popup for org-columns (column view), Sławomir Grochowski, 2024/04/11
- Re: [DISCUSSION] "quick-help" popup for org-columns (column view), Philip Kaludercic, 2024/04/13
- Re: [DISCUSSION] "quick-help" popup for org-columns (column view), Sławomir Grochowski, 2024/04/15
- Re: [DISCUSSION] "quick-help" popup for org-columns (column view), Philip Kaludercic, 2024/04/16
- Re: [DISCUSSION] "quick-help" popup for org-columns (column view), Sławomir Grochowski, 2024/04/18
- Re: [DISCUSSION] "quick-help" popup for org-columns (column view), Eli Zaretskii, 2024/04/08