bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#19226: eww.el desktop support fixes: autoload eww-mode, use inhibit-


From: Ivan Shmakov
Subject: bug#19226: eww.el desktop support fixes: autoload eww-mode, use inhibit-read-only
Date: Tue, 09 Dec 2014 19:45:47 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

>>>>> Stefan Monnier <monnier@iro.umontreal.ca> writes:

 >> The problem here is that desktop.el should explicitly be pointed to
 >> the function to do all the special handling for the mode, which is
 >> (conventionally) done like:

 >> (add-to-list 'desktop-buffer-mode-handlers
 >>              '(eww-mode . eww-restore-desktop))

 >> The problem is: to get /that/ evaluated, desktop.el needs to first
 >> load eww.el, leading to a chicken and egg problem.

 > I see.  Maybe the problem then is that desktop.el should be changed
 > so that it records `eww-restore-desktop' as the handler function for
 > this buffer in the desktop file.  I. e. those
 > desktop-buffer-mode-handlers should be looked up while *saving* the
 > desktop file rather than while reading them.

        Yes.  Yet I fail to see how that would be an improvement?

        First of all, we already can trigger .emacs.desktop
        incompatibility when the format of the value stored in there
        changes.  Now, we also make that fail when it’s the /name/ of
        the handler function that changes.  (I presume that the change
        in the mode name is much less likely on one side, and much more
        likely to get a defalias on the other.)

        Moreover, instead of (or, well, in addition to) an autoload for
        the mode function, we now need an autoload for the handler.

-- 
FSF associate member #7257  http://boycottsystemd.org/  … 3013 B6A0 230E 334A





reply via email to

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