From 2ea5364ca8d1a8dc3f8ac4c9a5ba5c7f03666258 Mon Sep 17 00:00:00 2001 From: Ivan Shmakov Date: Mon, 16 Feb 2015 18:55:02 +0000 Subject: [PATCH] Fix eww.el desktop support. * lisp/net/eww.el (eww-mode): Add autoload cookie. (eww-restore-desktop): Use inhibit-read-only. Fixes: debbugs:19226 --- lisp/ChangeLog | 6 ++++++ lisp/net/eww.el | 7 +++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e4383437c6d..42628ff2c53 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2015-02-16 Ivan Shmakov + + * net/eww.el: Fix desktop support. (Bug#19226) + (eww-mode): Add autoload cookie. + (eww-restore-desktop): Use inhibit-read-only. + 2015-02-16 Stefan Monnier * emacs-lisp/eieio.el (defclass): Use make-instance rather than diff --git a/lisp/net/eww.el b/lisp/net/eww.el index c401701f255..c2da4c96173 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -686,6 +686,8 @@ the like." map) "Tool bar for `eww-mode'.") +;; Autoload cookie needed by desktop.el. +;;;###autoload (define-derived-mode eww-mode special-mode "eww" "Mode for browsing the web." (setq-local eww-data (list :title "")) @@ -1877,8 +1879,9 @@ Otherwise, the restored buffer will contain a prompt to do so by using (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))) -- 2.39.2