From: Karl Fogel Date: Tue, 13 Jul 2010 22:17:51 +0000 (-0400) Subject: * lisp/bookmark.el (bookmark-show-annotation): Use `when' instead of `if'. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~438^2~51^2~57^2 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0c4371fe36c081259c29f6952c1b83b0dcddc3d6;p=emacs.git * lisp/bookmark.el (bookmark-show-annotation): Use `when' instead of `if'. This is also from Thierry Volpiatto's patch in bug #6444. However, because it was extraneous to the functional change in that patch, and causes a re-indendation, I am committing it separately. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f7bf7832488..ab1d043e3f2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2010-07-13 Karl Fogel + + * bookmark.el (bookmark-show-annotation): Use `when' instead of `if'. + This is also from Thierry Volpiatto's patch in bug #6444. However, + because it was extraneous to the functional change in that patch, + and causes a re-indendation, I am committing it separately. + 2010-07-13 Karl Fogel * bookmark.el (bookmark-show-annotation): Ensure annotations show, diff --git a/lisp/bookmark.el b/lisp/bookmark.el index b0d06f4e555..7c8ac45bb04 100644 --- a/lisp/bookmark.el +++ b/lisp/bookmark.el @@ -1733,15 +1733,15 @@ last full line, move to the last full line. The return value is undefined." "Display the annotation for bookmark named BOOKMARK in a buffer, if an annotation exists." (let ((annotation (bookmark-get-annotation bookmark))) - (if (and annotation (not (string-equal annotation ""))) - (save-excursion - (let ((old-buf (current-buffer))) - (pop-to-buffer (get-buffer-create "*Bookmark Annotation*") t) - (delete-region (point-min) (point-max)) - ;; (insert (concat "Annotation for bookmark '" bookmark "':\n\n")) - (insert annotation) - (goto-char (point-min)) - (switch-to-buffer-other-window old-buf)))))) + (when (and annotation (not (string-equal annotation ""))) + (save-excursion + (let ((old-buf (current-buffer))) + (pop-to-buffer (get-buffer-create "*Bookmark Annotation*") t) + (delete-region (point-min) (point-max)) + ;; (insert (concat "Annotation for bookmark '" bookmark "':\n\n")) + (insert annotation) + (goto-char (point-min)) + (switch-to-buffer-other-window old-buf)))))) (defun bookmark-show-all-annotations ()