1999-01-11 Colin Rafferty * gnus-art.el (article-update-date-lapsed): Made it work with picons, and make it update on all visible frames. (article-date-ut): Get summary-buffer's current-headers. --- lisp/gnus-art.el~ Sun Jan 3 08:36:04 1999 +++ lisp/gnus-art.el Mon Jan 11 16:55:05 1999 @@ -1446,17 +1446,19 @@ "Mapping from time units to seconds.") (defun article-date-ut (&optional type highlight header) "Convert DATE date to universal time in the current article. If TYPE is `local', convert to local time; if it is `lapsed', output how much time has lapsed since DATE." (interactive (list 'ut t)) (let* ((header (or header - (mail-header-date gnus-current-headers) + (mail-header-date (save-excursion + (set-buffer gnus-summary-buffer) + gnus-current-headers)) (message-fetch-field "date") "")) (date (if (vectorp header) (mail-header-date header) header)) (date-regexp "^Date:[ \t]\\|^X-Sent:[ \t]") (inhibit-point-motion-hooks t) bface eface newline) (when (and date (not (string= date ""))) @@ -1596,20 +1598,21 @@ (defun article-update-date-lapsed () "Function to be run from a timer to update the lapsed time line." (let (deactivate-mark) (save-excursion (ignore-errors (walk-windows (lambda (w) (set-buffer (window-buffer w)) - (when (eq major-mode 'gnus-article-mode) + (when (memq major-mode '(gnus-article-mode gnus-picons-mode)) (goto-char (point-min)) (when (re-search-forward "^X-Sent:" nil t) - (article-date-lapsed t))))))))) + (article-date-lapsed t)))) + nil 'visible))))) (defun gnus-start-date-timer (&optional n) "Start a timer to update the X-Sent header in the article buffers. The numerical prefix says how frequently (in seconds) the function is to run." (interactive "p") (unless n (setq n 1))