unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [lennart.borgman.073@student.lu.se: Keys bound to [t] does not give any help]
@ 2005-11-24  3:58 Richard M. Stallman
  2005-11-28  2:41 ` Chong Yidong
  0 siblings, 1 reply; 9+ messages in thread
From: Richard M. Stallman @ 2005-11-24  3:58 UTC (permalink / raw)


Would someone like to fix this bug?

------- Start of forwarded message -------
Date: Wed, 23 Nov 2005 16:41:12 +0100
From: Lennart Borgman <lennart.borgman.073@student.lu.se>
X-Accept-Language: en-us, en
To: emacs-pretest-bug@gnu.org
Subject: Keys bound to [t] does not give any help
Sender: emacs-pretest-bug-bounces+rms=gnu.org@gnu.org
X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on monty-python
X-Spam-Level: 
X-Spam-Status: No, hits=0.9 required=5.0 tests=FROM_ENDS_IN_NUMS autolearn=no 
	version=2.63

If you bind default keyboard keys like this

    (define-key bw-keymap [t]  'bw-exit-resize-mode)

then

    C-h k

says that the key "is undefined".


In GNU Emacs 22.0.50.1 (i386-mingw-nt5.0.2195)
 of 2005-11-22



_______________________________________________
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
------- End of forwarded message -------

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [lennart.borgman.073@student.lu.se: Keys bound to [t] does not give any help]
  2005-11-24  3:58 Richard M. Stallman
@ 2005-11-28  2:41 ` Chong Yidong
  2005-11-28  6:56   ` Lennart Borgman
  0 siblings, 1 reply; 9+ messages in thread
From: Chong Yidong @ 2005-11-28  2:41 UTC (permalink / raw)
  Cc: emacs-devel

> If you bind default keyboard keys like this
>
>     (define-key bw-keymap [t]  'bw-exit-resize-mode)
>
> then
>
>     C-h k
>
> says that the key "is undefined".

I don't get it.  What is the intended behavior of binding [t]?

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [lennart.borgman.073@student.lu.se: Keys bound to [t] does not give any help]
  2005-11-28  2:41 ` Chong Yidong
@ 2005-11-28  6:56   ` Lennart Borgman
  2005-11-28 18:50     ` Chong Yidong
  0 siblings, 1 reply; 9+ messages in thread
From: Lennart Borgman @ 2005-11-28  6:56 UTC (permalink / raw)
  Cc: rms, emacs-devel

Chong Yidong wrote:

>>If you bind default keyboard keys like this
>>
>>    (define-key bw-keymap [t]  'bw-exit-resize-mode)
>>
>>then
>>
>>    C-h k
>>
>>says that the key "is undefined".
>>    
>>
>
>I don't get it.  What is the intended behavior of binding [t]?
>  
>
This sets a default binding in the keymap which is used when there is no 
binding for a key. It is different from binding to nil which is 
transparent so that the binding in the next keymap is used instead.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [lennart.borgman.073@student.lu.se: Keys bound to [t] does not give any help]
  2005-11-28  6:56   ` Lennart Borgman
@ 2005-11-28 18:50     ` Chong Yidong
  0 siblings, 0 replies; 9+ messages in thread
From: Chong Yidong @ 2005-11-28 18:50 UTC (permalink / raw)
  Cc: emacs-devel

Lennart Borgman <lennart.borgman.073@student.lu.se> writes:

>>>If you bind default keyboard keys like this
>>>    (define-key bw-keymap [t]  'bw-exit-resize-mode)
>>>then
>>>    C-h k
>>>says that the key "is undefined".
>>
>>I don't get it.  What is the intended behavior of binding [t]?
>>  
> This sets a default binding in the keymap which is used when there is
> no binding for a key. It is different from binding to nil which is
> transparent so that the binding in the next keymap is used instead.

OK, now I get it.  But wouldn't C-h be overwritten when you bind [t]?
How did you get C-h to work?

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [lennart.borgman.073@student.lu.se: Keys bound to [t] does not give any help]
@ 2005-11-28 18:52 LENNART BORGMAN
  2005-11-29  3:26 ` Chong Yidong
  0 siblings, 1 reply; 9+ messages in thread
From: LENNART BORGMAN @ 2005-11-28 18:52 UTC (permalink / raw)
  Cc: emacs-devel

From: Chong Yidong <cyd@stupidchicken.com>

> >>>If you bind default keyboard keys like this
> >>>    (define-key bw-keymap [t]  'bw-exit-resize-mode)
> >>>then
> >>>    C-h k
> >>>says that the key "is undefined".
> >>
> >>I don't get it.  What is the intended behavior of binding [t]?
> >>  
> > This sets a default binding in the keymap which is used when 
> there is
> > no binding for a key. It is different from binding to nil which is
> > transparent so that the binding in the next keymap is used instead.
> 
> OK, now I get it.  But wouldn't C-h be overwritten when you bind [t]?
> How did you get C-h to work?

I have bount it in `bw-keymap' only.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [lennart.borgman.073@student.lu.se: Keys bound to [t] does not give any help]
  2005-11-28 18:52 [lennart.borgman.073@student.lu.se: Keys bound to [t] does not give any help] LENNART BORGMAN
@ 2005-11-29  3:26 ` Chong Yidong
  2005-11-29  6:50   ` Lennart Borgman
  0 siblings, 1 reply; 9+ messages in thread
From: Chong Yidong @ 2005-11-29  3:26 UTC (permalink / raw)
  Cc: emacs-devel

LENNART BORGMAN <lennart.borgman.073@student.lu.se> writes:

>> >>> If you bind default keyboard keys like this
>> >>>    (define-key bw-keymap [t]  'bw-exit-resize-mode)
>> >>> then
>> >>>    C-h k
>> >>> says that the key "is undefined".
>> >>
>> OK, now I get it.  But wouldn't C-h be overwritten when you bind [t]?
>> How did you get C-h to work?
>
> I have bount it in `bw-keymap' only.

Does this change do what you want?

*** emacs/lisp/help.el.~1.287.~	2005-11-28 22:26:04.000000000 -0500
--- emacs/lisp/help.el	2005-11-28 22:22:13.000000000 -0500
***************
*** 635,641 ****
        (when (windowp window)
  	    (set-buffer (window-buffer window))
  	(goto-char position))
!       (let ((defn (or (string-key-binding key) (key-binding key))))
  	(if (or (null defn) (integerp defn) (equal defn 'undefined))
  	    (message "%s is undefined" (help-key-description key untranslated))
  	  (help-setup-xref (list #'describe-function defn) (interactive-p))
--- 635,641 ----
        (when (windowp window)
  	    (set-buffer (window-buffer window))
  	(goto-char position))
!       (let ((defn (or (string-key-binding key) (key-binding key t))))
  	(if (or (null defn) (integerp defn) (equal defn 'undefined))
  	    (message "%s is undefined" (help-key-description key untranslated))
  	  (help-setup-xref (list #'describe-function defn) (interactive-p))

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [lennart.borgman.073@student.lu.se: Keys bound to [t] does not give any help]
  2005-11-29  3:26 ` Chong Yidong
@ 2005-11-29  6:50   ` Lennart Borgman
  2005-11-29 15:43     ` Chong Yidong
  0 siblings, 1 reply; 9+ messages in thread
From: Lennart Borgman @ 2005-11-29  6:50 UTC (permalink / raw)
  Cc: emacs-devel

Chong Yidong wrote:

>LENNART BORGMAN <lennart.borgman.073@student.lu.se> writes:
>
>  
>
>>>>>>If you bind default keyboard keys like this
>>>>>>   (define-key bw-keymap [t]  'bw-exit-resize-mode)
>>>>>>then
>>>>>>   C-h k
>>>>>>says that the key "is undefined".
>>>>>>            
>>>>>>
>>>OK, now I get it.  But wouldn't C-h be overwritten when you bind [t]?
>>>How did you get C-h to work?
>>>      
>>>
>>I have bount it in `bw-keymap' only.
>>    
>>
>
>Does this change do what you want?
>
>*** emacs/lisp/help.el.~1.287.~	2005-11-28 22:26:04.000000000 -0500
>--- emacs/lisp/help.el	2005-11-28 22:22:13.000000000 -0500
>***************
>*** 635,641 ****
>        (when (windowp window)
>  	    (set-buffer (window-buffer window))
>  	(goto-char position))
>!       (let ((defn (or (string-key-binding key) (key-binding key))))
>  	(if (or (null defn) (integerp defn) (equal defn 'undefined))
>  	    (message "%s is undefined" (help-key-description key untranslated))
>  	  (help-setup-xref (list #'describe-function defn) (interactive-p))
>--- 635,641 ----
>        (when (windowp window)
>  	    (set-buffer (window-buffer window))
>  	(goto-char position))
>!       (let ((defn (or (string-key-binding key) (key-binding key t))))
>  	(if (or (null defn) (integerp defn) (equal defn 'undefined))
>  	    (message "%s is undefined" (help-key-description key untranslated))
>  	  (help-setup-xref (list #'describe-function defn) (interactive-p))
>
>  
>
Yes and no. It gives the correct answer for "C-h k" I believe, but not 
for "C-h c".

BTW I just saw that C-h c gives a bit different results when using [t]:

     C-h c a: a runs the command self-insert-command
     C-h c RET: <return> is undefined

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [lennart.borgman.073@student.lu.se: Keys bound to [t] does not give any help]
  2005-11-29  6:50   ` Lennart Borgman
@ 2005-11-29 15:43     ` Chong Yidong
  2005-11-30 15:12       ` Lennart Borgman
  0 siblings, 1 reply; 9+ messages in thread
From: Chong Yidong @ 2005-11-29 15:43 UTC (permalink / raw)
  Cc: emacs-devel

> Yes and no. It gives the correct answer for "C-h k" I believe, but not
> for "C-h c".
>
> BTW I just saw that C-h c gives a bit different results when using [t]:
>
>      C-h c a: a runs the command self-insert-command
>      C-h c RET: <return> is undefined

OK, I just committed a fix for both describe-key and describe-key-briefly.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [lennart.borgman.073@student.lu.se: Keys bound to [t] does not give any help]
  2005-11-29 15:43     ` Chong Yidong
@ 2005-11-30 15:12       ` Lennart Borgman
  0 siblings, 0 replies; 9+ messages in thread
From: Lennart Borgman @ 2005-11-30 15:12 UTC (permalink / raw)
  Cc: emacs-devel

Chong Yidong wrote:

>>Yes and no. It gives the correct answer for "C-h k" I believe, but not
>>for "C-h c".
>>
>>BTW I just saw that C-h c gives a bit different results when using [t]:
>>
>>     C-h c a: a runs the command self-insert-command
>>     C-h c RET: <return> is undefined
>>    
>>
>
>OK, I just committed a fix for both describe-key and describe-key-briefly.
>  
>
And it works. Thanks.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2005-11-30 15:12 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-28 18:52 [lennart.borgman.073@student.lu.se: Keys bound to [t] does not give any help] LENNART BORGMAN
2005-11-29  3:26 ` Chong Yidong
2005-11-29  6:50   ` Lennart Borgman
2005-11-29 15:43     ` Chong Yidong
2005-11-30 15:12       ` Lennart Borgman
  -- strict thread matches above, loose matches on Subject: below --
2005-11-24  3:58 Richard M. Stallman
2005-11-28  2:41 ` Chong Yidong
2005-11-28  6:56   ` Lennart Borgman
2005-11-28 18:50     ` Chong Yidong

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).