aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/bookmark.el
diff options
context:
space:
mode:
authorKarl Fogel <[email protected]>2010-07-13 18:17:51 -0400
committerKarl Fogel <[email protected]>2010-07-13 18:17:51 -0400
commit0c4371fe36c081259c29f6952c1b83b0dcddc3d6 (patch)
tree3ecd488e820b024f3a6cc83d501d40c39628a276 /lisp/bookmark.el
parent068a0233c700042e117f2ee330e347f00c8cc6e0 (diff)
* 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.
Diffstat (limited to 'lisp/bookmark.el')
-rw-r--r--lisp/bookmark.el18
1 files changed, 9 insertions, 9 deletions
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 ()