Function: bookmark-show-annotation

bookmark-show-annotation is a byte-compiled function defined in bookmark.el.gz.

Signature

(bookmark-show-annotation BOOKMARK-NAME-OR-RECORD)

Documentation

Display the annotation for BOOKMARK-NAME-OR-RECORD in a buffer.

If the annotation does not exist, do nothing.

Source Code

;; Defined in /usr/src/emacs/lisp/bookmark.el.gz
(defun bookmark-show-annotation (bookmark-name-or-record)
  "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
        (let ((old-buf (current-buffer)))
          (pop-to-buffer (get-buffer-create "*Bookmark Annotation*") t)
          (let (buffer-read-only)
            (erase-buffer)
            (insert annotation)
            (goto-char (point-min))
            (set-buffer-modified-p nil))
          (setq buffer-read-only t)
          (switch-to-buffer-other-window old-buf))))))