From 0c4371fe36c081259c29f6952c1b83b0dcddc3d6 Mon Sep 17 00:00:00 2001 From: Karl Fogel Date: Tue, 13 Jul 2010 18:17:51 -0400 Subject: * 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. --- lisp/bookmark.el | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'lisp/bookmark.el') diff --git a/lisp/bookmark.el b/lisp/bookmark.el index b0d06f4e55..7c8ac45bb0 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 () -- cgit v1.2.3