[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r103087: gnus-art.el (gnus-article-da
From: |
Katsumi Yamaoka |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r103087: gnus-art.el (gnus-article-date-headers): Rip out the old -treat-date-* stuff, since it didn't really work with defcustom. |
Date: |
Thu, 03 Feb 2011 05:21:20 +0000 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 103087
author: Lars Ingebrigtsen <address@hidden>
committer: Katsumi Yamaoka <address@hidden>
branch nick: trunk
timestamp: Thu 2011-02-03 05:21:20 +0000
message:
gnus-art.el (gnus-article-date-headers): Rip out the old -treat-date-* stuff,
since it didn't really work with defcustom.
(article-update-date-lapsed): Make sure the window start doesn't move,
either.
modified:
lisp/gnus/ChangeLog
lisp/gnus/gnus-art.el
=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog 2011-02-03 05:01:44 +0000
+++ b/lisp/gnus/ChangeLog 2011-02-03 05:21:20 +0000
@@ -2,6 +2,10 @@
* gnus-art.el (gnus-article-setup-buffer): Stop the date timer if
gnus-article-update-date-headers is nil.
+ (gnus-article-date-headers): Rip out the old -treat-date-* stuff, since
+ it didn't really work with defcustom.
+ (article-update-date-lapsed): Make sure the window start doesn't move,
+ either.
2011-02-01 Julien Danjou <address@hidden>
=== modified file 'lisp/gnus/gnus-art.el'
--- a/lisp/gnus/gnus-art.el 2011-02-03 05:01:44 +0000
+++ b/lisp/gnus/gnus-art.el 2011-02-03 05:21:20 +0000
@@ -1014,24 +1014,7 @@
:group 'gnus-article-mime
:type '(repeat (cons :format "%v" (string :tag "MIME type") function)))
-(defcustom gnus-article-date-headers
- (let ((types '(ut local english lapsed combined-lapsed
- iso8601 original user-defined))
- default)
- ;; Try to respect the legacy `gnus-treat-date-*' variables, if
- ;; they're set.
- (dolist (type types)
- (let ((variable (intern (format "gnus-treat-date-%s" type))))
- (when (and (boundp variable)
- (symbol-value variable))
- (push type default))))
- (when (and (or (not (boundp (intern
"gnus-article-date-lapsed-new-header")))
- (not (symbol-value (intern
"gnus-article-date-lapsed-new-header"))))
- (memq 'lapsed default))
- (setq default (delq 'lapsed default)))
- (or default
- ;; If they weren't set, we default to `combined-lapsed'.
- '(combined-lapsed)))
+(defcustom gnus-article-date-headers '(combined-lapsed)
"A list of Date header formats to display.
Valid formats are `ut' (universal time), `local' (local time
zone), `english' (readable English), `lapsed' (elapsed time),
@@ -3645,14 +3628,25 @@
(set-buffer (window-buffer w))
(when (eq major-mode 'gnus-article-mode)
(let ((old-line (count-lines (point-min) (point)))
- (old-column (- (point) (line-beginning-position))))
+ (old-column (- (point) (line-beginning-position)))
+ (window-start
+ (window-start (get-buffer-window (current-buffer)))))
(goto-char (point-min))
(while (re-search-forward "^Date:" nil t)
- (let ((type (get-text-property (match-beginning 0)
'gnus-date-type)))
+ (let ((type (get-text-property (match-beginning 0)
+ 'gnus-date-type)))
(when (memq type '(lapsed combined-lapsed user-format))
+ (unless (= window-start
+ (save-excursion
+ (forward-line 1)
+ (point)))
+ (setq window-start nil))
(save-excursion
(article-date-ut type t (match-beginning 0)))
- (forward-line 1))))
+ (forward-line 1)
+ (when window-start
+ (set-window-start (get-buffer-window (current-buffer))
+ (point))))))
(goto-char (point-min))
(when (> old-column 0)
(setq old-line (1- old-line)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r103087: gnus-art.el (gnus-article-date-headers): Rip out the old -treat-date-* stuff, since it didn't really work with defcustom.,
Katsumi Yamaoka <=