:group 'bookmark)
(defconst bookmark-bmenu-inline-header-height 2
- "Number of lines used for the *Bookmark List* header
-\(only significant when `bookmark-bmenu-use-header-line' is nil).")
+ "Number of lines used for the *Bookmark List* header.
+\(This is only significant when `bookmark-bmenu-use-header-line'
+is nil.)")
(defconst bookmark-bmenu-marks-width 2
- "Number of columns (chars) used for the *Bookmark List* marks column,
-including the annotations column.")
+ "Number of columns (chars) used for the *Bookmark List* marks column.
+This includes the annotations column.")
(defcustom bookmark-bmenu-file-column 30
"Column at which to display filenames in a buffer listing bookmarks.
"Keymap containing bindings to bookmark functions.
It is not bound to any key by default: to bind it
so that you have a bookmark prefix, just use `global-set-key' and bind a
-key of your choice to `bookmark-map'. All interactive bookmark
+key of your choice to variable `bookmark-map'. All interactive bookmark
functions have a binding in this keymap.")
;;;###autoload (fset 'bookmark-map bookmark-map)
(defvar bookmark-quit-flag nil
- "Non nil make `bookmark-bmenu-search' quit immediately.")
+ "Non-nil means `bookmark-bmenu-search' quits immediately.")
\f
;; Helper functions and macros.
;; Everyone else should go through them.
(defun bookmark-name-from-full-record (bookmark-record)
- "Return the name of BOOKMARK-RECORD. BOOKMARK-RECORD is, e.g.,
-one element from `bookmark-alist'."
+ "Return the name of BOOKMARK-RECORD.
+BOOKMARK-RECORD is, e.g., one element from `bookmark-alist'."
(car bookmark-record))
(defun bookmark-get-bookmark-record (bookmark-name-or-record)
- "Return the record portion of the entry for BOOKMARK-NAME-OR-RECORD in
-`bookmark-alist' (that is, all information but the name)."
+ "Return the record portion of BOOKMARK-NAME-OR-RECORD in `bookmark-alist'.
+In other words, return all information but the name."
(let ((alist (cdr (bookmark-get-bookmark bookmark-name-or-record))))
;; The bookmark objects can either look like (NAME ALIST) or
;; (NAME . ALIST), so we have to distinguish the two here.
(cond
((eq overwrite-or-push nil)
(if (bookmark-get-bookmark str t)
- (error "A bookmark named \"%s\" already exists." str)
+ (error "A bookmark named \"%s\" already exists" str)
(bookmark-store str (cdr record) nil)))
((eq overwrite-or-push 'overwrite)
(bookmark-store str (cdr record) nil))
"Keymap for editing an annotation of a bookmark.")
(defun bookmark-insert-annotation (bookmark-name-or-record)
+ "Insert annotation for BOOKMARK-NAME-OR-RECORD at point."
(insert (funcall bookmark-edit-annotation-text-func bookmark-name-or-record))
(let ((annotation (bookmark-get-annotation bookmark-name-or-record)))
(if (and annotation (not (string-equal annotation "")))
Useful for example to unhide text in `outline-mode'.")
(defun bookmark--jump-via (bookmark-name-or-record display-function)
- "Handle BOOKMARK-NAME-OR-RECORD, then call DISPLAY-FUNCTION with
-current buffer as argument.
+ "Handle BOOKMARK-NAME-OR-RECORD, then call DISPLAY-FUNCTION.
+DISPLAY-FUNCTION is called with the current buffer as argument.
After calling DISPLAY-FUNCTION, set window point to the point specified
by BOOKMARK-NAME-OR-RECORD, if necessary, run `bookmark-after-jump-hook',
(defalias 'edit-bookmarks 'bookmark-bmenu-list)
(defun bookmark-bmenu-set-header ()
- "Sets the immutable header line."
+ "Set the immutable header line."
(let ((header (concat "%% " "Bookmark")))
(when bookmark-bmenu-toggle-filenames
(setq header (concat header
(defun bookmark-show-annotation (bookmark-name-or-record)
- "Display the annotation for BOOKMARK-NAME-OR-RECORD in a buffer,
-if an annotation exists."
+ "Display the annotation for BOOKMARK-NAME-OR-RECORD in a buffer.
+If the annotation does not exist, do nothing."
(let ((annotation (bookmark-get-annotation bookmark-name-or-record)))
(when (and annotation (not (string-equal annotation "")))
(save-excursion
(bookmark--jump-via bookmark fun)))
(defun bookmark-bmenu-other-window-with-mouse (event)
- "Select bookmark at the mouse pointer in other window, leaving bookmark menu visible."
+ "Jump to bookmark at mouse EVENT position in other window.
+Move point in menu buffer to the position of EVENT and leave
+bookmark menu visible."
(interactive "e")
(with-current-buffer (window-buffer (posn-window (event-end event)))
(save-excursion
(message "%s" (bookmark-location bmrk))))
(defun bookmark-bmenu-relocate ()
- "Change the file path of the bookmark on the current line,
- prompting with completion for the new path."
+ "Change the absolute file name of the bookmark on the current line.
+Prompt with completion for the new path."
(interactive)
(let ((bmrk (bookmark-bmenu-bookmark))
(thispoint (point)))