emacs-devel
[Top][All Lists]
Advanced

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

[bugfixed] don't show key bindings for `PREFIX C-h' in Gnus article


From: Katsumi Yamaoka
Subject: [bugfixed] don't show key bindings for `PREFIX C-h' in Gnus article
Date: Wed, 06 Jan 2010 18:24:56 +0900
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1.91 (gnu/linux)

I've fixed the bug that `PREFIX C-h' (whene PREFIX is prefix
key(s) like `/', `A', `M', etc.) didn't show the key bindings
when invoked from the Gnus article buffer.  `C-h b' didn't show
all the key bindings, either.

Note: Gnus provides the feature that most of the summary commands
can also be used in the article buffer with the same keystrokes[1].
For example, the keys `M M ! !' typed in the article buffer are
interpreted by the `gnus-article-read-summary-keys' function into
the summary command `gnus-summary-put-mark-as-ticked'.  A user
types `C-h b', `C-h c', `C-h k', `PREFIX C-h', etc. as usual to
find out what keys are available, but the help commands those keys
invoke are the ones designed for the Gnus article buffer specially.

[1] (info "(gnus)Article Keymap")

Note2: If you use some input method for writing non-ASCII text, and
if it substitutes `self-insert-command' bound to the alphabetical
keys into something another, this feature will not work.  I was in
the very condition; all the alphabetical keys are bound to
`egg-self-insert-command' and `suppress-keymap' didn't substitute
it to `undefined' (see subr.el for Emacs, keymap.el for XEmacs).
Now I use:

(if (let ((keymap (make-sparse-keymap)))
      (suppress-keymap keymap)
      (lookup-key keymap [remap]))
    ;; Emacs 22 and greater.
    (defadvice suppress-keymap (before remap-egg-self-insert-command activate)
      "Remap `egg-self-insert-command' to `undefined'."
      (define-key (ad-get-arg 0) [remap egg-self-insert-command] 'undefined))
  (defadvice suppress-keymap (before remap-egg-self-insert-command activate)
    "Remap `egg-self-insert-command' to `undefined'."
    (substitute-key-definition 'egg-self-insert-command 'undefined
                               (ad-get-arg 0) global-map)))




reply via email to

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