comparison lisp/gnus/gnus-art.el @ 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 c0f8b7d7e2ae
children 53e7abe8917f 01137c1fdbe9
comparison
equal deleted inserted replaced
63025:36a997bd89f7 63026:81ee906cdd23
3036 (interactive (list t)) 3036 (interactive (list t))
3037 (article-date-ut 'lapsed highlight)) 3037 (article-date-ut 'lapsed highlight))
3038 3038
3039 (defun article-update-date-lapsed () 3039 (defun article-update-date-lapsed ()
3040 "Function to be run from a timer to update the lapsed time line." 3040 "Function to be run from a timer to update the lapsed time line."
3041 (let (deactivate-mark) 3041 (save-match-data
3042 (save-excursion 3042 (let (deactivate-mark)
3043 (ignore-errors 3043 (save-excursion
3044 (walk-windows 3044 (ignore-errors
3045 (lambda (w) 3045 (walk-windows
3046 (set-buffer (window-buffer w)) 3046 (lambda (w)
3047 (when (eq major-mode 'gnus-article-mode) 3047 (set-buffer (window-buffer w))
3048 (let ((mark (point-marker))) 3048 (when (eq major-mode 'gnus-article-mode)
3049 (goto-char (point-min)) 3049 (let ((mark (point-marker)))
3050 (when (re-search-forward "^X-Sent:" nil t) 3050 (goto-char (point-min))
3051 (article-date-lapsed t)) 3051 (when (re-search-forward "^X-Sent:" nil t)
3052 (goto-char (marker-position mark)) 3052 (article-date-lapsed t))
3053 (move-marker mark nil)))) 3053 (goto-char (marker-position mark))
3054 nil 'visible))))) 3054 (move-marker mark nil))))
3055 nil 'visible))))))
3055 3056
3056 (defun gnus-start-date-timer (&optional n) 3057 (defun gnus-start-date-timer (&optional n)
3057 "Start a timer to update the X-Sent header in the article buffers. 3058 "Start a timer to update the X-Sent header in the article buffers.
3058 The numerical prefix says how frequently (in seconds) the function 3059 The numerical prefix says how frequently (in seconds) the function
3059 is to run." 3060 is to run."