+2013-11-26 Kenjiro NAKAYAMA <knakayam@redhat.com> (tiny change)
+
+ * net/eww.el (eww-bookmark-browse): Use 'eww-browse-url'.
+ (eww-add-bookmark): ask confirmation when add to bookmarks
+ (eww-quit): ask confirmation before quitting eww
+
2013-11-26 Eli Zaretskii <eliz@gnu.org>
* vc/vc.el (vc-diff-internal): Use *-dos coding-system when
(defun eww-quit ()
"Exit the Emacs Web Wowser."
(interactive)
- (setq eww-history nil)
- (kill-buffer (current-buffer)))
+ (if (y-or-n-p "quit eww? ")
+ (progn
+ (setq eww-history nil)
+ (kill-buffer (current-buffer)))))
(defun eww-back-url ()
"Go to the previously displayed page."
(when (equal eww-current-url
(plist-get bookmark :url))
(error "Already bookmarked")))
- (let ((title (replace-regexp-in-string "[\n\t\r]" " " eww-current-title)))
- (setq title (replace-regexp-in-string "\\` +\\| +\\'" "" title))
- (push (list :url eww-current-url
- :title title
- :time (current-time-string))
- eww-bookmarks))
- (eww-write-bookmarks)
- (message "Bookmarked %s (%s)" eww-current-url eww-current-title))
+ (if (y-or-n-p "bookmark this page? ")
+ (progn
+ (let ((title (replace-regexp-in-string "[\n\t\r]" " " eww-current-title)))
+ (setq title (replace-regexp-in-string "\\` +\\| +\\'" "" title))
+ (push (list :url eww-current-url
+ :title title
+ :time (current-time-string))
+ eww-bookmarks))
+ (eww-write-bookmarks)
+ (message "Bookmarked %s (%s)" eww-current-url eww-current-title))))
(defun eww-write-bookmarks ()
(with-temp-file (expand-file-name "eww-bookmarks" user-emacs-directory)
;; just let it remain.
(ignore-errors
(delete-window))
- (eww (plist-get bookmark :url))))
+ (eww-browse-url (plist-get bookmark :url))))
(defun eww-next-bookmark ()
"Go to the next bookmark in the list."