[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#44202: [PATCH] Add variable to control confirmation of help-mode-rev
From: |
Lars Ingebrigtsen |
Subject: |
bug#44202: [PATCH] Add variable to control confirmation of help-mode-revert-buffer |
Date: |
Mon, 26 Oct 2020 11:22:40 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Kevin Foley <kevin@kevinjfoley.me> writes:
> I could update `revert-buffer' to include the logic for IGNORE-AUTO and
> NOCONFIRM that are used in `revert-buffer--default' with some additional
> logic to handle buffers without associated files.
Let's see... That would be this bit from --default, I guess:
((or noconfirm
(and (not (buffer-modified-p))
(catch 'found
(dolist (regexp revert-without-query)
(when (string-match regexp file-name)
(throw 'found t)))))
(yes-or-no-p (format "Revert buffer from file %s? "
file-name)))
I am a bit worried about incompatibles by hoisting that code up to
`revert-buffer'...
I've looked at some of the different usages of `revert-buffer-function',
and the help-functions one seems to be an outlier -- very few of the
non-file ones ask at all (I haven't found one yet, but I've only looked
at a handful). Which makes me wonder why the *Help* one does? I've
always found that pretty odd. What's the use case for prompting the
user when the user hits `g' here?
> I believe that would also require changing `help-mode' to use
> `revert-buffer-function' and `revert-buffer' instead of binding
> `help-mode-revert-buffer', right?
`help-mode' does bind `g' to `revert-buffer'? So I think I don't quite
understand what you're asking.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
- bug#44202: [PATCH] Add variable to control confirmation of help-mode-revert-buffer, Kevin Foley, 2020/10/24
- bug#44202: [PATCH] Add variable to control confirmation of help-mode-revert-buffer, Drew Adams, 2020/10/24
- bug#44202: [PATCH] Add variable to control confirmation of help-mode-revert-buffer, Stefan Kangas, 2020/10/24
- bug#44202: [PATCH] Add variable to control confirmation of help-mode-revert-buffer, Kevin Foley, 2020/10/25
- bug#44202: [PATCH] Add variable to control confirmation of help-mode-revert-buffer, Lars Ingebrigtsen, 2020/10/25
- bug#44202: [PATCH] Add variable to control confirmation of help-mode-revert-buffer, Kevin Foley, 2020/10/25
- bug#44202: [PATCH] Add variable to control confirmation of help-mode-revert-buffer, Lars Ingebrigtsen, 2020/10/25
- bug#44202: [PATCH] Add variable to control confirmation of help-mode-revert-buffer, Stefan Kangas, 2020/10/25
- bug#44202: [PATCH] Add variable to control confirmation of help-mode-revert-buffer, Kevin Foley, 2020/10/25
- bug#44202: [PATCH] Add variable to control confirmation of help-mode-revert-buffer,
Lars Ingebrigtsen <=
- bug#44202: [PATCH] Add variable to control confirmation of help-mode-revert-buffer, Stefan Kangas, 2020/10/26
- bug#44202: [PATCH] Add variable to control confirmation of help-mode-revert-buffer, Kevin Foley, 2020/10/26
- bug#44202: [PATCH] Add variable to control confirmation of help-mode-revert-buffer, Lars Ingebrigtsen, 2020/10/27