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: Eli Zaretskii
Subject: Re: [PATCH] Allow inhibiting 'auto-save-visited-mode' on a per-buffer basis.
Date: Sun, 05 Apr 2020 16:11:22 +0300

> From: Philipp Stephani <address@hidden>
> Date: Sun, 5 Apr 2020 11:52:16 +0200
> Cc: Emacs developers <address@hidden>, Philipp Stephani <address@hidden>
> 
> > > +(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.

Indeed, we could either have some reference count in the timer to
disable it when there's no buffer that needs it, or keep it running at
all times.

Of course, if this is deemed too complicated, I guess we could go with
your original proposal, but in that case we should at least have some
comment there explaining why this mode is so different from others.

Thanks.



reply via email to

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