[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#66394: 29.1; Make register-read-with-preview more useful
From: |
Stefan Monnier |
Subject: |
bug#66394: 29.1; Make register-read-with-preview more useful |
Date: |
Fri, 15 Dec 2023 10:18:05 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
> @@ -429,7 +429,12 @@ Format of each entry is controlled by the variable
> `register-preview-function'."
> Prompt with the string PROMPT.
> If `help-char' (or a member of `help-event-list') is pressed,
> display such a window regardless."
> - (funcall register--read-with-preview-function prompt))
> + (let ((register--read-with-preview-function
> + (if (and executing-kbd-macro
> + (memq register-use-preview '(nil never)))
> + #'register-read-with-preview-basic
> + (default-value 'register--read-with-preview-function))))
> + (funcall register--read-with-preview-function prompt)))
Questions/comments:
- Why did you change from using
`register--read-with-preview-function` to using
(default-value 'register--read-with-preview-function) ?
[ The answer should presumably be in the commit message but
I couldn't find it there. ]
- Why let-bind `register--read-with-preview-function`
rather than using a local lexical var?
[ The answer should probably be in a comment in the code. ]
- Making the behavior dependent on `executing-kbd-macro` is generally
undesirable, so it should be accompanied with a comment in the code
explaining why we need it (with enough detail that someone
sufficiently motivated could potentially "fix" the code to remove this
dependency, or alternatively to convince that someone else that this
dependency is actually desirable here).
-- Stefan
- bug#66394: 29.1; Make register-read-with-preview more useful, (continued)
- bug#66394: 29.1; Make register-read-with-preview more useful, Eli Zaretskii, 2023/12/14
- bug#66394: 29.1; Make register-read-with-preview more useful, Stefan Monnier, 2023/12/14
- bug#66394: 29.1; Make register-read-with-preview more useful, Thierry Volpiatto, 2023/12/14
- bug#66394: 29.1; Make register-read-with-preview more useful, Andreas Schwab, 2023/12/14
- bug#66394: 29.1; Make register-read-with-preview more useful, Stefan Kangas, 2023/12/14
- bug#66394: 29.1; Make register-read-with-preview more useful, Thierry Volpiatto, 2023/12/15
- bug#66394: 29.1; Make register-read-with-preview more useful,
Stefan Monnier <=
- bug#66394: 29.1; Make register-read-with-preview more useful, Thierry Volpiatto, 2023/12/15
- bug#66394: 29.1; Make register-read-with-preview more useful, Stefan Monnier, 2023/12/15
- bug#66394: 29.1; Make register-read-with-preview more useful, Thierry Volpiatto, 2023/12/16
- bug#66394: 29.1; Make register-read-with-preview more useful, Stefan Monnier, 2023/12/16
- bug#66394: 29.1; Make register-read-with-preview more useful, Thierry Volpiatto, 2023/12/16
- bug#66394: 29.1; Make register-read-with-preview more useful, Stefan Monnier, 2023/12/17
- bug#66394: 29.1; Make register-read-with-preview more useful, Thierry Volpiatto, 2023/12/18
- bug#66394: 29.1; Make register-read-with-preview more useful, Stefan Monnier, 2023/12/18
- bug#66394: 29.1; Make register-read-with-preview more useful, Thierry Volpiatto, 2023/12/18
- bug#66394: 29.1; Make register-read-with-preview more useful, Dmitry Gutov, 2023/12/18