emacs-devel
[Top][All Lists]
Advanced

[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:52:16 +0200

Am Do., 2. Apr. 2020 um 15:39 Uhr schrieb Eli Zaretskii <address@hidden>:
>
> > From: Philipp Stephani <address@hidden>
> > Date: Wed,  1 Apr 2020 19:57:36 +0200
> > Cc: Philipp Stephani <address@hidden>
> >
> > +** Autosaving via 'auto-save-visited-mode' can now be inhibited using
> > +the buffer-local variable 'auto-save-visited-inhibit'.
> > +
> >
> >  * Changes in Specialized Modes and Packages in Emacs 28.1
> >
> > diff --git a/lisp/files.el b/lisp/files.el
> > index 55a0958f54..f3ea1d083f 100644
> > --- a/lisp/files.el
> > +++ b/lisp/files.el
> > @@ -425,12 +425,17 @@ auto-save-visited-interval
> >           (when auto-save--timer
> >             (timer-set-idle-time auto-save--timer value :repeat))))
> >
> > +(defvar-local auto-save-visited-inhibit nil
> > +  "If non-nil, ignore this buffer for `auto-save-visited-mode'.")
> > +
>
> Wouldn't it be better to have a local minor mode and a globalized
> minor mode, like we do in other cases?

I don't think that's possible here. We have one global timer, and with
a local minor mode we'd either need one timer per buffer or some
additional complexity to ensure that the timer is enabled if at least
one buffer has the minor mode on.
Alternatively we could have a global timer that's always on.



reply via email to

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