* bug#6222: Shouldn't f1 in isearch-mode be help?
@ 2010-05-19 23:30 Lennart Borgman
2010-05-20 0:20 ` Juri Linkov
2010-05-20 3:37 ` Stefan Monnier
0 siblings, 2 replies; 7+ messages in thread
From: Lennart Borgman @ 2010-05-19 23:30 UTC (permalink / raw)
To: 6222
C-h gives isearch help in isearch, but f1 does not. Should not both do
the same for consistency?
And should not `help-char' (or [help]) be used instead of C-h in the code?
The doc string for isearch does not mention that you now have this
good help for isearch during isearch. Shouldn't it do that?
BTW: My bad memory can't find a variable that is holding both C-h and
f1. Wasn't there such a variable?
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#6222: Shouldn't f1 in isearch-mode be help?
2010-05-19 23:30 bug#6222: Shouldn't f1 in isearch-mode be help? Lennart Borgman
@ 2010-05-20 0:20 ` Juri Linkov
2010-05-20 0:31 ` Lennart Borgman
2010-05-20 3:37 ` Stefan Monnier
1 sibling, 1 reply; 7+ messages in thread
From: Juri Linkov @ 2010-05-20 0:20 UTC (permalink / raw)
To: Lennart Borgman; +Cc: 6222
> C-h gives isearch help in isearch, but f1 does not. Should not both do
> the same for consistency?
>
> And should not `help-char' (or [help]) be used instead of C-h in the code?
>
> The doc string for isearch does not mention that you now have this
> good help for isearch during isearch. Shouldn't it do that?
>
> BTW: My bad memory can't find a variable that is holding both C-h and
> f1. Wasn't there such a variable?
There is no such variable. E.g. in help.el help bindings are repeated
three times:
(define-key map (char-to-string help-char) 'help-for-help)
(define-key map [help] 'help-for-help)
(define-key map [f1] 'help-for-help)
and
(define-key global-map (char-to-string help-char) 'help-command)
(define-key global-map [help] 'help-command)
(define-key global-map [f1] 'help-command)
--
Juri Linkov
http://www.jurta.org/emacs/
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#6222: Shouldn't f1 in isearch-mode be help?
2010-05-20 0:20 ` Juri Linkov
@ 2010-05-20 0:31 ` Lennart Borgman
2010-05-20 0:38 ` Juri Linkov
0 siblings, 1 reply; 7+ messages in thread
From: Lennart Borgman @ 2010-05-20 0:31 UTC (permalink / raw)
To: Juri Linkov; +Cc: 6222
On Thu, May 20, 2010 at 2:20 AM, Juri Linkov <juri@jurta.org> wrote:
>> C-h gives isearch help in isearch, but f1 does not. Should not both do
>> the same for consistency?
>>
>> And should not `help-char' (or [help]) be used instead of C-h in the code?
>>
>> The doc string for isearch does not mention that you now have this
>> good help for isearch during isearch. Shouldn't it do that?
>>
>> BTW: My bad memory can't find a variable that is holding both C-h and
>> f1. Wasn't there such a variable?
>
> There is no such variable. E.g. in help.el help bindings are repeated
> three times:
>
> (define-key map (char-to-string help-char) 'help-for-help)
> (define-key map [help] 'help-for-help)
> (define-key map [f1] 'help-for-help)
>
> and
>
> (define-key global-map (char-to-string help-char) 'help-command)
> (define-key global-map [help] 'help-command)
> (define-key global-map [f1] 'help-command)
Thanks, I see. But shouldn't isearch do the same then?
What about having a function in help.el for defining a binding for all
three possibilities? Something like
(defun help-define-help-keys (map command)
(define-key map (char-to-string help-char) command)
(define-key map [help] command)
(define-key map [f1] command))
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#6222: Shouldn't f1 in isearch-mode be help?
2010-05-20 0:31 ` Lennart Borgman
@ 2010-05-20 0:38 ` Juri Linkov
2010-05-20 0:47 ` Lennart Borgman
2010-05-20 22:04 ` Juri Linkov
0 siblings, 2 replies; 7+ messages in thread
From: Juri Linkov @ 2010-05-20 0:38 UTC (permalink / raw)
To: Lennart Borgman; +Cc: 6222
>> (define-key global-map (char-to-string help-char) 'help-command)
>> (define-key global-map [help] 'help-command)
>> (define-key global-map [f1] 'help-command)
>
> Thanks, I see. But shouldn't isearch do the same then?
I agree that it should:
=== modified file 'lisp/isearch.el'
--- lisp/isearch.el 2010-04-16 01:30:37 +0000
+++ lisp/isearch.el 2010-05-20 00:38:21 +0000
@@ -461,6 +461,9 @@ (defvar isearch-mode-map
(define-key map "\C-y" 'isearch-yank-line)
(define-key map "\C-h" isearch-help-map)
+ (define-key map (char-to-string help-char) isearch-help-map)
+ (define-key map [help] isearch-help-map)
+ (define-key map [f1] isearch-help-map)
(define-key map "\M-n" 'isearch-ring-advance)
(define-key map "\M-p" 'isearch-ring-retreat)
> What about having a function in help.el for defining a binding for all
> three possibilities? Something like
>
> (defun help-define-help-keys (map command)
> (define-key map (char-to-string help-char) command)
> (define-key map [help] command)
> (define-key map [f1] command))
I'd rather remap all them to one key.
--
Juri Linkov
http://www.jurta.org/emacs/
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#6222: Shouldn't f1 in isearch-mode be help?
2010-05-20 0:38 ` Juri Linkov
@ 2010-05-20 0:47 ` Lennart Borgman
2010-05-20 22:04 ` Juri Linkov
1 sibling, 0 replies; 7+ messages in thread
From: Lennart Borgman @ 2010-05-20 0:47 UTC (permalink / raw)
To: Juri Linkov; +Cc: 6222
On Thu, May 20, 2010 at 2:38 AM, Juri Linkov <juri@jurta.org> wrote:
>>> (define-key global-map (char-to-string help-char) 'help-command)
>>> (define-key global-map [help] 'help-command)
>>> (define-key global-map [f1] 'help-command)
>>
>> Thanks, I see. But shouldn't isearch do the same then?
>
> I agree that it should:
Fine, thanks.
>> What about having a function in help.el for defining a binding for all
>> three possibilities? Something like
>>
>> (defun help-define-help-keys (map command)
>> (define-key map (char-to-string help-char) command)
>> (define-key map [help] command)
>> (define-key map [f1] command))
>
> I'd rather remap all them to one key.
I don't understand, but that is just because I do not know the details
of remap I guess. Otherwise it sounds reasonable.
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#6222: Shouldn't f1 in isearch-mode be help?
2010-05-19 23:30 bug#6222: Shouldn't f1 in isearch-mode be help? Lennart Borgman
2010-05-20 0:20 ` Juri Linkov
@ 2010-05-20 3:37 ` Stefan Monnier
1 sibling, 0 replies; 7+ messages in thread
From: Stefan Monnier @ 2010-05-20 3:37 UTC (permalink / raw)
To: Lennart Borgman; +Cc: 6222
> BTW: My bad memory can't find a variable that is holding both C-h and
> f1. Wasn't there such a variable?
You're thinking of help-char and help-event-list.
Stefan
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#6222: Shouldn't f1 in isearch-mode be help?
2010-05-20 0:38 ` Juri Linkov
2010-05-20 0:47 ` Lennart Borgman
@ 2010-05-20 22:04 ` Juri Linkov
1 sibling, 0 replies; 7+ messages in thread
From: Juri Linkov @ 2010-05-20 22:04 UTC (permalink / raw)
To: Lennart Borgman; +Cc: 6222-done
Patch installed.
--
Juri Linkov
http://www.jurta.org/emacs/
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2010-05-20 22:04 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-19 23:30 bug#6222: Shouldn't f1 in isearch-mode be help? Lennart Borgman
2010-05-20 0:20 ` Juri Linkov
2010-05-20 0:31 ` Lennart Borgman
2010-05-20 0:38 ` Juri Linkov
2010-05-20 0:47 ` Lennart Borgman
2010-05-20 22:04 ` Juri Linkov
2010-05-20 3:37 ` Stefan Monnier
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).