comparison lisp/bookmark.el @ 13969:8fd836e88aec

(bookmark-save-flag, bookmark-read-annotation-text-func, bookmark-rename, bookmark-bmenu-mode, bookmark-menu-rename): Doc fix.
author Karl Heuer <kwzh@gnu.org>
date Thu, 04 Jan 1996 23:28:24 +0000
parents 0c12b3398d37
children 831c5fda97f4
comparison
equal deleted inserted replaced
13968:cc71d8efd948 13969:8fd836e88aec
108 (defvar bookmark-save-flag t 108 (defvar bookmark-save-flag t
109 "*Controls when Emacs saves bookmarks to a file. 109 "*Controls when Emacs saves bookmarks to a file.
110 --> Nil means never save bookmarks, except when `bookmark-save' is 110 --> Nil means never save bookmarks, except when `bookmark-save' is
111 explicitly called \(\\[bookmark-save]\). 111 explicitly called \(\\[bookmark-save]\).
112 --> t means save bookmarks when Emacs is killed. 112 --> t means save bookmarks when Emacs is killed.
113 --> Otherise, it should be a number that is the frequency with which 113 --> Otherwise, it should be a number that is the frequency with which
114 the bookmark list is saved \(i.e.: the number of times which 114 the bookmark list is saved \(i.e.: the number of times which
115 Emacs' bookmark list may be modified before it is automatically 115 Emacs' bookmark list may be modified before it is automatically
116 saved.\). If it is a number, Emacs will also automatically save 116 saved.\). If it is a number, Emacs will also automatically save
117 bookmarks when it is killed. 117 bookmarks when it is killed.
118 118
501 (or bookmark-xemacsp 501 (or bookmark-xemacsp
502 ;; XEmacs's `set-text-properties' doesn't work on 502 ;; XEmacs's `set-text-properties' doesn't work on
503 ;; free-standing strings, apparently. 503 ;; free-standing strings, apparently.
504 (set-text-properties 0 (length stripped-name) nil stripped-name)) 504 (set-text-properties 0 (length stripped-name) nil stripped-name))
505 (if (and (bookmark-get-bookmark stripped-name) (not overwrite)) 505 (if (and (bookmark-get-bookmark stripped-name) (not overwrite))
506 ;; already existing boookmark under that name and 506 ;; already existing bookmark under that name and
507 ;; no prefix arg means just overwrite old bookmark 507 ;; no prefix arg means just overwrite old bookmark
508 (setcdr (bookmark-get-bookmark stripped-name) 508 (setcdr (bookmark-get-bookmark stripped-name)
509 (list (bookmark-make-cell annotation))) 509 (list (bookmark-make-cell annotation)))
510 510
511 ;; otherwise just cons it onto the front (either the bookmark 511 ;; otherwise just cons it onto the front (either the bookmark
829 "# Date: " (current-time-string) "\n")) 829 "# Date: " (current-time-string) "\n"))
830 830
831 831
832 (defvar bookmark-read-annotation-text-func 'bookmark-default-annotation-text 832 (defvar bookmark-read-annotation-text-func 'bookmark-default-annotation-text
833 "A variable containing a function which returns the text to insert 833 "A variable containing a function which returns the text to insert
834 into an annotation compisition buffer. It takes the name of the bookmark, 834 into an annotation composition buffer. It takes the name of the bookmark,
835 as a string, as an arg.") 835 as a string, as an arg.")
836 836
837 837
838 (defun bookmark-read-annotation-mode (buf point parg bookmark) 838 (defun bookmark-read-annotation-mode (buf point parg bookmark)
839 "Mode for composing annotations for a bookmark. 839 "Mode for composing annotations for a bookmark.
1164 If called from Lisp, prompts for NEW if only OLD was passed as an 1164 If called from Lisp, prompts for NEW if only OLD was passed as an
1165 argument. If called with two strings, then no prompting is done. You 1165 argument. If called with two strings, then no prompting is done. You
1166 must pass at least OLD when calling from Lisp. 1166 must pass at least OLD when calling from Lisp.
1167 1167
1168 While you are entering the new name, consecutive C-w's insert 1168 While you are entering the new name, consecutive C-w's insert
1169 consectutive words from the text of the buffer into the new bookmark 1169 consecutive words from the text of the buffer into the new bookmark
1170 name." 1170 name."
1171 (interactive (bookmark-completing-read "Old bookmark name")) 1171 (interactive (bookmark-completing-read "Old bookmark name"))
1172 (bookmark-maybe-historicize-string old) 1172 (bookmark-maybe-historicize-string old)
1173 (bookmark-maybe-load-default-file) 1173 (bookmark-maybe-load-default-file)
1174 (progn 1174 (progn
1229 (bookmark-maybe-historicize-string bookmark) 1229 (bookmark-maybe-historicize-string bookmark)
1230 (bookmark-maybe-load-default-file) 1230 (bookmark-maybe-load-default-file)
1231 (let ((will-go (bookmark-get-bookmark bookmark))) 1231 (let ((will-go (bookmark-get-bookmark bookmark)))
1232 (setq bookmark-alist (delq will-go bookmark-alist)) 1232 (setq bookmark-alist (delq will-go bookmark-alist))
1233 ;; Added by db, nil bookmark-current-bookmark if the last 1233 ;; Added by db, nil bookmark-current-bookmark if the last
1234 ;; occurence has been deleted 1234 ;; occurrence has been deleted
1235 (or (bookmark-get-bookmark bookmark-current-bookmark) 1235 (or (bookmark-get-bookmark bookmark-current-bookmark)
1236 (setq bookmark-current-bookmark nil))) 1236 (setq bookmark-current-bookmark nil)))
1237 ;; Don't rebuild the list 1237 ;; Don't rebuild the list
1238 (if batch 1238 (if batch
1239 nil 1239 nil
1469 (goto-char (point-min)) ;sure are playing it safe... 1469 (goto-char (point-min)) ;sure are playing it safe...
1470 (insert "% Bookmark\n- --------\n") 1470 (insert "% Bookmark\n- --------\n")
1471 (bookmark-maybe-sort-alist) 1471 (bookmark-maybe-sort-alist)
1472 (mapcar 1472 (mapcar
1473 (lambda (full-record) 1473 (lambda (full-record)
1474 ;; if a bookmark has an annotation, preceed it with a "*" 1474 ;; if a bookmark has an annotation, prepend a "*"
1475 ;; in the list of bookmarks. 1475 ;; in the list of bookmarks.
1476 (let ((annotation (bookmark-get-annotation 1476 (let ((annotation (bookmark-get-annotation
1477 (bookmark-name-from-full-record full-record)))) 1477 (bookmark-name-from-full-record full-record))))
1478 (if (and (not (eq annotation nil)) 1478 (if (and (not (eq annotation nil))
1479 (not (string-equal annotation ""))) 1479 (not (string-equal annotation "")))
1496 1496
1497 (defun bookmark-bmenu-mode () 1497 (defun bookmark-bmenu-mode ()
1498 "Major mode for editing a list of bookmarks. 1498 "Major mode for editing a list of bookmarks.
1499 Each line describes one of the bookmarks in Emacs. 1499 Each line describes one of the bookmarks in Emacs.
1500 Letters do not insert themselves; instead, they are commands. 1500 Letters do not insert themselves; instead, they are commands.
1501 Bookmark names preceeded by a \"*\" have annotations. 1501 Bookmark names preceded by a \"*\" have annotations.
1502 \\<bookmark-bmenu-mode-map> 1502 \\<bookmark-bmenu-mode-map>
1503 \\[bookmark-bmenu-mark] -- mark bookmark to be displayed. 1503 \\[bookmark-bmenu-mark] -- mark bookmark to be displayed.
1504 \\[bookmark-bmenu-select] -- select bookmark of line point is on. 1504 \\[bookmark-bmenu-select] -- select bookmark of line point is on.
1505 Also show bookmarks marked using m in other windows. 1505 Also show bookmarks marked using m in other windows.
1506 \\[bookmark-bmenu-toggle-filenames] -- toggle displaying of filenames (they may obscure long bookmark names). 1506 \\[bookmark-bmenu-toggle-filenames] -- toggle displaying of filenames (they may obscure long bookmark names).
2090 If called from Lisp, prompts for NEWNAME if only OLD-BOOKMARK was 2090 If called from Lisp, prompts for NEWNAME if only OLD-BOOKMARK was
2091 passed as an argument. If called with two strings, then no prompting 2091 passed as an argument. If called with two strings, then no prompting
2092 is done. You must pass at least OLD-BOOKMARK when calling from Lisp. 2092 is done. You must pass at least OLD-BOOKMARK when calling from Lisp.
2093 2093
2094 While you are entering the new name, consecutive C-w's insert 2094 While you are entering the new name, consecutive C-w's insert
2095 consectutive words from the text of the buffer into the new bookmark 2095 consecutive words from the text of the buffer into the new bookmark
2096 name. 2096 name.
2097 2097
2098 Warning: this function only takes an EVENT as argument. Use the 2098 Warning: this function only takes an EVENT as argument. Use the
2099 corresponding bookmark function from Lisp \(the one without the 2099 corresponding bookmark function from Lisp \(the one without the
2100 \"-menu-\" in its name\)." 2100 \"-menu-\" in its name\)."