aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Brown2014-08-05 20:15:52 +0200
committerLars Magne Ingebrigtsen2014-08-05 20:15:52 +0200
commit06e7319ce3b281bd014d67801cf66bc0f8cc4381 (patch)
tree9a8d6dfee4519ed70a3e04e2e1ef14ddb2c03507
parent488df60acc38854e089a0f115feba5787be14ae8 (diff)
downloademacs-06e7319ce3b281bd014d67801cf66bc0f8cc4381.tar.gz
emacs-06e7319ce3b281bd014d67801cf66bc0f8cc4381.zip
lisp/net/eww.el (eww-bookmarks-directory): New variable.
* lisp/net/eww.el (eww-bookmarks-directory): New variable. (eww-write-bookmarks): Use it. (eww-read-bookmarks): Ditto.
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/net/eww.el10
2 files changed, 14 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 5ec506b63b0..adca3166187 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12014-08-05 Eric Brown <brown@fastmail.fm> (tiny change)
2
3 * net/eww.el (eww-bookmarks-directory): New variable.
4 (eww-write-bookmarks): Use it.
5 (eww-read-bookmarks): Ditto.
6
12014-08-05 Lars Magne Ingebrigtsen <larsi@gnus.org> 72014-08-05 Lars Magne Ingebrigtsen <larsi@gnus.org>
2 8
3 * net/shr.el (shr-copy-url): Also copy the image URL. 9 * net/shr.el (shr-copy-url): Also copy the image URL.
diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index 02fc575c261..f99148162e4 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -57,6 +57,12 @@
57 :group 'eww 57 :group 'eww
58 :type 'string) 58 :type 'string)
59 59
60(defcustom eww-bookmarks-directory user-emacs-directory
61 "Directory where bookmark files will be stored."
62 :version "24.5"
63 :group 'eww
64 :type 'string)
65
60(defcustom eww-use-external-browser-for-content-type 66(defcustom eww-use-external-browser-for-content-type
61 "\\`\\(video/\\|audio/\\|application/ogg\\)" 67 "\\`\\(video/\\|audio/\\|application/ogg\\)"
62 "Always use external browser for specified content-type." 68 "Always use external browser for specified content-type."
@@ -1118,12 +1124,12 @@ Differences in #targets are ignored."
1118 (message "Bookmarked %s (%s)" eww-current-url eww-current-title)))) 1124 (message "Bookmarked %s (%s)" eww-current-url eww-current-title))))
1119 1125
1120(defun eww-write-bookmarks () 1126(defun eww-write-bookmarks ()
1121 (with-temp-file (expand-file-name "eww-bookmarks" user-emacs-directory) 1127 (with-temp-file (expand-file-name "eww-bookmarks" eww-bookmarks-directory)
1122 (insert ";; Auto-generated file; don't edit\n") 1128 (insert ";; Auto-generated file; don't edit\n")
1123 (pp eww-bookmarks (current-buffer)))) 1129 (pp eww-bookmarks (current-buffer))))
1124 1130
1125(defun eww-read-bookmarks () 1131(defun eww-read-bookmarks ()
1126 (let ((file (expand-file-name "eww-bookmarks" user-emacs-directory))) 1132 (let ((file (expand-file-name "eww-bookmarks" eww-bookmarks-directory)))
1127 (setq eww-bookmarks 1133 (setq eww-bookmarks
1128 (unless (zerop (or (nth 7 (file-attributes file)) 0)) 1134 (unless (zerop (or (nth 7 (file-attributes file)) 0))
1129 (with-temp-buffer 1135 (with-temp-buffer