>From my previous message:
Note that even after this patch, there is one potentially troublesome
case left...
Sorry, I was confused. That entire long paragraph makes no sense
(sorry about that). Without MODE-stored-mode, I can not avoid some
inefficiency for non-file buffers (unnecessarily dis- and re-enable
the mode once), unless I somehow can recognize whether we are running
from a timer or process. (I can not immediately think of way to do
that. Is there away?) Getting rid of the one remaining bug I
described _and_ avoiding a similar inefficiency for file buffers can
be accomplished using the following alternate ,buffers function, so it
seems definitely better than the one in my previous patch:
;; The function that calls TURN-ON in each buffer.
(defun ,buffers ()
(dolist (buf ,buffers)
(and (buffer-live-p buf)
(not buffer-file-name)
(with-current-buffer buf
(when mode (,mode -1))
(,turn-on)))))
It is actually _here_ (in after-change-major-mode-hook) that disabling
and re-enabling is unlikely to occur, so getting rid of the remaining
bug carries no real price, but getting rid of MODE-stored-hook does
carry some price, for non-file buffers. I will still think of this further.
Sincerely,
Luc.
_______________________________________________
Emacs-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-devel