changeset 109384:32e3de61d8a0

* 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.
author Karl Fogel <kfogel@red-bean.com>
date Tue, 13 Jul 2010 18:17:51 -0400
parents dcdf09a52e2c
children 2bc66123f2c6 b019ae044fb3 f16404a62b75
files lisp/ChangeLog lisp/bookmark.el
diffstat 2 files changed, 16 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Tue Jul 13 18:09:20 2010 -0400
+++ b/lisp/ChangeLog	Tue Jul 13 18:17:51 2010 -0400
@@ -1,3 +1,10 @@
+2010-07-13  Karl Fogel  <kfogel@red-bean.com>
+
+	* 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  <kfogel@red-bean.com>
 
 	* bookmark.el (bookmark-show-annotation): Ensure annotations show,
--- a/lisp/bookmark.el	Tue Jul 13 18:09:20 2010 -0400
+++ b/lisp/bookmark.el	Tue Jul 13 18:17:51 2010 -0400
@@ -1733,15 +1733,15 @@
   "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 ()