comparison lisp/packages/bookmark.el @ 108:360340f9fd5f r20-1b6

Import from CVS: tag r20-1b6
author cvs
date Mon, 13 Aug 2007 09:18:39 +0200
parents 131b0175ea99
children cca96a509cfe
comparison
equal deleted inserted replaced
107:523141596bda 108:360340f9fd5f
1147 If called from Lisp, prompts for NEW if only OLD was passed as an 1147 If called from Lisp, prompts for NEW if only OLD was passed as an
1148 argument. If called with two strings, then no prompting is done. You 1148 argument. If called with two strings, then no prompting is done. You
1149 must pass at least OLD when calling from Lisp. 1149 must pass at least OLD when calling from Lisp.
1150 1150
1151 While you are entering the new name, consecutive C-w's insert 1151 While you are entering the new name, consecutive C-w's insert
1152 consectutive words from the text of the buffer into the new bookmark 1152 consecutive words from the text of the buffer into the new bookmark
1153 name." 1153 name."
1154 (interactive (bookmark-completing-read "Old bookmark name")) 1154 (interactive (bookmark-completing-read "Old bookmark name"))
1155 (bookmark-maybe-historicize-string old) 1155 (bookmark-maybe-historicize-string old)
1156 (bookmark-maybe-load-default-file) 1156 (bookmark-maybe-load-default-file)
1157 (progn 1157 (progn
1452 (goto-char (point-min)) ;sure are playing it safe... 1452 (goto-char (point-min)) ;sure are playing it safe...
1453 (insert "% Bookmark\n- --------\n") 1453 (insert "% Bookmark\n- --------\n")
1454 (bookmark-maybe-sort-alist) 1454 (bookmark-maybe-sort-alist)
1455 (mapcar 1455 (mapcar
1456 (lambda (full-record) 1456 (lambda (full-record)
1457 ;; if a bookmark has an annotation, preceed it with a "*" 1457 ;; if a bookmark has an annotation, precede it with a "*"
1458 ;; in the list of bookmarks. 1458 ;; in the list of bookmarks.
1459 (let ((annotation (bookmark-get-annotation 1459 (let ((annotation (bookmark-get-annotation
1460 (bookmark-name-from-full-record full-record)))) 1460 (bookmark-name-from-full-record full-record))))
1461 (if (and (not (eq annotation nil)) 1461 (if (and (not (eq annotation nil))
1462 (not (string-equal annotation ""))) 1462 (not (string-equal annotation "")))
1479 1479
1480 (defun bookmark-bmenu-mode () 1480 (defun bookmark-bmenu-mode ()
1481 "Major mode for editing a list of bookmarks. 1481 "Major mode for editing a list of bookmarks.
1482 Each line describes one of the bookmarks in Emacs. 1482 Each line describes one of the bookmarks in Emacs.
1483 Letters do not insert themselves; instead, they are commands. 1483 Letters do not insert themselves; instead, they are commands.
1484 Bookmark names preceeded by a \"*\" have annotations. 1484 Bookmark names preceded by a \"*\" have annotations.
1485 \\<bookmark-bmenu-mode-map> 1485 \\<bookmark-bmenu-mode-map>
1486 \\[bookmark-bmenu-mark] -- mark bookmark to be displayed. 1486 \\[bookmark-bmenu-mark] -- mark bookmark to be displayed.
1487 \\[bookmark-bmenu-select] -- select bookmark of line point is on. 1487 \\[bookmark-bmenu-select] -- select bookmark of line point is on.
1488 Also show bookmarks marked using m in other windows. 1488 Also show bookmarks marked using m in other windows.
1489 \\[bookmark-bmenu-toggle-filenames] -- toggle displaying of filenames (they may obscure long bookmark names). 1489 \\[bookmark-bmenu-toggle-filenames] -- toggle displaying of filenames (they may obscure long bookmark names).
2076 If called from Lisp, prompts for NEWNAME if only OLD-BOOKMARK was 2076 If called from Lisp, prompts for NEWNAME if only OLD-BOOKMARK was
2077 passed as an argument. If called with two strings, then no prompting 2077 passed as an argument. If called with two strings, then no prompting
2078 is done. You must pass at least OLD-BOOKMARK when calling from Lisp. 2078 is done. You must pass at least OLD-BOOKMARK when calling from Lisp.
2079 2079
2080 While you are entering the new name, consecutive C-w's insert 2080 While you are entering the new name, consecutive C-w's insert
2081 consectutive words from the text of the buffer into the new bookmark 2081 consecutive words from the text of the buffer into the new bookmark
2082 name. 2082 name.
2083 2083
2084 Warning: this function only takes an EVENT as argument. Use the 2084 Warning: this function only takes an EVENT as argument. Use the
2085 corresponding bookmark function from Lisp \(the one without the 2085 corresponding bookmark function from Lisp \(the one without the
2086 \"-menu-\" in its name\)." 2086 \"-menu-\" in its name\)."