Function: gnus-summary-insert-line
gnus-summary-insert-line is an autoloaded and byte-compiled function
defined in gnus-sum.el.gz.
Signature
(gnus-summary-insert-line HEADER LEVEL CURRENT UNDOWNLOADED UNREAD REPLIED EXPIRABLE SUBJECT-OR-NIL &optional DUMMY SCORE PROCESS)
Source Code
;; Defined in /usr/src/emacs/lisp/gnus/gnus-sum.el.gz
(defun gnus-summary-insert-line (header level current undownloaded
unread replied expirable subject-or-nil
&optional dummy score process)
(if (>= level (length gnus-thread-indent-array))
(gnus-make-thread-indent-array (max (* 2 (length gnus-thread-indent-array))
level)))
(let* ((gnus-tmp-header header)
(gnus-tmp-level level)
(gnus-tmp-current current)
(gnus-tmp-unread unread)
(gnus-tmp-expirable expirable)
(gnus-tmp-subject-or-nil subject-or-nil)
(gnus-tmp-dummy dummy)
(gnus-tmp-process process)
(gnus-tmp-indentation (aref gnus-thread-indent-array gnus-tmp-level))
(gnus-tmp-lines (mail-header-lines gnus-tmp-header))
(gnus-tmp-score (or score gnus-summary-default-score 0))
(gnus-tmp-score-char
(if (or (null gnus-summary-default-score)
(<= (abs (- gnus-tmp-score gnus-summary-default-score))
gnus-summary-zcore-fuzz))
? ;Whitespace
(if (< gnus-tmp-score gnus-summary-default-score)
gnus-score-below-mark gnus-score-over-mark)))
(gnus-tmp-number (mail-header-number gnus-tmp-header))
(gnus-tmp-replied
(cond (gnus-tmp-process gnus-process-mark)
((memq gnus-tmp-current gnus-newsgroup-cached)
gnus-cached-mark)
(replied gnus-replied-mark)
((memq gnus-tmp-current gnus-newsgroup-forwarded)
gnus-forwarded-mark)
((memq gnus-tmp-current gnus-newsgroup-saved)
gnus-saved-mark)
((memq gnus-tmp-number gnus-newsgroup-unseen)
gnus-unseen-mark)
(t gnus-no-mark)))
(gnus-tmp-downloaded
(cond (undownloaded
gnus-undownloaded-mark)
(gnus-newsgroup-agentized
gnus-downloaded-mark)
(t
gnus-no-mark)))
(gnus-tmp-from (mail-header-from gnus-tmp-header))
(gnus-tmp-name
(cond
((string-match "<[^>]+> *$" gnus-tmp-from)
(let ((beg (match-beginning 0)))
(or (and (string-match "^\".+\"" gnus-tmp-from)
(substring gnus-tmp-from 1 (1- (match-end 0))))
(substring gnus-tmp-from 0 beg))))
((string-match "(.+)" gnus-tmp-from)
(substring gnus-tmp-from
(1+ (match-beginning 0)) (1- (match-end 0))))
(t gnus-tmp-from)))
(gnus-tmp-subject (mail-header-subject gnus-tmp-header))
(gnus-tmp-opening-bracket
(if gnus-tmp-dummy
gnus-sum-opening-bracket-adopted
gnus-sum-opening-bracket))
(gnus-tmp-closing-bracket
(if gnus-tmp-dummy
gnus-sum-closing-bracket-adopted
gnus-sum-closing-bracket))
(inhibit-read-only t))
(when (string= gnus-tmp-name "")
(setq gnus-tmp-name gnus-tmp-from))
(unless (numberp gnus-tmp-lines)
(setq gnus-tmp-lines -1))
(setq gnus-tmp-lines (if (= gnus-tmp-lines -1)
"?"
(number-to-string gnus-tmp-lines)))
(condition-case ()
(put-text-property
(point)
(progn (eval gnus-summary-line-format-spec t) (point))
'gnus-number gnus-tmp-number)
(error (gnus-message 5 "Error updating the summary line")))
(when (gnus-visual-p 'summary-highlight 'highlight)
(forward-line -1)
(gnus-summary-highlight-line)
(gnus-run-hooks 'gnus-summary-update-hook)
(forward-line 1))))