+Mon Jun 14 01:15:59 1999 Lars Magne Ingebrigtsen <larsi@menja.ifi.uio.no>
+
+ * gnus.el: Pterodactyl Gnus v0.87 is released.
+
+1999-06-14 02:46:05 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * mail-source.el (mail-source-fetch-file): Use prescript-delay.
+ (mail-source-run-script): New function.
+ (mail-source-fetch-pop): Use it.
+
+1999-06-13 09:52:11 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * gnus-art.el (gnus-article-setup-highlight-words): Moved here.
+
Sun Jun 13 07:30:40 1999 Lars Magne Ingebrigtsen <larsi@menja.ifi.uio.no>
* gnus.el: Pterodactyl Gnus v0.86 is released.
(defvar article-goto-body-goes-to-point-min-p nil)
(defvar gnus-article-wash-types nil)
+(defvar gnus-article-emphasis-alist nil)
(defvar gnus-article-mime-handle-alist-1 nil)
(defvar gnus-treatment-function-alist
(interactive (gnus-article-hidden-arg))
(unless (gnus-article-check-hidden-text 'emphasis arg)
(save-excursion
- (let ((alist (or gnus-newsgroup-emphasis-alist gnus-emphasis-alist))
+ (let ((alist (or gnus-article-emphasis-alist gnus-emphasis-alist))
(buffer-read-only nil)
(props (append '(article-type emphasis)
gnus-hidden-properties))
(match-beginning visible) (match-end visible) 'face face)
(goto-char (match-end invisible)))))))))
+(defun gnus-article-setup-highlight-words (&optional highlight-words)
+ "Setup newsgroup emphasis alist."
+ (unless gnus-article-emphasis-alist
+ (let ((name (and gnus-newsgroup-name
+ (gnus-group-real-name gnus-newsgroup-name))))
+ (make-local-variable 'gnus-article-emphasis-alist)
+ (setq gnus-article-emphasis-alist
+ (nconc
+ (let ((alist gnus-group-highlight-words-alist) elem highlight)
+ (while (setq elem (pop alist))
+ (when (and name (string-match (car elem) name))
+ (setq alist nil
+ highlight (copy-list (cdr elem)))))
+ highlight)
+ (copy-list highlight-words)
+ (if gnus-newsgroup-name
+ (copy-list (gnus-group-find-parameter
+ gnus-newsgroup-name 'highlight-words t)))
+ gnus-emphasis-alist)))))
+
(defvar gnus-summary-article-menu)
(defvar gnus-summary-post-menu)
(setq gnus-article-buffer name)
(setq gnus-original-article-buffer original)
(gnus-set-global-variables)))
+ (gnus-article-setup-highlight-words)
;; Init original article buffer.
(save-excursion
(set-buffer (gnus-get-buffer-create gnus-original-article-buffer))
(defvar gnus-last-article nil)
(defvar gnus-newsgroup-history nil)
(defvar gnus-newsgroup-charset nil)
-(defvar gnus-newsgroup-emphasis-alist nil)
(defconst gnus-summary-local-variables
'(gnus-newsgroup-name
gnus-cache-removable-articles gnus-newsgroup-cached
gnus-newsgroup-data gnus-newsgroup-data-reverse
gnus-newsgroup-limit gnus-newsgroup-limits
- gnus-newsgroup-charset gnus-newsgroup-emphasis-alist)
+ gnus-newsgroup-charset)
"Variables that are buffer-local to the summary buffers.")
;; Byte-compiler warning.
(gac gnus-article-current)
(reffed gnus-reffed-article-number)
(score-file gnus-current-score-file)
- (default-charset gnus-newsgroup-charset)
- (emphasis-alist gnus-newsgroup-emphasis-alist))
+ (default-charset gnus-newsgroup-charset))
(save-excursion
(set-buffer gnus-group-buffer)
(setq gnus-newsgroup-name name
gnus-original-article-buffer original
gnus-reffed-article-number reffed
gnus-current-score-file score-file
- gnus-newsgroup-charset default-charset
- gnus-newsgroup-emphasis-alist emphasis-alist)
+ gnus-newsgroup-charset default-charset)
;; The article buffer also has local variables.
(when (gnus-buffer-live-p gnus-article-buffer)
(set-buffer gnus-article-buffer)
(setq gnus-newsgroup-unselected nil)
(setq gnus-newsgroup-unreads (gnus-list-of-unread-articles group))
(gnus-summary-setup-default-charset)
- (gnus-summary-setup-highlight-words)
;; Adjust and set lists of article marks.
(when info
(gnus-set-mode-line 'summary)
n))
-;; Added by Shenghuo Zhu <zsh@cs.rochester.edu>
-(defun gnus-summary-setup-highlight-words (&optional highlight-words)
- "Setup newsgroup emphasis alist."
- (let ((name (and gnus-newsgroup-name
- (gnus-group-real-name gnus-newsgroup-name))))
- (setq gnus-newsgroup-emphasis-alist
- (nconc
- (let ((alist gnus-group-highlight-words-alist) elem highlight)
- (while (setq elem (pop alist))
- (when (and name (string-match (car elem) name))
- (setq alist nil
- highlight (copy-list (cdr elem)))))
- highlight)
- (copy-list highlight-words)
- (if gnus-newsgroup-name
- (copy-list (gnus-group-find-parameter
- gnus-newsgroup-name 'highlight-words t)))
- gnus-emphasis-alist))))
-
(gnus-summary-make-all-marking-commands)
(gnus-ems-redefine)
(defvar mail-source-keyword-map
'((file
(:prescript)
+ (:prescript-delay)
(:postscript)
(:path (or (getenv "MAIL")
(concat "/usr/spool/mail/" (user-login-name)))))
(:predicate identity))
(pop
(:prescript)
+ (:prescript-delay)
(:postscript)
(:server (getenv "MAILHOST"))
(:port 110)
(zerop (call-process shell-file-name nil nil nil
shell-command-switch program)))
+(defun mail-source-run-script (script spec &optional delay)
+ (when script
+ (if (and (symbolp script) (fboundp script))
+ (funcall script)
+ (mail-source-call-script
+ (format-spec
+ script spec))))
+ (when delay
+ (sleep-for delay)))
+
(defun mail-source-call-script (script)
(let ((background nil))
(when (string-match "& *$" script)
(defun mail-source-fetch-file (source callback)
"Fetcher for single-file sources."
(mail-source-bind (file source)
- (when prescript
- (if (and (symbolp prescript) (fboundp prescript))
- (funcall prescript)
- (mail-source-call-script
- (format-spec
- prescript (format-spec-make ?t mail-source-crash-box)))))
+ (mail-source-run-script
+ prescript (format-spec-make ?t mail-source-crash-box)
+ prescript-delay)
(let ((mail-source-string (format "file:%s" path)))
(if (mail-source-movemail path mail-source-crash-box)
(prog1
(mail-source-callback callback path)
- (when prescript
- (if (and (symbolp prescript) (fboundp prescript))
- (funcall prescript)
- (mail-source-call-script
- (format-spec
- postscript (format-spec-make ?t mail-source-crash-box))))))
+ (mail-source-run-script
+ postscript (format-spec-make ?t mail-source-crash-box)))
0))))
(defun mail-source-fetch-directory (source callback)
(defun mail-source-fetch-pop (source callback)
"Fetcher for single-file sources."
(mail-source-bind (pop source)
- (when prescript
- (if (and (symbolp prescript)
- (fboundp prescript))
- (funcall prescript)
- (mail-source-call-script
- (format-spec
- prescript (format-spec-make ?p password ?t mail-source-crash-box
- ?s server ?P port ?u user)))))
+ (mail-source-run-script
+ prescript
+ (format-spec-make ?p password ?t mail-source-crash-box
+ ?s server ?P port ?u user)
+ prescript-delay)
(let ((from (format "%s:%s:%s" server user port))
(mail-source-string (format "pop:%s@%s" user server))
result)
(if result
(prog1
(mail-source-callback callback server)
- (when postscript
- (if (and (symbolp postscript)
- (fboundp postscript))
- (funcall postscript)
- (mail-source-call-script
- (format-spec
- postscript (format-spec-make
+ (mail-source-run-script
+ postscript
+ (format-spec-make
?p password ?t mail-source-crash-box
- ?s server ?P port ?u user))))))
+ ?s server ?P port ?u user)))
;; We nix out the password in case the error
;; was because of a wrong password being given.
(setq mail-source-password-cache