diff options
| author | Luc Teirlinck | 2005-06-04 22:27:57 +0000 |
|---|---|---|
| committer | Luc Teirlinck | 2005-06-04 22:27:57 +0000 |
| commit | e0a8aa091c57fd3435363550b615f54dba06aa41 (patch) | |
| tree | 9a1fa5fd8a2d5fc21f8bc79480d6bea8844a3b3f | |
| parent | bed88438516314839b49b2dc2bf2c46522a59a24 (diff) | |
| download | emacs-e0a8aa091c57fd3435363550b615f54dba06aa41.tar.gz emacs-e0a8aa091c57fd3435363550b615f54dba06aa41.zip | |
(article-update-date-lapsed): Use `save-match-data'.
| -rw-r--r-- | lisp/gnus/gnus-art.el | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 7bc2e938071..498596dd63c 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el | |||
| @@ -3038,20 +3038,21 @@ function and want to see what the date was before converting." | |||
| 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. |