Commit e0a8aa09 authored by Luc Teirlinck's avatar Luc Teirlinck
Browse files

(article-update-date-lapsed): Use `save-match-data'.

parent bed88438
...@@ -3038,20 +3038,21 @@ function and want to see what the date was before converting." ...@@ -3038,20 +3038,21 @@ function and want to see what the date was before converting."
(defun article-update-date-lapsed () (defun article-update-date-lapsed ()
"Function to be run from a timer to update the lapsed time line." "Function to be run from a timer to update the lapsed time line."
(let (deactivate-mark) (save-match-data
(save-excursion (let (deactivate-mark)
(ignore-errors (save-excursion
(walk-windows (ignore-errors
(lambda (w) (walk-windows
(set-buffer (window-buffer w)) (lambda (w)
(when (eq major-mode 'gnus-article-mode) (set-buffer (window-buffer w))
(let ((mark (point-marker))) (when (eq major-mode 'gnus-article-mode)
(goto-char (point-min)) (let ((mark (point-marker)))
(when (re-search-forward "^X-Sent:" nil t) (goto-char (point-min))
(article-date-lapsed t)) (when (re-search-forward "^X-Sent:" nil t)
(goto-char (marker-position mark)) (article-date-lapsed t))
(move-marker mark nil)))) (goto-char (marker-position mark))
nil 'visible))))) (move-marker mark nil))))
nil 'visible))))))
(defun gnus-start-date-timer (&optional n) (defun gnus-start-date-timer (&optional n)
"Start a timer to update the X-Sent header in the article buffers. "Start a timer to update the X-Sent header in the article buffers.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment