diff options
| author | Karl Fogel | 2009-10-05 01:47:00 +0000 |
|---|---|---|
| committer | Karl Fogel | 2009-10-05 01:47:00 +0000 |
| commit | 825382c06efb2aef4c4ef00a89e0f3f7dacc251f (patch) | |
| tree | 033dab5903d2d445a9a97686c5994375b0c15611 | |
| parent | 13901bcbc4926630bdb2127301af0cdf7bcc50f7 (diff) | |
| download | emacs-825382c06efb2aef4c4ef00a89e0f3f7dacc251f.tar.gz emacs-825382c06efb2aef4c4ef00a89e0f3f7dacc251f.zip | |
* bookmark.el (bookmark-set, bookmark-buffer-name): Improve doc strings.
(Bug#1193)
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/bookmark.el | 18 |
2 files changed, 15 insertions, 8 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 68f827b215a..c0371125072 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,10 @@ | |||
| 1 | 2009-10-04 Karl Fogel <kfogel@red-bean.com> | 1 | 2009-10-04 Karl Fogel <kfogel@red-bean.com> |
| 2 | 2 | ||
| 3 | * bookmark.el (bookmark-set, bookmark-buffer-name): | ||
| 4 | Improve doc strings. (Bug#1193) | ||
| 5 | |||
| 6 | 2009-10-04 Karl Fogel <kfogel@red-bean.com> | ||
| 7 | |||
| 3 | * bookmark.el (bookmark-get-bookmark, bookmark-get-bookmark-record, | 8 | * bookmark.el (bookmark-get-bookmark, bookmark-get-bookmark-record, |
| 4 | bookmark-set-name, bookmark-prop-get, bookmark-prop-set, | 9 | bookmark-set-name, bookmark-prop-get, bookmark-prop-set, |
| 5 | bookmark-get-annotation, bookmark-set-annotation, | 10 | bookmark-get-annotation, bookmark-set-annotation, |
diff --git a/lisp/bookmark.el b/lisp/bookmark.el index b2da75c8b1d..b5a3158e272 100644 --- a/lisp/bookmark.el +++ b/lisp/bookmark.el | |||
| @@ -733,13 +733,13 @@ This expects to be called from `point-min' in a bookmark file." | |||
| 733 | 733 | ||
| 734 | ;;;###autoload | 734 | ;;;###autoload |
| 735 | (defun bookmark-set (&optional name no-overwrite) | 735 | (defun bookmark-set (&optional name no-overwrite) |
| 736 | "Set a bookmark named NAME inside a file. | 736 | "Set a bookmark named NAME at the current location. |
| 737 | If name is nil, then prompt the user. | 737 | If name is nil, then prompt the user. |
| 738 | 738 | ||
| 739 | With prefix arg (NO-OVERWRITE), do not overwrite a bookmark that | 739 | With prefix arg (NO-OVERWRITE), do not overwrite a bookmark that |
| 740 | has the same name as NAME if such a bookmark already exists, but | 740 | has the same name as NAME if such a bookmark already exists, but |
| 741 | instead \"push\" the new bookmark onto the bookmark alist. Thus | 741 | instead push the new bookmark onto the bookmark alist. Thus the |
| 742 | the most recently set bookmark with name NAME would be the one in | 742 | most recently set bookmark with name NAME would be the one in |
| 743 | effect at any given time, but the others are still there, should | 743 | effect at any given time, but the others are still there, should |
| 744 | the user decide to delete the most recent one. | 744 | the user decide to delete the most recent one. |
| 745 | 745 | ||
| @@ -747,10 +747,11 @@ To yank words from the text of the buffer and use them as part of the | |||
| 747 | bookmark name, type C-w while setting a bookmark. Successive C-w's | 747 | bookmark name, type C-w while setting a bookmark. Successive C-w's |
| 748 | yank successive words. | 748 | yank successive words. |
| 749 | 749 | ||
| 750 | Typing C-u inserts the name of the last bookmark used in the buffer | 750 | Typing C-u will insert (at the bookmark name prompt) the name of the |
| 751 | \(as an aid in using a single bookmark name to track progress through | 751 | last bookmark used in the document where the new bookmark is being set; |
| 752 | a large file\). If no bookmark was used, then C-u inserts the name of | 752 | this helps one use a single bookmark name to track progress through |
| 753 | the file being visited. | 753 | a large document. If there is no prior bookmark for this document, |
| 754 | then C-u inserts an appropriate name based on the buffer or file. | ||
| 754 | 755 | ||
| 755 | Use \\[bookmark-delete] to remove bookmarks \(give it a name and it | 756 | Use \\[bookmark-delete] to remove bookmarks \(give it a name and it |
| 756 | removes only the first instance of a bookmark with that name from | 757 | removes only the first instance of a bookmark with that name from |
| @@ -883,7 +884,8 @@ Default to file name if it's nil." | |||
| 883 | 884 | ||
| 884 | 885 | ||
| 885 | (defun bookmark-buffer-name () | 886 | (defun bookmark-buffer-name () |
| 886 | "Return the name of the current buffer's file, non-directory." | 887 | "Return the name of the current buffer (or its file, if any) in a |
| 888 | way that is suitable as a bookmark name." | ||
| 887 | (cond | 889 | (cond |
| 888 | ;; Or are we a file? | 890 | ;; Or are we a file? |
| 889 | (buffer-file-name (file-name-nondirectory buffer-file-name)) | 891 | (buffer-file-name (file-name-nondirectory buffer-file-name)) |