aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Steingold2001-01-12 22:49:40 +0000
committerSam Steingold2001-01-12 22:49:40 +0000
commitdbe99ae975633d404cb0de5e9312952cab0f28e6 (patch)
tree6b376c5a52defe857221eaff27a6d7869007602f
parentd30717c9d7e0f01f58259ff233be590fa6995d1e (diff)
downloademacs-dbe99ae975633d404cb0de5e9312952cab0f28e6.tar.gz
emacs-dbe99ae975633d404cb0de5e9312952cab0f28e6.zip
new backquote syntax
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/bookmark.el110
2 files changed, 60 insertions, 55 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index c4d66c7b0c9..2133ced6ae9 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12001-01-12 Sam Steingold <sds@gnu.org>
2
3 * bookmark.el (bookmark-maybe-historicize-string):
4 Use new backquote syntax.
5
12001-01-12 Richard M. Stallman <rms@caffeine.ai.mit.edu> 62001-01-12 Richard M. Stallman <rms@caffeine.ai.mit.edu>
2 7
3 * subr.el (last): Handle a list that doesn't end in nil. 8 * subr.el (last): Handle a list that doesn't end in nil.
diff --git a/lisp/bookmark.el b/lisp/bookmark.el
index 31bd50a2bc6..55c37fd027b 100644
--- a/lisp/bookmark.el
+++ b/lisp/bookmark.el
@@ -73,7 +73,7 @@
73 73
74;; Enough with the credits already, get on to the good stuff: 74;; Enough with the credits already, get on to the good stuff:
75 75
76;; FAVORITE CHINESE RESTAURANT: 76;; FAVORITE CHINESE RESTAURANT:
77;; Boy, that's a tough one. Probably Hong Min, or maybe Emperor's 77;; Boy, that's a tough one. Probably Hong Min, or maybe Emperor's
78;; Choice (both in Chicago's Chinatown). Well, both. How about you? 78;; Choice (both in Chicago's Chinatown). Well, both. How about you?
79 79
@@ -84,7 +84,7 @@
84;;; Misc comments: 84;;; Misc comments:
85;; 85;;
86;; If variable bookmark-use-annotations is non-nil, an annotation is 86;; If variable bookmark-use-annotations is non-nil, an annotation is
87;; queried for when setting a bookmark. 87;; queried for when setting a bookmark.
88;; 88;;
89;; The bookmark list is sorted lexically by default, but you can turn 89;; The bookmark list is sorted lexically by default, but you can turn
90;; this off by setting bookmark-sort-flag to nil. If it is nil, then 90;; this off by setting bookmark-sort-flag to nil. If it is nil, then
@@ -212,7 +212,7 @@ following in your `.emacs' file:
212 212
213;; This variable is probably obsolete now... 213;; This variable is probably obsolete now...
214(or (boundp 'baud-rate) 214(or (boundp 'baud-rate)
215 ;; some random value higher than 9600 215 ;; some random value higher than 9600
216 (setq baud-rate 19200)) 216 (setq baud-rate 19200))
217 217
218 218
@@ -302,7 +302,7 @@ So the cdr of each bookmark is an alist too.
302 302
303;; more stuff added by db. 303;; more stuff added by db.
304 304
305(defvar bookmark-current-bookmark nil 305(defvar bookmark-current-bookmark nil
306 "Name of bookmark most recently used in the current file. 306 "Name of bookmark most recently used in the current file.
307It is buffer local, used to make moving a bookmark forward 307It is buffer local, used to make moving a bookmark forward
308through a file easier.") 308through a file easier.")
@@ -437,7 +437,7 @@ That is, all information but the name."
437(defun bookmark-get-info-node (bookmark) 437(defun bookmark-get-info-node (bookmark)
438 "Get the info node associated with BOOKMARK." 438 "Get the info node associated with BOOKMARK."
439 (cdr (assq 'info-node (bookmark-get-bookmark-record bookmark)))) 439 (cdr (assq 'info-node (bookmark-get-bookmark-record bookmark))))
440 440
441 441
442(defun bookmark-set-info-node (bookmark node) 442(defun bookmark-set-info-node (bookmark node)
443 "Set the Info node of BOOKMARK to NODE." 443 "Set the Info node of BOOKMARK to NODE."
@@ -451,7 +451,7 @@ That is, all information but the name."
451 (message "%S" (assq 'info-node (bookmark-get-bookmark-record bookmark))) 451 (message "%S" (assq 'info-node (bookmark-get-bookmark-record bookmark)))
452 (sit-for 4) 452 (sit-for 4)
453 ) 453 )
454 454
455 455
456(defvar bookmark-history nil 456(defvar bookmark-history nil
457 "The history list for bookmark functions.") 457 "The history list for bookmark functions.")
@@ -485,9 +485,9 @@ the empty string."
485 "Put STRING into the bookmark prompt history, if caller non-interactive. 485 "Put STRING into the bookmark prompt history, if caller non-interactive.
486We need this because sometimes bookmark functions are invoked from 486We need this because sometimes bookmark functions are invoked from
487menus, so `completing-read' never gets a chance to set `bookmark-history'." 487menus, so `completing-read' never gets a chance to set `bookmark-history'."
488 (` (or 488 `(or
489 (interactive-p) 489 (interactive-p)
490 (setq bookmark-history (cons (, string) bookmark-history))))) 490 (setq bookmark-history (cons ,string bookmark-history))))
491 491
492 492
493(defun bookmark-make (name &optional annotation overwrite info-node) 493(defun bookmark-make (name &optional annotation overwrite info-node)
@@ -508,17 +508,17 @@ INFO-NODE, so record this fact in the bookmark's entry."
508 ;; no prefix arg means just overwrite old bookmark 508 ;; no prefix arg means just overwrite old bookmark
509 (setcdr (bookmark-get-bookmark stripped-name) 509 (setcdr (bookmark-get-bookmark stripped-name)
510 (list (bookmark-make-cell annotation info-node))) 510 (list (bookmark-make-cell annotation info-node)))
511 511
512 ;; otherwise just cons it onto the front (either the bookmark 512 ;; otherwise just cons it onto the front (either the bookmark
513 ;; doesn't exist already, or there is no prefix arg. In either 513 ;; doesn't exist already, or there is no prefix arg. In either
514 ;; case, we want the new bookmark consed onto the alist...) 514 ;; case, we want the new bookmark consed onto the alist...)
515 515
516 (setq bookmark-alist 516 (setq bookmark-alist
517 (cons 517 (cons
518 (list stripped-name 518 (list stripped-name
519 (bookmark-make-cell annotation info-node)) 519 (bookmark-make-cell annotation info-node))
520 bookmark-alist))) 520 bookmark-alist)))
521 521
522 ;; Added by db 522 ;; Added by db
523 (setq bookmark-current-bookmark stripped-name) 523 (setq bookmark-current-bookmark stripped-name)
524 (setq bookmark-alist-modification-count 524 (setq bookmark-alist-modification-count
@@ -563,8 +563,8 @@ INFO-NODE, so record this fact in the bookmark's entry."
563 563
564 ;; Finally, return the completed record. 564 ;; Finally, return the completed record.
565 the-record)) 565 the-record))
566 566
567 567
568 568
569;;; File format stuff 569;;; File format stuff
570 570
@@ -596,17 +596,17 @@ INFO-NODE, so record this fact in the bookmark's entry."
596;; risk of interfering with existing ones. 596;; risk of interfering with existing ones.
597;; 597;;
598;; BOOKMARK-NAME is the string the user gives the bookmark and 598;; BOOKMARK-NAME is the string the user gives the bookmark and
599;; accesses it by from then on. 599;; accesses it by from then on.
600;; 600;;
601;; FILENAME is the location of the file in which the bookmark is set. 601;; FILENAME is the location of the file in which the bookmark is set.
602;; 602;;
603;; STRING-IN-FRONT is a string of `bookmark-search-size' chars of 603;; STRING-IN-FRONT is a string of `bookmark-search-size' chars of
604;; context in front of the point at which the bookmark is set. 604;; context in front of the point at which the bookmark is set.
605;; 605;;
606;; STRING-BEHIND is the same thing, but after the point. 606;; STRING-BEHIND is the same thing, but after the point.
607;; 607;;
608;; The context strings exist so that modifications to a file don't 608;; The context strings exist so that modifications to a file don't
609;; necessarily cause a bookmark's position to be invalidated. 609;; necessarily cause a bookmark's position to be invalidated.
610;; bookmark-jump will search for STRING-BEHIND and STRING-IN-FRONT in 610;; bookmark-jump will search for STRING-BEHIND and STRING-IN-FRONT in
611;; case the file has changed since the bookmark was set. It will 611;; case the file has changed since the bookmark was set. It will
612;; attempt to place the user before the changes, if there were any. 612;; attempt to place the user before the changes, if there were any.
@@ -772,7 +772,7 @@ the list of bookmarks.\)"
772 now-map)))) 772 now-map))))
773 (annotation nil)) 773 (annotation nil))
774 (and (string-equal str "") (setq str default)) 774 (and (string-equal str "") (setq str default))
775 ;; Ask for an annotation buffer for this bookmark 775 ;; Ask for an annotation buffer for this bookmark
776 (if bookmark-use-annotations 776 (if bookmark-use-annotations
777 (bookmark-read-annotation parg str) 777 (bookmark-read-annotation parg str)
778 (bookmark-make str annotation parg (bookmark-info-current-node)) 778 (bookmark-make str annotation parg (bookmark-info-current-node))
@@ -828,7 +828,7 @@ the bookmark (and file, and point) specified in buffer local variables."
828 ;; Actually, bookmark-make-cell should probably be re-written, 828 ;; Actually, bookmark-make-cell should probably be re-written,
829 ;; to avoid this need. Should I handle the error if a buffer is 829 ;; to avoid this need. Should I handle the error if a buffer is
830 ;; killed between "C-x r m" and a "C-c C-c" in the annotation buffer? 830 ;; killed between "C-x r m" and a "C-c C-c" in the annotation buffer?
831 (save-excursion 831 (save-excursion
832 (pop-to-buffer buf) 832 (pop-to-buffer buf)
833 (goto-char pt) 833 (goto-char pt)
834 (bookmark-make bookmark annotation parg (bookmark-info-current-node)) 834 (bookmark-make bookmark annotation parg (bookmark-info-current-node))
@@ -1026,7 +1026,7 @@ For example, if this is a Info buffer, return the Info file's name."
1026 (expand-file-name bookmark-default-file))) 1026 (expand-file-name bookmark-default-file)))
1027 ;; return t so the `and' will continue... 1027 ;; return t so the `and' will continue...
1028 t) 1028 t)
1029 1029
1030 (file-readable-p (expand-file-name bookmark-default-file)) 1030 (file-readable-p (expand-file-name bookmark-default-file))
1031 (bookmark-load bookmark-default-file t t) 1031 (bookmark-load bookmark-default-file t t)
1032 (setq bookmarks-already-loaded t))) 1032 (setq bookmarks-already-loaded t)))
@@ -1044,7 +1044,7 @@ For example, if this is a Info buffer, return the Info file's name."
1044 1044
1045;;;###autoload 1045;;;###autoload
1046(defun bookmark-jump (bookmark) 1046(defun bookmark-jump (bookmark)
1047 "Jump to bookmark BOOKMARK (a point in some file). 1047 "Jump to bookmark BOOKMARK (a point in some file).
1048You may have a problem using this function if the value of variable 1048You may have a problem using this function if the value of variable
1049`bookmark-alist' is nil. If that happens, you need to load in some 1049`bookmark-alist' is nil. If that happens, you need to load in some
1050bookmarks. See help on function `bookmark-load' for more about 1050bookmarks. See help on function `bookmark-load' for more about
@@ -1070,7 +1070,7 @@ of the old one in the permanent bookmark record."
1070(defun bookmark-file-or-variation-thereof (file) 1070(defun bookmark-file-or-variation-thereof (file)
1071 "Return FILE (a string) if it exists in any reasonable variation, else nil. 1071 "Return FILE (a string) if it exists in any reasonable variation, else nil.
1072Reasonable variations are FILE.gz, FILE.Z, FILE.info, FILE.info.gz, etc." 1072Reasonable variations are FILE.gz, FILE.Z, FILE.info, FILE.info.gz, etc."
1073 (cond 1073 (cond
1074 ((file-exists-p file) file) 1074 ((file-exists-p file) file)
1075 ((file-exists-p (concat file ".Z")) (concat file ".Z")) 1075 ((file-exists-p (concat file ".Z")) (concat file ".Z"))
1076 ((file-exists-p (concat file ".gz")) (concat file ".gz")) 1076 ((file-exists-p (concat file ".gz")) (concat file ".gz"))
@@ -1132,7 +1132,7 @@ Reasonable variations are FILE.gz, FILE.Z, FILE.info, FILE.info.gz, etc."
1132 (bookmark-relocate str) 1132 (bookmark-relocate str)
1133 ;; gasp! It's a recursive function call in Emacs Lisp! 1133 ;; gasp! It's a recursive function call in Emacs Lisp!
1134 (bookmark-jump-noselect str)) 1134 (bookmark-jump-noselect str))
1135 (message 1135 (message
1136 "Bookmark not relocated; consider removing it \(%s\)." str) 1136 "Bookmark not relocated; consider removing it \(%s\)." str)
1137 nil)))) 1137 nil))))
1138 1138
@@ -1166,7 +1166,7 @@ minibuffer history list `bookmark-history'."
1166 (prog1 1166 (prog1
1167 (insert (bookmark-location bookmark)) ; *Return this line* 1167 (insert (bookmark-location bookmark)) ; *Return this line*
1168 (if (and (display-color-p) (display-mouse-p)) 1168 (if (and (display-color-p) (display-mouse-p))
1169 (put-text-property start 1169 (put-text-property start
1170 (save-excursion (re-search-backward 1170 (save-excursion (re-search-backward
1171 "[^ \t]") 1171 "[^ \t]")
1172 (1+ (point))) 1172 (1+ (point)))
@@ -1222,7 +1222,7 @@ name."
1222 1222
1223;;;###autoload 1223;;;###autoload
1224(defun bookmark-insert (bookmark) 1224(defun bookmark-insert (bookmark)
1225 "Insert the text of the file pointed to by bookmark BOOKMARK. 1225 "Insert the text of the file pointed to by bookmark BOOKMARK.
1226You may have a problem using this function if the value of variable 1226You may have a problem using this function if the value of variable
1227`bookmark-alist' is nil. If that happens, you need to load in some 1227`bookmark-alist' is nil. If that happens, you need to load in some
1228bookmarks. See help on function `bookmark-load' for more about 1228bookmarks. See help on function `bookmark-load' for more about
@@ -1242,7 +1242,7 @@ this."
1242 1242
1243;;;###autoload 1243;;;###autoload
1244(defun bookmark-delete (bookmark &optional batch) 1244(defun bookmark-delete (bookmark &optional batch)
1245 "Delete BOOKMARK from the bookmark list. 1245 "Delete BOOKMARK from the bookmark list.
1246Removes only the first instance of a bookmark with that name. If 1246Removes only the first instance of a bookmark with that name. If
1247there are one or more other bookmarks with the same name, they will 1247there are one or more other bookmarks with the same name, they will
1248not be deleted. Defaults to the \"current\" bookmark \(that is, the 1248not be deleted. Defaults to the \"current\" bookmark \(that is, the
@@ -1276,7 +1276,7 @@ probably because we were called from there."
1276 ;; bookmark-alist-modification-count. Returns t if they should be 1276 ;; bookmark-alist-modification-count. Returns t if they should be
1277 ;; saved, nil otherwise. if last-time is non-nil, then this is 1277 ;; saved, nil otherwise. if last-time is non-nil, then this is
1278 ;; being called when emacs is killed. 1278 ;; being called when emacs is killed.
1279 (cond (last-time 1279 (cond (last-time
1280 (and (> bookmark-alist-modification-count 0) 1280 (and (> bookmark-alist-modification-count 0)
1281 bookmark-save-flag)) 1281 bookmark-save-flag))
1282 ((numberp bookmark-save-flag) 1282 ((numberp bookmark-save-flag)
@@ -1295,7 +1295,7 @@ Don't use this in Lisp programs; use `bookmark-save' instead."
1295 1295
1296 1296
1297;;;###autoload 1297;;;###autoload
1298(defun bookmark-save (&optional parg file) 1298(defun bookmark-save (&optional parg file)
1299 "Save currently defined bookmarks. 1299 "Save currently defined bookmarks.
1300Saves by default in the file defined by the variable 1300Saves by default in the file defined by the variable
1301`bookmark-default-file'. With a prefix arg, save it in file FILE 1301`bookmark-default-file'. With a prefix arg, save it in file FILE
@@ -1412,7 +1412,7 @@ method buffers use to resolve name collisions."
1412 (interactive 1412 (interactive
1413 (list (read-file-name 1413 (list (read-file-name
1414 (format "Load bookmarks from: (%s) " 1414 (format "Load bookmarks from: (%s) "
1415 bookmark-default-file) 1415 bookmark-default-file)
1416 ;;Default might not be used often, 1416 ;;Default might not be used often,
1417 ;;but there's no better default, and 1417 ;;but there's no better default, and
1418 ;;I guess it's better than none at all. 1418 ;;I guess it's better than none at all.
@@ -1442,7 +1442,7 @@ method buffers use to resolve name collisions."
1442 (expand-file-name bookmark-default-file) 1442 (expand-file-name bookmark-default-file)
1443 file) 1443 file)
1444 (setq bookmarks-already-loaded t)) 1444 (setq bookmarks-already-loaded t))
1445 (bookmark-bmenu-surreptitiously-rebuild-list)) 1445 (bookmark-bmenu-surreptitiously-rebuild-list))
1446 (error "Invalid bookmark list in %s" file))) 1446 (error "Invalid bookmark list in %s" file)))
1447 (kill-buffer (current-buffer))) 1447 (kill-buffer (current-buffer)))
1448 (if (and (null no-msg) (>= baud-rate 9600)) 1448 (if (and (null no-msg) (>= baud-rate 9600))
@@ -1492,7 +1492,7 @@ method buffers use to resolve name collisions."
1492 (define-key bookmark-bmenu-mode-map "?" 'describe-mode) 1492 (define-key bookmark-bmenu-mode-map "?" 'describe-mode)
1493 (define-key bookmark-bmenu-mode-map "u" 'bookmark-bmenu-unmark) 1493 (define-key bookmark-bmenu-mode-map "u" 'bookmark-bmenu-unmark)
1494 (define-key bookmark-bmenu-mode-map "m" 'bookmark-bmenu-mark) 1494 (define-key bookmark-bmenu-mode-map "m" 'bookmark-bmenu-mark)
1495 (define-key bookmark-bmenu-mode-map "l" 'bookmark-bmenu-load) 1495 (define-key bookmark-bmenu-mode-map "l" 'bookmark-bmenu-load)
1496 (define-key bookmark-bmenu-mode-map "r" 'bookmark-bmenu-rename) 1496 (define-key bookmark-bmenu-mode-map "r" 'bookmark-bmenu-rename)
1497 (define-key bookmark-bmenu-mode-map "t" 'bookmark-bmenu-toggle-filenames) 1497 (define-key bookmark-bmenu-mode-map "t" 'bookmark-bmenu-toggle-filenames)
1498 (define-key bookmark-bmenu-mode-map "a" 'bookmark-bmenu-show-annotation) 1498 (define-key bookmark-bmenu-mode-map "a" 'bookmark-bmenu-show-annotation)
@@ -1501,7 +1501,7 @@ method buffers use to resolve name collisions."
1501 (define-key bookmark-bmenu-mode-map [mouse-2] 1501 (define-key bookmark-bmenu-mode-map [mouse-2]
1502 'bookmark-bmenu-other-window-with-mouse)) 1502 'bookmark-bmenu-other-window-with-mouse))
1503 1503
1504 1504
1505 1505
1506;; Bookmark Buffer Menu mode is suitable only for specially formatted 1506;; Bookmark Buffer Menu mode is suitable only for specially formatted
1507;; data. 1507;; data.
@@ -1509,7 +1509,7 @@ method buffers use to resolve name collisions."
1509 1509
1510 1510
1511;; todo: need to display whether or not bookmark exists as a buffer in 1511;; todo: need to display whether or not bookmark exists as a buffer in
1512;; flag column. 1512;; flag column.
1513 1513
1514;; Format: 1514;; Format:
1515;; FLAGS BOOKMARK [ LOCATION ] 1515;; FLAGS BOOKMARK [ LOCATION ]
@@ -1520,7 +1520,7 @@ method buffers use to resolve name collisions."
1520Don't affect the buffer ring order." 1520Don't affect the buffer ring order."
1521 (if (get-buffer "*Bookmark List*") 1521 (if (get-buffer "*Bookmark List*")
1522 (save-excursion 1522 (save-excursion
1523 (save-window-excursion 1523 (save-window-excursion
1524 (bookmark-bmenu-list))))) 1524 (bookmark-bmenu-list)))))
1525 1525
1526 1526
@@ -1552,7 +1552,7 @@ deletion, or > if it is flagged for displaying."
1552 (let ((start (point))) 1552 (let ((start (point)))
1553 (insert (bookmark-name-from-full-record full-record)) 1553 (insert (bookmark-name-from-full-record full-record))
1554 (if (and (display-color-p) (display-mouse-p)) 1554 (if (and (display-color-p) (display-mouse-p))
1555 (put-text-property start 1555 (put-text-property start
1556 (save-excursion (re-search-backward 1556 (save-excursion (re-search-backward
1557 "[^ \t]") 1557 "[^ \t]")
1558 (1+ (point))) 1558 (1+ (point)))
@@ -1591,9 +1591,9 @@ Bookmark names preceded by a \"*\" have annotations.
1591\\[bookmark-bmenu-other-window] -- select this bookmark in another window, 1591\\[bookmark-bmenu-other-window] -- select this bookmark in another window,
1592 so the bookmark menu bookmark remains visible in its window. 1592 so the bookmark menu bookmark remains visible in its window.
1593\\[bookmark-bmenu-switch-other-window] -- switch the other window to this bookmark. 1593\\[bookmark-bmenu-switch-other-window] -- switch the other window to this bookmark.
1594\\[bookmark-bmenu-rename] -- rename this bookmark \(prompts for new name\). 1594\\[bookmark-bmenu-rename] -- rename this bookmark \(prompts for new name\).
1595\\[bookmark-bmenu-delete] -- mark this bookmark to be deleted, and move down. 1595\\[bookmark-bmenu-delete] -- mark this bookmark to be deleted, and move down.
1596\\[bookmark-bmenu-delete-backwards] -- mark this bookmark to be deleted, and move up. 1596\\[bookmark-bmenu-delete-backwards] -- mark this bookmark to be deleted, and move up.
1597\\[bookmark-bmenu-execute-deletions] -- delete bookmarks marked with `\\[bookmark-bmenu-delete]'. 1597\\[bookmark-bmenu-execute-deletions] -- delete bookmarks marked with `\\[bookmark-bmenu-delete]'.
1598\\[bookmark-bmenu-save] -- save the current bookmark list in the default file. 1598\\[bookmark-bmenu-save] -- save the current bookmark list in the default file.
1599 With a prefix arg, prompts for a file to save in. 1599 With a prefix arg, prompts for a file to save in.
@@ -1679,7 +1679,7 @@ Optional argument SHOW means show them unconditionally."
1679 (let ((start (point))) 1679 (let ((start (point)))
1680 (insert (car bookmark-bmenu-hidden-bookmarks)) 1680 (insert (car bookmark-bmenu-hidden-bookmarks))
1681 (if (and (display-color-p) (display-mouse-p)) 1681 (if (and (display-color-p) (display-mouse-p))
1682 (put-text-property start 1682 (put-text-property start
1683 (save-excursion (re-search-backward 1683 (save-excursion (re-search-backward
1684 "[^ \t]") 1684 "[^ \t]")
1685 (1+ (point))) 1685 (1+ (point)))
@@ -1720,8 +1720,8 @@ Optional argument SHOW means show them unconditionally."
1720 (beginning-of-line) 1720 (beginning-of-line)
1721 (forward-char bookmark-bmenu-bookmark-column) 1721 (forward-char bookmark-bmenu-bookmark-column)
1722 (prog1 1722 (prog1
1723 (buffer-substring-no-properties (point) 1723 (buffer-substring-no-properties (point)
1724 (progn 1724 (progn
1725 (end-of-line) 1725 (end-of-line)
1726 (point))) 1726 (point)))
1727 ;; well, this is certainly crystal-clear: 1727 ;; well, this is certainly crystal-clear:
@@ -1786,7 +1786,7 @@ You can mark bookmarks with the \\<bookmark-bmenu-mode-map>\\[bookmark-bmenu-mar
1786 (interactive) 1786 (interactive)
1787 (if (bookmark-bmenu-check-position) 1787 (if (bookmark-bmenu-check-position)
1788 (let ((bmrk (bookmark-bmenu-bookmark)) 1788 (let ((bmrk (bookmark-bmenu-bookmark))
1789 (menu (current-buffer)) 1789 (menu (current-buffer))
1790 (others ()) 1790 (others ())
1791 tem) 1791 tem)
1792 (goto-char (point-min)) 1792 (goto-char (point-min))
@@ -1795,8 +1795,8 @@ You can mark bookmarks with the \\<bookmark-bmenu-mode-map>\\[bookmark-bmenu-mar
1795 (let ((buffer-read-only nil)) 1795 (let ((buffer-read-only nil))
1796 (delete-char -1) 1796 (delete-char -1)
1797 (insert ?\ )) 1797 (insert ?\ ))
1798 (or (string-equal tem bmrk) 1798 (or (string-equal tem bmrk)
1799 (member tem others) 1799 (member tem others)
1800 (setq others (cons tem others)))) 1800 (setq others (cons tem others))))
1801 (setq others (nreverse others) 1801 (setq others (nreverse others)
1802 tem (/ (1- (frame-height)) (1+ (length others)))) 1802 tem (/ (1- (frame-height)) (1+ (length others))))
@@ -1885,7 +1885,7 @@ The current window remains selected."
1885 (interactive) 1885 (interactive)
1886 (let ((bookmark (bookmark-bmenu-bookmark)) 1886 (let ((bookmark (bookmark-bmenu-bookmark))
1887 (pop-up-windows t) 1887 (pop-up-windows t)
1888 same-window-buffer-names 1888 same-window-buffer-names
1889 same-window-regexps) 1889 same-window-regexps)
1890 (if (bookmark-bmenu-check-position) 1890 (if (bookmark-bmenu-check-position)
1891 (let* ((pair (bookmark-jump-noselect bookmark)) 1891 (let* ((pair (bookmark-jump-noselect bookmark))
@@ -2110,7 +2110,7 @@ The number of panes depends on the number of bookmarks."
2110 2110
2111;;;###autoload 2111;;;###autoload
2112(defun bookmark-menu-insert (event) 2112(defun bookmark-menu-insert (event)
2113 "Insert the text of the file pointed to by bookmark BOOKMARK. 2113 "Insert the text of the file pointed to by bookmark BOOKMARK.
2114You may have a problem using this function if the value of variable 2114You may have a problem using this function if the value of variable
2115`bookmark-alist' is nil. If that happens, you need to load in some 2115`bookmark-alist' is nil. If that happens, you need to load in some
2116bookmarks. See help on function `bookmark-load' for more about 2116bookmarks. See help on function `bookmark-load' for more about
@@ -2126,7 +2126,7 @@ corresponding bookmark function from Lisp \(the one without the
2126 2126
2127;;;###autoload 2127;;;###autoload
2128(defun bookmark-menu-jump (event) 2128(defun bookmark-menu-jump (event)
2129 "Jump to bookmark BOOKMARK (a point in some file). 2129 "Jump to bookmark BOOKMARK (a point in some file).
2130You may have a problem using this function if the value of variable 2130You may have a problem using this function if the value of variable
2131`bookmark-alist' is nil. If that happens, you need to load in some 2131`bookmark-alist' is nil. If that happens, you need to load in some
2132bookmarks. See help on function `bookmark-load' for more about 2132bookmarks. See help on function `bookmark-load' for more about
@@ -2142,7 +2142,7 @@ corresponding bookmark function from Lisp \(the one without the
2142 2142
2143;;;###autoload 2143;;;###autoload
2144(defun bookmark-menu-locate (event) 2144(defun bookmark-menu-locate (event)
2145 "Insert the name of the file associated with BOOKMARK. 2145 "Insert the name of the file associated with BOOKMARK.
2146\(This is not the same as the contents of that file\). 2146\(This is not the same as the contents of that file\).
2147 2147
2148Warning: this function only takes an EVENT as argument. Use the 2148Warning: this function only takes an EVENT as argument. Use the
@@ -2155,10 +2155,10 @@ corresponding bookmark function from Lisp \(the one without the
2155 2155
2156;;;###autoload 2156;;;###autoload
2157(defun bookmark-menu-rename (event) 2157(defun bookmark-menu-rename (event)
2158 "Change the name of OLD-BOOKMARK to NEWNAME. 2158 "Change the name of OLD-BOOKMARK to NEWNAME.
2159If called from keyboard, prompts for OLD-BOOKMARK and NEWNAME. 2159If called from keyboard, prompts for OLD-BOOKMARK and NEWNAME.
2160If called from menubar, OLD-BOOKMARK is selected from a menu, and 2160If called from menubar, OLD-BOOKMARK is selected from a menu, and
2161prompts for NEWNAME. 2161prompts for NEWNAME.
2162If called from Lisp, prompts for NEWNAME if only OLD-BOOKMARK was 2162If called from Lisp, prompts for NEWNAME if only OLD-BOOKMARK was
2163passed as an argument. If called with two strings, then no prompting 2163passed as an argument. If called with two strings, then no prompting
2164is done. You must pass at least OLD-BOOKMARK when calling from Lisp. 2164is done. You must pass at least OLD-BOOKMARK when calling from Lisp.
@@ -2177,7 +2177,7 @@ corresponding bookmark function from Lisp \(the one without the
2177 2177
2178;;;###autoload 2178;;;###autoload
2179(defun bookmark-menu-delete (event) 2179(defun bookmark-menu-delete (event)
2180 "Delete the bookmark named NAME from the bookmark list. 2180 "Delete the bookmark named NAME from the bookmark list.
2181Removes only the first instance of a bookmark with that name. If 2181Removes only the first instance of a bookmark with that name. If
2182there are one or more other bookmarks with the same name, they will 2182there are one or more other bookmarks with the same name, they will
2183not be deleted. Defaults to the \"current\" bookmark \(that is, the 2183not be deleted. Defaults to the \"current\" bookmark \(that is, the
@@ -2207,7 +2207,7 @@ corresponding bookmark function from Lisp \(the one without the
2207 2207
2208;; make bookmarks appear toward the right side of the menu. 2208;; make bookmarks appear toward the right side of the menu.
2209(if (boundp 'menu-bar-final-items) 2209(if (boundp 'menu-bar-final-items)
2210 (if menu-bar-final-items 2210 (if menu-bar-final-items
2211 (setq menu-bar-final-items 2211 (setq menu-bar-final-items
2212 (cons 'bookmark menu-bar-final-items))) 2212 (cons 'bookmark menu-bar-final-items)))
2213 (setq menu-bar-final-items '(bookmark))) 2213 (setq menu-bar-final-items '(bookmark)))
@@ -2249,7 +2249,7 @@ corresponding bookmark function from Lisp \(the one without the
2249 '("Set Bookmark" . bookmark-set)) 2249 '("Set Bookmark" . bookmark-set))
2250 2250
2251;;;###autoload 2251;;;###autoload
2252(define-key menu-bar-bookmark-map [jump] 2252(define-key menu-bar-bookmark-map [jump]
2253 '("Jump to Bookmark" . bookmark-menu-jump)) 2253 '("Jump to Bookmark" . bookmark-menu-jump))
2254 2254
2255;;;; end bookmark menu stuff ;;;; 2255;;;; end bookmark menu stuff ;;;;
@@ -2262,7 +2262,7 @@ corresponding bookmark function from Lisp \(the one without the
2262;;; Exit Hook, called from kill-emacs-hook 2262;;; Exit Hook, called from kill-emacs-hook
2263(defvar bookmark-exit-hook nil 2263(defvar bookmark-exit-hook nil
2264 "Hook to run when emacs exits") 2264 "Hook to run when emacs exits")
2265 2265
2266(defun bookmark-exit-hook-internal () 2266(defun bookmark-exit-hook-internal ()
2267 "Save bookmark state, if necessary, at Emacs exit time. 2267 "Save bookmark state, if necessary, at Emacs exit time.
2268This also runs `bookmark-exit-hooks'." 2268This also runs `bookmark-exit-hooks'."
@@ -2278,5 +2278,5 @@ This also runs `bookmark-exit-hooks'."
2278(run-hooks 'bookmark-load-hook) 2278(run-hooks 'bookmark-load-hook)
2279 2279
2280(provide 'bookmark) 2280(provide 'bookmark)
2281 2281
2282;;; bookmark.el ends here 2282;;; bookmark.el ends here