GNU bug report logs - #19226
eww.el desktop support fixes: autoload eww-mode, use inhibit-read-only

Previous Next

Package: emacs;

Reported by: Ivan Shmakov <ivan <at> siamics.net>

Date: Sun, 30 Nov 2014 11:05:01 UTC

Severity: normal

Tags: patch

Done: Ivan Shmakov <ivan <at> siamics.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Ivan Shmakov <ivan <at> siamics.net>
To: 19226 <at> debbugs.gnu.org
Subject: bug#19226: eww.el desktop support fixes: autoload eww-mode, use inhibit-read-only 
Date: Sun, 30 Nov 2014 20:15:49 +0000
>>>>> Glenn Morris <rgm <at> gnu.org> writes:
>>>>> Ivan Shmakov wrote:

 >> * eww.el (eww-mode): Autoload, as expected by desktop.el.

 > Then IMO desktop.el should autoload it, rather than adding a general
 > autoload cookie.

	That’s the point: as currently implemented, desktop.el uses a
	general autoload cookie to map major modes (as preserved in the
	desktop file) to Emacs features to load before handling any
	given buffer.  Consider, for instance:

   514	Modules that define a major mode that needs a special handler should contain
   515	code like
   516	
   517	   (defun foo-restore-desktop-buffer
   518	   ...
   519	   (add-to-list 'desktop-buffer-mode-handlers
   520	                '(foo-mode . foo-restore-desktop-buffer))
   521	
   522	Furthermore the major mode function must be autoloaded.")
…
  1319	(defun desktop-load-file (function)
  1320	  "Load the file where auto loaded FUNCTION is defined."
  1321	  (when (fboundp function)
  1322	    (autoload-do-load (symbol-function function) function)))
…

	(See also the uses of desktop-load-file in desktop.el.)

 > (Yes, this may be inconsistent with some existing cases.)

	As for the existing cases, the change suggested exactly matches
	info.el:

  4222	;; Autoload cookie needed by desktop.el
  4223	;;;###autoload
  4224	(define-derived-mode Info-mode nil "Info" ;FIXME: Derive from special-mode?
…
  4312	  (setq-local bookmark-make-record-function #'Info-bookmark-make-record))

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




This bug report was last modified 10 years and 154 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.