[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Info-mode patch
From: |
Arthur Miller |
Subject: |
Re: Info-mode patch |
Date: |
Mon, 03 Jul 2023 23:07:06 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Juri Linkov <juri@linkov.net> writes:
>>> >> >> It seems you found a bug in 'key-valid-p'!
>>> >> >> And indeed it returns nil:
>>> >> >>
>>> >> >> (key-valid-p "<tool-bar> <C-Back in history>")
>>> >> >
>>> >> > Why is it a bug? "<tool-bar> <C-Back in history>" has no meaning,
>>> >> > since it isn't a mouse event.
>>> >>
>>> >> Is "remap" a mouse event?
>>> >
>>> > Why is "remap" relevant to the issue at hand?
>>>
>>> I converted from "old idiom" in info.el to new defvar-keymap. When
>>> seeing "remap" (a dummy event) works, I just expected defvar-keymap was
>>> done the way that it is possible to use all keys, fake-kyes, events,
>>> and whatnot the same way. Similar as I expected 'frame to have same
>>> meaning everywhere for the uniformity.
>>>
>>> Would look more tidy if it was possible to keep all key definitions in
>>> the same place as in the old code.
>>
>> Do you mean that we had a binding like [tool-bar C-Back\ in\ history]
>> somewhere?
It is in info.el since version 27:
(defvar Info-mode-map
(let ((map (make-keymap)))
(suppress-keymap map)
(define-key map "." 'beginning-of-buffer)
(define-key map " " 'Info-scroll-up)
(define-key map [?\S-\ ] 'Info-scroll-down)
(define-key map "\C-m" 'Info-follow-nearest-node)
(define-key map "\t" 'Info-next-reference)
(define-key map "\e\t" 'Info-prev-reference)
(define-key map [backtab] 'Info-prev-reference)
(define-key map "1" 'Info-nth-menu-item)
(define-key map "2" 'Info-nth-menu-item)
(define-key map "3" 'Info-nth-menu-item)
(define-key map "4" 'Info-nth-menu-item)
(define-key map "5" 'Info-nth-menu-item)
(define-key map "6" 'Info-nth-menu-item)
(define-key map "7" 'Info-nth-menu-item)
(define-key map "8" 'Info-nth-menu-item)
(define-key map "9" 'Info-nth-menu-item)
(define-key map "0" 'undefined)
(define-key map "?" 'Info-summary)
(define-key map "]" 'Info-forward-node)
(define-key map "[" 'Info-backward-node)
(define-key map "<" 'Info-top-node)
(define-key map ">" 'Info-final-node)
(define-key map "b" 'beginning-of-buffer)
(put 'beginning-of-buffer :advertised-binding "b")
(define-key map "d" 'Info-directory)
(define-key map "e" 'end-of-buffer)
(define-key map "f" 'Info-follow-reference)
(define-key map "g" 'Info-goto-node)
(define-key map "G" 'Info-goto-node-web)
(define-key map "h" 'Info-help)
;; This is for compatibility with standalone info (>~ version 5.2).
;; Though for some time, standalone info had H and h reversed.
;; See <https://debbugs.gnu.org/16455>.
(define-key map "H" 'describe-mode)
(define-key map "i" 'Info-index)
(define-key map "I" 'Info-virtual-index)
(define-key map "l" 'Info-history-back)
(define-key map "L" 'Info-history)
(define-key map "m" 'Info-menu)
(define-key map "n" 'Info-next)
(define-key map "p" 'Info-prev)
(define-key map "q" 'quit-window)
(define-key map "r" 'Info-history-forward)
(define-key map "s" 'Info-search)
(define-key map "S" 'Info-search-case-sensitively)
(define-key map "\M-n" 'clone-buffer)
(define-key map "t" 'Info-top-node)
(define-key map "T" 'Info-toc)
(define-key map "u" 'Info-up)
;; `w' for consistency with `dired-copy-filename-as-kill'.
(define-key map "w" 'Info-copy-current-node-name)
(define-key map "c" 'Info-copy-current-node-name)
;; `^' for consistency with `dired-up-directory'.
(define-key map "^" 'Info-up)
(define-key map "," 'Info-index-next)
(define-key map "\177" 'Info-scroll-down)
(define-key map [remap goto-line] 'goto-line-relative)
(define-key map [mouse-2] 'Info-mouse-follow-nearest-node)
(define-key map [follow-link] 'mouse-face)
(define-key map [XF86Back] 'Info-history-back)
(define-key map [XF86Forward] 'Info-history-forward)
(define-key map [tool-bar C-Back\ in\ history] 'Info-history-back-menu)
(define-key map [tool-bar C-Forward\ in\ history]
'Info-history-forward-menu)
map)
"Keymap containing Info commands.")
> This symbol is generated automatically by 'easy-menu-define'
> from the menu item "Back in History" with spaces inside.
Since menus in Emacs are implemented as keymaps, I thought toolbar is
"sort of a menu" and probably implemented as a keymap too, and that
tool-bar was some "special event".
- Re: Info-mode patch, (continued)
- Re: Info-mode patch, Juri Linkov, 2023/07/02
- Re: Info-mode patch, Eli Zaretskii, 2023/07/02
- Re: Info-mode patch, Arthur Miller, 2023/07/02
- Re: Info-mode patch, Eli Zaretskii, 2023/07/03
- Re: Info-mode patch, Arthur Miller, 2023/07/03
- Re: Info-mode patch, Eli Zaretskii, 2023/07/03
- Re: Info-mode patch, Juri Linkov, 2023/07/03
- Re: Info-mode patch, Eli Zaretskii, 2023/07/03
- easy-menu-define keys for key-valid-p (was: Info-mode patch), Juri Linkov, 2023/07/04
- Re: easy-menu-define keys for key-valid-p (was: Info-mode patch), Eli Zaretskii, 2023/07/04
- Re: Info-mode patch,
Arthur Miller <=
- Re: Info-mode patch, Andreas Schwab, 2023/07/04
- Re: Info-mode patch, Arthur Miller, 2023/07/04
- Re: Info-mode patch, Eli Zaretskii, 2023/07/03
- Re: Info-mode patch, Stefan Monnier, 2023/07/04
- Re: Info-mode patch, Eli Zaretskii, 2023/07/08
Re: Info-mode patch, Arthur Miller, 2023/07/02