;;; bookmark.el --- set bookmarks, maybe annotate them, jump to them later
-;; Copyright (C) 1993-1997, 2001-2014 Free Software Foundation, Inc.
+;; Copyright (C) 1993-1997, 2001-2015 Free Software Foundation, Inc.
;; Author: Karl Fogel <kfogel@red-bean.com>
;; Maintainer: Karl Fogel <kfogel@red-bean.com>
"Return default annotation text for BOOKMARK-NAME.
The default annotation text is simply some text explaining how to use
annotations."
- (concat "# Type the annotation for bookmark '" bookmark-name "' here.\n"
- "# All lines which start with a '#' will be deleted.\n"
+ (concat (format-message
+ "# Type the annotation for bookmark ā%sā here.\n"
+ bookmark-name)
+ (format-message
+ "# All lines which start with a ā#ā will be deleted.\n")
"# Type C-c C-c when done.\n#\n"
"# Author: " (user-full-name) " <" (user-login-name) "@"
(system-name) ">\n"
If you load a file containing bookmarks with the same names as
bookmarks already present in your Emacs, the new bookmarks will get
-unique numeric suffixes \"<2>\", \"<3>\", ... following the same
-method buffers use to resolve name collisions."
+unique numeric suffixes \"<2>\", \"<3>\", etc."
(interactive
(list (read-file-name
(format "Load bookmarks from: (%s) "
(let ((inhibit-read-only t))
(erase-buffer)
(if (not bookmark-bmenu-use-header-line)
- (insert "% Bookmark\n- --------\n"))
+ (insert "% Bookmark\n- --------\n"))
(add-text-properties (point-min) (point)
'(font-lock-face bookmark-menu-heading))
(dolist (full-record (bookmark-maybe-sort-alist))
(defun bookmark-bmenu-set-header ()
"Sets the immutable header line."
(let ((header (concat "%% " "Bookmark")))
- (when bookmark-bmenu-toggle-filenames
- (setq header (concat header
- (make-string (- bookmark-bmenu-file-column
+ (when bookmark-bmenu-toggle-filenames
+ (setq header (concat header
+ (make-string (- bookmark-bmenu-file-column
(- (length header) 3)) ?\s)
"File")))
(let ((pos 0))
(save-selected-window
(pop-to-buffer (get-buffer-create "*Bookmark Annotation*") t)
(delete-region (point-min) (point-max))
- (dolist (full-record bookmark-alist)
+ (dolist (full-record (bookmark-maybe-sort-alist))
(let* ((name (bookmark-name-from-full-record full-record))
(ann (bookmark-get-annotation full-record)))
(insert (concat name ":\n"))
(defun bookmark-bmenu-goto-bookmark (name)
"Move point to bookmark with name NAME."
(goto-char (point-min))
- (while (not (equal name (bookmark-bmenu-bookmark)))
+ (while (not (or (equal name (bookmark-bmenu-bookmark))
+ (eobp)))
(forward-line 1))
(forward-line 0))