[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Allow inhibiting 'auto-save-visited-mode' on a per-buffer ba
From: |
Philipp Stephani |
Subject: |
Re: [PATCH] Allow inhibiting 'auto-save-visited-mode' on a per-buffer basis. |
Date: |
Sun, 5 Apr 2020 11:50:18 +0200 |
Am Do., 2. Apr. 2020 um 17:22 Uhr schrieb Stefan Monnier
<address@hidden>:
>
> > Wouldn't it be better to have a local minor mode and a globalized
> > minor mode, like we do in other cases?
>
> We could start with the patch below (which allows disabling the mode in
> specific buffers, but lacks the rest of the code which would allow
> *enabling* the mode in specific buffers).
>
>
> Stefan
>
>
> diff --git a/lisp/files.el b/lisp/files.el
> index 55a0958f54..5132aa456a 100644
> --- a/lisp/files.el
> +++ b/lisp/files.el
> @@ -441,6 +441,7 @@ auto-save-visited-mode
> #'save-some-buffers :no-prompt
> (lambda ()
> (and buffer-file-name
> + auto-save-visited-mode
> (not (and buffer-auto-save-file-name
> auto-save-visited-file-name))))))))
>
Is this really OK? All minor mode variables, including
auto-save-visited-mode, by default get the "Setting this variable
directly does not take effect" documentation string, because we want
to use minor mode variables only for checking a mode's state and
always want users to call the mode function.
Re: [PATCH] Allow inhibiting 'auto-save-visited-mode' on a per-buffer basis., Eli Zaretskii, 2020/04/02
- Re: [PATCH] Allow inhibiting 'auto-save-visited-mode' on a per-buffer basis., Stefan Monnier, 2020/04/02
- Re: [PATCH] Allow inhibiting 'auto-save-visited-mode' on a per-buffer basis.,
Philipp Stephani <=
- Re: [PATCH] Allow inhibiting 'auto-save-visited-mode' on a per-buffer basis., Stefan Monnier, 2020/04/05
- Re: [PATCH] Allow inhibiting 'auto-save-visited-mode' on a per-buffer basis., Philipp Stephani, 2020/04/05
- Re: [PATCH] Allow inhibiting 'auto-save-visited-mode' on a per-buffer basis., Stefan Monnier, 2020/04/05
- Re: [PATCH] Allow inhibiting 'auto-save-visited-mode' on a per-buffer basis., Philipp Stephani, 2020/04/05
- Re: [PATCH] Allow inhibiting 'auto-save-visited-mode' on a per-buffer basis., Philipp Stephani, 2020/04/08
- Re: [PATCH] Allow inhibiting 'auto-save-visited-mode' on a per-buffer basis., Eli Zaretskii, 2020/04/08
- Re: [PATCH] Allow inhibiting 'auto-save-visited-mode' on a per-buffer basis., Philipp Stephani, 2020/04/08
- Re: [PATCH] Allow inhibiting 'auto-save-visited-mode' on a per-buffer basis., Eli Zaretskii, 2020/04/08
Re: [PATCH] Allow inhibiting 'auto-save-visited-mode' on a per-buffer basis., Stefan Monnier, 2020/04/08
Re: [PATCH] Allow inhibiting 'auto-save-visited-mode' on a per-buffer basis., Philipp Stephani, 2020/04/11