diff options
| author | Juanma Barranquero | 2005-07-26 13:56:01 +0000 |
|---|---|---|
| committer | Juanma Barranquero | 2005-07-26 13:56:01 +0000 |
| commit | d32ff76aa26d144f10eeadf1317c83136e67d15c (patch) | |
| tree | 6e5a574f7aa31d4eb1bd34c2f5488e7244337c3e | |
| parent | 94c7f25790c1cca8337250b31a75b9869d967b1e (diff) | |
| download | emacs-d32ff76aa26d144f10eeadf1317c83136e67d15c.tar.gz emacs-d32ff76aa26d144f10eeadf1317c83136e67d15c.zip | |
(bookmark-automatically-show-annotations, bookmark-read-annotation-text-func): Doc fixes.
(bookmark-save): Improve argument/docstring consistency.
(bookmark-get-bookmark, bookmark-get-bookmark-record,
bookmark-alist-from-buffer, bookmark-upgrade-file-format-from-0,
bookmark-grok-file-format-version, bookmark-maybe-upgrade-file-format,
bookmark-kill-line, bookmark-read-annotation-mode,
bookmark-insert-current-bookmark, bookmark-jump, bookmark-exit-hook):
Fix typos in docstrings.
(bookmark-exit-hooks): Define as obsolete alias.
(bookmark-exit-hook-internal): Run `bookmark-exit-hook',
not `bookmark-exit-hooks'. Fix docstring.
(bookmark-bmenu-select): "?\ " -> "?\s".
| -rw-r--r-- | lisp/ChangeLog | 20 | ||||
| -rw-r--r-- | lisp/bookmark.el | 43 |
2 files changed, 41 insertions, 22 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d55e69e2fe7..ad67e420c78 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,4 +1,22 @@ | |||
| 1 | 2005-07-25 Ari Roponen <arjuropo@cc.jyu.fi> (tiny change) | 1 | 2005-07-26 Juanma Barranquero <lekktu@gmail.com> |
| 2 | |||
| 3 | * bookmark.el (bookmark-automatically-show-annotations) | ||
| 4 | (bookmark-read-annotation-text-func): Doc fixes. | ||
| 5 | (bookmark-save): Improve argument/docstring consistency. | ||
| 6 | (bookmark-get-bookmark, bookmark-get-bookmark-record) | ||
| 7 | (bookmark-alist-from-buffer) | ||
| 8 | (bookmark-upgrade-file-format-from-0) | ||
| 9 | (bookmark-grok-file-format-version) | ||
| 10 | (bookmark-maybe-upgrade-file-format, bookmark-kill-line) | ||
| 11 | (bookmark-read-annotation-mode) | ||
| 12 | (bookmark-insert-current-bookmark, bookmark-jump) | ||
| 13 | (bookmark-exit-hook): Fix typos in docstrings. | ||
| 14 | (bookmark-exit-hooks): Define as obsolete alias. | ||
| 15 | (bookmark-exit-hook-internal): Run `bookmark-exit-hook', | ||
| 16 | not `bookmark-exit-hooks'. Fix docstring. | ||
| 17 | (bookmark-bmenu-select): "?\ " -> "?\s". | ||
| 18 | |||
| 19 | 2005-07-25 Ari Roponen <arjuropo@cc.jyu.fi> (tiny change) | ||
| 2 | 20 | ||
| 3 | * startup.el (command-line): Fix typo. | 21 | * startup.el (command-line): Fix typo. |
| 4 | 22 | ||
diff --git a/lisp/bookmark.el b/lisp/bookmark.el index 51a5e0469e5..1f0d671afb4 100644 --- a/lisp/bookmark.el +++ b/lisp/bookmark.el | |||
| @@ -169,7 +169,7 @@ recently set ones come first, oldest ones come last)." | |||
| 169 | 169 | ||
| 170 | 170 | ||
| 171 | (defcustom bookmark-automatically-show-annotations t | 171 | (defcustom bookmark-automatically-show-annotations t |
| 172 | "*nil means don't show annotations when jumping to a bookmark." | 172 | "*Non-nil means show annotations when jumping to a bookmark." |
| 173 | :type 'boolean | 173 | :type 'boolean |
| 174 | :group 'bookmark) | 174 | :group 'bookmark) |
| 175 | 175 | ||
| @@ -333,14 +333,14 @@ through a file easier.") | |||
| 333 | 333 | ||
| 334 | 334 | ||
| 335 | (defun bookmark-get-bookmark (bookmark) | 335 | (defun bookmark-get-bookmark (bookmark) |
| 336 | "Return the full entry for BOOKMARK in bookmark-alist. | 336 | "Return the full entry for BOOKMARK in `bookmark-alist'. |
| 337 | If BOOKMARK is not a string, return nil." | 337 | If BOOKMARK is not a string, return nil." |
| 338 | (when (stringp bookmark) | 338 | (when (stringp bookmark) |
| 339 | (assoc-string bookmark bookmark-alist bookmark-completion-ignore-case))) | 339 | (assoc-string bookmark bookmark-alist bookmark-completion-ignore-case))) |
| 340 | 340 | ||
| 341 | 341 | ||
| 342 | (defun bookmark-get-bookmark-record (bookmark) | 342 | (defun bookmark-get-bookmark-record (bookmark) |
| 343 | "Return the guts of the entry for BOOKMARK in bookmark-alist. | 343 | "Return the guts of the entry for BOOKMARK in `bookmark-alist'. |
| 344 | That is, all information but the name." | 344 | That is, all information but the name." |
| 345 | (car (cdr (bookmark-get-bookmark bookmark)))) | 345 | (car (cdr (bookmark-get-bookmark bookmark)))) |
| 346 | 346 | ||
| @@ -443,8 +443,7 @@ That is, all information but the name." | |||
| 443 | (list (cons 'info-node node))))) | 443 | (list (cons 'info-node node))))) |
| 444 | 444 | ||
| 445 | (message "%S" (assq 'info-node (bookmark-get-bookmark-record bookmark))) | 445 | (message "%S" (assq 'info-node (bookmark-get-bookmark-record bookmark))) |
| 446 | (sit-for 4) | 446 | (sit-for 4)) |
| 447 | ) | ||
| 448 | 447 | ||
| 449 | 448 | ||
| 450 | (defvar bookmark-history nil | 449 | (defvar bookmark-history nil |
| @@ -619,7 +618,7 @@ You should never need to change this.") | |||
| 619 | 618 | ||
| 620 | 619 | ||
| 621 | (defun bookmark-alist-from-buffer () | 620 | (defun bookmark-alist-from-buffer () |
| 622 | "Return a bookmark-alist (in any format) from the current buffer. | 621 | "Return a `bookmark-alist' (in any format) from the current buffer. |
| 623 | The buffer must of course contain bookmark format information. | 622 | The buffer must of course contain bookmark format information. |
| 624 | Does not care from where in the buffer it is called, and does not | 623 | Does not care from where in the buffer it is called, and does not |
| 625 | affect point." | 624 | affect point." |
| @@ -659,7 +658,7 @@ affect point." | |||
| 659 | 658 | ||
| 660 | (defun bookmark-upgrade-file-format-from-0 () | 659 | (defun bookmark-upgrade-file-format-from-0 () |
| 661 | "Upgrade a bookmark file of format 0 (the original format) to format 1. | 660 | "Upgrade a bookmark file of format 0 (the original format) to format 1. |
| 662 | This expects to be called from point-min in a bookmark file." | 661 | This expects to be called from `point-min' in a bookmark file." |
| 663 | (message "Upgrading bookmark format from 0 to %d..." | 662 | (message "Upgrading bookmark format from 0 to %d..." |
| 664 | bookmark-file-format-version) | 663 | bookmark-file-format-version) |
| 665 | (let* ((old-list (bookmark-alist-from-buffer)) | 664 | (let* ((old-list (bookmark-alist-from-buffer)) |
| @@ -676,7 +675,7 @@ This expects to be called from point-min in a bookmark file." | |||
| 676 | 675 | ||
| 677 | (defun bookmark-grok-file-format-version () | 676 | (defun bookmark-grok-file-format-version () |
| 678 | "Return an integer which is the file-format version of this bookmark file. | 677 | "Return an integer which is the file-format version of this bookmark file. |
| 679 | This expects to be called from point-min in a bookmark file." | 678 | This expects to be called from `point-min' in a bookmark file." |
| 680 | (if (looking-at "^;;;;") | 679 | (if (looking-at "^;;;;") |
| 681 | (save-excursion | 680 | (save-excursion |
| 682 | (save-match-data | 681 | (save-match-data |
| @@ -691,7 +690,7 @@ This expects to be called from point-min in a bookmark file." | |||
| 691 | (defun bookmark-maybe-upgrade-file-format () | 690 | (defun bookmark-maybe-upgrade-file-format () |
| 692 | "Check the file-format version of this bookmark file. | 691 | "Check the file-format version of this bookmark file. |
| 693 | If the version is not up-to-date, upgrade it automatically. | 692 | If the version is not up-to-date, upgrade it automatically. |
| 694 | This expects to be called from point-min in a bookmark file." | 693 | This expects to be called from `point-min' in a bookmark file." |
| 695 | (let ((version (bookmark-grok-file-format-version))) | 694 | (let ((version (bookmark-grok-file-format-version))) |
| 696 | (cond | 695 | (cond |
| 697 | ((= version bookmark-file-format-version) | 696 | ((= version bookmark-file-format-version) |
| @@ -783,7 +782,7 @@ the list of bookmarks.\)" | |||
| 783 | (defun bookmark-kill-line (&optional newline-too) | 782 | (defun bookmark-kill-line (&optional newline-too) |
| 784 | "Kill from point to end of line. | 783 | "Kill from point to end of line. |
| 785 | If optional arg NEWLINE-TOO is non-nil, delete the newline too. | 784 | If optional arg NEWLINE-TOO is non-nil, delete the newline too. |
| 786 | Does not affect the kill-ring." | 785 | Does not affect the kill ring." |
| 787 | (let ((eol (save-excursion (end-of-line) (point)))) | 786 | (let ((eol (save-excursion (end-of-line) (point)))) |
| 788 | (delete-region (point) eol) | 787 | (delete-region (point) eol) |
| 789 | (if (and newline-too (looking-at "\n")) | 788 | (if (and newline-too (looking-at "\n")) |
| @@ -842,11 +841,11 @@ the bookmark (and file, and point) specified in buffer local variables." | |||
| 842 | 841 | ||
| 843 | (defvar bookmark-read-annotation-text-func 'bookmark-default-annotation-text | 842 | (defvar bookmark-read-annotation-text-func 'bookmark-default-annotation-text |
| 844 | "Function to return default text to use for a bookmark annotation. | 843 | "Function to return default text to use for a bookmark annotation. |
| 845 | It takes the name of the bookmark, as a string, as an arg.") | 844 | It takes one argument, the name of the bookmark, as a string.") |
| 846 | 845 | ||
| 847 | (defun bookmark-read-annotation-mode (buf point parg bookmark) | 846 | (defun bookmark-read-annotation-mode (buf point parg bookmark) |
| 848 | "Mode for composing annotations for a bookmark. | 847 | "Mode for composing annotations for a bookmark. |
| 849 | Wants BUF POINT PARG and BOOKMARK. | 848 | Wants BUF, POINT, PARG, and BOOKMARK. |
| 850 | When you have finished composing, type \\[bookmark-send-annotation] to send | 849 | When you have finished composing, type \\[bookmark-send-annotation] to send |
| 851 | the annotation. | 850 | the annotation. |
| 852 | 851 | ||
| @@ -933,7 +932,7 @@ Lines beginning with `#' are ignored." | |||
| 933 | 932 | ||
| 934 | 933 | ||
| 935 | (defun bookmark-insert-current-bookmark () | 934 | (defun bookmark-insert-current-bookmark () |
| 936 | "Insert this buffer's value of bookmark-current-bookmark. | 935 | "Insert this buffer's value of `bookmark-current-bookmark'. |
| 937 | Default to file name if it's nil." | 936 | Default to file name if it's nil." |
| 938 | (interactive) | 937 | (interactive) |
| 939 | (let ((str | 938 | (let ((str |
| @@ -1044,7 +1043,7 @@ bookmarks. See help on function `bookmark-load' for more about | |||
| 1044 | this. | 1043 | this. |
| 1045 | 1044 | ||
| 1046 | If the file pointed to by BOOKMARK no longer exists, you will be asked | 1045 | If the file pointed to by BOOKMARK no longer exists, you will be asked |
| 1047 | if you wish to give the bookmark a new location, and bookmark-jump | 1046 | if you wish to give the bookmark a new location, and `bookmark-jump' |
| 1048 | will then jump to the new location, as well as recording it in place | 1047 | will then jump to the new location, as well as recording it in place |
| 1049 | of the old one in the permanent bookmark record." | 1048 | of the old one in the permanent bookmark record." |
| 1050 | (interactive | 1049 | (interactive |
| @@ -1304,8 +1303,8 @@ Saves by default in the file defined by the variable | |||
| 1304 | `bookmark-default-file'. With a prefix arg, save it in file FILE | 1303 | `bookmark-default-file'. With a prefix arg, save it in file FILE |
| 1305 | \(second argument\). | 1304 | \(second argument\). |
| 1306 | 1305 | ||
| 1307 | If you are calling this from Lisp, the two arguments are PREFIX-ARG | 1306 | If you are calling this from Lisp, the two arguments are PARG and |
| 1308 | and FILE, and if you just want it to write to the default file, then | 1307 | FILE, and if you just want it to write to the default file, then |
| 1309 | pass no arguments. Or pass in nil and FILE, and it will save in FILE | 1308 | pass no arguments. Or pass in nil and FILE, and it will save in FILE |
| 1310 | instead. If you pass in one argument, and it is non-nil, then the | 1309 | instead. If you pass in one argument, and it is non-nil, then the |
| 1311 | user will be interactively queried for a file to save in. | 1310 | user will be interactively queried for a file to save in. |
| @@ -1804,7 +1803,7 @@ You can mark bookmarks with the \\<bookmark-bmenu-mode-map>\\[bookmark-bmenu-mar | |||
| 1804 | (setq tem (bookmark-bmenu-bookmark)) | 1803 | (setq tem (bookmark-bmenu-bookmark)) |
| 1805 | (let ((inhibit-read-only t)) | 1804 | (let ((inhibit-read-only t)) |
| 1806 | (delete-char -1) | 1805 | (delete-char -1) |
| 1807 | (insert ?\ )) | 1806 | (insert ?\s)) |
| 1808 | (or (string-equal tem bmrk) | 1807 | (or (string-equal tem bmrk) |
| 1809 | (member tem others) | 1808 | (member tem others) |
| 1810 | (setq others (cons tem others)))) | 1809 | (setq others (cons tem others)))) |
| @@ -2093,7 +2092,7 @@ strings returned are not." | |||
| 2093 | (format "-*- %s (%d) -*-" name iter) | 2092 | (format "-*- %s (%d) -*-" name iter) |
| 2094 | (nreverse lst)) | 2093 | (nreverse lst)) |
| 2095 | pane-list))) | 2094 | pane-list))) |
| 2096 | 2095 | ||
| 2097 | ;; Popup the menu and return the string. | 2096 | ;; Popup the menu and return the string. |
| 2098 | (x-popup-menu event (cons (concat "-*- " name " -*-") | 2097 | (x-popup-menu event (cons (concat "-*- " name " -*-") |
| 2099 | (nreverse pane-list))))) | 2098 | (nreverse pane-list))))) |
| @@ -2141,12 +2140,14 @@ strings returned are not." | |||
| 2141 | 2140 | ||
| 2142 | ;;; Exit Hook, called from kill-emacs-hook | 2141 | ;;; Exit Hook, called from kill-emacs-hook |
| 2143 | (defvar bookmark-exit-hook nil | 2142 | (defvar bookmark-exit-hook nil |
| 2144 | "Hook run when emacs exits.") | 2143 | "Hook run when Emacs exits.") |
| 2144 | |||
| 2145 | (define-obsolete-variable-alias 'bookmark-exit-hooks 'bookmark-exit-hook "22.1") | ||
| 2145 | 2146 | ||
| 2146 | (defun bookmark-exit-hook-internal () | 2147 | (defun bookmark-exit-hook-internal () |
| 2147 | "Save bookmark state, if necessary, at Emacs exit time. | 2148 | "Save bookmark state, if necessary, at Emacs exit time. |
| 2148 | This also runs `bookmark-exit-hooks'." | 2149 | This also runs `bookmark-exit-hook'." |
| 2149 | (run-hooks 'bookmark-exit-hooks) | 2150 | (run-hooks 'bookmark-exit-hook) |
| 2150 | (and bookmark-alist | 2151 | (and bookmark-alist |
| 2151 | (bookmark-time-to-save-p t) | 2152 | (bookmark-time-to-save-p t) |
| 2152 | (bookmark-save))) | 2153 | (bookmark-save))) |