diff options
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/net/eww.el | 26 |
2 files changed, 21 insertions, 11 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1e7fc7c9184..44048d841f8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2013-11-26 Kenjiro NAKAYAMA <knakayam@redhat.com> (tiny change) | ||
| 2 | |||
| 3 | * net/eww.el (eww-bookmark-browse): Use 'eww-browse-url'. | ||
| 4 | (eww-add-bookmark): ask confirmation when add to bookmarks | ||
| 5 | (eww-quit): ask confirmation before quitting eww | ||
| 6 | |||
| 1 | 2013-11-26 Eli Zaretskii <eliz@gnu.org> | 7 | 2013-11-26 Eli Zaretskii <eliz@gnu.org> |
| 2 | 8 | ||
| 3 | * vc/vc.el (vc-diff-internal): Use *-dos coding-system when | 9 | * vc/vc.el (vc-diff-internal): Use *-dos coding-system when |
diff --git a/lisp/net/eww.el b/lisp/net/eww.el index 86e09776b42..0c84e782aa3 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el | |||
| @@ -403,8 +403,10 @@ word(s) will be searched for via `eww-search-prefix'." | |||
| 403 | (defun eww-quit () | 403 | (defun eww-quit () |
| 404 | "Exit the Emacs Web Wowser." | 404 | "Exit the Emacs Web Wowser." |
| 405 | (interactive) | 405 | (interactive) |
| 406 | (setq eww-history nil) | 406 | (if (y-or-n-p "quit eww? ") |
| 407 | (kill-buffer (current-buffer))) | 407 | (progn |
| 408 | (setq eww-history nil) | ||
| 409 | (kill-buffer (current-buffer))))) | ||
| 408 | 410 | ||
| 409 | (defun eww-back-url () | 411 | (defun eww-back-url () |
| 410 | "Go to the previously displayed page." | 412 | "Go to the previously displayed page." |
| @@ -964,14 +966,16 @@ The browser to used is specified by the `shr-external-browser' variable." | |||
| 964 | (when (equal eww-current-url | 966 | (when (equal eww-current-url |
| 965 | (plist-get bookmark :url)) | 967 | (plist-get bookmark :url)) |
| 966 | (error "Already bookmarked"))) | 968 | (error "Already bookmarked"))) |
| 967 | (let ((title (replace-regexp-in-string "[\n\t\r]" " " eww-current-title))) | 969 | (if (y-or-n-p "bookmark this page? ") |
| 968 | (setq title (replace-regexp-in-string "\\` +\\| +\\'" "" title)) | 970 | (progn |
| 969 | (push (list :url eww-current-url | 971 | (let ((title (replace-regexp-in-string "[\n\t\r]" " " eww-current-title))) |
| 970 | :title title | 972 | (setq title (replace-regexp-in-string "\\` +\\| +\\'" "" title)) |
| 971 | :time (current-time-string)) | 973 | (push (list :url eww-current-url |
| 972 | eww-bookmarks)) | 974 | :title title |
| 973 | (eww-write-bookmarks) | 975 | :time (current-time-string)) |
| 974 | (message "Bookmarked %s (%s)" eww-current-url eww-current-title)) | 976 | eww-bookmarks)) |
| 977 | (eww-write-bookmarks) | ||
| 978 | (message "Bookmarked %s (%s)" eww-current-url eww-current-title)))) | ||
| 975 | 979 | ||
| 976 | (defun eww-write-bookmarks () | 980 | (defun eww-write-bookmarks () |
| 977 | (with-temp-file (expand-file-name "eww-bookmarks" user-emacs-directory) | 981 | (with-temp-file (expand-file-name "eww-bookmarks" user-emacs-directory) |
| @@ -1063,7 +1067,7 @@ The browser to used is specified by the `shr-external-browser' variable." | |||
| 1063 | ;; just let it remain. | 1067 | ;; just let it remain. |
| 1064 | (ignore-errors | 1068 | (ignore-errors |
| 1065 | (delete-window)) | 1069 | (delete-window)) |
| 1066 | (eww (plist-get bookmark :url)))) | 1070 | (eww-browse-url (plist-get bookmark :url)))) |
| 1067 | 1071 | ||
| 1068 | (defun eww-next-bookmark () | 1072 | (defun eww-next-bookmark () |
| 1069 | "Go to the next bookmark in the list." | 1073 | "Go to the next bookmark in the list." |