From: yamaoka Date: Mon, 14 Jun 1999 12:07:24 +0000 (+0000) Subject: Sync up with Pterodactyl Gnus v0.87. X-Git-Tag: et-gnus-6_11_02-00~3 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=69ca5712cc59d557aaa76dcda487022b0ae06e5f;p=elisp%2Fgnus.git- Sync up with Pterodactyl Gnus v0.87. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 07c8ed2..218520e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,17 @@ +Mon Jun 14 01:15:59 1999 Lars Magne Ingebrigtsen + + * gnus.el: Pterodactyl Gnus v0.87 is released. + +1999-06-14 02:46:05 Lars Magne Ingebrigtsen + + * 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 + + * gnus-art.el (gnus-article-setup-highlight-words): Moved here. + Sun Jun 13 07:30:40 1999 Lars Magne Ingebrigtsen * gnus.el: Pterodactyl Gnus v0.86 is released. diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index 0ee6058..3e927c5 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -925,6 +925,7 @@ See the manual for details." (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 @@ -2139,7 +2140,7 @@ This format is defined by the `gnus-article-time-format' variable." (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)) @@ -2162,6 +2163,26 @@ This format is defined by the `gnus-article-time-format' variable." (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) @@ -2649,6 +2670,7 @@ commands: (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)) diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index 63a3440..481b2c9 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -1036,7 +1036,6 @@ variable (string, integer, character, etc).") (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 @@ -1070,7 +1069,7 @@ variable (string, integer, character, etc).") 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. @@ -2404,8 +2403,7 @@ marks of articles." (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 @@ -2419,8 +2417,7 @@ marks of articles." 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) @@ -3996,7 +3993,6 @@ If SELECT-ARTICLES, only select those articles from GROUP." (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 @@ -9533,25 +9529,6 @@ returned." (gnus-set-mode-line 'summary) n)) -;; Added by Shenghuo Zhu -(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) diff --git a/lisp/mail-source.el b/lisp/mail-source.el index bb5128b..45ef233 100644 --- a/lisp/mail-source.el +++ b/lisp/mail-source.el @@ -69,6 +69,7 @@ This variable is a list of mail source specifiers." (defvar mail-source-keyword-map '((file (:prescript) + (:prescript-delay) (:postscript) (:path (or (getenv "MAIL") (concat "/usr/spool/mail/" (user-login-name))))) @@ -78,6 +79,7 @@ This variable is a list of mail source specifiers." (:predicate identity)) (pop (:prescript) + (:prescript-delay) (:postscript) (:server (getenv "MAILHOST")) (:port 110) @@ -303,6 +305,16 @@ If ARGS, PROMPT is used as an argument to `format'." (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) @@ -318,22 +330,15 @@ If ARGS, PROMPT is used as an argument to `format'." (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) @@ -352,14 +357,11 @@ If ARGS, PROMPT is used as an argument to `format'." (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) @@ -396,15 +398,11 @@ If ARGS, PROMPT is used as an argument to `format'." (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