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

From: Ivan Shmakov <[email-masked]>
Date: Sun, 30 Nov 2014 11:04:04 +0000

Package:  emacs
Tags:     patch

	Please consider the patch MIMEd.

	* eww.el (eww-mode): Autoload, as expected by desktop.el.
	(eww-restore-desktop): Use inhibit-read-only when inserting
	eww-restore-reload-prompt.

-- 
FSF associate member #7257  np. Your Leaving — Jami Sieber   … B6A0 230E 334A
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -662,6 +662,8 @@
     map)
   "Tool bar for `eww-mode'.")
 
+;; autoload cookie needed by desktop.el
+;;;###autoload
 (define-derived-mode eww-mode nil "eww"
   "Mode for browsing the web.
 
@@ -1710,8 +1712,9 @@ defun eww-restore-desktop (file-name buffer-name misc-data)
 	(case eww-restore-desktop
 	  ((t auto) (eww (plist-get eww-data :url)))
 	  ((zerop (buffer-size))
-	   (insert (substitute-command-keys
-		    eww-restore-reload-prompt))))))
+	   (let ((inhibit-read-only t))
+	     (insert (substitute-command-keys
+		      eww-restore-reload-prompt)))))))
     ;; .
     (current-buffer)))