From 67b70de989cb04daad34be6fc678361f4ff5b6bb Mon Sep 17 00:00:00 2001 From: Karl Fogel Date: Sat, 10 Oct 2009 21:48:22 +0000 Subject: [PATCH] * bookmark.el (Info-suffix-list): Remove this completely 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) --- lisp/ChangeLog | 10 ++++++++++ lisp/bookmark.el | 28 ++++++++++++++++------------ 2 files changed, 26 insertions(+), 12 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ea529794c74..ebc8755c2ca 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,13 @@ +2009-10-10 Karl Fogel + + * 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 * calendar/calendar.el (calendar-split-width-threshold): New option. diff --git a/lisp/bookmark.el b/lisp/bookmark.el index ae2b79722d7..6c9559de5ae 100644 --- a/lisp/bookmark.el +++ b/lisp/bookmark.el @@ -278,7 +278,8 @@ will be used to open this bookmark instead of `bookmark-default-handler', 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. @@ -299,11 +300,18 @@ through a file easier.") "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) ;; Helper functions. @@ -762,7 +770,6 @@ the list of bookmarks.\)" (bookmark-maybe-load-default-file) - (setq bookmark-current-point (point)) (setq bookmark-yank-point (point)) (setq bookmark-current-buffer (current-buffer)) @@ -777,9 +784,8 @@ the list of bookmarks.\)" (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. @@ -860,8 +866,7 @@ Lines beginning with `#' are ignored." (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))) @@ -1195,7 +1200,6 @@ name." (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 -- 2.11.4.GIT