+2009-10-10 Karl Fogel <kfogel@red-bean.com>
+
+ * bookmark.el (Info-suffix-list): Remove this unused variable.
+ (bookmark-current-point): Remove this obsolete variable.
+ (bookmark-set, bookmark-rename, bookmark-send-edited-annotation):
+ Adjust for removal of bookmark-current-point.
+
+ (bookmarks-already-loaded, bookmark-current-buffer)
+ (bookmark-yank-point): Document. (Bug#4188)
+
2009-10-10 Glenn Morris <rgm@gnu.org>
* calendar/calendar.el (calendar-split-width-threshold): New option.
whose calling discipline HANDLER-FUNC should of course match.")
-(defvar bookmarks-already-loaded nil)
+(defvar bookmarks-already-loaded nil
+ "Non-nil iff bookmarks have been loaded from `bookmark-default-file'.")
;; more stuff added by db.
"Length of the context strings recorded on either side of a bookmark.")
-(defvar bookmark-current-point 0)
-(defvar bookmark-yank-point 0)
-(defvar bookmark-current-buffer nil)
+(defvar bookmark-current-buffer nil
+ "The buffer in which a bookmark is currently being set or renamed.
+Functions that insert strings into the minibuffer use this to know
+the source buffer for that information; see `bookmark-yank-word' and
+`bookmark-insert-current-bookmark' for example.")
+
+
+(defvar bookmark-yank-point 0
+ "The next point from which to pull source text for `bookmark-yank-word'.
+This point is in `bookmark-curent-buffer'.")
+
-(defvar Info-suffix-list)
\f
;; Helper functions.
(bookmark-maybe-load-default-file)
- (setq bookmark-current-point (point))
(setq bookmark-yank-point (point))
(setq bookmark-current-buffer (current-buffer))
(bookmark-store str (cdr record) no-overwrite)
;; Ask for an annotation buffer for this bookmark
- (if bookmark-use-annotations
- (bookmark-edit-annotation str)
- (goto-char bookmark-current-point)))))
+ (when bookmark-use-annotations
+ (bookmark-edit-annotation str)))))
(defun bookmark-kill-line (&optional newline-too)
"Kill from point to end of line.
(let ((annotation (buffer-substring-no-properties (point-min) (point-max)))
(bookmark bookmark-annotation-name))
(bookmark-set-annotation bookmark annotation)
- (bookmark-bmenu-surreptitiously-rebuild-list)
- (goto-char bookmark-current-point))
+ (bookmark-bmenu-surreptitiously-rebuild-list))
(kill-buffer (current-buffer)))
(bookmark-maybe-historicize-string old)
(bookmark-maybe-load-default-file)
- (setq bookmark-current-point (point))
(setq bookmark-yank-point (point))
(setq bookmark-current-buffer (current-buffer))
(let ((newname