diff options
| author | Karl Fogel | 2010-07-13 18:17:51 -0400 |
|---|---|---|
| committer | Karl Fogel | 2010-07-13 18:17:51 -0400 |
| commit | 0c4371fe36c081259c29f6952c1b83b0dcddc3d6 (patch) | |
| tree | 3ecd488e820b024f3a6cc83d501d40c39628a276 | |
| parent | 068a0233c700042e117f2ee330e347f00c8cc6e0 (diff) | |
| download | emacs-0c4371fe36c081259c29f6952c1b83b0dcddc3d6.tar.gz emacs-0c4371fe36c081259c29f6952c1b83b0dcddc3d6.zip | |
* 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.
| -rw-r--r-- | lisp/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/bookmark.el | 18 |
2 files changed, 16 insertions, 9 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f7bf7832488..ab1d043e3f2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,12 @@ | |||
| 1 | 2010-07-13 Karl Fogel <kfogel@red-bean.com> | 1 | 2010-07-13 Karl Fogel <kfogel@red-bean.com> |
| 2 | 2 | ||
| 3 | * bookmark.el (bookmark-show-annotation): Use `when' instead of `if'. | ||
| 4 | This is also from Thierry Volpiatto's patch in bug #6444. However, | ||
| 5 | because it was extraneous to the functional change in that patch, | ||
| 6 | and causes a re-indendation, I am committing it separately. | ||
| 7 | |||
| 8 | 2010-07-13 Karl Fogel <kfogel@red-bean.com> | ||
| 9 | |||
| 3 | * bookmark.el (bookmark-show-annotation): Ensure annotations show, | 10 | * bookmark.el (bookmark-show-annotation): Ensure annotations show, |
| 4 | e.g. in Info bookmarks, by using `switch-to-buffer-other-window'. | 11 | e.g. in Info bookmarks, by using `switch-to-buffer-other-window'. |
| 5 | Patch by Thierry Volpiatto (Bug#6444). | 12 | Patch by Thierry Volpiatto (Bug#6444). |
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." | |||
| 1733 | "Display the annotation for bookmark named BOOKMARK in a buffer, | 1733 | "Display the annotation for bookmark named BOOKMARK in a buffer, |
| 1734 | if an annotation exists." | 1734 | if an annotation exists." |
| 1735 | (let ((annotation (bookmark-get-annotation bookmark))) | 1735 | (let ((annotation (bookmark-get-annotation bookmark))) |
| 1736 | (if (and annotation (not (string-equal annotation ""))) | 1736 | (when (and annotation (not (string-equal annotation ""))) |
| 1737 | (save-excursion | 1737 | (save-excursion |
| 1738 | (let ((old-buf (current-buffer))) | 1738 | (let ((old-buf (current-buffer))) |
| 1739 | (pop-to-buffer (get-buffer-create "*Bookmark Annotation*") t) | 1739 | (pop-to-buffer (get-buffer-create "*Bookmark Annotation*") t) |
| 1740 | (delete-region (point-min) (point-max)) | 1740 | (delete-region (point-min) (point-max)) |
| 1741 | ;; (insert (concat "Annotation for bookmark '" bookmark "':\n\n")) | 1741 | ;; (insert (concat "Annotation for bookmark '" bookmark "':\n\n")) |
| 1742 | (insert annotation) | 1742 | (insert annotation) |
| 1743 | (goto-char (point-min)) | 1743 | (goto-char (point-min)) |
| 1744 | (switch-to-buffer-other-window old-buf)))))) | 1744 | (switch-to-buffer-other-window old-buf)))))) |
| 1745 | 1745 | ||
| 1746 | 1746 | ||
| 1747 | (defun bookmark-show-all-annotations () | 1747 | (defun bookmark-show-all-annotations () |