aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Kangas2019-05-26 12:48:26 +0200
committerEli Zaretskii2019-06-09 09:50:39 +0300
commitfb6610f59e3a2d16462a8599812ca3b222fa59a3 (patch)
treef17c6a3730bafd7dda7af811252a46f5c849d639
parent1e6396ec3df3b55cebf0f7380ed6dd43775a3a5b (diff)
downloademacs-fb6610f59e3a2d16462a8599812ca3b222fa59a3.tar.gz
emacs-fb6610f59e3a2d16462a8599812ca3b222fa59a3.zip
Checkdoc fixes in lisp/bookmark.el
* lisp/bookmark.el (bookmark-bmenu-inline-header-height) (bookmark-bmenu-marks-width, bookmark-map, bookmark-quit-flag) (bookmark-name-from-full-record, bookmark-set-internal) (bookmark-insert-annotation, bookmark--jump-via) (bookmark-bmenu-set-header, bookmark-show-annotation) (bookmark-bmenu-other-window-with-mouse, bookmark-bmenu-relocate): Checkdoc docstring fixes. (Bug#35916)
-rw-r--r--lisp/bookmark.el42
1 files changed, 23 insertions, 19 deletions
diff --git a/lisp/bookmark.el b/lisp/bookmark.el
index ed71dd1ade5..dd8470168c3 100644
--- a/lisp/bookmark.el
+++ b/lisp/bookmark.el
@@ -136,12 +136,13 @@ This is as opposed to inline text at the top of the buffer."
136 :group 'bookmark) 136 :group 'bookmark)
137 137
138(defconst bookmark-bmenu-inline-header-height 2 138(defconst bookmark-bmenu-inline-header-height 2
139 "Number of lines used for the *Bookmark List* header 139 "Number of lines used for the *Bookmark List* header.
140\(only significant when `bookmark-bmenu-use-header-line' is nil).") 140\(This is only significant when `bookmark-bmenu-use-header-line'
141is nil.)")
141 142
142(defconst bookmark-bmenu-marks-width 2 143(defconst bookmark-bmenu-marks-width 2
143 "Number of columns (chars) used for the *Bookmark List* marks column, 144 "Number of columns (chars) used for the *Bookmark List* marks column.
144including the annotations column.") 145This includes the annotations column.")
145 146
146(defcustom bookmark-bmenu-file-column 30 147(defcustom bookmark-bmenu-file-column 30
147 "Column at which to display filenames in a buffer listing bookmarks. 148 "Column at which to display filenames in a buffer listing bookmarks.
@@ -221,7 +222,7 @@ A non-nil value may result in truncated bookmark names."
221 "Keymap containing bindings to bookmark functions. 222 "Keymap containing bindings to bookmark functions.
222It is not bound to any key by default: to bind it 223It is not bound to any key by default: to bind it
223so that you have a bookmark prefix, just use `global-set-key' and bind a 224so that you have a bookmark prefix, just use `global-set-key' and bind a
224key of your choice to `bookmark-map'. All interactive bookmark 225key of your choice to variable `bookmark-map'. All interactive bookmark
225functions have a binding in this keymap.") 226functions have a binding in this keymap.")
226 227
227;;;###autoload (fset 'bookmark-map bookmark-map) 228;;;###autoload (fset 'bookmark-map bookmark-map)
@@ -301,7 +302,7 @@ This point is in `bookmark-current-buffer'.")
301 302
302 303
303(defvar bookmark-quit-flag nil 304(defvar bookmark-quit-flag nil
304 "Non nil make `bookmark-bmenu-search' quit immediately.") 305 "Non-nil means `bookmark-bmenu-search' quits immediately.")
305 306
306;; Helper functions and macros. 307;; Helper functions and macros.
307 308
@@ -318,8 +319,8 @@ This point is in `bookmark-current-buffer'.")
318;; Everyone else should go through them. 319;; Everyone else should go through them.
319 320
320(defun bookmark-name-from-full-record (bookmark-record) 321(defun bookmark-name-from-full-record (bookmark-record)
321 "Return the name of BOOKMARK-RECORD. BOOKMARK-RECORD is, e.g., 322 "Return the name of BOOKMARK-RECORD.
322one element from `bookmark-alist'." 323BOOKMARK-RECORD is, e.g., one element from `bookmark-alist'."
323 (car bookmark-record)) 324 (car bookmark-record))
324 325
325 326
@@ -346,8 +347,8 @@ is already a bookmark record, just return it."
346 347
347 348
348(defun bookmark-get-bookmark-record (bookmark-name-or-record) 349(defun bookmark-get-bookmark-record (bookmark-name-or-record)
349 "Return the record portion of the entry for BOOKMARK-NAME-OR-RECORD in 350 "Return the record portion of BOOKMARK-NAME-OR-RECORD in `bookmark-alist'.
350`bookmark-alist' (that is, all information but the name)." 351In other words, return all information but the name."
351 (let ((alist (cdr (bookmark-get-bookmark bookmark-name-or-record)))) 352 (let ((alist (cdr (bookmark-get-bookmark bookmark-name-or-record))))
352 ;; The bookmark objects can either look like (NAME ALIST) or 353 ;; The bookmark objects can either look like (NAME ALIST) or
353 ;; (NAME . ALIST), so we have to distinguish the two here. 354 ;; (NAME . ALIST), so we have to distinguish the two here.
@@ -812,7 +813,7 @@ is ever deleted."
812 (cond 813 (cond
813 ((eq overwrite-or-push nil) 814 ((eq overwrite-or-push nil)
814 (if (bookmark-get-bookmark str t) 815 (if (bookmark-get-bookmark str t)
815 (error "A bookmark named \"%s\" already exists." str) 816 (error "A bookmark named \"%s\" already exists" str)
816 (bookmark-store str (cdr record) nil))) 817 (bookmark-store str (cdr record) nil)))
817 ((eq overwrite-or-push 'overwrite) 818 ((eq overwrite-or-push 'overwrite)
818 (bookmark-store str (cdr record) nil)) 819 (bookmark-store str (cdr record) nil))
@@ -937,6 +938,7 @@ It takes one argument, the name of the bookmark, as a string.")
937 "Keymap for editing an annotation of a bookmark.") 938 "Keymap for editing an annotation of a bookmark.")
938 939
939(defun bookmark-insert-annotation (bookmark-name-or-record) 940(defun bookmark-insert-annotation (bookmark-name-or-record)
941 "Insert annotation for BOOKMARK-NAME-OR-RECORD at point."
940 (insert (funcall bookmark-edit-annotation-text-func bookmark-name-or-record)) 942 (insert (funcall bookmark-edit-annotation-text-func bookmark-name-or-record))
941 (let ((annotation (bookmark-get-annotation bookmark-name-or-record))) 943 (let ((annotation (bookmark-get-annotation bookmark-name-or-record)))
942 (if (and annotation (not (string-equal annotation ""))) 944 (if (and annotation (not (string-equal annotation "")))
@@ -1066,8 +1068,8 @@ If `bookmark-sort-flag' is non-nil, then return a sorted copy of the alist."
1066Useful for example to unhide text in `outline-mode'.") 1068Useful for example to unhide text in `outline-mode'.")
1067 1069
1068(defun bookmark--jump-via (bookmark-name-or-record display-function) 1070(defun bookmark--jump-via (bookmark-name-or-record display-function)
1069 "Handle BOOKMARK-NAME-OR-RECORD, then call DISPLAY-FUNCTION with 1071 "Handle BOOKMARK-NAME-OR-RECORD, then call DISPLAY-FUNCTION.
1070current buffer as argument. 1072DISPLAY-FUNCTION is called with the current buffer as argument.
1071 1073
1072After calling DISPLAY-FUNCTION, set window point to the point specified 1074After calling DISPLAY-FUNCTION, set window point to the point specified
1073by BOOKMARK-NAME-OR-RECORD, if necessary, run `bookmark-after-jump-hook', 1075by BOOKMARK-NAME-OR-RECORD, if necessary, run `bookmark-after-jump-hook',
@@ -1676,7 +1678,7 @@ deletion, or > if it is flagged for displaying."
1676(defalias 'edit-bookmarks 'bookmark-bmenu-list) 1678(defalias 'edit-bookmarks 'bookmark-bmenu-list)
1677 1679
1678(defun bookmark-bmenu-set-header () 1680(defun bookmark-bmenu-set-header ()
1679 "Sets the immutable header line." 1681 "Set the immutable header line."
1680 (let ((header (concat "%% " "Bookmark"))) 1682 (let ((header (concat "%% " "Bookmark")))
1681 (when bookmark-bmenu-toggle-filenames 1683 (when bookmark-bmenu-toggle-filenames
1682 (setq header (concat header 1684 (setq header (concat header
@@ -1836,8 +1838,8 @@ last full line, move to the last full line. The return value is undefined."
1836 1838
1837 1839
1838(defun bookmark-show-annotation (bookmark-name-or-record) 1840(defun bookmark-show-annotation (bookmark-name-or-record)
1839 "Display the annotation for BOOKMARK-NAME-OR-RECORD in a buffer, 1841 "Display the annotation for BOOKMARK-NAME-OR-RECORD in a buffer.
1840if an annotation exists." 1842If the annotation does not exist, do nothing."
1841 (let ((annotation (bookmark-get-annotation bookmark-name-or-record))) 1843 (let ((annotation (bookmark-get-annotation bookmark-name-or-record)))
1842 (when (and annotation (not (string-equal annotation ""))) 1844 (when (and annotation (not (string-equal annotation "")))
1843 (save-excursion 1845 (save-excursion
@@ -1998,7 +2000,9 @@ The current window remains selected."
1998 (bookmark--jump-via bookmark fun))) 2000 (bookmark--jump-via bookmark fun)))
1999 2001
2000(defun bookmark-bmenu-other-window-with-mouse (event) 2002(defun bookmark-bmenu-other-window-with-mouse (event)
2001 "Select bookmark at the mouse pointer in other window, leaving bookmark menu visible." 2003 "Jump to bookmark at mouse EVENT position in other window.
2004Move point in menu buffer to the position of EVENT and leave
2005bookmark menu visible."
2002 (interactive "e") 2006 (interactive "e")
2003 (with-current-buffer (window-buffer (posn-window (event-end event))) 2007 (with-current-buffer (window-buffer (posn-window (event-end event)))
2004 (save-excursion 2008 (save-excursion
@@ -2124,8 +2128,8 @@ To carry out the deletions that you've marked, use \\<bookmark-bmenu-mode-map>\\
2124 (message "%s" (bookmark-location bmrk)))) 2128 (message "%s" (bookmark-location bmrk))))
2125 2129
2126(defun bookmark-bmenu-relocate () 2130(defun bookmark-bmenu-relocate ()
2127 "Change the file path of the bookmark on the current line, 2131 "Change the absolute file name of the bookmark on the current line.
2128 prompting with completion for the new path." 2132Prompt with completion for the new path."
2129 (interactive) 2133 (interactive)
2130 (let ((bmrk (bookmark-bmenu-bookmark)) 2134 (let ((bmrk (bookmark-bmenu-bookmark))
2131 (thispoint (point))) 2135 (thispoint (point)))