[gnus git] branch master updated: =1= (article-update-date-lapsed): Try a better way to really keep point at the "same place".
Lars Magne Ingebrigtsen <[email protected]>
| Newsgroups | gmane.emacs.gnus.cvs |
|---|---|
| Message-ID | <[email protected]> |
via 2ebf9f23964d9d572cb206cf092a1071bcce02dc (commit)
from 15a4e4b567dca492a30ffb42dc964762e3b3aba9 (commit)
- Log -----------------------------------------------------------------
commit 2ebf9f23964d9d572cb206cf092a1071bcce02dc
Author: Lars Magne Ingebrigtsen <[email protected]>
Date: Fri Jan 28 17:30:59 2011 -0800
(article-update-date-lapsed): Try a better way to really keep point at the "same place".
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 57a44f6..42c85c9 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2011-01-29 Lars Ingebrigtsen <[email protected]>
+
+ * gnus-art.el (article-update-date-lapsed): Try a better way to really
+ keep point at the "same place".
+
2011-01-28 Lars Ingebrigtsen <[email protected]>
* gnus-sum.el (gnus-select-newsgroup): Don't try to alter the active
diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el
index bde599c..0a9446a 100644
--- a/lisp/gnus-art.el
+++ b/lisp/gnus-art.el
@@ -3692,28 +3692,22 @@ function and want to see what the date was before converting."
(lambda (w)
(set-buffer (window-buffer w))
(when (eq major-mode 'gnus-article-mode)
- (let ((mark (point-marker))
- (old-point (point)))
+ (let ((old-line (count-lines (point-min) (point)))
+ (old-column (current-column)))
(goto-char (point-min))
(when (re-search-forward "^X-Sent:\\|^Date:" nil t)
- ;; If the point is on the Date line, then use that
- ;; absolute position. Otherwise, use the mark.
- ;; This will ensure that point stays at the "same
- ;; place".
- (when (or (< old-point (match-beginning 0))
- (> old-point (progn
- (forward-line 1)
- (while (and (not (eobp))
- (looking-at "X-Sent:\\|Date:"))
- (forward-line))
- (point))))
- (setq old-point nil))
(when gnus-treat-date-combined-lapsed
(article-date-combined-lapsed t))
(when gnus-treat-date-lapsed
(article-date-lapsed t)))
- (goto-char (or old-point (marker-position mark)))
- (move-marker mark nil))))
+ (goto-char (point-min))
+ (when (> old-column 0)
+ (setq old-line (1- old-line)))
+ (forward-line old-line)
+ (end-of-line)
+ (when (> (current-column) old-column)
+ (beginning-of-line)
+ (forward-char old-column)))))
nil 'visible))))))
(defun gnus-start-date-timer (&optional n)
-----------------------------------------------------------------------
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we listed those
revisions in full, above.
Summary of changes:
lisp/ChangeLog | 5 +++++
lisp/gnus-art.el | 26 ++++++++++----------------
2 files changed, 15 insertions(+), 16 deletions(-)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnus Project".
The branch, master has been updated
hooks/post-receive
--
Gnus Project