aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl Fogel1993-10-25 23:56:15 +0000
committerKarl Fogel1993-10-25 23:56:15 +0000
commitd23e2c3f349782cc825579aa472c572075467671 (patch)
tree1eaf4381bddd1bc7c3bb5c88b50ae7e264d020a5
parentc1da5c031fbc3399105c806b2cd7a1bed99da3a3 (diff)
downloademacs-d23e2c3f349782cc825579aa472c572075467671.tar.gz
emacs-d23e2c3f349782cc825579aa472c572075467671.zip
upped version to 2.5
Got rid of ###autoload to put a bookmark menu on the menu-bar. Now it will appear on the File menu, fourth item down. menu-bar.el will be modified to do this. (bookmark-load, bookmark-write-file): made enable-local-eval be nil when loading a bookmark file, since bookmark context strings can contain eval forms from the files in which the bookmarks are set, and we don't want them evalled when .emacs-bkmrks is found! upped version to 2.4.1 after doing this.
-rw-r--r--lisp/bookmark.el31
1 files changed, 21 insertions, 10 deletions
diff --git a/lisp/bookmark.el b/lisp/bookmark.el
index 620b4ab6032..cb52753686c 100644
--- a/lisp/bookmark.el
+++ b/lisp/bookmark.el
@@ -5,7 +5,7 @@
5;; Author: Karl Fogel <kfogel@cs.oberlin.edu> 5;; Author: Karl Fogel <kfogel@cs.oberlin.edu>
6;; Maintainer: Karl Fogel <kfogel@cs.oberlin.edu> 6;; Maintainer: Karl Fogel <kfogel@cs.oberlin.edu>
7;; Created: July, 1993 7;; Created: July, 1993
8;; Version: 2.4 8;; Version: 2.5
9;; Keywords: bookmarks, placeholders 9;; Keywords: bookmarks, placeholders
10 10
11;; This file is part of GNU Emacs. 11;; This file is part of GNU Emacs.
@@ -26,26 +26,40 @@
26 26
27;; Thanks to David Bremner <bremner@cs.sfu.ca> for thinking of and 27;; Thanks to David Bremner <bremner@cs.sfu.ca> for thinking of and
28;; then implementing the bookmark-current-bookmark idea. He even 28;; then implementing the bookmark-current-bookmark idea. He even
29;; sent *patches*, bless his soul... 29;; sent *patches*, bless his soul...
30 30
31;; Thanks to Gregory M. Saunders <saunders@cis.ohio-state.edu> for 31;; Thanks to Gregory M. Saunders <saunders@cis.ohio-state.edu> for
32;; fixing and improving bookmark-time-to-save-p. 32;; fixing and improving bookmark-time-to-save-p.
33 33
34;; Thanks go to Andrew V. Klein <avk@rtsg.mot.com> for the code that
35;; sorts the alist before presenting it to the user (in list-bookmarks
36;; and the menu-bar).
37
34;; And much thanks to David Hughes <djh@harston.cv.com> for many small 38;; And much thanks to David Hughes <djh@harston.cv.com> for many small
35;; suggestions and the code to implement them (like 39;; suggestions and the code to implement them (like
36;; Bookmark-menu-check-position, and some of the Lucid compatibility 40;; Bookmark-menu-check-position, and some of the Lucid compatibility
37;; stuff). 41;; stuff).
38 42
43;; Kudos (whatever they are) go to Jim Blandy <jimb@cs.oberlin.edu>
44;; for his eminently sensible suggestion to separate bookmark-jump
45;; into bookmark-jump and bookmark-jump-noselect, which made many
46;; other things cleaner as well.
47
39;; Thanks to Roland McGrath for encouragement and help with defining 48;; Thanks to Roland McGrath for encouragement and help with defining
40;; autoloads on the menu-bar. 49;; autoloads on the menu-bar.
41 50
51;; Jonathan Stigelman <stig@key.amdahl.com> gave patches for default
52;; values in bookmark-jump and bookmark-set. Everybody please keep
53;; all the keystrokes they save thereby and send them to him at the
54;; end of each year :-) (No, seriously, thanks Jonathan!)
55
42;; Based on info-bookmark.el, by Karl Fogel and Ken Olstad 56;; Based on info-bookmark.el, by Karl Fogel and Ken Olstad
43;; <olstad@msc.edu>. 57;; <olstad@msc.edu>.
44 58
45;; LCD Archive Entry: 59;; LCD Archive Entry:
46;; bookmark|Karl Fogel|kfogel@cs.oberlin.edu| 60;; bookmark|Karl Fogel|kfogel@cs.oberlin.edu|
47;; Setting bookmarks in files or directories, jumping to them later.| 61;; Setting bookmarks in files or directories, jumping to them later.|
48;; 16-July-93|Version: 2.4|~/misc/bookmark.el.Z| 62;; 16-July-93|Version: 2.5|~/misc/bookmark.el.Z|
49 63
50;; Enough with the credits already, get on to the good stuff: 64;; Enough with the credits already, get on to the good stuff:
51 65
@@ -666,7 +680,8 @@ for a file, defaulting to the file defined by variable
666 (save-window-excursion 680 (save-window-excursion
667 (if (>= baud-rate 9600) 681 (if (>= baud-rate 9600)
668 (message (format "Saving bookmarks to file %s." file))) 682 (message (format "Saving bookmarks to file %s." file)))
669 (set-buffer (find-file-noselect file)) 683 (set-buffer (let ((enable-local-eval nil))
684 (find-file-noselect file)))
670 (goto-char (point-min)) 685 (goto-char (point-min))
671 (delete-region (point-min) (point-max)) 686 (delete-region (point-min) (point-max))
672 (print bookmark-alist (current-buffer)) 687 (print bookmark-alist (current-buffer))
@@ -709,7 +724,8 @@ explicitly."
709 (save-window-excursion 724 (save-window-excursion
710 (if (and (null no-msg) (>= baud-rate 9600)) 725 (if (and (null no-msg) (>= baud-rate 9600))
711 (message (format "Loading bookmarks from %s..." file))) 726 (message (format "Loading bookmarks from %s..." file)))
712 (set-buffer (find-file-noselect file)) 727 (set-buffer (let ((enable-local-eval nil))
728 (find-file-noselect file)))
713 (goto-char (point-min)) 729 (goto-char (point-min))
714 (let ((blist (car (read-from-string 730 (let ((blist (car (read-from-string
715 (buffer-substring (point-min) (point-max)))))) 731 (buffer-substring (point-min) (point-max))))))
@@ -1237,10 +1253,6 @@ one most recently used in this file, if any\)."
1237;; Thanks to Roland McGrath for fixing menubar.el so that the 1253;; Thanks to Roland McGrath for fixing menubar.el so that the
1238;; following works, and for explaining what to do to make it work. 1254;; following works, and for explaining what to do to make it work.
1239 1255
1240;;;###autoload
1241(define-key global-map [menu-bar bookmark]
1242 '("Bookmarks" . menu-bar-bookmark-map))
1243
1244(defvar menu-bar-bookmark-map (make-sparse-keymap "Bookmark functions.")) 1256(defvar menu-bar-bookmark-map (make-sparse-keymap "Bookmark functions."))
1245 1257
1246;; make bookmarks appear toward the right side of the menu. 1258;; make bookmarks appear toward the right side of the menu.
@@ -1289,4 +1301,3 @@ one most recently used in this file, if any\)."
1289(provide 'bookmark) 1301(provide 'bookmark)
1290 1302
1291;;; bookmark.el ends here 1303;;; bookmark.el ends here
1292