comparison lisp/gnus/gnus-sum.el @ 109397:4e6b8160da4b

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.
author Karl Fogel <kfogel@red-bean.com>
date Wed, 14 Jul 2010 12:41:40 -0400
parents 8b1192833a1e
children cb913a283247
comparison
equal deleted inserted replaced
109396:8b1192833a1e 109397:4e6b8160da4b
12629 12629
12630 (defun gnus-summary-bookmark-make-record () 12630 (defun gnus-summary-bookmark-make-record ()
12631 "Make a bookmark entry for a Gnus summary buffer." 12631 "Make a bookmark entry for a Gnus summary buffer."
12632 (let (pos buf) 12632 (let (pos buf)
12633 (unless (and (derived-mode-p 'gnus-summary-mode) gnus-article-current) 12633 (unless (and (derived-mode-p 'gnus-summary-mode) gnus-article-current)
12634 (save-restriction ; FIXME is it necessary to widen? 12634 (save-restriction ; FIXME is it necessary to widen?
12635 (widen) (setq pos (point))) ; Set position in gnus-article buffer. 12635 (widen) (setq pos (point))) ; Set position in gnus-article buffer.
12636 (setq buf "art") ; We are recording bookmark from article buffer. 12636 (setq buf "art") ; We are recording bookmark from article buffer.
12637 (gnus-article-show-summary)) ; Go back in summary buffer. 12637 (setq bookmark-yank-point (point))
12638 (setq bookmark-current-buffer (current-buffer))
12639 (gnus-article-show-summary)) ; Go back in summary buffer.
12638 ;; We are now recording bookmark from summary buffer. 12640 ;; We are now recording bookmark from summary buffer.
12639 (unless buf (setq buf "sum")) 12641 (unless buf (setq buf "sum"))
12640 (let* ((subject (elt (gnus-summary-article-header) 1)) 12642 (let* ((subject (elt (gnus-summary-article-header) 1))
12641 (grp (car gnus-article-current)) 12643 (grp (car gnus-article-current))
12642 (art (cdr gnus-article-current)) 12644 (art (cdr gnus-article-current))