From: yamaoka Date: Tue, 26 Dec 2000 02:38:46 +0000 (+0000) Subject: Synch with Oort Gnus. X-Git-Tag: t-gnus-6_15_0-02-quimby~2 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=de3d8f7666167551f9a60d27366eb97cb707fa61;p=elisp%2Fgnus.git- Synch with Oort Gnus. * lisp/gnus.el: Bind `:parameter-type', `:parameter-document', `:function', `:function-document', `:variable', `:variable-document', `:variable-group', `:variable-type' and `:variable-default' for old Emacsen. --- diff --git a/ChangeLog b/ChangeLog index 0599a16..7a65488 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2000-12-26 Katsumi Yamaoka + + * lisp/gnus.el: Bind `:parameter-type', `:parameter-document', + `:function', `:function-document', `:variable', + `:variable-document', `:variable-group', `:variable-type' and + `:variable-default' for old Emacsen. + 2000-12-22 Katsumi Yamaoka * lisp/gnus-vers.el (gnus-revision-number): Increment to 01. diff --git a/Makefile.in b/Makefile.in index d0203cf..8e742d3 100644 --- a/Makefile.in +++ b/Makefile.in @@ -164,7 +164,7 @@ xsome: distclean: clean rm -rf *~ - for i in lisp texi; do (cd $$i; $(MAKE) distclean); done + for i in lisp texi etc; do (cd $$i; $(MAKE) distclean); done rm -f config.log config.status config.cache Makefile config.status: $(srcdir)/configure diff --git a/etc/Makefile.in b/etc/Makefile.in index c71b83f..efee033 100644 --- a/etc/Makefile.in +++ b/etc/Makefile.in @@ -38,6 +38,9 @@ Makefile: $(srcdir)/Makefile.in ../config.status cd .. \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status +distclean: + rm -f *~ Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b60abf2..efd2b1e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,84 @@ +2000-12-25 00:00:00 ShengHuo ZHU + + * dgnushack.el (dgnushack-compile): elc is in the current directory. + + * qp.el (quoted-printable-encode-region): Don't check multibyte in + XEmacs. + +2000-12-25 Lloyd Zusman + + * mml.el (mml-read-tag): Save tag location. + +2000-12-25 Simon Josefsson + + * starttls.el: Sync with Emacs 21. + +2000-12-24 11:00:00 ShengHuo ZHU + + * message.el (message-mail): Support yank-action. + + * message.el (message-setup): Revoke the last change. + +2000-12-24 01:00:00 ShengHuo ZHU + + * message.el (message-setup): Use cons. Suggested by Johan Vromans + . + +2000-12-24 Simon Josefsson + + * mm-bodies.el (mm-decode-content-transfer-encoding): Preserve + mailing list junk at end of part. + +2000-12-23 Simon Josefsson + + * nnimap.el (nnimap-expiry-target): New function. + (nnimap-request-expire-articles): Use it. + +2000-12-22 21:00:00 ShengHuo ZHU + + * gnus.el (gnus-group-parameters-more): New variable. + * gnus-cus.el (gnus-group-customize): Use it. + + * gnus.el (gnus-define-group-parameter): New macro. + (auto-expire): Use it + (total-expire): Use it. + * gnus-art.el (banner): Use it. + + * mml.el (mml-parse): save-excursion. Suggested by Lloyd Zusman + . + +2000-12-22 12:00:00 ShengHuo ZHU + + * gnus-topic.el (gnus-topic-create-topic): Use list. + + * gnus-vm.el (gnus-summary-save-article-vm): Require gnus-art + before binding gnus-default-article-saver. + + * gnus-sum.el (gnus-summary-save-article): + (gnus-summary-pipe-output): + (gnus-summary-save-article-mail): + (gnus-summary-save-article-rmail): + (gnus-summary-save-article-file): + (gnus-summary-write-article-file): + (gnus-summary-save-article-body-file): Ditto. + + * gnus-mh.el (gnus-summary-save-article-folder): Ditto. + +2000-12-22 10:00:00 ShengHuo ZHU + + * gnus-art.el (gnus-mime-security-button-map): + (gnus-mime-button-map): Add parent. + +2000-12-22 09:00:00 ShengHuo ZHU + + * messagexmas.el (message-xmas-redefine): New function. + + * message.el: Use it. + + * gnus-art.el (gnus-article-check-hidden-text): Return t. + + * gnus-util.el (gnus-remove-text-properties-when): Return t. + 2000-12-22 03:00:00 ShengHuo ZHU * mm-decode.el (mm-dissect-multipart): Avoid errors owing to diff --git a/lisp/dgnushack.el b/lisp/dgnushack.el index a0e50c8..e34deae 100644 --- a/lisp/dgnushack.el +++ b/lisp/dgnushack.el @@ -324,7 +324,8 @@ Modify to suit your needs.")) (dolist (file dgnushack-exporting-files) (setq file (expand-file-name file srcdir)) - (when (and (file-exists-p (setq elc (concat file "c"))) + (when (and (file-exists-p + (setq elc (concat (file-name-nondirectory file) "c"))) (file-newer-than-file-p file elc)) (delete-file elc))) @@ -333,7 +334,8 @@ Modify to suit your needs.")) file elc) (while (setq file (pop files)) (setq file (expand-file-name file srcdir)) - (when (or (not (file-exists-p (setq elc (concat file "c")))) + (when (or (not (file-exists-p + (setq elc (concat (file-name-nondirectory file) "c")))) (file-newer-than-file-p file elc)) (ignore-errors (byte-compile-file file)))))) diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index 98bb934..b1286f0 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -260,6 +260,27 @@ For example, :type '(repeat (cons symbol regexp)) :group 'gnus-article-washing) +(gnus-define-group-parameter + banner + :variable-document + "Alist of regexps (to match group names) and banner." + :variable-group gnus-article-washing + :parameter-type + '(choice :tag "Banner" + :value nil + (const :tag "Remove signature" signature) + (symbol :tag "Item in `gnus-article-banner-alist'" none) + regexp + (const :tag "None" nil)) + :parameter-document + "If non-nil, specify how to remove `banners' from articles. + +Symbol `signature' means to remove signatures delimited by +`gnus-signature-separator'. Any other symbol is used to look up a +regular expression to match the banner in `gnus-article-banner-alist'. +A string is used as a regular expression to match the banner +directly.") + (defcustom gnus-emphasis-alist (let ((format "\\(\\s-\\|^\\|[-\"]\\|\\s(\\)\\(%s\\(\\w+\\(\\s-+\\w+\\)*[.,]?\\)%s\\)\\(\\s-\\|[-,;:\"]\\s-\\|[?!.]+\\s-\\|\\s)\\)") @@ -1964,7 +1985,7 @@ always hide." (save-excursion (save-restriction (let ((inhibit-point-motion-hooks t) - (banner (gnus-group-find-parameter gnus-newsgroup-name 'banner)) + (banner (gnus-parameter-banner gnus-newsgroup-name)) (gnus-signature-limit nil) buffer-read-only beg end) (when banner @@ -2188,10 +2209,13 @@ means show, 0 means toggle." (> arg 0)) nil) ((< arg 0) - (gnus-article-show-hidden-text type)) + (gnus-article-show-hidden-text type) + t) (t (if (eq hide 'hidden) - (gnus-article-show-hidden-text type) + (progn + (gnus-article-show-hidden-text type) + t) nil))))))) (defun gnus-article-hidden-text-p (type) @@ -3473,8 +3497,9 @@ value of the variable `gnus-show-mime' is non-nil." (defvar gnus-mime-button-map (let ((map (make-sparse-keymap))) - ;; Not for Emacs 21: fixme better. - ;; (set-keymap-parent map gnus-article-mode-map) + (unless (>= (string-to-number emacs-version) 21) + ;; XEmacs doesn't care. + (set-keymap-parent map gnus-article-mode-map)) (define-key map gnus-mouse-2 'gnus-article-push-button) (define-key map gnus-down-mouse-3 'gnus-mime-button-menu) (dolist (c gnus-mime-button-commands) @@ -5766,8 +5791,8 @@ For example: (defvar gnus-mime-security-button-map (let ((map (make-sparse-keymap))) - ;; Not for Emacs 21: fixme better. - ;;(set-keymap-parent map gnus-article-mode-map) + (unless (>= (string-to-number emacs-version) 21) + (set-keymap-parent map gnus-article-mode-map)) (define-key map gnus-mouse-2 'gnus-article-push-button) (define-key map "\r" 'gnus-article-press-button) map)) diff --git a/lisp/gnus-cus.el b/lisp/gnus-cus.el index 87987e5..4d3aa94 100644 --- a/lisp/gnus-cus.el +++ b/lisp/gnus-cus.el @@ -27,8 +27,10 @@ ;;; Code: (require 'wid-edit) +(require 'gnus) (require 'gnus-score) (require 'gnus-topic) +(require 'gnus-art) ;;; Widgets: @@ -168,29 +170,6 @@ is present and a string, this string will be inserted literally as a `gcc' header (this symbol takes precedence over any default `Gcc' rules as described later).") - (banner (choice :tag "Banner" - :value nil - (const :tag "Remove signature" signature) - (symbol :tag "Item in `gnus-article-banner-alist'" none) - regexp - (const :tag "None" nil)) "\ -If non-nil, specify how to remove `banners' from articles. - -Symbol `signature' means to remove signatures delimited by -`gnus-signature-separator'. Any other symbol is used to look up a -regular expression to match the banner in `gnus-article-banner-alist'. -A string is used as a regular expression to match the banner -directly.") - - (auto-expire (const :tag "Automatic Expire" t) "\ -All articles that are read will be marked as expirable.") - - (total-expire (const :tag "Total Expire" t) "\ -All read articles will be put through the expiry process - -This happens even if they are not marked as expirable. -Use with caution.") - (expiry-wait (choice :tag "Expire Wait" :value never (const never) @@ -327,6 +306,7 @@ DOC is a documentation string for the parameter.") (const :format "" ,(nth 0 entry)) ,(nth 1 entry))) (append gnus-group-parameters + (reverse gnus-group-parameters-more) (if group gnus-extra-group-parameters gnus-extra-topic-parameters))))) diff --git a/lisp/gnus-mh.el b/lisp/gnus-mh.el index 0278d50..35ee140 100644 --- a/lisp/gnus-mh.el +++ b/lisp/gnus-mh.el @@ -50,6 +50,7 @@ If N is a negative number, save the N previous articles. If N is nil and any articles have been marked with the process mark, save those articles instead." (interactive "P") + (require 'gnus-art) (let ((gnus-default-article-saver 'gnus-summary-save-in-folder)) (gnus-summary-save-article arg))) diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index ad7075c..c32c19c 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -9388,6 +9388,7 @@ If N is a negative number, pipe the N previous articles. If N is nil and any articles have been marked with the process mark, pipe those articles instead." (interactive "P") + (require 'gnus-art) (let ((gnus-default-article-saver 'gnus-summary-save-in-pipe)) (gnus-summary-save-article arg t)) (gnus-configure-windows 'pipe)) @@ -9399,6 +9400,7 @@ If N is a negative number, save the N previous articles. If N is nil and any articles have been marked with the process mark, save those articles instead." (interactive "P") + (require 'gnus-art) (let ((gnus-default-article-saver 'gnus-summary-save-in-mail)) (gnus-summary-save-article arg))) @@ -9409,6 +9411,7 @@ If N is a negative number, save the N previous articles. If N is nil and any articles have been marked with the process mark, save those articles instead." (interactive "P") + (require 'gnus-art) (let ((gnus-default-article-saver 'gnus-summary-save-in-rmail)) (gnus-summary-save-article arg))) @@ -9419,6 +9422,7 @@ If N is a negative number, save the N previous articles. If N is nil and any articles have been marked with the process mark, save those articles instead." (interactive "P") + (require 'gnus-art) (let ((gnus-default-article-saver 'gnus-summary-save-in-file)) (gnus-summary-save-article arg))) @@ -9429,6 +9433,7 @@ If N is a negative number, save the N previous articles. If N is nil and any articles have been marked with the process mark, save those articles instead." (interactive "P") + (require 'gnus-art) (let ((gnus-default-article-saver 'gnus-summary-write-to-file)) (gnus-summary-save-article arg))) @@ -9439,6 +9444,7 @@ If N is a negative number, save the N previous articles. If N is nil and any articles have been marked with the process mark, save those articles instead." (interactive "P") + (require 'gnus-art) (let ((gnus-default-article-saver 'gnus-summary-save-body-in-file)) (gnus-summary-save-article arg))) diff --git a/lisp/gnus-topic.el b/lisp/gnus-topic.el index 1181d67..7420265 100644 --- a/lisp/gnus-topic.el +++ b/lisp/gnus-topic.el @@ -1176,7 +1176,7 @@ When used interactively, PARENT will be the topic under point." (unless parent (setq parent (caar gnus-topic-topology))) (let ((top (cdr (gnus-topic-find-topology parent))) - (full-topic (or full-topic `((,topic visible))))) + (full-topic (or full-topic (list (list topic 'visible nil nil))))) (unless top (error "No such parent topic: %s" parent)) (if previous diff --git a/lisp/gnus-util.el b/lisp/gnus-util.el index c94bac7..85ce328 100644 --- a/lisp/gnus-util.el +++ b/lisp/gnus-util.el @@ -1062,7 +1062,8 @@ Entries without port tokens default to DEFAULTPORT." (remove-text-properties start point properties object) (setq start (text-property-any point end property value))) (if start - (remove-text-properties start end properties object)))) + (remove-text-properties start end properties object)) + t)) (provide 'gnus-util) diff --git a/lisp/gnus.el b/lisp/gnus.el index b5b6273..d530de1 100644 --- a/lisp/gnus.el +++ b/lisp/gnus.el @@ -877,6 +877,86 @@ be set in `.emacs' instead." (require 'gnus-util) (require 'nnheader) +(defvar gnus-group-parameters-more nil) + +(condition-case nil + :symbol-for-testing-whether-colon-keyword-is-available-or-not + (void-variable + ;; Bind keywords. + (dolist (keyword '(:parameter-type + :parameter-document :function :function-document + :variable :variable-document :variable-group + :variable-type :variable-default)) + (set keyword keyword)))) + +(defmacro gnus-define-group-parameter (param &rest rest) + "Define a group parameter PARAM. +REST is a plist of following: +:type One of `bool', `list' or `nil'. +:function The name of the function. +:function-document The document of the function. +:parameter-type The type for customizing the parameter. +:parameter-document The document for the parameter. +:variable The name of the variable. +:variable-document The document for the variable. +:variable-group The group for customizing the variable. +:variable-type The type for customizing the variable. +:variable-default The default value of the variable." + (let* ((type (plist-get rest :type)) + (parameter-type (plist-get rest :parameter-type)) + (parameter-document (plist-get rest :parameter-document)) + (function (or (plist-get rest :function) + (intern (format "gnus-parameter-%s" param)))) + (function-document (or (plist-get rest :function-document) "")) + (variable (or (plist-get rest :variable) + (intern (format "gnus-parameter-%s-alist" param)))) + (variable-document (or (plist-get rest :variable-document) "")) + (variable-group (plist-get rest :variable-group)) + (variable-type (or (plist-get rest :variable-type) + `(quote (repeat (list (regexp :tag "Group") + ,parameter-type))))) + (variable-default (plist-get rest :variable-default))) + (list + 'progn + `(defcustom ,variable ,variable-default + ,variable-document + :group 'gnus-group-parameter + :group ',variable-group + :type ,variable-type) + `(setq gnus-group-parameters-more + (delq (assq ',param gnus-group-parameters-more) + gnus-group-parameters-more)) + `(add-to-list 'gnus-group-parameters-more + (list ',param + ,parameter-type + ,parameter-document)) + (if (eq type 'bool) + `(defun ,function (group) + ,function-document + (let ((params (gnus-group-find-parameter group)) + val) + (cond + ((memq ',param params) + t) + ((setq val (assq ',param params)) + (cdr val)) + (,variable + (string-match ,variable group))))) + `(defun ,function (name) + ,function-document + (and name + (or (gnus-group-find-parameter name ',param) + (let ((alist ,variable) + elem value) + (while (setq elem (pop alist)) + (when (and name + (string-match (car elem) name)) + (setq alist nil + value (cdr elem)))) + ,(if type + 'value + '(if (consp value) (car value) value)))))))))) + (defcustom gnus-home-directory "~/" "Directory variable that specifies the \"home\" directory. All other Gnus path variables are initialized from this variable." @@ -1394,23 +1474,48 @@ to be desirable; see the manual for further details." :type '(choice (const nil) integer)) -(defcustom gnus-auto-expirable-newsgroups nil +(gnus-define-group-parameter + auto-expire + :type bool + :function gnus-group-auto-expirable-p + :function-document + "Check whether GROUP is auto-expirable or not." + :variable gnus-auto-expirable-newsgroups + :variable-default nil + :variable-document "*Groups in which to automatically mark read articles as expirable. If non-nil, this should be a regexp that should match all groups in which to perform auto-expiry. This only makes sense for mail groups." - :group 'nnmail-expire - :type '(choice (const nil) - regexp)) - -(defcustom gnus-total-expirable-newsgroups nil - "*Groups in which to perform expiry of all read articles. + :variable-group nnmail-expire + :variable-type '(choice (const nil) + regexp) + :parameter-type '(const :tag "Automatic Expire" t) + :parameter-document + "All articles that are read will be marked as expirable.") + +(gnus-define-group-parameter + total-expire + :type bool + :function gnus-group-total-expirable-p + :function-document + "Check whether GROUP is total-expirable or not." + :variable gnus-total-expirable-newsgroups + :variable-default nil + :variable-document + "*Groups in which to perform expiry of all read articles. Use with extreme caution. All groups that match this regexp will be expiring - which means that all read articles will be deleted after \(say) one week. (This only goes for mail groups and the like, of course.)" - :group 'nnmail-expire - :type '(choice (const nil) - regexp)) + :variable-group nnmail-expire + :variable-type '(choice (const nil) + regexp) + :parameter-type '(const :tag "Total Expire" t) + :parameter-document + "All read articles will be put through the expiry process + +This happens even if they are not marked as expirable. +Use with caution.") (defcustom gnus-group-uncollapsed-levels 1 "Number of group name elements to leave alone when making a short group name." @@ -2335,30 +2440,6 @@ that that variable is buffer-local to the summary buffers." (let ((group (or group gnus-newsgroup-name))) (not (gnus-check-backend-function 'request-replace-article group)))) -(defun gnus-group-total-expirable-p (group) - "Check whether GROUP is total-expirable or not." - (let ((params (gnus-group-find-parameter group)) - val) - (cond - ((memq 'total-expire params) - t) - ((setq val (assq 'total-expire params)) ; (auto-expire . t) - (cdr val)) - (gnus-total-expirable-newsgroups ; Check var. - (string-match gnus-total-expirable-newsgroups group))))) - -(defun gnus-group-auto-expirable-p (group) - "Check whether GROUP is auto-expirable or not." - (let ((params (gnus-group-find-parameter group)) - val) - (cond - ((memq 'auto-expire params) - t) - ((setq val (assq 'auto-expire params)) ; (auto-expire . t) - (cdr val)) - (gnus-auto-expirable-newsgroups ; Check var. - (string-match gnus-auto-expirable-newsgroups group))))) - (defun gnus-virtual-group-p (group) "Say whether GROUP is virtual or not." (memq 'virtual (assoc (symbol-name (car (gnus-find-method-for-group group))) diff --git a/lisp/lpath.el b/lisp/lpath.el index 109c54a..ff93cba 100644 --- a/lisp/lpath.el +++ b/lisp/lpath.el @@ -16,7 +16,7 @@ find-image font-create-object gnus-mule-get-coding-system font-lock-set-defaults image-size image-type-available-p insert-image - make-temp-file + make-temp-file message-xmas-redefine mail-aliases-setup mm-copy-tree mule-write-region-no-coding-system put-image ring-elements diff --git a/lisp/message.el b/lisp/message.el index b9a715a..6d03623 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -4630,13 +4630,20 @@ than 988 characters long, and if they are not, trim them until they are." "Start editing a mail message to be sent. OTHER-HEADERS is an alist of header/value pairs." (interactive) - (let ((message-this-is-mail t)) + (let ((message-this-is-mail t) replybuffer) (unless (message-mail-user-agent) (message-pop-to-buffer (message-buffer-name "mail" to))) + ;; FIXME: message-mail should do something if YANK-ACTION is not + ;; insert-buffer. + (and (consp yank-action) (eq (car yank-action) 'insert-buffer) + (setq replybuffer (nth 1 yank-action))) (message-setup (nconc `((To . ,(or to "")) (Subject . ,(or subject ""))) - (when other-headers other-headers))))) + (when other-headers other-headers)) + replybuffer) + ;; FIXME: Should return nil if failure. + t)) ;;;###autoload (defun message-news (&optional newsgroups subject) @@ -5448,9 +5455,6 @@ which specify the range to operate on." (defalias 'message-exchange-point-and-mark 'exchange-point-and-mark) ;; Support for toolbar -(if (featurep 'xemacs) - (require 'messagexmas)) - (eval-when-compile (defvar tool-bar-map) (defvar tool-bar-mode)) @@ -5754,6 +5758,10 @@ regexp varstr." (mail-strip-quoted-names (message-fetch-field "to"))))) +(when (featurep 'xemacs) + (require 'messagexmas) + (message-xmas-redefine)) + (defun message-save-drafts () "Postponing the message." (interactive) diff --git a/lisp/messagexmas.el b/lisp/messagexmas.el index cf94e54..62f2cd4 100644 --- a/lisp/messagexmas.el +++ b/lisp/messagexmas.el @@ -91,9 +91,6 @@ If it is non-nil, it must be a toolbar. The five valid values are "Exchange point and mark, but allow for XEmacs' optional argument." (exchange-point-and-mark message-xmas-dont-activate-region)) -(defalias 'message-exchange-point-and-mark - 'message-xmas-exchange-point-and-mark) - (defun message-xmas-maybe-fontify () (when (featurep 'font-lock) (font-lock-set-defaults))) @@ -115,12 +112,19 @@ If it is non-nil, it must be a toolbar. The five valid values are (substring table a (+ a n)) (substring table (+ a 26) 255)))) -(when (>= emacs-major-version 20) - (defalias 'message-make-caesar-translation-table - 'message-xmas-make-caesar-translation-table)) - (add-hook 'message-mode-hook 'message-xmas-maybe-fontify) +(defun message-xmas-redefine () + "Redefine message functions for XEmacs." + (defalias 'message-exchange-point-and-mark + 'message-xmas-exchange-point-and-mark) + + (when (>= emacs-major-version 20) + (defalias 'message-make-caesar-translation-table + 'message-xmas-make-caesar-translation-table))) + +(message-xmas-redefine) + (provide 'messagexmas) ;;; messagexmas.el ends here diff --git a/lisp/mm-bodies.el b/lisp/mm-bodies.el index f7440c7..9983a8f 100644 --- a/lisp/mm-bodies.el +++ b/lisp/mm-bodies.el @@ -183,9 +183,8 @@ If no encoding was done, nil is returned." (delete-region (match-beginning 0) (match-end 0))) (goto-char (point-max)) (when (re-search-backward "^[A-Za-z0-9+/]+=*[\t ]*$" nil t) - (forward-line) - (delete-region (point) (point-max))) - (point-max)))) + (forward-line)) + (point)))) ((memq encoding '(7bit 8bit binary)) ;; Do nothing. ) diff --git a/lisp/mml.el b/lisp/mml.el index e406c10..200dea0 100644 --- a/lisp/mml.el +++ b/lisp/mml.el @@ -90,13 +90,14 @@ one charsets.") (defun mml-parse () "Parse the current buffer as an MML document." - (goto-char (point-min)) - (let ((table (syntax-table))) - (unwind-protect - (progn - (set-syntax-table mml-syntax-table) - (mml-parse-1)) - (set-syntax-table table)))) + (save-excursion + (goto-char (point-min)) + (let ((table (syntax-table))) + (unwind-protect + (progn + (set-syntax-table mml-syntax-table) + (mml-parse-1)) + (set-syntax-table table))))) (defun mml-parse-1 () "Parse the current buffer as an MML document." @@ -215,7 +216,8 @@ one charsets.") (defun mml-read-tag () "Read a tag and return the contents." - (let (contents name elem val) + (let ((orig-point (point)) + contents name elem val) (forward-char 2) (setq name (buffer-substring-no-properties (point) (progn (forward-sexp 1) (point)))) @@ -233,6 +235,8 @@ one charsets.") (goto-char (match-end 0)) ;; Don't skip the leading space. ;;(skip-chars-forward " \t\n") + ;; Put the tag location into the returned contents + (setq contents (append (list (cons 'tag-location orig-point)) contents)) (cons (intern name) (nreverse contents)))) (defun mml-read-part (&optional mml) diff --git a/lisp/nnimap.el b/lisp/nnimap.el index b402c3a..2e3e8ea 100644 --- a/lisp/nnimap.el +++ b/lisp/nnimap.el @@ -1100,22 +1100,37 @@ function is generally only called when Gnus is shutting down." (gnus-message 5 "nnimap: Marking article %d for deletion..." imap-current-message)) + +(defun nnimap-expiry-target (arts group server) + (unless (eq nnmail-expiry-target 'delete) + (with-current-buffer nntp-server-buffer + (dolist (art (gnus-uncompress-sequence arts)) + (nnimap-request-article art group server) + ;; hints for optimization in `nnimap-request-accept-article' + (let ((nnimap-current-move-article art) + (nnimap-current-move-group group) + (nnimap-current-move-server server)) + (nnmail-expiry-target-group nnmail-expiry-target group)))))) + ;; Notice that we don't actually delete anything, we just mark them deleted. (deffoo nnimap-request-expire-articles (articles group &optional server force) (let ((artseq (gnus-compress-sequence articles))) (when (and artseq (nnimap-possibly-change-group group server)) (with-current-buffer nnimap-server-buffer (if force - (and (imap-message-flags-add - (imap-range-to-message-set artseq) "\\Deleted") - (setq articles nil)) + (progn + (nnimap-expiry-target artseq group server) + (when (imap-message-flags-add (imap-range-to-message-set artseq) + "\\Deleted") + (setq articles nil))) (let ((days (or (and nnmail-expiry-wait-function (funcall nnmail-expiry-wait-function group)) nnmail-expiry-wait))) (cond ((eq days 'immediate) - (and (imap-message-flags-add - (imap-range-to-message-set artseq) "\\Deleted") - (setq articles nil))) + (nnimap-expiry-target artseq group server) + (when (imap-message-flags-add + (imap-range-to-message-set artseq) "\\Deleted") + (setq articles nil))) ((numberp days) (let ((oldarts (imap-search (format "UID %s NOT SINCE %s" @@ -1123,6 +1138,7 @@ function is generally only called when Gnus is shutting down." (nnimap-date-days-ago days)))) (imap-fetch-data-hook '(nnimap-request-expire-articles-progress))) + (nnimap-expiry-target oldarts group server) (and oldarts (imap-message-flags-add (imap-range-to-message-set diff --git a/lisp/qp.el b/lisp/qp.el index a5993de..3470a9b 100644 --- a/lisp/qp.el +++ b/lisp/qp.el @@ -99,8 +99,8 @@ encode lines starting with \"From\"." (save-restriction (narrow-to-region from to) (mm-with-unibyte-current-buffer-mule4 - ;; Fixme: what should this do in XEmacs/Mule? - (if (fboundp 'find-charset-region) ; else XEmacs, non-Mule + (if (and (not (featurep 'xemacs)) ;; Don't check XEmacs Mule. + (fboundp 'find-charset-region)) (if (delq 'unknown ; Emacs 20 unibyte (delq 'eight-bit-graphic ; Emacs 21 (delq 'eight-bit-control diff --git a/lisp/starttls.el b/lisp/starttls.el index cf6530d..3c65e5d 100644 --- a/lisp/starttls.el +++ b/lisp/starttls.el @@ -4,19 +4,19 @@ ;; Author: Daiki Ueno ;; Created: 1999/11/20 -;; Keywords: TLS, SSL, OpenSSL +;; Keywords: TLS, SSL, OpenSSL, mail, news -;; This file is not part of any package. +;; This file is part of GNU Emacs. -;; This program is free software; you can redistribute it and/or -;; modify it under the terms of the GNU General Public License as -;; published by the Free Software Foundation; either version 2, or (at -;; your option) any later version. +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. -;; This program is distributed in the hope that it will be useful, but -;; WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;; General Public License for more details. +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs; see the file COPYING. If not, write to the @@ -34,14 +34,17 @@ (defgroup starttls nil "Support for `Transport Layer Security' protocol." - :group 'ssl) + :version "21.1" + :group 'mail) (defcustom starttls-program "starttls" "The program to run in a subprocess to open an TLSv1 connection." + :type 'string :group 'starttls) (defcustom starttls-extra-args nil - "Extra arguments to `starttls-program'" + "Extra arguments to `starttls-program'." + :type '(repeat string) :group 'starttls) (defun starttls-negotiate (process) diff --git a/texi/ChangeLog b/texi/ChangeLog index ab30e8d..6583f0b 100644 --- a/texi/ChangeLog +++ b/texi/ChangeLog @@ -1,3 +1,13 @@ +2000-12-22 Christopher Splinter + + * gnus.texi (Group Parameters): Add documentation for the `banner' + group parameter. + +2000-12-22 11:00:00 ShengHuo ZHU + + * gnus.texi (Adaptive Scoring): Use setq by Thomas Seck + . + 2000-12-21 Kai Gro,A_(Bjohann * gnus.texi (Article Washing): Doc addition by Paul Stevenson diff --git a/texi/gnus-ja.texi b/texi/gnus-ja.texi index a49fc8f..4e8f179 100644 --- a/texi/gnus-ja.texi +++ b/texi/gnus-ja.texi @@ -2745,6 +2745,13 @@ form $B$N(B @code{nil} $B$O$=$3$GI>2A$5$l$^$9!#(B (signature "Funky Signature")) @end example +@item banner +@code{(banner . "regex")} $B$N$h$&$J9`L\$O!"5-;v$N$9$Y$F$N>l=j$G@55,I=(B +$B8=(B "regex" $B$K%^%C%A$9$k$b$N$r:o=|$7$^$9!#(B"regex" $B$NBe$o$j$K%7%s%\(B +$B%k(B @code{signature} ($B:G8e$N=pL>$r:o(B +$B=|(B) $B$dO"A[%j%9%H(B @code{gnus-article-banner-alist} $B$N3FMWAG$r;H$&$3$H$b$G(B +$B$-$^$9!#(B + @end table $B%0%k!<%W%Q%i%a!<%?$N=$@5$K$O(B @kbd{G p} $BL?Na$r;H$C$F$/$@$5$$!#%H%T%C%/%Q(B @@ -14047,9 +14054,9 @@ gnus $B%(!<%8%'%s%H$,$=$N5-;v$r(B SPAM $B$@$H8+Pv$7$?$i??!#$3$NH/8+E*$+$b(B diff --git a/texi/gnus.texi b/texi/gnus.texi index 2f75491..1113427 100644 --- a/texi/gnus.texi +++ b/texi/gnus.texi @@ -2710,6 +2710,13 @@ like this in the group parameters: (signature "Funky Signature")) @end example +@item banner +An item like @code{(banner . "regex")} causes any part of an article +that matches the regular expression "regex" to be stripped. Instead of +"regex", you can also use the symbol @code{signature} which strips the +last signature or any of the elements of the alist +@code{gnus-article-banner-alist}. + @end table Use the @kbd{G p} command to edit group parameters of a group. You @@ -14606,7 +14613,7 @@ wherever. (Note: this would have to be at a point *after* @code{gnus-agent} has been loaded via @code{(gnus-agentize)}) @lisp -(defvar gnus-category-predicate-alist +(setq gnus-category-predicate-alist (append gnus-category-predicate-alist '((old . my-article-old-p)))) @end lisp @@ -15995,7 +16002,7 @@ the @code{gnus-default-adaptive-score-alist} variable. For instance, it might look something like this: @lisp -(defvar gnus-default-adaptive-score-alist +(setq gnus-default-adaptive-score-alist '((gnus-unread-mark) (gnus-ticked-mark (from 4)) (gnus-dormant-mark (from 5))