+2013-12-11 Teodor Zlatanov <tzz@lifelogs.com>
+
+ * net/eww.el (eww-exit, eww-close): Add UI convenience wrappers.
+ (eww-mode-map): Use them.
+
2013-12-11 Martin Rudalics <rudalics@gmx.at>
* window.el (display-buffer-in-side-window): Fix doc-string
(defvar eww-mode-map
(let ((map (make-sparse-keymap)))
(suppress-keymap map)
- (define-key map "q" 'quit-window)
+ (define-key map "q" 'eww-close)
+ (define-key map "Q" 'eww-exit)
(define-key map "g" 'eww-reload)
(define-key map [tab] 'shr-next-link)
(define-key map [backtab] 'shr-previous-link)
(easy-menu-define nil map ""
'("Eww"
- ["Exit" eww-quit t]
- ["Close browser" quit-window t]
+ ["Exit" eww-exit t]
+ ["Close browser" eww-close t]
["Reload" eww-reload t]
["Back to previous page" eww-back-url
:active (not (zerop (length eww-history)))]
;;(setq buffer-read-only t)
)
+(defun eww-exit ()
+ "Exit the Emacs Web Wowser."
+ (interactive)
+ (setq eww-history nil)
+ (kill-buffer (current-buffer)))
+
+(defun eww-close ()
+ "Close the Emacs Web Wowser browser, leaving history intact."
+ (interactive)
+ (quit-window))
+
(defun eww-save-history ()
(push (list :url eww-current-url
:title eww-current-title