bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#47012: xref copies keymap properties to minibuffer


From: Dmitry Gutov
Subject: bug#47012: xref copies keymap properties to minibuffer
Date: Thu, 25 Mar 2021 12:57:19 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1

On 25.03.2021 11:40, Juri Linkov wrote:
Sharing regexp history between grep and project-find-regexp would be
the most desirable.  How better to achieve this?

Either by using 'grep-regexp-history directly, or with either of the options below.

Some commands already use variable *-history-variable, so adding
project-regexp-history-variable wouldn't cause a new precedent.

Could you give an example?

And ideally, we should be also able to answer the question why some packages have their own variables, and others have "-variable variables".

If it's just historical reasons, as it often is, maybe

  (defvar project-regexp-history-variable 'grep-regexp-history)

will be good enough.

Whereas using defalias is something new, maybe it could work too:

   (defalias 'grep-regexp-history 'project-regexp-history)

Yup, that's what I meant. It does feel a bit hackish, though.

Another possible approach would be some categories based system, together with user customization, like completion-category-overrides, but it's probably overkill for this problem.





reply via email to

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