emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r100813: * lisp/bookmark.el (bookmark


From: Karl Fogel
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r100813: * lisp/bookmark.el (bookmark-show-annotation): Use `when' instead of `if'.
Date: Tue, 13 Jul 2010 18:17:51 -0400
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 100813
committer: Karl Fogel <address@hidden>
branch nick: trunk
timestamp: Tue 2010-07-13 18:17:51 -0400
message:
  * 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.
modified:
  lisp/ChangeLog
  lisp/bookmark.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2010-07-13 22:09:20 +0000
+++ b/lisp/ChangeLog    2010-07-13 22:17:51 +0000
@@ -1,5 +1,12 @@
 2010-07-13  Karl Fogel  <address@hidden>
 
+       * 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  <address@hidden>
+
        * bookmark.el (bookmark-show-annotation): Ensure annotations show,
        e.g. in Info bookmarks, by using `switch-to-buffer-other-window'.
        Patch by Thierry Volpiatto (Bug#6444).

=== modified file 'lisp/bookmark.el'
--- a/lisp/bookmark.el  2010-07-13 22:09:20 +0000
+++ b/lisp/bookmark.el  2010-07-13 22:17:51 +0000
@@ -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 ()


reply via email to

[Prev in Thread] Current Thread [Next in Thread]