emacs-devel
[Top][All Lists]
Advanced

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

Re: address@hidden: Keys bound to [t] does not give any help]


From: Lennart Borgman
Subject: Re: address@hidden: Keys bound to [t] does not give any help]
Date: Tue, 29 Nov 2005 07:50:25 +0100
User-agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)

Chong Yidong wrote:

LENNART BORGMAN <address@hidden> 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




reply via email to

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