Merge from gnus--devo--0
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1513
This commit is contained in:
parent
2188975fbf
commit
e3e955fed3
21 changed files with 562 additions and 191 deletions
|
@ -1,8 +1,39 @@
|
|||
2009-01-08 Reiner Steib <Reiner.Steib@gmx.de>
|
||||
|
||||
* message.el (message-fix-before-sending): Amend comment.
|
||||
|
||||
2009-01-07 David Engster <dengste@eml.cc>
|
||||
|
||||
* gnus-msg.el (gnus-inews-do-gcc): Fix last patch to deal with
|
||||
simplified server definitions by converting it via
|
||||
gnus-server-to-method.
|
||||
|
||||
2009-01-06 Katsumi Yamaoka <yamaoka@jpl.org>
|
||||
|
||||
* gnus-sum.el (gnus-summary-set-local-parameters): Always evaluate
|
||||
parameter's operands.
|
||||
|
||||
2009-01-06 David Engster <dengste@eml.cc>
|
||||
|
||||
* gnus-msg.el (gnus-inews-do-gcc): Reduce to short group name when on
|
||||
primary select method (for gnus-group-mark-article-as-read).
|
||||
|
||||
2009-01-06 Tassilo Horn <tassilo@member.fsf.org>
|
||||
|
||||
* gnus-art.el (gnus-treat-display-face): Fix docstring link to point to
|
||||
`(gnus)Face', not `(gnus)X-Face'.
|
||||
|
||||
2009-01-05 Katsumi Yamaoka <yamaoka@jpl.org>
|
||||
|
||||
* mm-util.el (mm-ucs-to-char): New function.
|
||||
|
||||
* mm-url.el (mm-url-decode-entities): Use it.
|
||||
|
||||
2009-01-03 Reiner Steib <Reiner.Steib@gmx.de>
|
||||
|
||||
* message.el (message-fix-before-sending): Add `eight-bit' to
|
||||
illegible-text check.
|
||||
|
||||
2009-01-03 Michael Olson <mwolson@gnu.org>
|
||||
|
||||
* nnimap.el (nnimap-retrieve-headers-progress): Handle edge case where
|
||||
|
@ -11,6 +42,68 @@
|
|||
to the folder.
|
||||
(nnimap-request-article-part): Do not insert `data' if it is nil.
|
||||
|
||||
2009-01-01 Dave Love <fx@gnu.org>
|
||||
|
||||
* nnimap.el (nnimap-find-minmax-uid): Use imap-fetch-safe.
|
||||
|
||||
* nnimap.el: Fix author email.
|
||||
(nnimap-split-rule): Add FIXME comment.
|
||||
(nnimap-debug): Fix doc string.
|
||||
|
||||
2008-12-25 Katsumi Yamaoka <yamaoka@jpl.org>
|
||||
|
||||
* gnus-sum.el (gnus-summary-set-article-display-arrow): Make
|
||||
overlay-arrow-position and overlay-arrow-string buffer-local; no need
|
||||
to check if those variables exist (first appeared in Emacs 18.50).
|
||||
|
||||
2008-12-24 Katsumi Yamaoka <yamaoka@jpl.org>
|
||||
|
||||
* mm-util.el (mm-line-number-at-pos): New function.
|
||||
|
||||
* spam-report.el (spam-report-process-queue): Use it.
|
||||
|
||||
2008-12-24 David Engster <dengste@eml.cc>
|
||||
|
||||
* gnus-sum.el (gnus-summary-set-local-parameters): Don't bind
|
||||
parameters that haven't existed as variables as buffer-local variables.
|
||||
|
||||
2008-12-23 Dave Love <fx@gnu.org>
|
||||
|
||||
* legacy-gnus-agent.el (gnus-agent-unlist-expire-days): Don't use
|
||||
cadar.
|
||||
|
||||
* sieve-manage.el (sieve-manage-starttls-p): Renamed from
|
||||
imap-starttls-p.
|
||||
(sieve-manage-starttls-open): Renamed from imap-starttls-open.
|
||||
|
||||
2008-12-22 Reiner Steib <Reiner.Steib@gmx.de>
|
||||
|
||||
* spam-report.el (spam-report-gmane-max-requests): New constant.
|
||||
(spam-report-gmane-wait): New variable.
|
||||
(spam-report-gmane-ham, spam-report-gmane-spam)
|
||||
(spam-report-url-ping-plain, spam-report-process-queue): Wait only if
|
||||
spam-report-gmane-wait is non-nil should be sufficient to avoid DOS-ing
|
||||
the server.
|
||||
|
||||
* nnheader.el (nnheader-read-timeout, nnheader-accept-process-output):
|
||||
Add explanations.
|
||||
|
||||
* pop3.el (pop3-accept-process-output, pop3-read-timeout): Use
|
||||
nnheader-accept-process-output and nnheader-read-timeout if available.
|
||||
(pop3-movemail): Use it.
|
||||
|
||||
* message.el (message-check-news-body-syntax): Fix signature check if
|
||||
there's an attachment.
|
||||
|
||||
2008-12-21 Katsumi Yamaoka <yamaoka@jpl.org>
|
||||
|
||||
* mm-util.el: Add comments to the mm- emulating functions.
|
||||
|
||||
2008-12-21 Reiner Steib <Reiner.Steib@gmx.de>
|
||||
|
||||
* gnus-start.el (gnus-before-startup-hook): Fix doc string. Reported
|
||||
by Stephen Berman <stephen.berman@gmx.net>.
|
||||
|
||||
2008-12-18 Katsumi Yamaoka <yamaoka@jpl.org>
|
||||
|
||||
* mm-util.el (mm-substring-no-properties): New function.
|
||||
|
@ -23,6 +116,11 @@
|
|||
2008-12-18 Reiner Steib <Reiner.Steib@gmx.de>
|
||||
|
||||
* mml.el (mml-attach-file): Strip text properties from file name.
|
||||
(Bug#1574)
|
||||
|
||||
2008-12-16 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* mm-util.el (mm-charset-override-alist): Declare for compiler.
|
||||
|
||||
2008-12-16 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
|
@ -13136,11 +13234,10 @@
|
|||
|
||||
2004-01-04 Mario Lang <lang@zid.tugraz.at>
|
||||
|
||||
* dns.el: Add support for AAAA records (see RFC 3596)
|
||||
|
||||
* Fix typo PRT -> PTR
|
||||
|
||||
* Parse MX, PTR and SOA replies (see RFC 1035)
|
||||
* dns.el (dns-query-types): Fix typo.
|
||||
(dns-query-types): New function
|
||||
(dns-read-type): Add support for AAAA records, see RFC 3596. Parse MX,
|
||||
PTR and SOA replies, see RFC 1035.
|
||||
|
||||
2004-01-04 Lars Magne Ingebrigtsen <larsi@gnus.org>
|
||||
|
||||
|
|
|
@ -8763,8 +8763,7 @@
|
|||
* sieve-manage.el (sieve-manage-cram-md5-auth): Just send the SASL
|
||||
name (makes it work with recent Cyrus timsieved).
|
||||
|
||||
2002-05-20 Jason Baker <jbaker@cs.utah.edu>
|
||||
Trivial patch.
|
||||
2002-05-20 Jason Baker <jbaker@cs.utah.edu> (tiny change)
|
||||
|
||||
* gnus-art.el (gnus-request-article-this-buffer): Try
|
||||
reconnecting if you don't get the message.
|
||||
|
@ -9189,8 +9188,7 @@
|
|||
|
||||
* nnmaildir.el: Fixed some buggy invocations of nnmaildir--pgname.
|
||||
|
||||
2002-03-31 Andrew Cohen <cohen@andy.bu.edu>
|
||||
Trivial patch.
|
||||
2002-03-31 Andrew Cohen <cohen@andy.bu.edu> (tiny change)
|
||||
|
||||
* dns.el: open-network-stream under XEmacs does udp.
|
||||
|
||||
|
@ -10451,8 +10449,7 @@
|
|||
|
||||
* nnweb.el (nnweb-type-definition): Clean up.
|
||||
|
||||
2002-01-21 Alastair Burt <burt@dfki.de>
|
||||
Trivial patch.
|
||||
2002-01-21 Alastair Burt <burt@dfki.de> (tiny change)
|
||||
|
||||
* gnus-art.el (gnus-mm-display-part): Make sure that the summary
|
||||
buffer exists before jumping to it.
|
||||
|
@ -11088,8 +11085,7 @@
|
|||
|
||||
* gnus.el (gnus-logo-color-alist): Added more colors from Luis.
|
||||
|
||||
2002-01-05 Keiichi Suzuki <keiichi@nanap.org>
|
||||
Trivial patch.
|
||||
2002-01-05 Keiichi Suzuki <keiichi@nanap.org> (tiny change)
|
||||
|
||||
* nntp.el (nntp-possibly-change-group): Erase contents of nntp
|
||||
buffer to get rid of junk line.
|
||||
|
@ -13307,8 +13303,7 @@
|
|||
* gnus-spec.el (gnus-correct-pad-form): Re-revert.
|
||||
(gnus-parse-simple-format): Re-revert.
|
||||
|
||||
2001-09-16 Katsuhiro Hermit Endo <hermit@koka-in.org>
|
||||
Trivial patch.
|
||||
2001-09-16 Katsuhiro Hermit Endo <hermit@koka-in.org> (tiny change)
|
||||
|
||||
* gnus-spec.el (gnus-parse-complex-format): Don't fold search
|
||||
case. (Thanks to Daiki Ueno <ueno@unixuser.org>.)
|
||||
|
@ -14156,8 +14151,7 @@
|
|||
* message.el (message-indent-citation): Quote only lines starting
|
||||
with ">" using `message-yank-cited-prefix'.
|
||||
|
||||
2001-08-05 Nuutti Kotivuori <nuutti.kotivuori@smarttrust.com>
|
||||
Trivial patch.
|
||||
2001-08-05 Nuutti Kotivuori <nuutti.kotivuori@smarttrust.com> (tiny change)
|
||||
|
||||
* gnus-cache.el (gnus-cache-possibly-enter-article): Use
|
||||
gnus-cache-fully-p.
|
||||
|
@ -14926,8 +14920,7 @@
|
|||
* nntp.el (nntp-send-command-nodelete): Ditto.
|
||||
* nntp.el (nntp-send-command-and-decode): Ditto.
|
||||
|
||||
2001-06-30 YAGI Tatsuya <yagi@is.titech.ac.jp>
|
||||
Trivial patch.
|
||||
2001-06-30 YAGI Tatsuya <yagi@is.titech.ac.jp> (tiny change)
|
||||
|
||||
* gnus-start.el (gnus-check-first-time-used): Use `if' instead of
|
||||
`when'.
|
||||
|
@ -15646,8 +15639,7 @@
|
|||
|
||||
* message.el (message-generate-headers-first): Update doc.
|
||||
|
||||
2001-03-10 Matthias Wiehl <mwiehl@gmx.de>
|
||||
Trivial patch.
|
||||
2001-03-10 Matthias Wiehl <mwiehl@gmx.de> (tiny change)
|
||||
|
||||
* gnus.el (gnus-summary-line-format): Typo.
|
||||
|
||||
|
@ -16021,8 +16013,7 @@
|
|||
* message.el (message-cancel-news): Allow to shoot foot.
|
||||
(message-supersede): Ditto.
|
||||
|
||||
2001-02-08 Tommi Vainikainen <thv@iki.fi>
|
||||
Trivial patch.
|
||||
2001-02-08 Tommi Vainikainen <thv@iki.fi> (tiny change)
|
||||
|
||||
* gnus-sum.el (gnus-simplify-subject-re): Use
|
||||
message-subject-re-regexp.
|
||||
|
@ -16487,8 +16478,7 @@
|
|||
|
||||
* time-date.el (time-to-number-of-days): New function.
|
||||
|
||||
2001-01-04 11:06:14 Gregory Chernov <greg@visiontech-dml.com>
|
||||
Trivial patch.
|
||||
2001-01-04 11:06:14 Gregory Chernov <greg@visiontech-dml.com> (tiny change)
|
||||
|
||||
* nnslashdot.el (nnslashdot-request-list): Always get the right
|
||||
sid.
|
||||
|
@ -16645,8 +16635,7 @@
|
|||
(gnus-uu-mark-by-regexp): Use it.
|
||||
(gnus-new-processable): New function.
|
||||
|
||||
2000-12-28 19:21:57 Inge Frick <inge@nada.kth.se>
|
||||
Trivial patch.
|
||||
2000-12-28 19:21:57 Inge Frick <inge@nada.kth.se> (tiny change)
|
||||
|
||||
* gnus-sum.el (gnus-no-mark): New variable.
|
||||
|
||||
|
@ -16665,8 +16654,7 @@
|
|||
* qp.el (quoted-printable-encode-region): Don't check multibyte in
|
||||
XEmacs.
|
||||
|
||||
2000-12-25 Lloyd Zusman <ljz@asfast.com>
|
||||
Trivial patch.
|
||||
2000-12-25 Lloyd Zusman <ljz@asfast.com> (tiny change)
|
||||
|
||||
* mml.el (mml-read-tag): Save tag location.
|
||||
|
||||
|
@ -18370,8 +18358,7 @@
|
|||
(nnultimate-table-regexp): New variable.
|
||||
(nnultimate-forum-table-p): Use it.
|
||||
|
||||
2000-10-30 Ed L Cashin <ecashin@coe.uga.edu>
|
||||
Trivial patch.
|
||||
2000-10-30 Ed L Cashin <ecashin@coe.uga.edu> (tiny change)
|
||||
|
||||
* gnus-sum.el (gnus-summary-expire-articles): Save point.
|
||||
|
||||
|
|
|
@ -1677,6 +1677,11 @@ this is a reply."
|
|||
group method t t))))
|
||||
(gnus-message 1 "Couldn't store article in group %s: %s"
|
||||
group (gnus-status-message method)))
|
||||
(when (stringp method)
|
||||
(setq method (gnus-server-to-method method)))
|
||||
(when (and (listp method)
|
||||
(gnus-native-method-p method))
|
||||
(setq group (gnus-group-short-name group)))
|
||||
(when (and group-art
|
||||
;; FIXME: Should gcc-mark-as-read work when
|
||||
;; Gnus is not running?
|
||||
|
|
|
@ -392,7 +392,7 @@ This hook is called after Gnus is connected to the NNTP server."
|
|||
:type 'hook)
|
||||
|
||||
(defcustom gnus-before-startup-hook nil
|
||||
"A hook called at before startup.
|
||||
"A hook called before startup.
|
||||
This hook is called as the first thing when Gnus is started."
|
||||
:group 'gnus-start
|
||||
:type 'hook)
|
||||
|
|
|
@ -3455,9 +3455,9 @@ display only a single character."
|
|||
|
||||
(defun gnus-summary-set-article-display-arrow (pos)
|
||||
"Update the overlay arrow to point to line at position POS."
|
||||
(when (and gnus-summary-display-arrow
|
||||
(boundp 'overlay-arrow-position)
|
||||
(boundp 'overlay-arrow-string))
|
||||
(when gnus-summary-display-arrow
|
||||
(make-local-variable 'overlay-arrow-position)
|
||||
(make-local-variable 'overlay-arrow-string)
|
||||
(save-excursion
|
||||
(goto-char pos)
|
||||
(beginning-of-line)
|
||||
|
@ -3832,10 +3832,15 @@ This function is intended to be used in
|
|||
(consp (cdr elem)) ; The cdr has to be a list.
|
||||
(symbolp (car elem)) ; Has to be a symbol in there.
|
||||
(not (memq (car elem) vars))
|
||||
(ignore-errors ; So we set it.
|
||||
(ignore-errors
|
||||
(push (car elem) vars)
|
||||
(make-local-variable (car elem))
|
||||
(set (car elem) (eval (nth 1 elem))))))))
|
||||
;; Variables like `gnus-show-threads' that are globally
|
||||
;; bound, if used as group parameters, need to get to be
|
||||
;; buffer-local, whereas just parameters like `gcc-self',
|
||||
;; `timestamp', etc. should not be bound as variables.
|
||||
(if (boundp (car elem))
|
||||
(set (make-local-variable (car elem)) (eval (nth 1 elem)))
|
||||
(eval (nth 1 elem))))))))
|
||||
|
||||
(defun gnus-summary-read-group (group &optional show-all no-article
|
||||
kill-buffer no-display backward
|
||||
|
|
|
@ -186,7 +186,7 @@ converted to the compressed format."
|
|||
(when (eq 0 (string-match
|
||||
(caar days)
|
||||
group))
|
||||
(throw 'found (cadar days)))
|
||||
(throw 'found (cadr (car days))))
|
||||
(setq days (cdr days)))
|
||||
nil)))
|
||||
(when day
|
||||
|
|
|
@ -2395,6 +2395,8 @@ Return the number of headers removed."
|
|||
(point-max)))
|
||||
(goto-char (point-min)))
|
||||
|
||||
;; FIXME: clarify diffference: message-narrow-to-head,
|
||||
;; message-narrow-to-headers-or-head, message-narrow-to-headers
|
||||
(defun message-narrow-to-head ()
|
||||
"Narrow the buffer to the head of the message.
|
||||
Point is left at the beginning of the narrowed-to region."
|
||||
|
@ -4140,6 +4142,8 @@ conformance."
|
|||
(and (mm-multibyte-p)
|
||||
(memq (char-charset char)
|
||||
'(eight-bit-control eight-bit-graphic
|
||||
;; Emacs 23, Bug#1770:
|
||||
eight-bit
|
||||
control-1))
|
||||
(not (get-text-property
|
||||
(point) 'untranslated-utf-8))))
|
||||
|
@ -4166,10 +4170,13 @@ conformance."
|
|||
(or (< (mm-char-int char) 128)
|
||||
(and (mm-multibyte-p)
|
||||
;; FIXME: Wrong for Emacs 23 (unicode) and for
|
||||
;; things like undecable utf-8. Should at least
|
||||
;; use find-coding-systems-region.
|
||||
;; things like undecodable utf-8 (in Emacs 21?).
|
||||
;; Should at least use find-coding-systems-region.
|
||||
;; -- fx
|
||||
(memq (char-charset char)
|
||||
'(eight-bit-control eight-bit-graphic
|
||||
;; Emacs 23, Bug#1770:
|
||||
eight-bit
|
||||
control-1))
|
||||
(not (get-text-property
|
||||
(point) 'untranslated-utf-8)))))
|
||||
|
@ -5119,17 +5126,24 @@ Otherwise, generate and save a value for `canlock-password' first."
|
|||
nil)))
|
||||
;; Check the length of the signature.
|
||||
(message-check 'signature
|
||||
(goto-char (point-max))
|
||||
(if (not (re-search-backward message-signature-separator nil t))
|
||||
t
|
||||
(if (>= (count-lines (1+ (point-at-eol)) (point-max)) 5)
|
||||
(if (message-gnksa-enable-p 'signature)
|
||||
(y-or-n-p
|
||||
(format "Signature is excessively long (%d lines). Really post? "
|
||||
(count-lines (1+ (point-at-eol)) (point-max))))
|
||||
(message "Denied posting -- Excessive signature.")
|
||||
nil)
|
||||
t)))
|
||||
(let (sig-start sig-end)
|
||||
(goto-char (point-max))
|
||||
(if (not (re-search-backward message-signature-separator nil t))
|
||||
t
|
||||
(setq sig-start (1+ (point-at-eol)))
|
||||
(setq sig-end
|
||||
(if (re-search-forward
|
||||
"<#/?\\(multipart\\|part\\|external\\|mml\\)" nil t)
|
||||
(- (point-at-bol) 1)
|
||||
(point-max)))
|
||||
(if (>= (count-lines sig-start sig-end) 5)
|
||||
(if (message-gnksa-enable-p 'signature)
|
||||
(y-or-n-p
|
||||
(format "Signature is excessively long (%d lines). Really post? "
|
||||
(count-lines sig-start sig-end)))
|
||||
(message "Denied posting -- Excessive signature.")
|
||||
nil)
|
||||
t))))
|
||||
;; Ensure that text follows last quoted portion.
|
||||
(message-check 'quoting-style
|
||||
(goto-char (point-max))
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
;;; mm-url.el --- a wrapper of url functions/commands for Gnus
|
||||
|
||||
;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
|
||||
;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
|
||||
;; Free Software Foundation, Inc.
|
||||
|
||||
;; Author: Shenghuo Zhu <zsh@cs.rochester.edu>
|
||||
|
||||
|
@ -366,10 +367,10 @@ If FOLLOW-REFRESH is non-nil, redirect refresh url in META."
|
|||
(goto-char (point-min))
|
||||
(while (re-search-forward "&\\(#[0-9]+\\|[a-z]+[0-9]*\\);" nil t)
|
||||
(let ((elem (if (eq (aref (match-string 1) 0) ?\#)
|
||||
(let ((c
|
||||
(string-to-number (substring
|
||||
(match-string 1) 1))))
|
||||
(if (mm-char-or-char-int-p c) c 32))
|
||||
(let ((c (mm-ucs-to-char
|
||||
(string-to-number
|
||||
(substring (match-string 1) 1)))))
|
||||
(if (mm-char-or-char-int-p c) c ?#))
|
||||
(or (cdr (assq (intern (match-string 1))
|
||||
mm-url-html-entities))
|
||||
?#))))
|
||||
|
|
|
@ -40,6 +40,10 @@
|
|||
|
||||
(defvar mm-mime-mule-charset-alist )
|
||||
|
||||
;; Emulate functions that are not available in every (X)Emacs version.
|
||||
;; The name of a function is prefixed with mm-, like `mm-char-int' for
|
||||
;; `char-int' that is a native XEmacs function, not available in Emacs.
|
||||
;; Gnus programs all should use mm- functions, not the original ones.
|
||||
(eval-and-compile
|
||||
(mapc
|
||||
(lambda (elem)
|
||||
|
@ -47,11 +51,19 @@
|
|||
(if (fboundp (car elem))
|
||||
(defalias nfunc (car elem))
|
||||
(defalias nfunc (cdr elem)))))
|
||||
`((coding-system-list . ignore)
|
||||
`(;; `coding-system-list' is not available in XEmacs 21.4 built
|
||||
;; without the `file-coding' feature.
|
||||
(coding-system-list . ignore)
|
||||
;; `char-int' is an XEmacs function, not available in Emacs.
|
||||
(char-int . identity)
|
||||
;; `coding-system-equal' is an Emacs function, not available in XEmacs.
|
||||
(coding-system-equal . equal)
|
||||
;; `annotationp' is an XEmacs function, not available in Emacs.
|
||||
(annotationp . ignore)
|
||||
;; `set-buffer-file-coding-system' is not available in XEmacs 21.4
|
||||
;; built without the `file-coding' feature.
|
||||
(set-buffer-file-coding-system . ignore)
|
||||
;; `read-charset' is an Emacs function, not available in XEmacs.
|
||||
(read-charset
|
||||
. ,(lambda (prompt)
|
||||
"Return a charset."
|
||||
|
@ -61,6 +73,7 @@
|
|||
(mapcar (lambda (e) (list (symbol-name (car e))))
|
||||
mm-mime-mule-charset-alist)
|
||||
nil t))))
|
||||
;; `subst-char-in-string' is not available in XEmacs 21.4.
|
||||
(subst-char-in-string
|
||||
. ,(lambda (from to string &optional inplace)
|
||||
;; stolen (and renamed) from nnheader.el
|
||||
|
@ -75,11 +88,14 @@
|
|||
(aset string idx to))
|
||||
(setq idx (1+ idx)))
|
||||
string)))
|
||||
;; `replace-in-string' is an XEmacs function, not available in Emacs.
|
||||
(replace-in-string
|
||||
. ,(lambda (string regexp rep &optional literal)
|
||||
"See `replace-regexp-in-string', only the order of args differs."
|
||||
(replace-regexp-in-string regexp rep string nil literal)))
|
||||
;; `string-as-unibyte' is an Emacs function, not available in XEmacs.
|
||||
(string-as-unibyte . identity)
|
||||
;; `string-make-unibyte' is an Emacs function, not available in XEmacs.
|
||||
(string-make-unibyte . identity)
|
||||
;; string-as-multibyte often doesn't really do what you think it does.
|
||||
;; Example:
|
||||
|
@ -99,11 +115,18 @@
|
|||
;; (string-as-multibyte s) ~= (decode-coding-string s 'emacs-mule)
|
||||
;; (string-to-multibyte s) ~= (decode-coding-string s 'binary)
|
||||
;; (string-make-multibyte s) ~= (decode-coding-string s locale-coding-system)
|
||||
;; `string-as-multibyte' is an Emacs function, not available in XEmacs.
|
||||
(string-as-multibyte . identity)
|
||||
;; `multibyte-string-p' is an Emacs function, not available in XEmacs.
|
||||
(multibyte-string-p . ignore)
|
||||
;; `insert-byte' is available only in Emacs 23.1 or greater.
|
||||
(insert-byte . insert-char)
|
||||
;; `multibyte-char-to-unibyte' is an Emacs function, not available
|
||||
;; in XEmacs.
|
||||
(multibyte-char-to-unibyte . identity)
|
||||
;; `set-buffer-multibyte' is an Emacs function, not available in XEmacs.
|
||||
(set-buffer-multibyte . ignore)
|
||||
;; `special-display-p' is an Emacs function, not available in XEmacs.
|
||||
(special-display-p
|
||||
. ,(lambda (buffer-name)
|
||||
"Returns non-nil if a buffer named BUFFER-NAME gets a special frame."
|
||||
|
@ -119,6 +142,7 @@
|
|||
(stringp (car elem))
|
||||
(string-match (car elem) buffer-name)
|
||||
(throw 'return (cdr elem)))))))))
|
||||
;; `substring-no-properties' is available only in Emacs 22.1 or greater.
|
||||
(substring-no-properties
|
||||
. ,(lambda (string &optional from to)
|
||||
"Return a substring of STRING, without text properties.
|
||||
|
@ -130,12 +154,30 @@ If FROM or TO is negative, it counts from the end.
|
|||
With one argument, just copy STRING without its properties."
|
||||
(setq string (substring string (or from 0) to))
|
||||
(set-text-properties 0 (length string) nil string)
|
||||
string)))))
|
||||
string))
|
||||
;; `line-number-at-pos' is available only in Emacs 22.1 or greater
|
||||
;; and XEmacs 21.5.
|
||||
(line-number-at-pos
|
||||
. ,(lambda (&optional pos)
|
||||
"Return (narrowed) buffer line number at position POS.
|
||||
If POS is nil, use current buffer location.
|
||||
Counting starts at (point-min), so the value refers
|
||||
to the contents of the accessible portion of the buffer."
|
||||
(let ((opoint (or pos (point))) start)
|
||||
(save-excursion
|
||||
(goto-char (point-min))
|
||||
(setq start (point))
|
||||
(goto-char opoint)
|
||||
(forward-line 0)
|
||||
(1+ (count-lines start (point))))))))))
|
||||
|
||||
;; `decode-coding-string', `encode-coding-string', `decode-coding-region'
|
||||
;; and `encode-coding-region' are available in Emacs and XEmacs built with
|
||||
;; the `file-coding' feature, but the XEmacs versions treat nil, that is
|
||||
;; given as the `coding-system' argument, as the `binary' coding system.
|
||||
(eval-and-compile
|
||||
(if (featurep 'xemacs)
|
||||
(if (featurep 'file-coding)
|
||||
;; Don't modify string if CODING-SYSTEM is nil.
|
||||
(progn
|
||||
(defun mm-decode-coding-string (str coding-system)
|
||||
(if coding-system
|
||||
|
@ -160,6 +202,7 @@ With one argument, just copy STRING without its properties."
|
|||
(defalias 'mm-decode-coding-region 'decode-coding-region)
|
||||
(defalias 'mm-encode-coding-region 'encode-coding-region)))
|
||||
|
||||
;; `string-to-multibyte' is available only in Emacs 22.1 or greater.
|
||||
(defalias 'mm-string-to-multibyte
|
||||
(cond
|
||||
((featurep 'xemacs)
|
||||
|
@ -173,6 +216,7 @@ With one argument, just copy STRING without its properties."
|
|||
(lambda (ch) (mm-string-as-multibyte (char-to-string ch)))
|
||||
string "")))))
|
||||
|
||||
;; `char-or-char-int-p' is an XEmacs function, not available in Emacs.
|
||||
(eval-and-compile
|
||||
(defalias 'mm-char-or-char-int-p
|
||||
(cond
|
||||
|
@ -180,6 +224,44 @@ With one argument, just copy STRING without its properties."
|
|||
((fboundp 'char-valid-p) 'char-valid-p)
|
||||
(t 'identity))))
|
||||
|
||||
;; `ucs-to-char' is a function that Mule-UCS provides.
|
||||
(if (featurep 'xemacs)
|
||||
(cond ((and (fboundp 'unicode-to-char) ;; XEmacs 21.5.
|
||||
(subrp (symbol-function 'unicode-to-char)))
|
||||
(if (featurep 'mule)
|
||||
(defalias 'mm-ucs-to-char 'unicode-to-char)
|
||||
(defun mm-ucs-to-char (codepoint)
|
||||
"Convert Unicode codepoint to character."
|
||||
(or (unicode-to-char codepoint) ?#))))
|
||||
((featurep 'mule)
|
||||
(defun mm-ucs-to-char (codepoint)
|
||||
"Convert Unicode codepoint to character."
|
||||
(if (fboundp 'ucs-to-char) ;; Mule-UCS is loaded.
|
||||
(progn
|
||||
(defalias 'mm-ucs-to-char
|
||||
(lambda (codepoint)
|
||||
"Convert Unicode codepoint to character."
|
||||
(condition-case nil
|
||||
(or (ucs-to-char codepoint) ?#)
|
||||
(error ?#))))
|
||||
(mm-ucs-to-char codepoint))
|
||||
(condition-case nil
|
||||
(or (int-to-char codepoint) ?#)
|
||||
(error ?#)))))
|
||||
(t
|
||||
(defun mm-ucs-to-char (codepoint)
|
||||
"Convert Unicode codepoint to character."
|
||||
(condition-case nil
|
||||
(or (int-to-char codepoint) ?#)
|
||||
(error ?#)))))
|
||||
(if (let ((char (make-char 'japanese-jisx0208 36 34)))
|
||||
(eq char (decode-char 'ucs char)))
|
||||
;; Emacs 23.
|
||||
(defalias 'mm-ucs-to-char 'identity)
|
||||
(defun mm-ucs-to-char (codepoint)
|
||||
"Convert Unicode codepoint to character."
|
||||
(or (decode-char 'ucs codepoint) ?#))))
|
||||
|
||||
;; Fixme: This seems always to be used to read a MIME charset, so it
|
||||
;; should be re-named and fixed (in Emacs) to offer completion only on
|
||||
;; proper charset names (base coding systems which have a
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
|
||||
;; 2007, 2008, 2009 Free Software Foundation, Inc.
|
||||
|
||||
;; Author: Sascha Ldecke <sascha@meta-x.de>,
|
||||
;; Author: Sascha Lüdecke <sascha@meta-x.de>,
|
||||
;; Simon Josefsson <simon@josefsson.org> (Mailcrypt interface, Gnus glue)
|
||||
;; Keywords PGP
|
||||
|
||||
|
|
|
@ -86,7 +86,14 @@ Integer values will in effect be rounded up to the nearest multiple of
|
|||
;; what's possible. Perhaps better, maybe the Windows/DOS primitive
|
||||
;; could round up non-zero timeouts to a minimum of 1.0?
|
||||
1.0
|
||||
;; 2008-05-19 change by Larsi:
|
||||
;; Change the default timeout from 0.1 seconds to 0.01 seconds. This will
|
||||
;; make nntp and pop3 article retrieval faster in some cases, but might
|
||||
;; make CPU usage larger. If this has any bad side effects, we might
|
||||
;; revert this change.
|
||||
0.01)
|
||||
;; When changing this variable, consider changing `pop3-read-timeout' as
|
||||
;; well.
|
||||
"How long nntp should wait between checking for the end of output.
|
||||
Shorter values mean quicker response, but are more CPU intensive.")
|
||||
|
||||
|
@ -1057,6 +1064,8 @@ See `find-file-noselect' for the arguments."
|
|||
(defalias 'nnheader-cancel-timer 'cancel-timer)
|
||||
(defalias 'nnheader-cancel-function-timers 'cancel-function-timers)
|
||||
|
||||
;; When changing this function, consider changing `pop3-accept-process-output'
|
||||
;; as well.
|
||||
(defun nnheader-accept-process-output (process)
|
||||
(accept-process-output
|
||||
process
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
|
||||
;; 2007, 2008, 2009 Free Software Foundation, Inc.
|
||||
|
||||
;; Author: Simon Josefsson <jas@pdc.kth.se>
|
||||
;; Author: Simon Josefsson <simon@josefsson.org>
|
||||
;; Jim Radford <radford@robby.caltech.edu>
|
||||
;; Keywords: mail
|
||||
|
||||
|
@ -163,6 +163,8 @@ the inbox string is also a regexp. The actual splitting rules are as
|
|||
before, either a function, or a list with group/regexp or
|
||||
group/function elements."
|
||||
:group 'nnimap
|
||||
;; FIXME: Doesn't allow `("my2server" ("INBOX" nnimap-split-fancy))'
|
||||
;; per example above. -- fx
|
||||
:type '(choice :tag "Rule type"
|
||||
(repeat :menu-tag "Single-server"
|
||||
:tag "Single-server list"
|
||||
|
@ -460,11 +462,17 @@ An example plist would be '(\"name\" \"Gnus\" \"version\" gnus-version-number
|
|||
(plist :key-type string :value-type string)))
|
||||
|
||||
(defcustom nnimap-debug nil
|
||||
"If non-nil, random debug spews are placed in *nnimap-debug* buffer.
|
||||
"If non-nil, trace nnimap- functions into `nnimap-debug-buffer'.
|
||||
Uses `trace-function-background', so you can turn it off with,
|
||||
say, `untrace-all'.
|
||||
|
||||
Note that username, passwords and other privacy sensitive
|
||||
information (such as e-mail) may be stored in the *nnimap-debug*
|
||||
buffer. It is not written to disk, however. Do not enable this
|
||||
variable unless you are comfortable with that."
|
||||
information (such as e-mail) may be stored in the buffer.
|
||||
It is not written to disk, however. Do not enable this
|
||||
variable unless you are comfortable with that.
|
||||
|
||||
This variable only takes effect when loading the `nnimap' library.
|
||||
See also `nnimap-log'."
|
||||
:group 'nnimap
|
||||
:type 'boolean)
|
||||
|
||||
|
@ -555,8 +563,7 @@ If EXAMINE is non-nil the group is selected read-only."
|
|||
(imap-mailbox-select group examine))
|
||||
(let (minuid maxuid)
|
||||
(when (> (imap-mailbox-get 'exists) 0)
|
||||
(imap-fetch (if imap-enable-exchange-bug-workaround "1,*:*" "1,*")
|
||||
"UID" nil 'nouidfetch)
|
||||
(imap-fetch-safe '("1,*" . "1,*:*") "UID" nil 'nouidfetch)
|
||||
(imap-message-map (lambda (uid Uid)
|
||||
(setq minuid (if minuid (min minuid uid) uid)
|
||||
maxuid (if maxuid (max maxuid uid) uid)))
|
||||
|
|
|
@ -105,33 +105,28 @@ Used for APOP authentication.")
|
|||
(defvar pop3-read-point nil)
|
||||
(defvar pop3-debug nil)
|
||||
|
||||
;; Borrowed from nnheader-accept-process-output in nnheader.el.
|
||||
(defvar pop3-read-timeout
|
||||
(if (string-match "windows-nt\\|os/2\\|emx\\|cygwin"
|
||||
(symbol-name system-type))
|
||||
;; http://thread.gmane.org/v9655t3pjo.fsf@marauder.physik.uni-ulm.de
|
||||
;;
|
||||
;; IIRC, values lower than 1.0 didn't/don't work on Windows/DOS.
|
||||
;;
|
||||
;; There should probably be a runtime test to determine the timing
|
||||
;; resolution, or a primitive to report it. I don't know off-hand
|
||||
;; what's possible. Perhaps better, maybe the Windows/DOS primitive
|
||||
;; could round up non-zero timeouts to a minimum of 1.0?
|
||||
1.0
|
||||
0.1)
|
||||
"How long pop3 should wait between checking for the end of output.
|
||||
;; Borrowed from nnheader-accept-process-output in nnheader.el. See the
|
||||
;; comments there for explanations about the values.
|
||||
|
||||
(eval-and-compile
|
||||
(if (and (fboundp 'nnheader-accept-process-output)
|
||||
(boundp 'nnheader-read-timeout))
|
||||
(defalias 'pop3-accept-process-output 'nnheader-accept-process-output)
|
||||
;; Borrowed from `nnheader.el':
|
||||
(defvar pop3-read-timeout
|
||||
(if (string-match "windows-nt\\|os/2\\|emx\\|cygwin"
|
||||
(symbol-name system-type))
|
||||
1.0
|
||||
0.01)
|
||||
"How long pop3 should wait between checking for the end of output.
|
||||
Shorter values mean quicker response, but are more CPU intensive.")
|
||||
|
||||
;; Borrowed from nnheader-accept-process-output in nnheader.el.
|
||||
(defun pop3-accept-process-output (process)
|
||||
(accept-process-output
|
||||
process
|
||||
(truncate pop3-read-timeout)
|
||||
(truncate (* (- pop3-read-timeout
|
||||
(truncate pop3-read-timeout))
|
||||
1000))))
|
||||
|
||||
(autoload 'nnheader-accept-process-output "nnheader")
|
||||
(defun pop3-accept-process-output (process)
|
||||
(accept-process-output
|
||||
process
|
||||
(truncate pop3-read-timeout)
|
||||
(truncate (* (- pop3-read-timeout
|
||||
(truncate pop3-read-timeout))
|
||||
1000))))))
|
||||
|
||||
(defun pop3-movemail (&optional crashbox)
|
||||
"Transfer contents of a maildrop to the specified CRASHBOX."
|
||||
|
@ -171,7 +166,7 @@ Shorter values mean quicker response, but are more CPU intensive.")
|
|||
(unless pop3-leave-mail-on-server
|
||||
(pop3-dele process n))
|
||||
(setq n (+ 1 n))
|
||||
(nnheader-accept-process-output process))
|
||||
(pop3-accept-process-output process))
|
||||
(when (and pop3-leave-mail-on-server
|
||||
(> n 1))
|
||||
(message "pop3.el doesn't support UIDL. Setting `pop3-leave-mail-on-server'
|
||||
|
|
|
@ -304,15 +304,14 @@ Returns t if login was successful, nil otherwise."
|
|||
(when (memq (process-status process) '(open run))
|
||||
process))))
|
||||
|
||||
(defun imap-starttls-p (buffer)
|
||||
;; (and (imap-capability 'STARTTLS buffer)
|
||||
(defun sieve-manage-starttls-p (buffer)
|
||||
(condition-case ()
|
||||
(progn
|
||||
(require 'starttls)
|
||||
(call-process "starttls"))
|
||||
(error nil)))
|
||||
|
||||
(defun imap-starttls-open (name buffer server port)
|
||||
(defun sieve-manage-starttls-open (name buffer server port)
|
||||
(let* ((port (or port sieve-manage-default-port))
|
||||
(coding-system-for-read sieve-manage-coding-system-for-read)
|
||||
(coding-system-for-write sieve-manage-coding-system-for-write)
|
||||
|
|
|
@ -117,17 +117,33 @@ Reports is as ham when HAM is set."
|
|||
"Report an article as ham by resending via email."
|
||||
(spam-report-resend articles t))
|
||||
|
||||
(defconst spam-report-gmane-max-requests 4
|
||||
"Number of reports to send before waiting for a response.")
|
||||
|
||||
(defvar spam-report-gmane-wait nil
|
||||
"When non-nil, wait until we get a server response.
|
||||
This makes sure we don't DOS the host, if many reports are
|
||||
submitted at once. Internal variable.")
|
||||
|
||||
(defun spam-report-gmane-ham (&rest articles)
|
||||
"Report ARTICLES as ham (unregister) through Gmane."
|
||||
(interactive (gnus-summary-work-articles current-prefix-arg))
|
||||
(dolist (article articles)
|
||||
(spam-report-gmane-internal t article)))
|
||||
(let ((count 0))
|
||||
(dolist (article articles)
|
||||
(setq count (1+ count))
|
||||
(let ((spam-report-gmane-wait
|
||||
(zerop (% count spam-report-gmane-max-requests))))
|
||||
(spam-report-gmane-internal t article)))))
|
||||
|
||||
(defun spam-report-gmane-spam (&rest articles)
|
||||
"Report ARTICLES as spam through Gmane."
|
||||
(interactive (gnus-summary-work-articles current-prefix-arg))
|
||||
(dolist (article articles)
|
||||
(spam-report-gmane-internal nil article)))
|
||||
(let ((count 0))
|
||||
(dolist (article articles)
|
||||
(setq count (1+ count))
|
||||
(let ((spam-report-gmane-wait
|
||||
(zerop (% count spam-report-gmane-max-requests))))
|
||||
(spam-report-gmane-internal nil article)))))
|
||||
|
||||
;; `spam-report-gmane' was an interactive entry point, so we should provide an
|
||||
;; alias.
|
||||
|
@ -245,10 +261,14 @@ This is initialized based on `user-mail-address'."
|
|||
tcp-connection
|
||||
(format "GET %s HTTP/1.1\nUser-Agent: %s\nHost: %s\n\n"
|
||||
report spam-report-user-agent host))
|
||||
;; Wait until we get something so we don't DOS the host.
|
||||
(while (and (memq (process-status tcp-connection) '(open run))
|
||||
(zerop (buffer-size)))
|
||||
(accept-process-output tcp-connection)))))
|
||||
;; Wait until we get something so we don't DOS the host, if
|
||||
;; `spam-report-gmane-wait' is let-bound to t.
|
||||
(when spam-report-gmane-wait
|
||||
(gnus-message 7 "Waiting for response from %s..." host)
|
||||
(while (and (memq (process-status tcp-connection) '(open run))
|
||||
(zerop (buffer-size)))
|
||||
(accept-process-output tcp-connection))
|
||||
(gnus-message 7 "Waiting for response from %s... done" host)))))
|
||||
|
||||
;;;###autoload
|
||||
(defun spam-report-process-queue (&optional file keep)
|
||||
|
@ -278,7 +298,13 @@ symbol `ask', query before flushing the queue file."
|
|||
(while (and (not (eobp))
|
||||
(re-search-forward
|
||||
"http://\\([^/]+\\)\\(/.*\\) *$" (point-at-eol) t))
|
||||
(funcall spam-report-url-ping-function (match-string 1) (match-string 2))
|
||||
(let ((spam-report-gmane-wait
|
||||
(zerop (% (mm-line-number-at-pos)
|
||||
spam-report-gmane-max-requests))))
|
||||
(gnus-message 6 "Reporting %s%s..."
|
||||
(match-string 1) (match-string 2))
|
||||
(funcall spam-report-url-ping-function
|
||||
(match-string 1) (match-string 2)))
|
||||
(forward-line 1))
|
||||
(if (or (eq keep nil)
|
||||
(and (eq keep 'ask)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue