[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r100821: Allow C-w when setting a boo
From: |
Karl Fogel |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r100821: Allow C-w when setting a bookmark in a Gnus Article buffer (Bug#5975). |
Date: |
Wed, 14 Jul 2010 12:41:40 -0400 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 100821
author: Thierry Volpiatto <address@hidden>
committer: Karl Fogel <address@hidden>
branch nick: trunk
timestamp: Wed 2010-07-14 12:41:40 -0400
message:
Allow C-w when setting a bookmark in a Gnus Article buffer (Bug#5975).
* lisp/bookmark.el (bookmark-set): Don't set `bookmark-yank-point' and
`bookmark-current-buffer' if they have been already set in another
buffer (e.g gnus-art).
* lisp/gnus/gnus-sum.el (gnus-summary-bookmark-make-record): Set
`bookmark-yank-point' and `bookmark-current-buffer' to allow C-w.
modified:
lisp/ChangeLog
lisp/bookmark.el
lisp/gnus/ChangeLog
lisp/gnus/gnus-sum.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2010-07-14 15:57:54 +0000
+++ b/lisp/ChangeLog 2010-07-14 16:41:40 +0000
@@ -1,3 +1,12 @@
+2010-07-13 Thierry Volpiatto <address@hidden>
+
+ Allow C-w when setting a bookmark in a Gnus Article buffer (Bug#5975).
+ Patch applied by Karl Fogel.
+
+ * bookmark.el (bookmark-set): Don't set `bookmark-yank-point'
+ and `bookmark-current-buffer' if they have been already set in
+ another buffer (e.g gnus-art).
+
2010-07-13 Karl Fogel <address@hidden>
Thierry Volpiatto <address@hidden>
=== modified file 'lisp/bookmark.el'
--- a/lisp/bookmark.el 2010-07-14 15:57:54 +0000
+++ b/lisp/bookmark.el 2010-07-14 16:41:40 +0000
@@ -783,27 +783,34 @@
it removes only the first instance of a bookmark with that name from
the list of bookmarks.)"
(interactive (list nil current-prefix-arg))
- (let* ((record (bookmark-make-record))
- (default (car record)))
-
- (bookmark-maybe-load-default-file)
-
- (setq bookmark-yank-point (point))
- (setq bookmark-current-buffer (current-buffer))
-
- (let ((str
- (or name
- (read-from-minibuffer
- (format "Set bookmark (%s): " default)
- nil
- bookmark-minibuffer-read-name-map
- nil nil default))))
- (and (string-equal str "") (setq str default))
- (bookmark-store str (cdr record) no-overwrite)
-
- ;; Ask for an annotation buffer for this bookmark
- (when bookmark-use-annotations
- (bookmark-edit-annotation str)))))
+ (unwind-protect
+ (let* ((record (bookmark-make-record))
+ (default (car record)))
+
+ (bookmark-maybe-load-default-file)
+ ;; Don't set `bookmark-yank-point' and `bookmark-current-buffer'
+ ;; if they have been already set in another buffer. (e.g gnus-art).
+ (unless (and bookmark-yank-point
+ bookmark-current-buffer)
+ (setq bookmark-yank-point (point))
+ (setq bookmark-current-buffer (current-buffer)))
+
+ (let ((str
+ (or name
+ (read-from-minibuffer
+ (format "Set bookmark (%s): " default)
+ nil
+ bookmark-minibuffer-read-name-map
+ nil nil default))))
+ (and (string-equal str "") (setq str default))
+ (bookmark-store str (cdr record) no-overwrite)
+
+ ;; Ask for an annotation buffer for this bookmark
+ (when bookmark-use-annotations
+ (bookmark-edit-annotation str))))
+ (setq bookmark-yank-point nil)
+ (setq bookmark-current-buffer nil)))
+
(defun bookmark-kill-line (&optional newline-too)
"Kill from point to end of line.
=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog 2010-07-14 16:02:53 +0000
+++ b/lisp/gnus/ChangeLog 2010-07-14 16:41:40 +0000
@@ -1,3 +1,11 @@
+2010-07-13 Thierry Volpiatto <address@hidden>
+
+ Allow C-w when setting a bookmark in a Gnus Article buffer (Bug#5975).
+ Patch applied by Karl Fogel.
+
+ * gnus-sum.el (gnus-summary-bookmark-make-record): Set
+ `bookmark-yank-point' and `bookmark-current-buffer' to allow C-w.
+
2010-07-13 Thierry Volpiatto <address@hidden>
Allow bookmarks to be set from Gnus Article buffers (Bug #5975).
=== modified file 'lisp/gnus/gnus-sum.el'
--- a/lisp/gnus/gnus-sum.el 2010-07-14 16:02:53 +0000
+++ b/lisp/gnus/gnus-sum.el 2010-07-14 16:41:40 +0000
@@ -12631,10 +12631,12 @@
"Make a bookmark entry for a Gnus summary buffer."
(let (pos buf)
(unless (and (derived-mode-p 'gnus-summary-mode) gnus-article-current)
- (save-restriction ; FIXME is it necessary to widen?
+ (save-restriction ; FIXME is it necessary to widen?
(widen) (setq pos (point))) ; Set position in gnus-article buffer.
(setq buf "art") ; We are recording bookmark from article buffer.
- (gnus-article-show-summary)) ; Go back in summary buffer.
+ (setq bookmark-yank-point (point))
+ (setq bookmark-current-buffer (current-buffer))
+ (gnus-article-show-summary)) ; Go back in summary buffer.
;; We are now recording bookmark from summary buffer.
(unless buf (setq buf "sum"))
(let* ((subject (elt (gnus-summary-article-header) 1))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r100821: Allow C-w when setting a bookmark in a Gnus Article buffer (Bug#5975).,
Karl Fogel <=