GNU bug report logs - #70576
[PATCH] `repeat-echo-message-string': support repeat keymap "hints"

Previous Next

Package: emacs;

Reported by: JD Smith <jdtsmith <at> gmail.com>

Date: Thu, 25 Apr 2024 22:33:05 UTC

Severity: normal

Tags: fixed, moreinfo, patch

Found in version 30.0.5

Fixed in version 30.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Juri Linkov <juri <at> linkov.net>
To: JD Smith <jdtsmith <at> gmail.com>
Cc: 70576 <at> debbugs.gnu.org
Subject: bug#70576: [PATCH] `repeat-echo-message-string': support repeat keymap "hints"
Date: Fri, 26 Apr 2024 09:06:29 +0300
> Example usage:
>
> (defvar-keymap expreg-repeat-map
>     :doc "Repeat map for `expreg' actions."
>     :repeat t
>     :name "expreg"
>     "\\" (cons "expand" 'expreg-expand)
>     "|"  (cons "contract"  'expreg-contract))

I feel uneasy about reusing the form (STRING . DEFN)
that has another meaning:

 a cons (STRING . DEFN), meaning that DEFN is the definition
    (DEFN should be a valid definition in its own right) and
    STRING is the menu item name (which is used only if the containing
    keymap has been created with a menu name, see make-keymap),

Can the same instead be achieved by using symbol properties?
For example:

(defvar-keymap expreg-repeat-map
    :doc "Repeat map for `expreg' actions."
    :repeat t
    :name "expreg"
    "\\" 'expreg-expand
    "|"  'expreg-contract)

(put 'expreg-expand 'repeat-hint "expand")
(put 'expreg-contract 'repeat-hint "contract")




This bug report was last modified 70 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.