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: Sat, 14 Feb 2015 20:50:41 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

        The discussion, as it seems, have lead us nowhere.

        Would there be any objections against me pushing the (updated)
        fix sometime within the next two days, /as well as/ a couple of
        unrelated minor changes (both MIMEd)?  (Somehow, I believe that
        the discussion over the possible desktop.el vs. special modes
        changes can safely be postponed until something specific is
        suggested.)

        TIA.

Fix eww.el desktop support.

* lisp/net/eww.el (eww-mode): Add autoload cookie.
(eww-restore-desktop): Use inhibit-read-only.

Fixes: debbugs:19226

Minor eww.el fixes.

* lisp/net/eww.el (eww-suggest-uris): Add autoload cookie, so that
add-hook works correctly even if the file is not yet loaded.
(eww-list-histories): Do not pad the rightmost (URIs) column.

-- 
FSF associate member #7257  http://boycottsystemd.org/  … 3013 B6A0 230E 334A
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -686,6 +687,8 @@
     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 +1880,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)))
 
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -60,6 +60,7 @@
   :group 'eww
   :type 'string)
 
+;;;###autoload
 (defcustom eww-suggest-uris
   '(eww-links-at-point
     url-get-url-at-point
@@ -1634,7 +1637,7 @@ defun eww-list-histories ()
        (setq start (point))
        (setq domain-length (max domain-length (length (plist-get history 
:url))))
        (setq title-length (max title-length (length (plist-get history 
:title)))))
-      (setq format (format "%%-%ds %%-%ds" title-length domain-length)
+      (setq format (format "%%-%ds %%s" title-length)
            header-line-format
            (concat " " (format format "Title" "URL")))
       (dolist (history eww-history-trans)

reply via email to

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