[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r101197: gnus-summary-(move, delete)-
From: |
Katsumi Yamaoka |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r101197: gnus-summary-(move, delete)-article: Save excursion while copying, moving, |
Date: |
Fri, 27 Aug 2010 01:54:07 +0000 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 101197 [merge]
committer: Katsumi Yamaoka <address@hidden>
branch nick: trunk
timestamp: Fri 2010-08-27 01:54:07 +0000
message:
gnus-summary-(move,delete)-article: Save excursion while copying, moving,
and deleting articles in order to prevent the cursor from jumping to
unforeseen place.
modified:
lisp/gnus/ChangeLog
lisp/gnus/gnus-sum.el
=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog 2010-08-17 07:04:35 +0000
+++ b/lisp/gnus/ChangeLog 2010-08-27 01:53:01 +0000
@@ -1,3 +1,9 @@
+2010-08-27 Katsumi Yamaoka <address@hidden>
+
+ * gnus-sum.el (gnus-summary-move-article, gnus-summary-delete-article):
+ Save excursion while copying, moving, and deleting articles in order to
+ prevent the cursor from jumping to unforeseen place.
+
2010-08-17 Glenn Morris <address@hidden>
* gnus-sync.el: Require gnus components whose functions are used.
=== modified file 'lisp/gnus/gnus-sum.el'
--- a/lisp/gnus/gnus-sum.el 2010-08-18 02:38:44 +0000
+++ b/lisp/gnus/gnus-sum.el 2010-08-27 01:53:01 +0000
@@ -9848,12 +9848,14 @@
;;;!!!Why is this necessary?
(set-buffer gnus-summary-buffer)
- (gnus-summary-goto-subject article)
(when (eq action 'move)
- (gnus-summary-mark-article article gnus-canceled-mark))))
+ (save-excursion
+ (gnus-summary-goto-subject article)
+ (gnus-summary-mark-article article gnus-canceled-mark)))))
(push article articles-to-update-marks))
- (apply 'gnus-summary-remove-process-mark articles-to-update-marks)
+ (save-excursion
+ (apply 'gnus-summary-remove-process-mark articles-to-update-marks))
;; Re-activate all groups that have been moved to.
(with-current-buffer gnus-group-buffer
(let ((gnus-group-marked to-groups))
@@ -10109,19 +10111,20 @@
;; Delete the articles.
(setq not-deleted (gnus-request-expire-articles
articles gnus-newsgroup-name 'force))
- (while articles
- (gnus-summary-remove-process-mark (car articles))
- ;; The backend might not have been able to delete the article
- ;; after all.
- (unless (memq (car articles) not-deleted)
- (gnus-summary-mark-article (car articles) gnus-canceled-mark))
- (let* ((article (car articles))
- (ghead (gnus-data-header
- (assoc article (gnus-data-list nil)))))
- (run-hook-with-args 'gnus-summary-article-delete-hook
- 'delete ghead gnus-newsgroup-name nil
- nil))
- (setq articles (cdr articles)))
+ (save-excursion
+ (while articles
+ (gnus-summary-remove-process-mark (car articles))
+ ;; The backend might not have been able to delete the article
+ ;; after all.
+ (unless (memq (car articles) not-deleted)
+ (gnus-summary-mark-article (car articles) gnus-canceled-mark))
+ (let* ((article (car articles))
+ (ghead (gnus-data-header
+ (assoc article (gnus-data-list nil)))))
+ (run-hook-with-args 'gnus-summary-article-delete-hook
+ 'delete ghead gnus-newsgroup-name nil
+ nil))
+ (setq articles (cdr articles))))
(when not-deleted
(gnus-message 4 "Couldn't delete articles %s" not-deleted)))
(gnus-summary-position-point)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r101197: gnus-summary-(move, delete)-article: Save excursion while copying, moving,,
Katsumi Yamaoka <=