Function: article-update-date-lapsed

article-update-date-lapsed is a byte-compiled function defined in gnus-art.el.gz.

Signature

(article-update-date-lapsed)

Documentation

Function to be run from a timer to update the lapsed time line.

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/gnus-art.el.gz
(defun article-update-date-lapsed ()
  "Function to be run from a timer to update the lapsed time line."
  (save-match-data
    (let ((buffer (current-buffer)))
      (ignore-errors
	(walk-windows
	 (lambda (w)
	   (set-buffer (window-buffer w))
	   (when (derived-mode-p 'gnus-article-mode)
	     (let ((old-line (count-lines (point-min) (point)))
		   (old-column (- (point) (line-beginning-position)))
		   (window-start (window-start w))
		   (pos (point-min))
		   type next end)
	       (while (setq pos (text-property-not-all pos (point-max)
						       'gnus-date-type nil))
		 (setq next (or (next-single-property-change pos
							     'gnus-date-type)
				(point-max)))
		 (setq type (get-text-property pos 'gnus-date-type))
		 (when (memq type '(lapsed combined-lapsed user-defined))
		   (article-date-ut type t pos)
		   (setq end (or (next-single-property-change pos
							      'gnus-date-type)
				 (point-max)))
		   (when window-start
		     (if (/= window-start next)
			 (setq window-start nil)
		       (set-window-start w end)))
		   (setq next end))
		 (setq pos next))
	       (goto-char (point-min))
	       (when (> old-column 0)
		 (setq old-line (1- old-line)))
	       (forward-line old-line)
	       (end-of-line)
	       (when (> (current-column) old-column)
		 (beginning-of-line)
		 (forward-char old-column)))))
	 nil 'visible))
      (set-buffer buffer))))