Mercurial > emacs
changeset 63026:81ee906cdd23
(article-update-date-lapsed): Use `save-match-data'.
author | Luc Teirlinck <teirllm@auburn.edu> |
---|---|
date | Sat, 04 Jun 2005 22:27:57 +0000 |
parents | 36a997bd89f7 |
children | b5c7398b1750 |
files | lisp/gnus/gnus-art.el |
diffstat | 1 files changed, 15 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/gnus/gnus-art.el Sat Jun 04 22:23:44 2005 +0000 +++ b/lisp/gnus/gnus-art.el Sat Jun 04 22:27:57 2005 +0000 @@ -3038,20 +3038,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) - (let ((mark (point-marker))) - (goto-char (point-min)) - (when (re-search-forward "^X-Sent:" nil t) - (article-date-lapsed t)) - (goto-char (marker-position mark)) - (move-marker mark nil)))) - nil 'visible))))) + (save-match-data + (let (deactivate-mark) + (save-excursion + (ignore-errors + (walk-windows + (lambda (w) + (set-buffer (window-buffer w)) + (when (eq major-mode 'gnus-article-mode) + (let ((mark (point-marker))) + (goto-char (point-min)) + (when (re-search-forward "^X-Sent:" nil t) + (article-date-lapsed t)) + (goto-char (marker-position mark)) + (move-marker mark nil)))) + nil 'visible)))))) (defun gnus-start-date-timer (&optional n) "Start a timer to update the X-Sent header in the article buffers.