+2007-11-27 Dan Nicolaescu <dann@ics.uci.edu>
+
+ * mail/sendmail.el (dired-view-file, dired-get-filename): Declare as
+ functions.
+
+2007-11-24 Kenichi Handa <handa@m17n.org>
+
+ * ucs-tables.el (ucs-8859-7-alist): Update the table.
+
2007-11-20 Noah S. Friedman <friedman@splode.com>
* vcard.el: Update to revision 1.11 2000/06/29.
(message "Auto save file for draft message exists; consider M-x mail-recover"))
initialized))
+(declare-function dired-view-file "dired" ())
+(declare-function dired-get-filename "dired" (&optional localp no-error-if-not-filep))
+
(defun mail-recover-1 ()
"Pop up a list of auto-saved draft messages so you can recover one of them."
(interactive)
(setq buffer-file-coding-system
default-buffer-file-coding-system))))))))
+(declare-function dired-move-to-filename "dired" (&optional raise-error eol))
+(declare-function dired-get-filename "dired" (&optional localp no-error-if-not-filep))
+(declare-function dired-view-file "dired" ())
+
(defun mail-recover ()
"Recover interrupted mail composition from auto-save files.
(?\\e,F!\e(B . ?\x2018) ;; LEFT SINGLE QUOTATION MARK
(?\\e,F"\e(B . ?\x2019) ;; RIGHT SINGLE QUOTATION MARK
(?\\e,F#\e(B . ?\x00A3) ;; POUND SIGN
+ (?\\e,F$\e(B . ?\x20AC) ;; EURO SIGN
+ (?\\e,F%\e(B . ?\x20AF) ;; DRACHMA SIGN
(?\\e,F&\e(B . ?\x00A6) ;; BROKEN BAR
(?\\e,F'\e(B . ?\x00A7) ;; SECTION SIGN
(?\\e,F(\e(B . ?\x00A8) ;; DIAERESIS
(?\\e,F)\e(B . ?\x00A9) ;; COPYRIGHT SIGN
+ (?\\e,F*\e(B . ?\x037A) ;; GREEK YPOGEGRAMMENI
(?\\e,F+\e(B . ?\x00AB) ;; LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
(?\\e,F,\e(B . ?\x00AC) ;; NOT SIGN
(?\\e,F-\e(B . ?\x00AD) ;; SOFT HYPHEN
toggle-subscription.xpm (GNOME stock/document/stock_task-recurring)
kill-group.pbm and kill-group.xpm are converted from close.xpm
rot13.pbm and rot13.xpm are converted from lock.xpm
+mail-send.xpm ?
--- /dev/null
+Files: blink.xpm braindamaged.xpm cry.xpm dead.xpm evil.xpm forced.xpm
+ frown.xpm grin.xpm indifferent.xpm reverse-smile.xpm sad.xpm
+ smile.xpm wry.xpm
+Author: Adam Sjøgren
+Copyright (C) 2007 Free Software Foundation, Inc.
+License: GNU General Public License version 3 or later (see COPYING)
--- /dev/null
+Files: blink.xpm braindamaged.xpm cry.xpm dead.xpm evil.xpm forced.xpm
+ frown.xpm grin.xpm indifferent.xpm reverse-smile.xpm sad.xpm
+ smile.xpm wry.xpm
+Author: Adam Sjøgren
+Copyright (C) 2007 Free Software Foundation, Inc.
+License: GNU General Public License version 3 or later (see COPYING)
(rfc2047-encoded-word-regexp-loose): Move forward; add comments
explaining what regexp patterns are for.
+2007-12-04 Glenn Morris <rgm@gnu.org>
+
+ * password.el: Move to password-cache.el.
+
+ * mml1991.el (password-read, password-cache-add, password-cache-remove):
+ * mml2015.el (password-read, password-cache-add, password-cache-remove):
+ * mml-smime.el (password-read, password-cache-add)
+ (password-cache-remove):
+ No need to autoload, since mml-sec requires password.
+
+ * gnus.el (gnus-spam-resend-to, gnus-ham-resend-to):
+ * message.el (gnus-extract-address-components):
+ * mml-smime.el (gnus-extract-address-components): Define for compiler.
+
+ * mml-sec.el, sieve-manage.el, smime.el: Require password-cache or
+ password.
+
2007-12-03 Reiner Steib <Reiner.Steib@gmx.de>
* mailcap.el: Reduce dependencies.
* mm-uu.el (mm-uu-yenc-extract): Get the data from the original
buffer.
+2007-12-02 Glenn Morris <rgm@gnu.org>
+
+ * binhex.el (binhex): New custom group.
+ (binhex-decoder-program, binhex-decoder-switches)
+ (binhex-use-external): Move to the binhex custom group.
+
+ * uudecode.el (uudecode): New custom group.
+ (uudecode-decoder-program, uudecode-decoder-switches)
+ (uudecode-use-external): Move to the uudecode custom group.
+
+ * netrc.el (top-level): Don't load `encrypt' features.
+ (netrc-parse): Don't use encrypt.
+ (netrc-find-service-name, netrc-find-service-number): Don't use caddr.
+
+ * encrypt.el: Remove file.
+
2007-12-01 Reiner Steib <Reiner.Steib@gmx.de>
* message.el (message-cite-prefix-regexp): Remove `-' and `+' to avoid
* message.el (message-idna-to-ascii-rhs-1): Don't call `idna-to-ascii'
if rhs is ASCII.
+2007-12-01 Glenn Morris <rgm@gnu.org>
+
+ * mail-source.el (top-level): Require format-spec before
+ eval-when-compile.
+
+2007-11-30 Glenn Morris <rgm@gnu.org>
+
+ * encrypt.el: Require password, rather than autoloading password-read.
+
+2007-11-29 Glenn Morris <rgm@gnu.org>
+
+ * imap.el (sasl-find-mechanism, sasl-mechanism-name)
+ (sasl-make-client, sasl-next-step, sasl-step-data)
+ (sasl-step-set-data): Declare as functions.
+
2007-11-28 Reiner Steib <Reiner.Steib@gmx.de>
* tls.el (tls-hostmismatch, open-tls-stream): Checkdoc cleanup.
(article-display-x-face): Display face even if From header is missing
as article-display-face does.
+2007-11-27 Dan Nicolaescu <dann@ics.uci.edu>
+
+ * hashcash.el (message-narrow-to-headers-or-head)
+ (message-fetch-field, message-goto-eoh)
+ (message-narrow-to-headers): Declare as functions.
+
2007-11-27 Reiner Steib <Reiner.Steib@gmx.de>
* mail-source.el (mail-sources): Default to fetch from file for
nnml-generate-nov-databases-directory instead of
nnml-generate-nov-databases-1.
+2007-11-24 Glenn Morris <rgm@gnu.org>
+
+ * message.el (message-tool-bar-retro): Update for rename
+ mail_send.xpm->mail-send.xpm.
+
2007-11-22 Reiner Steib <Reiner.Steib@gmx.de>
* smime.el (smime-cert-by-ldap-1): Use `ldap-search' instead of
`smime-ldap-search' for Emacs 22 and up.
+2007-11-22 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * gnus-art.el (gnus-article-truncate-lines): Use `truncate-lines'.
+
+ * message.el (message-send-mail-function): Fix error convention.
+ (message-mailer-swallows-blank-line, message-send-mail-with-sendmail)
+ (message-widen-reply, message-send-mail, message-talkative-question)
+ (message-with-reply-buffer, message-generate-new-buffer-clone-locals)
+ (message-clone-locals, message-send-news): Use with-current-buffer.
+ (message-insert-or-toggle-importance): Remove unused var `valid'.
+ (message-make-references): Remove unused var `new-references'.
+ (message-make-mail-followup-to): Remove unused var `subscribed-lists'.
+
+2007-11-22 Juanma Barranquero <lekktu@gmail.com>
+
+ * spam.el (spam-find-spam, spam-enter-list): Doc fixes.
+ (spam-split-symbolic-return-positive): Reflow docstring.
+ (spam-backends, spam-summary-exit-behavior)
+ (spam-mark-ham-unread-before-move-from-spam-group)
+ (spam-summary-score-preferred-header, spam-sa-learn-spam-switch)
+ (spam-sa-learn-ham-switch, spam-sa-learn-unregister-switch)
+ (spam-clear-cache, spam-backend-check, spam-install-backend)
+ (spam-install-statistical-backend, spam-list-of-processors)
+ (spam-group-processor-p, spam-split, spam-bogofilter-score)
+ (spam-bsfilter-score, spam-check-bsfilter, spam-crm114-score)
+ (spam-check-crm114, spam-initialize, spam-unload-hook):
+ Fix typos in docstrings.
+
2007-11-21 Katsumi Yamaoka <yamaoka@jpl.org>
* gnus-start.el (gnus-get-unread-articles): Mark groups as having never
foreign groups unless a group level is specified by a user.
Reported by Dan Nicolaescu <dann@ics.uci.edu>.
+2007-11-21 Reiner Steib <Reiner.Steib@gmx.de>
+
+ * message.el (message-send-mail-function): Require sendmail.
+
+2007-11-20 Reiner Steib <Reiner.Steib@gmx.de>
+
+ * message.el (message-send-mail-function): Check for smtpmail too.
+
+ * utf7.el (utf7-encode, utf7-decode): Use coding system
+ `utf-7'/`utf-7-imap' from utf-7.el' if available.
+
+ * message.el (message-send-mail-function): New function.
+ (message-send-mail-function): Set default using
+ message-send-mail-function. Adjust doc string.
+ (message-send-mail-with-mailclient): New function.
+
+2007-11-17 Richard Stallman <rms@gnu.org>
+
+ * assistant.el: Remove file.
+
+2007-11-16 Dan Nicolaescu <dann@ics.uci.edu>
+
+ * smime.el (from):
+ * rfc2047.el (message-posting-charset):
+ * qp.el (mm-use-ultra-safe-encoding):
+ * pop3.el (parse-time-months):
+ * nnrss.el (mm-text-html-renderer, mm-text-html-washer-alist):
+ * nnml.el (files):
+ * nnheader.el (gnus-newsgroup-name, nnheader-file-coding-system)
+ (jka-compr-compression-info-list, ange-ftp-path-format)
+ (efs-path-regexp):
+ * nndiary.el (files):
+ * mml2015.el (mc-default-scheme, mc-schemes, pgg-default-user-id)
+ (pgg-errors-buffer, pgg-output-buffer, epg-user-id-alist)
+ (epg-digest-algorithm-alist, inhibit-redisplay)
+ (password-cache-expiry):
+ * mml1991.el (pgg-default-user-id, pgg-errors-buffer)
+ (pgg-output-buffer, password-cache-expiry):
+ * mml.el (mml-dnd-protocol-alist, ange-ftp-name-format)
+ (efs-path-regexp):
+ * mml-smime.el (epg-user-id-alist, epg-digest-algorithm-alist)
+ (inhibit-redisplay):
+ * mm-uu.el (file-name, start-point, end-point, entry)
+ (gnus-newsgroup-name, gnus-newsgroup-charset):
+ * mm-util.el (mm-mime-mule-charset-alist, latin-unity-coding-systems)
+ (latin-unity-ucs-list):
+ * mm-bodies.el (mm-uu-yenc-decode-function, mm-uu-decode-function)
+ (mm-uu-binhex-decode-function):
+ * message.el (gnus-message-group-art, gnus-list-identifiers, )
+ (rmail-enable-mime-composing, gnus-local-organization)
+ (gnus-post-method, gnus-select-method, gnus-active-hashtb)
+ (gnus-read-active-file, facemenu-add-face-function)
+ (facemenu-remove-face-function, gnus-article-decoded-p)
+ (tool-bar-mode):
+ * mail-source.el (display-time-mail-function):
+ * gnus-util.el (nnmail-pathname-coding-system)
+ (nnmail-active-file-coding-system, gnus-emphasize-whitespace-regexp)
+ (gnus-original-article-buffer, gnus-user-agent)
+ (rmail-default-rmail-file, mm-text-coding-system, tool-bar-mode)
+ (xemacs-codename, sxemacs-codename, emacs-program-version):
+ * gnus-sum.el (tool-bar-mode, gnus-tmp-header, number):
+ * gnus-start.el (gnus-agent-covered-methods)
+ (gnus-agent-file-loading-local, gnus-agent-file-loading-cache)
+ (gnus-current-headers, gnus-thread-indent-array, gnus-newsgroup-name)
+ (gnus-newsgroup-headers, gnus-group-list-mode)
+ (gnus-group-mark-positions, gnus-newsgroup-data)
+ (gnus-newsgroup-unreads, nnoo-state-alist)
+ (gnus-current-select-method, mail-sources)
+ (nnmail-scan-directory-mail-source-once, nnmail-split-history)
+ (nnmail-spool-file, gnus-cache-active-hashtb):
+ * gnus-mh.el (mh-lib-progs):
+ * gnus-ems.el (gnus-tmp-unread, gnus-tmp-replied)
+ (gnus-tmp-score-char, gnus-tmp-indentation, gnus-tmp-opening-bracket)
+ (gnus-tmp-lines, gnus-tmp-name, gnus-tmp-closing-bracket)
+ (gnus-tmp-subject-or-nil, gnus-check-before-posting, gnus-mouse-face)
+ (gnus-group-buffer):
+ * gnus-cite.el (font-lock-defaults-computed, font-lock-keywords)
+ (font-lock-set-defaults):
+ * gnus-art.el (tool-bar-map, w3m-minor-mode-map)
+ (gnus-face-properties-alist, charset, gnus-summary-article-menu)
+ (gnus-summary-post-menu, total-parts, type, condition, length):
+ * gnus-agent.el (gnus-agent-read-agentview):
+ * flow-fill.el (show-trailing-whitespace):
+ * gnus-group.el (tool-bar-mode, nnrss-group-alist): Remove unnecessary
+ eval-and-compile wrappers for byte compiler pacifiers.
+
+ * mm-view.el (mm-inline-image-xemacs): Only do something for XEmacs.
+ (mm-display-inline-fontify): Check for featurep 'xemacs not
+ extent-list.
+
+ * mm-decode.el (mm-display-external): Check for featurep 'xemacs not
+ itimer-list.
+ (mm-create-image-xemacs): Only do something for XEmacs.
+ (mm-image-fit-p): Check for featurep 'xemacs not glyph-width.
+
+ * mm-util.el (mm-find-buffer-file-coding-system): Add check for XEmacs.
+
+ * gnus-registry.el (gnus-adaptive-word-syntax-table):
+ * gnus-fun.el (gnus-face-properties-alist): Pacify byte compiler.
+
+2007-11-15 Juanma Barranquero <lekktu@gmail.com>
+
+ * nnimap.el (nnimap-split-download-body):
+ * gnus-demon.el (gnus-demon):
+ * gnus-uu.el (gnus-uu-default-view-rules): Fix typos in docstrings.
+
2007-11-15 Katsumi Yamaoka <yamaoka@jpl.org>
* nntp.el (nntp-insert-buffer-substring, nntp-copy-to-buffer): New
* gnus-ems.el (gnus-x-splash): Work even if there's no scroll bar.
+2007-10-29 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * message.el (message-check-news-body-syntax): Avoid
+ mm-string-as-multibyte.
+ (message-hide-headers): Don't assume (point-min)==1.
+
2007-10-28 Reiner Steib <Reiner.Steib@gmx.de>
* message.el (message-remove-blank-cited-lines): Fix if remove is
2007-10-04 Reiner Steib <Reiner.Steib@gmx.de>
- * Relicense "GPLv2 or later" files to "GPLv3 or later".
+ * Relicense "GPLv2 or later" files to "GPLv3 or later".
2007-10-03 Reiner Steib <Reiner.Steib@gmx.de>
eval-when-compile, to define gnus-agent-set-cat-groups as the setf
method of gnus-agent-cat-groups even when the buffer has been
evaled.
- (gnus-agent-save-active,gnus-agent-save-active-1): Merged to
+ (gnus-agent-save-active, gnus-agent-save-active-1): Merged to
delete gnus-agent-save-active-1.
(gnus-agent-save-groups): Deleted. Identical to
gnus-agent-save-active.
servers. Add use of min/max range limits from server's local
file.
(gnus-agent-save-alist): Removed unused optional argument.
- (gnus-agent-load-local,gnus-agent-read-and-cache-local),
- (gnus-agent-read-local,gnus-agent-save-local,gnus-agent-get-local),
+ (gnus-agent-load-local, gnus-agent-read-and-cache-local),
+ (gnus-agent-read-local, gnus-agent-save-local, gnus-agent-get-local),
(gnus-agent-set-local): A per-server file that keeps min/max range
- limits for articles known to the agent. Provides a fast mechanism
+ limits for articles known to the agent. Provides a fast mechanism
for altering many active ranges.
- (gnus-agent-expire-group,gnus-agent-expire): No longer save the
+ (gnus-agent-expire-group, gnus-agent-expire): No longer save the
active file (local makes it unnecessary).
(gnus-agent-regenerate-group): Fixed XEmacs compatibility.
'char-int
'identity)))
+(defgroup binhex nil
+ "Decoding of BinHex (binary-to-hexadecimal) data."
+ :group 'mail
+ :group 'news)
+
(defcustom binhex-decoder-program "hexbin"
"*Non-nil value should be a string that names a binhex decoder.
The program should expect to read binhex data on its standard
input and write the converted data to its standard output."
:type 'string
- :group 'gnus-extract)
+ :group 'binhex)
(defcustom binhex-decoder-switches '("-d")
"*List of command line flags passed to the command `binhex-decoder-program'."
- :group 'gnus-extract
+ :group 'binhex
:type '(repeat string))
(defcustom binhex-use-external
(executable-find binhex-decoder-program)
"*Use external binhex program."
:version "22.1"
- :group 'gnus-extract
+ :group 'binhex
:type 'boolean)
(defconst binhex-alphabet-decoding-alist
;; Author: Katsumi Yamaoka <yamaoka@jpl.org>
;; Keywords: news, cancel-lock, hmac, sha1, rfc2104
-;; This program is free software; you can redistribute it and/or modify
+;; This file is part of GNU Emacs.
+
+;; 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 3, or (at your option)
;; any later version.
-;; This program is distributed in the hope that it will be useful,
+;; 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 this program; see the file COPYING. If not, write to the
+;; along with GNU Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
'(dig-font-lock-keywords t)))
(when (featurep 'font-lock)
(font-lock-set-defaults))
- (gnus-run-mode-hooks 'dig-mode-hook))
+ (save-current-buffer
+ (if (fboundp 'run-mode-hooks)
+ (run-mode-hooks 'dig-mode-hook)
+ (run-hooks 'dig-mode-hook))))
(defun dig-exit ()
"Quit dig output buffer."
;;; dns.el --- Domain Name Service lookups
-;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007
+;; Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: network
;;; Code:
-(eval-when-compile (require 'cl))
-
-(require 'mm-util)
-
(defvar dns-timeout 5
"How many seconds to wait when doing DNS queries.")
(dns-write-bytes 0))
(defun dns-read-string-name (string buffer)
- (mm-with-unibyte-buffer
- (insert string)
- (goto-char (point-min))
- (dns-read-name buffer)))
+ (let (default-enable-multibyte-characters)
+ (with-temp-buffer
+ (insert string)
+ (goto-char (point-min))
+ (dns-read-name buffer))))
(defun dns-read-name (&optional buffer)
(let ((ended nil)
(buffer-string)))
(defun dns-read (packet)
- (mm-with-unibyte-buffer
- (let ((spec nil)
- queries answers authorities additionals)
- (insert packet)
- (goto-char (point-min))
- (push (list 'id (dns-read-bytes 2)) spec)
- (let ((byte (dns-read-bytes 1)))
- (push (list 'response-p (if (zerop (logand byte (lsh 1 7))) nil t))
- spec)
- (let ((opcode (logand byte (lsh 7 3))))
- (push (list 'opcode
- (cond ((eq opcode 0) 'query)
- ((eq opcode 1) 'inverse-query)
- ((eq opcode 2) 'status)))
- spec))
- (push (list 'authoritative-p (if (zerop (logand byte (lsh 1 2)))
- nil t)) spec)
- (push (list 'truncated-p (if (zerop (logand byte (lsh 1 2))) nil t))
- spec)
- (push (list 'recursion-desired-p
- (if (zerop (logand byte (lsh 1 0))) nil t)) spec))
- (let ((rc (logand (dns-read-bytes 1) 15)))
- (push (list 'response-code
- (cond
- ((eq rc 0) 'no-error)
- ((eq rc 1) 'format-error)
- ((eq rc 2) 'server-failure)
- ((eq rc 3) 'name-error)
- ((eq rc 4) 'not-implemented)
- ((eq rc 5) 'refused)))
- spec))
- (setq queries (dns-read-bytes 2))
- (setq answers (dns-read-bytes 2))
- (setq authorities (dns-read-bytes 2))
- (setq additionals (dns-read-bytes 2))
- (let ((qs nil))
- (dotimes (i queries)
- (push (list (dns-read-name)
- (list 'type (dns-inverse-get (dns-read-bytes 2)
- dns-query-types))
- (list 'class (dns-inverse-get (dns-read-bytes 2)
- dns-classes)))
- qs))
- (push (list 'queries qs) spec))
- (dolist (slot '(answers authorities additionals))
- (let ((qs nil)
- type)
- (dotimes (i (symbol-value slot))
- (push (list (dns-read-name)
- (list 'type
- (setq type (dns-inverse-get (dns-read-bytes 2)
- dns-query-types)))
- (list 'class (dns-inverse-get (dns-read-bytes 2)
- dns-classes))
- (list 'ttl (dns-read-bytes 4))
- (let ((length (dns-read-bytes 2)))
- (list 'data
- (dns-read-type
- (buffer-substring
- (point)
- (progn (forward-char length) (point)))
- type))))
- qs))
- (push (list slot qs) spec)))
- (nreverse spec))))
+ (let (default-enable-multibyte-characters)
+ (with-temp-buffer
+ (let ((spec nil)
+ queries answers authorities additionals)
+ (insert packet)
+ (goto-char (point-min))
+ (push (list 'id (dns-read-bytes 2)) spec)
+ (let ((byte (dns-read-bytes 1)))
+ (push (list 'response-p (if (zerop (logand byte (lsh 1 7))) nil t))
+ spec)
+ (let ((opcode (logand byte (lsh 7 3))))
+ (push (list 'opcode
+ (cond ((eq opcode 0) 'query)
+ ((eq opcode 1) 'inverse-query)
+ ((eq opcode 2) 'status)))
+ spec))
+ (push (list 'authoritative-p (if (zerop (logand byte (lsh 1 2)))
+ nil t)) spec)
+ (push (list 'truncated-p (if (zerop (logand byte (lsh 1 2))) nil t))
+ spec)
+ (push (list 'recursion-desired-p
+ (if (zerop (logand byte (lsh 1 0))) nil t)) spec))
+ (let ((rc (logand (dns-read-bytes 1) 15)))
+ (push (list 'response-code
+ (cond
+ ((eq rc 0) 'no-error)
+ ((eq rc 1) 'format-error)
+ ((eq rc 2) 'server-failure)
+ ((eq rc 3) 'name-error)
+ ((eq rc 4) 'not-implemented)
+ ((eq rc 5) 'refused)))
+ spec))
+ (setq queries (dns-read-bytes 2))
+ (setq answers (dns-read-bytes 2))
+ (setq authorities (dns-read-bytes 2))
+ (setq additionals (dns-read-bytes 2))
+ (let ((qs nil))
+ (dotimes (i queries)
+ (push (list (dns-read-name)
+ (list 'type (dns-inverse-get (dns-read-bytes 2)
+ dns-query-types))
+ (list 'class (dns-inverse-get (dns-read-bytes 2)
+ dns-classes)))
+ qs))
+ (push (list 'queries qs) spec))
+ (dolist (slot '(answers authorities additionals))
+ (let ((qs nil)
+ type)
+ (dotimes (i (symbol-value slot))
+ (push (list (dns-read-name)
+ (list 'type
+ (setq type (dns-inverse-get (dns-read-bytes 2)
+ dns-query-types)))
+ (list 'class (dns-inverse-get (dns-read-bytes 2)
+ dns-classes))
+ (list 'ttl (dns-read-bytes 4))
+ (let ((length (dns-read-bytes 2)))
+ (list 'data
+ (dns-read-type
+ (buffer-substring
+ (point)
+ (progn (forward-char length) (point)))
+ type))))
+ qs))
+ (push (list slot qs) spec)))
+ (nreverse spec)))))
(defun dns-read-int32 ()
;; Full 32 bit Integers can't be handled by Emacs. If we use
(let ((buffer (current-buffer))
(point (point)))
(prog1
- (mm-with-unibyte-buffer
- (insert string)
- (goto-char (point-min))
- (cond
- ((eq type 'A)
- (let ((bytes nil))
- (dotimes (i 4)
- (push (dns-read-bytes 1) bytes))
- (mapconcat 'number-to-string (nreverse bytes) ".")))
- ((eq type 'AAAA)
- (let (hextets)
- (dotimes (i 8)
- (push (dns-read-bytes 2) hextets))
- (mapconcat (lambda (n) (format "%x" n)) (nreverse hextets) ":")))
- ((eq type 'SOA)
- (list (list 'mname (dns-read-name buffer))
- (list 'rname (dns-read-name buffer))
- (list 'serial (dns-read-int32))
- (list 'refresh (dns-read-int32))
- (list 'retry (dns-read-int32))
- (list 'expire (dns-read-int32))
- (list 'minimum (dns-read-int32))))
- ((eq type 'SRV)
- (list (list 'priority (dns-read-bytes 2))
- (list 'weight (dns-read-bytes 2))
- (list 'port (dns-read-bytes 2))
- (list 'target (dns-read-name buffer))))
- ((eq type 'MX)
- (cons (dns-read-bytes 2) (dns-read-name buffer)))
- ((or (eq type 'CNAME) (eq type 'NS) (eq type 'PTR))
- (dns-read-string-name string buffer))
- (t string)))
+ (let (default-enable-multibyte-characters)
+ (with-temp-buffer
+ (insert string)
+ (goto-char (point-min))
+ (cond
+ ((eq type 'A)
+ (let ((bytes nil))
+ (dotimes (i 4)
+ (push (dns-read-bytes 1) bytes))
+ (mapconcat 'number-to-string (nreverse bytes) ".")))
+ ((eq type 'AAAA)
+ (let (hextets)
+ (dotimes (i 8)
+ (push (dns-read-bytes 2) hextets))
+ (mapconcat (lambda (n) (format "%x" n))
+ (nreverse hextets) ":")))
+ ((eq type 'SOA)
+ (list (list 'mname (dns-read-name buffer))
+ (list 'rname (dns-read-name buffer))
+ (list 'serial (dns-read-int32))
+ (list 'refresh (dns-read-int32))
+ (list 'retry (dns-read-int32))
+ (list 'expire (dns-read-int32))
+ (list 'minimum (dns-read-int32))))
+ ((eq type 'SRV)
+ (list (list 'priority (dns-read-bytes 2))
+ (list 'weight (dns-read-bytes 2))
+ (list 'port (dns-read-bytes 2))
+ (list 'target (dns-read-name buffer))))
+ ((eq type 'MX)
+ (cons (dns-read-bytes 2) (dns-read-name buffer)))
+ ((or (eq type 'CNAME) (eq type 'NS) (eq type 'PTR))
+ (dns-read-string-name string buffer))
+ (t string))))
(goto-char point))))
(defun dns-parse-resolv-conf ()
(if (not dns-servers)
(message "No DNS server configuration found")
- (mm-with-unibyte-buffer
- (let ((process (condition-case ()
- (dns-make-network-process (car dns-servers))
- (error
- (message "dns: Got an error while trying to talk to %s"
- (car dns-servers))
- nil)))
- (tcp-p (and (not (fboundp 'make-network-process))
- (not (featurep 'xemacs))))
- (step 100)
- (times (* dns-timeout 1000))
- (id (random 65000)))
- (when process
- (process-send-string
- process
- (dns-write `((id ,id)
- (opcode query)
- (queries ((,name (type ,type))))
- (recursion-desired-p t))
- tcp-p))
- (while (and (zerop (buffer-size))
- (> times 0))
- (sit-for (/ step 1000.0))
- (accept-process-output process 0 step)
- (decf times step))
- (ignore-errors
- (delete-process process))
- (when (and tcp-p
- (>= (buffer-size) 2))
- (goto-char (point-min))
- (delete-region (point) (+ (point) 2)))
- (when (and (>= (buffer-size) 2)
- ;; We had a time-out.
- (> times 0))
- (let ((result (dns-read (buffer-string))))
- (if fullp
- result
- (let ((answer (car (dns-get 'answers result))))
- (when (eq type (dns-get 'type answer))
- (if (eq type 'TXT)
- (dns-get-txt-answer (dns-get 'answers result))
- (dns-get 'data answer))))))))))))
+ (let (default-enable-multibyte-characters)
+ (with-temp-buffer
+ (let ((process (condition-case ()
+ (dns-make-network-process (car dns-servers))
+ (error
+ (message
+ "dns: Got an error while trying to talk to %s"
+ (car dns-servers))
+ nil)))
+ (tcp-p (and (not (fboundp 'make-network-process))
+ (not (featurep 'xemacs))))
+ (step 100)
+ (times (* dns-timeout 1000))
+ (id (random 65000)))
+ (when process
+ (process-send-string
+ process
+ (dns-write `((id ,id)
+ (opcode query)
+ (queries ((,name (type ,type))))
+ (recursion-desired-p t))
+ tcp-p))
+ (while (and (zerop (buffer-size))
+ (> times 0))
+ (sit-for (/ step 1000.0))
+ (accept-process-output process 0 step)
+ (setq times (- times step)))
+ (condition-case nil
+ (delete-process process)
+ (error nil))
+ (when (and tcp-p
+ (>= (buffer-size) 2))
+ (goto-char (point-min))
+ (delete-region (point) (+ (point) 2)))
+ (when (and (>= (buffer-size) 2)
+ ;; We had a time-out.
+ (> times 0))
+ (let ((result (dns-read (buffer-string))))
+ (if fullp
+ result
+ (let ((answer (car (dns-get 'answers result))))
+ (when (eq type (dns-get 'type answer))
+ (if (eq type 'TXT)
+ (dns-get-txt-answer (dns-get 'answers result))
+ (dns-get 'data answer)))))))))))))
(provide 'dns)
;;; ecomplete.el --- electric completion of addresses and the like
-;; Copyright (C) 2006 Free Software Foundation, Inc.
+
+;; Copyright (C) 2006, 2007 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: mail
;; Test vectors.
-(eval-when-compile
- (defvar show-trailing-whitespace))
+(defvar show-trailing-whitespace)
(defvar fill-flowed-encode-tests
`(
;; Keeps the compiler from warning about the free variable in
;; gnus-agent-read-agentview.
-(eval-when-compile
- (defvar gnus-agent-read-agentview))
+(defvar gnus-agent-read-agentview)
(defun gnus-agent-load-alist (group)
"Load the article-state alist for GROUP."
;;; Code:
(eval-when-compile
- (require 'cl)
- (defvar tool-bar-map)
- (defvar w3m-minor-mode-map))
+ (require 'cl))
+(defvar tool-bar-map)
+(defvar w3m-minor-mode-map)
(require 'gnus)
;; Avoid the "Recursive load suspected" error in Emacs 21.1.
(mail-header-fold-field)
(goto-char (point-max))))))
-(defcustom gnus-article-truncate-lines default-truncate-lines
+(defcustom gnus-article-truncate-lines (default-value 'truncate-lines)
"Value of `truncate-lines' in Gnus Article buffer.
Valid values are nil, t, `head', `first', `last', an integer or a
predicate. See Info node `(gnus)Customizing Articles'."
(forward-line 1)
(point))))))
-(eval-when-compile
- (defvar gnus-face-properties-alist))
+(defvar gnus-face-properties-alist)
(defun article-display-face (&optional force)
"Display any Face headers in the header."
;; Put the mark meaning this part was rendered by emacs-w3m.
'mm-inline-text-html-with-w3m t))))
-(eval-when-compile (defvar charset)) ;; Bound by `article-wash-html'.
+(defvar charset) ;; Bound by `article-wash-html'.
(defun gnus-article-wash-html-with-w3m-standalone ()
"Wash the current buffer with w3m."
gnus-newsgroup-name 'highlight-words t)))
gnus-emphasis-alist)))))
-(eval-when-compile
- (defvar gnus-summary-article-menu)
- (defvar gnus-summary-post-menu))
+(defvar gnus-summary-article-menu)
+(defvar gnus-summary-post-menu)
;;; Saving functions.
(funcall (cadr elem)))))))
;; Dynamic variables.
-(eval-when-compile
- (defvar part-number)
- (defvar total-parts)
- (defvar type)
- (defvar condition)
- (defvar length))
+(defvar part-number)
+(defvar total-parts)
+(defvar type)
+(defvar condition)
+(defvar length)
(defun gnus-treat-predicate (val)
(cond
;;; gnus-bookmark.el --- Bookmarks in Gnus
-;; Copyright (C) 2006 Free Software Foundation, Inc.
+;; Copyright (C) 2006, 2007 Free Software Foundation, Inc.
;; Author: Bastien Guerry <bzg AT altern DOT org>
;; Keywords: news
(setq count (1+ count)))))) ;;
"Keywords for highlighting different levels of message citations.")
-(eval-when-compile
- (defvar font-lock-defaults-computed)
- (defvar font-lock-keywords)
- (defvar font-lock-set-defaults))
+(defvar font-lock-defaults-computed)
+(defvar font-lock-keywords)
+(defvar font-lock-set-defaults)
(eval-and-compile
(unless (featurep 'xemacs)
(gnus-score-set 'touched '(t) alist))
(bury-buffer))
-(eval-when-compile
- (defvar category-fields nil)
- (defvar gnus-agent-cat-name)
- (defvar gnus-agent-cat-score-file)
- (defvar gnus-agent-cat-length-when-short)
- (defvar gnus-agent-cat-length-when-long)
- (defvar gnus-agent-cat-low-score)
- (defvar gnus-agent-cat-high-score)
- (defvar gnus-agent-cat-enable-expiration)
- (defvar gnus-agent-cat-days-until-old)
- (defvar gnus-agent-cat-predicate)
- (defvar gnus-agent-cat-groups)
- (defvar gnus-agent-cat-enable-undownloaded-faces)
-)
+(defvar category-fields nil)
+(defvar gnus-agent-cat-name)
+(defvar gnus-agent-cat-score-file)
+(defvar gnus-agent-cat-length-when-short)
+(defvar gnus-agent-cat-length-when-long)
+(defvar gnus-agent-cat-low-score)
+(defvar gnus-agent-cat-high-score)
+(defvar gnus-agent-cat-enable-expiration)
+(defvar gnus-agent-cat-days-until-old)
+(defvar gnus-agent-cat-predicate)
+(defvar gnus-agent-cat-groups)
+(defvar gnus-agent-cat-enable-undownloaded-faces)
(defun gnus-trim-whitespace (s)
(when (string-match "\\`[ \n\t]+" s)
(autoload 'parse-time-string "parse-time" nil nil)
(defgroup gnus-demon nil
- "Demonic behaviour."
+ "Demonic behavior."
:group 'gnus)
(defcustom gnus-demon-handlers nil
(defvar gnus-mouse-face-prop 'mouse-face
"Property used for highlighting mouse regions.")))
-(eval-when-compile
- (defvar gnus-tmp-unread)
- (defvar gnus-tmp-replied)
- (defvar gnus-tmp-score-char)
- (defvar gnus-tmp-indentation)
- (defvar gnus-tmp-opening-bracket)
- (defvar gnus-tmp-lines)
- (defvar gnus-tmp-name)
- (defvar gnus-tmp-closing-bracket)
- (defvar gnus-tmp-subject-or-nil)
- (defvar gnus-check-before-posting)
- (defvar gnus-mouse-face)
- (defvar gnus-group-buffer))
+(defvar gnus-tmp-unread)
+(defvar gnus-tmp-replied)
+(defvar gnus-tmp-score-char)
+(defvar gnus-tmp-indentation)
+(defvar gnus-tmp-opening-bracket)
+(defvar gnus-tmp-lines)
+(defvar gnus-tmp-name)
+(defvar gnus-tmp-closing-bracket)
+(defvar gnus-tmp-subject-or-nil)
+(defvar gnus-check-before-posting)
+(defvar gnus-mouse-face)
+(defvar gnus-group-buffer)
(defun gnus-ems-redefine ()
(cond
(require 'gnus-util)
(require 'gnus)
+(defvar gnus-face-properties-alist)
+
(defcustom gnus-x-face-directory (expand-file-name "x-faces" gnus-directory)
"*Directory where X-Face PBM files are stored."
:version "22.1"
;;; Code:
(eval-when-compile
- (require 'cl)
- (defvar tool-bar-mode))
+ (require 'cl))
+(defvar tool-bar-mode)
(require 'gnus)
(require 'gnus-start)
(cons (current-buffer)
(if (eq major-mode 'gnus-summary-mode) 'summary 'group))))))
+(defvar nnrss-group-alist)
(eval-when-compile
- (defvar nnrss-group-alist)
(defun nnrss-discover-feed (arg))
(defun nnrss-save-server-data (arg)))
(defun gnus-group-make-rss-group (&optional url)
(require 'gnus-msg)
(require 'gnus-sum)
-(eval-when-compile
- (defvar mh-lib-progs))
+(defvar mh-lib-progs)
(defun gnus-summary-save-article-folder (&optional arg)
"Append the current article to an mh folder.
(require 'gnus-util)
(require 'nnmail)
+(defvar gnus-adaptive-word-syntax-table)
+
(defvar gnus-registry-dirty t
"Boolean set to t when the registry is modified")
(autoload 'gnus-agent-possibly-alter-active "gnus-agent")
(eval-when-compile
- (require 'cl)
+ (require 'cl))
- (defvar gnus-agent-covered-methods nil)
- (defvar gnus-agent-file-loading-local nil)
- (defvar gnus-agent-file-loading-cache nil))
+(defvar gnus-agent-covered-methods)
+(defvar gnus-agent-file-loading-local)
+(defvar gnus-agent-file-loading-cache)
(defcustom gnus-startup-file (nnheader-concat gnus-home-directory ".newsrc")
"Your `.newsrc' file.
;;; General various misc type functions.
;; Silence byte-compiler.
-(eval-when-compile
- (defvar gnus-current-headers)
- (defvar gnus-thread-indent-array)
- (defvar gnus-newsgroup-name)
- (defvar gnus-newsgroup-headers)
- (defvar gnus-group-list-mode)
- (defvar gnus-group-mark-positions)
- (defvar gnus-newsgroup-data)
- (defvar gnus-newsgroup-unreads)
- (defvar nnoo-state-alist)
- (defvar gnus-current-select-method)
- (defvar mail-sources)
- (defvar nnmail-scan-directory-mail-source-once)
- (defvar nnmail-split-history))
+(defvar gnus-current-headers)
+(defvar gnus-thread-indent-array)
+(defvar gnus-newsgroup-name)
+(defvar gnus-newsgroup-headers)
+(defvar gnus-group-list-mode)
+(defvar gnus-group-mark-positions)
+(defvar gnus-newsgroup-data)
+(defvar gnus-newsgroup-unreads)
+(defvar nnoo-state-alist)
+(defvar gnus-current-select-method)
+(defvar mail-sources)
+(defvar nnmail-scan-directory-mail-source-once)
+(defvar nnmail-split-history)
+(defvar nnmail-spool-file)
(defun gnus-close-all-servers ()
"Close all servers."
(setq killed (cdr killed)))))
;; We want to inline a function from gnus-cache, so we cheat here:
+(defvar gnus-cache-active-hashtb)
(eval-when-compile
- (defvar gnus-cache-active-hashtb)
(defun gnus-cache-possibly-alter-active (group active)
"Alter the ACTIVE info for GROUP to reflect the articles in the cache."
(when gnus-cache-active-hashtb
;;; Code:
(eval-when-compile
- (require 'cl)
- (defvar tool-bar-mode))
+ (require 'cl))
+
+(defvar tool-bar-mode)
+(defvar gnus-tmp-header)
(require 'gnus)
(require 'gnus-group)
(defvar gnus-tmp-root-expunged nil)
(defvar gnus-tmp-dummy-line nil)
-(eval-when-compile (defvar gnus-tmp-header))
(defun gnus-extra-header (type &optional header)
"Return the extra header of TYPE."
(or (cdr (assq type (mail-header-extra (or header gnus-tmp-header))))
(gnus-get-predicate display)))
;; Uses the dynamically bound `number' variable.
-(eval-when-compile
- (defvar number))
+(defvar number)
(defun gnus-article-marked-p (type &optional article)
(let ((article (or article number)))
(cond
;;; Code:
(eval-when-compile
- (require 'cl)
- ;; Fixme: this should be a gnus variable, not nnmail-.
- (defvar nnmail-pathname-coding-system)
- (defvar nnmail-active-file-coding-system)
-
- ;; Inappropriate references to other parts of Gnus.
- (defvar gnus-emphasize-whitespace-regexp)
- (defvar gnus-original-article-buffer)
- (defvar gnus-user-agent)
- )
+ (require 'cl))
+;; Fixme: this should be a gnus variable, not nnmail-.
+(defvar nnmail-pathname-coding-system)
+(defvar nnmail-active-file-coding-system)
+
+;; Inappropriate references to other parts of Gnus.
+(defvar gnus-emphasize-whitespace-regexp)
+(defvar gnus-original-article-buffer)
+(defvar gnus-user-agent)
+
(require 'time-date)
(require 'netrc)
;; version fails halfway, however it provides the rmail-select-summary
;; macro which uses the following functions:
(autoload 'rmail-summary-displayed "rmail")
- (autoload 'rmail-maybe-display-summary "rmail")))
- (defvar rmail-default-rmail-file)
- (defvar mm-text-coding-system))
+ (autoload 'rmail-maybe-display-summary "rmail"))))
+
+(defvar rmail-default-rmail-file)
+(defvar mm-text-coding-system)
(defun gnus-output-to-rmail (filename &optional ask)
"Append the current article to an Rmail file named FILENAME."
display))
display)))))
-(eval-when-compile
- (defvar tool-bar-mode))
+(defvar tool-bar-mode)
(defun gnus-tool-bar-update (&rest ignore)
"Update the tool bar."
(push (pop list1) res)))
(nconc (nreverse res) list1 list2))))
-(eval-when-compile
- (defvar xemacs-codename)
- (defvar sxemacs-codename)
- (defvar emacs-program-version))
+(defvar xemacs-codename)
+(defvar sxemacs-codename)
+(defvar emacs-program-version)
(defun gnus-emacs-version ()
"Stringified Emacs version."
("\\.\\(tar\\|arj\\|zip\\|zoo\\|arc\\|gz\\|Z\\|lzh\\|ar\\|lha\\)$"
"gnus-uu-archive"))
"*Default actions to be taken when the user asks to view a file.
-To change the behaviour, you can either edit this variable or set
+To change the behavior, you can either edit this variable or set
`gnus-uu-user-view-rules' to something useful.
For example:
command string, the file name will be appended to the command string
before executing.
-There are several user variables to tailor the behaviour of gnus-uu to
+There are several user variables to tailor the behavior of gnus-uu to
your needs. First we have `gnus-uu-user-view-rules', which is the
variable gnus-uu first consults when trying to decide how to view a
file. If this variable contains no matches, gnus-uu examines the
(defvar gnus-spam-autodetect-methods)
(defvar gnus-spam-newsgroup-contents)
(defvar gnus-spam-process-destinations)
+(defvar gnus-spam-resend-to)
+(defvar gnus-ham-resend-to)
(defvar gnus-spam-process-newsgroups)
(concat (match-string 1 addr) (match-string 2 addr))
addr))
+(declare-function message-narrow-to-headers-or-head "message" ())
+(declare-function message-fetch-field "message" (header &optional not-all))
+(declare-function message-goto-eoh "message" ())
+(declare-function message-narrow-to-headers "message" ())
+
(defun hashcash-token-substring ()
(save-excursion
(let ((token ""))
;; Author: Shuhei KOBAYASHI <shuhei@aqua.ocn.ne.jp>
;; Keywords: data
-;; This file is part of FLIM (Faithful Library about Internet Message).
+;; 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 3, 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 3, or (at your option)
+;; any later version.
-;; This program is distributed in the hope that it will be useful,
+;; 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 this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; along with GNU Emacs; see the file COPYING. If not, write to the
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;;; Commentary:
;;; hmac-def.el --- A macro for defining HMAC functions.
-;; Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+;; Copyright (C) 1999, 2001, 2007 Free Software Foundation, Inc.
;; Author: Shuhei KOBAYASHI <shuhei@aqua.ocn.ne.jp>
;; Keywords: HMAC, RFC 2104
-;; This file is part of FLIM (Faithful Library about Internet Message).
+;; 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 3, 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 3, or (at your option)
+;; any later version.
-;; This program is distributed in the hope that it will be useful,
+;; 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 this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; along with GNU Emacs; see the file COPYING. If not, write to the
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;;; Commentary:
;;; hmac-md5.el --- Compute HMAC-MD5.
-;; Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+;; Copyright (C) 1999, 2001, 2007 Free Software Foundation, Inc.
;; Author: Shuhei KOBAYASHI <shuhei@aqua.ocn.ne.jp>
;; Keywords: HMAC, RFC 2104, HMAC-MD5, MD5, KEYED-MD5, CRAM-MD5
-;; This file is part of FLIM (Faithful Library about Internet Message).
+;; 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 3, 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 3, or (at your option)
+;; any later version.
-;; This program is distributed in the hope that it will be useful,
+;; 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 this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; along with GNU Emacs; see the file COPYING. If not, write to the
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;;; Commentary:
(imap-capability nil buffer))
mecs))
+(declare-function sasl-find-mechanism "sasl" (mechanism))
+(declare-function sasl-mechanism-name "sasl" (mechanism))
+(declare-function sasl-make-client "sasl" (mechanism name service server))
+(declare-function sasl-next-step "sasl" (client step))
+(declare-function sasl-step-data "sasl" (step))
+(declare-function sasl-step-set-data "sasl" (step data))
+
(defun imap-sasl-auth-p (buffer)
(and (condition-case ()
(require 'sasl)
;;; Code:
+(require 'format-spec)
(eval-when-compile
(require 'cl)
- (require 'imap)
- (eval-when-compile (defvar display-time-mail-function)))
+ (require 'imap))
(eval-and-compile
(autoload 'pop3-movemail "pop3")
(autoload 'pop3-get-message-count "pop3")
(autoload 'nnheader-cancel-timer "nnheader"))
-(require 'format-spec)
(require 'mm-util)
(require 'message) ;; for `message-directory'
+(defvar display-time-mail-function)
+
+
(defgroup mail-source nil
"The mail-fetching library."
:version "21.1"
;;; md4.el --- MD4 Message Digest Algorithm.
-;; Copyright (C) 2004 Free Software Foundation, Inc.
-;; Copyright (C) 2001 Taro Kawagishi
+;; Copyright (C) 2001, 2004, 2007 Free Software Foundation, Inc.
+
;; Author: Taro Kawagishi <tarok@transpulse.org>
;; Keywords: MD4
;; Version: 1.00
;; Created: February 2001
-;; This file is part of FLIM (Faithful Library about Internet Message).
+;; This file is part of GNU Emacs.
-;; This program is free software; you can redistribute it and/or modify
+;; 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 3, or (at your option)
;; any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
+
+;; 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 this program; see the file COPYING. If not, write to the
+;; along with GNU Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;;; Code:
(eval-when-compile
- (require 'cl)
- (defvar gnus-message-group-art)
- (defvar gnus-list-identifiers)) ; gnus-sum is required where necessary
+ (require 'cl))
+
(require 'hashcash)
(require 'canlock)
(require 'mailheader)
(require 'rfc822)
(require 'ecomplete)
+(autoload 'mailclient-send-it "mailclient") ;; Emacs 22 or contrib/
+
+(defvar gnus-message-group-art)
+(defvar gnus-list-identifiers) ; gnus-sum is required where necessary
+(defvar rmail-enable-mime-composing)
(defgroup message '((user-mail-address custom-variable)
(user-full-name custom-variable))
:group 'message-buffers
:type 'boolean)
-(eval-when-compile
- (defvar gnus-local-organization))
+(defvar gnus-local-organization)
(defcustom message-user-organization
(or (and (boundp 'gnus-local-organization)
(stringp gnus-local-organization)
:link '(custom-manual "(message)Canceling News")
:type 'string)
+(defvar smtpmail-default-smtp-server)
+
+(defun message-send-mail-function ()
+ "Return suitable value for the variable `message-send-mail-function'."
+ (cond ((and (require 'sendmail)
+ (boundp 'sendmail-program)
+ sendmail-program
+ (executable-find sendmail-program))
+ 'message-send-mail-with-sendmail)
+ ((and (locate-library "smtpmail")
+ (require 'smtpmail)
+ smtpmail-default-smtp-server)
+ 'message-smtpmail-send-it)
+ ((locate-library "mailclient")
+ 'message-send-mail-with-mailclient)
+ (t
+ (lambda ()
+ (error "Don't know how to send mail. Please customize `message-send-mail-function'")))))
+
;; Useful to set in site-init.el
-(defcustom message-send-mail-function
- (let ((program (if (boundp 'sendmail-program)
- ;; see paths.el
- sendmail-program)))
- (cond
- ((and program
- (string-match "/" program) ;; Skip path
- (file-executable-p program))
- 'message-send-mail-with-sendmail)
- ((and program
- (executable-find program))
- 'message-send-mail-with-sendmail)
- (t
- 'smtpmail-send-it)))
+(defcustom message-send-mail-function (message-send-mail-function)
"Function to call to send the current buffer as mail.
The headers should be delimited by a line whose contents match the
variable `mail-header-separator'.
-Valid values include `message-send-mail-with-sendmail' (the default),
+Valid values include `message-send-mail-with-sendmail'
`message-send-mail-with-mh', `message-send-mail-with-qmail',
-`message-smtpmail-send-it', `smtpmail-send-it' and `feedmail-send-it'.
+`message-smtpmail-send-it', `smtpmail-send-it',
+`feedmail-send-it' and `message-send-mail-with-mailclient'. The
+default is system dependent.
See also `send-mail-function'."
:type '(radio (function-item message-send-mail-with-sendmail)
(function-item message-smtpmail-send-it)
(function-item smtpmail-send-it)
(function-item feedmail-send-it)
- (function :tag "Other"))
+ (function :tag "Other")
+ (function-item message-send-mail-with-mailclient
+ :tag "Use Mailclient package")
+ (function :tag "Other"))
:group 'message-sending
+ :initialize 'custom-initialize-default
:link '(custom-manual "(message)Mail Variables")
:group 'message-mail)
:type '(choice (function)
(repeat string)))
-(eval-when-compile
- (defvar gnus-post-method)
- (defvar gnus-select-method))
+(defvar gnus-post-method)
+(defvar gnus-select-method)
(defcustom message-post-method
(cond ((and (boundp 'gnus-post-method)
(listp gnus-post-method)
(file-readable-p "/etc/sendmail.cf")
(let ((buffer (get-buffer-create " *temp*")))
(unwind-protect
- (save-excursion
- (set-buffer buffer)
+ (with-current-buffer buffer
(insert-file-contents "/etc/sendmail.cf")
(goto-char (point-min))
(let ((case-fold-search nil))
(defcustom message-dont-reply-to-names
(and (boundp 'rmail-dont-reply-to-names) rmail-dont-reply-to-names)
"*Addresses to prune when doing wide replies.
-This can be a regexp or a list of regexps. Also, a value of nil means
+This can be a regexp or a list of regexps. Also, a value of nil means
exclude your own user name only."
:version "21.1"
:group 'message
(defcustom message-generate-hashcash (if (executable-find "hashcash") t)
"*Whether to generate X-Hashcash: headers.
-If `t', always generate hashcash headers. If `opportunistic',
+If t, always generate hashcash headers. If `opportunistic',
only generate hashcash headers if it can be done without the user
waiting (i.e., only asynchronously).
(defvar message-inserted-headers nil)
;; Byte-compiler warning
-(eval-when-compile
- (defvar gnus-active-hashtb)
- (defvar gnus-read-active-file))
+(defvar gnus-active-hashtb)
+(defvar gnus-read-active-file)
;;; Regexp matching the delimiter of messages in UNIX mail format
;;; (UNIX From lines), minus the initial ^. It should be a copy
"Evaluate FORMS in the reply buffer, if it exists."
`(when (and message-reply-buffer
(buffer-name message-reply-buffer))
- (save-excursion
- (set-buffer message-reply-buffer)
+ (with-current-buffer message-reply-buffer
,@forms)))
(put 'message-with-reply-buffer 'lisp-indent-function 0)
(defvar message-tool-bar-map nil)
-(eval-when-compile
- (defvar facemenu-add-face-function)
- (defvar facemenu-remove-face-function))
+(defvar facemenu-add-face-function)
+(defvar facemenu-remove-face-function)
;;; Forbidden properties
;;
;; solution would be not to use `define-derived-mode', and run
;; `text-mode-hook' ourself at the end of the mode.
;; -- Per Abrahamsen <abraham@dina.kvl.dk> Date: 2001-10-19.
+ ;; This kludge is unneeded in Emacs>=21 since define-derived-mode is
+ ;; now careful to run parent hooks after the body. --Stef
(when auto-fill-function
(setq auto-fill-function normal-auto-fill-function)))
(let ((follow-to
(and message-reply-buffer
(buffer-name message-reply-buffer)
- (save-excursion
- (set-buffer message-reply-buffer)
+ (with-current-buffer message-reply-buffer
(message-get-reply-headers t)))))
(save-excursion
(save-restriction
and `low'."
(interactive)
(save-excursion
- (let ((valid '("high" "normal" "low"))
- (new "high")
+ (let ((new "high")
cur)
(save-restriction
(message-narrow-to-headers)
(defun message-buffers ()
"Return a list of active message buffers."
(let (buffers)
- (save-excursion
+ (save-current-buffer
(dolist (buffer (buffer-list t))
(set-buffer buffer)
(when (and (eq major-mode 'message-mode)
(push (buffer-name buffer) buffers))))
(nreverse buffers)))
-(eval-when-compile (defvar mail-citation-hook)) ; Compiler directive
-
(defun message-cite-original-1 (strip-signature)
"Cite an original message.
If STRIP-SIGNATURE is non-nil, strips off the signature from the
"Cite function in the standard Message manner."
(message-cite-original-1 nil))
+(defvar gnus-extract-address-components)
+
(defun message-insert-formatted-citation-line (&optional from date)
"Function that inserts a formatted citation line.
;; Let the user do all of the above.
(run-hooks 'message-header-hook))
(unwind-protect
- (save-excursion
- (set-buffer tembuf)
+ (with-current-buffer tembuf
(erase-buffer)
;; Avoid copying text props (except hard newlines).
(insert (with-current-buffer mailbuf
(unless (or (null cpr) (and (numberp cpr) (zerop cpr)))
(error "Sending...failed with exit value %d" cpr)))
(when message-interactive
- (save-excursion
- (set-buffer errbuf)
+ (with-current-buffer errbuf
(goto-char (point-min))
(while (re-search-forward "\n+ *" nil t)
(replace-match "; "))
(run-hooks 'message-send-mail-hook)
(smtpmail-send-it))
+(defun message-send-mail-with-mailclient ()
+ "Send the prepared message buffer with `mailclient-send-it'.
+This only differs from `smtpmail-send-it' that this command evaluates
+`message-send-mail-hook' just before sending a message."
+ (run-hooks 'message-send-mail-hook)
+ (mailclient-send-it))
+
(defun message-canlock-generate ()
"Return a string that is non-trivial to guess.
Do not use this for anything important, it is cryptographically weak."
(message-check-news-syntax)))
nil
(unwind-protect
- (save-excursion
- (set-buffer tembuf)
+ (with-current-buffer tembuf
(buffer-disable-undo)
(erase-buffer)
;; Avoid copying text props (except hard newlines).
;; Check for control characters.
(message-check 'control-chars
(if (re-search-forward
- (mm-string-as-multibyte "[\000-\007\013\015-\032\034-\037\200-\237]")
+ (mm-string-to-multibyte "[\000-\007\013\015-\032\034-\037\200-\237]")
nil t)
(y-or-n-p
"The article contains control characters. Really post? ")
"Return the References header for this message."
(when message-reply-headers
(let ((message-id (mail-header-message-id message-reply-headers))
- (references (mail-header-references message-reply-headers))
- new-references)
+ (references (mail-header-references message-reply-headers)))
(if (or references message-id)
(concat (or references "") (and references " ")
(or message-id ""))
(mapcar 'funcall
message-subscribed-address-functions))))
(save-match-data
- (let ((subscribed-lists nil)
- (list
+ (let ((list
(loop for recipient in recipients
when (loop for regexp in mft-regexps
when (string-match regexp recipient) return t)
(setq subject (funcall func subject))))
subject))))
-(eval-when-compile
- (defvar gnus-article-decoded-p))
+(defvar gnus-article-decoded-p)
;;;###autoload
(rmail-msg-restore-non-pruned-header)))
(message-forward-make-body forward-buffer))
-(eval-when-compile (defvar rmail-enable-mime-composing))
-
;; Fixme: Should have defcustom.
;;;###autoload
(defun message-insinuate-rmail ()
(mapcar #'delete-overlay (overlays-in (point-min) (point-max)))))
;; Support for toolbar
-(eval-when-compile
- (defvar tool-bar-mode))
+(defvar tool-bar-mode)
;; Note: The :set function in the `message-tool-bar*' variables will only
;; affect _new_ message buffers. We might add a function that walks thru all
(defcustom message-tool-bar-retro
'(;; Old Emacs 21 icon for consistency.
- (message-send-and-exit "gnus/mail_send")
+ (message-send-and-exit "gnus/mail-send")
(message-kill-buffer "close")
(message-dont-send "cancel")
(mml-attach-file "attach" mml-mode-map)
(if (and show
(setq text (message-flatten-list text)))
(save-window-excursion
- (save-excursion
- (with-output-to-temp-buffer " *MESSAGE information message*"
- (set-buffer " *MESSAGE information message*")
+ (with-output-to-temp-buffer " *MESSAGE information message*"
+ (with-current-buffer " *MESSAGE information message*"
(fundamental-mode) ; for Emacs 20.4+
(mapc 'princ text)
(goto-char (point-min))))
new one, cloning only the locals having a substring matching the
regexp VARSTR."
(let ((oldbuf (current-buffer)))
- (save-excursion
- (set-buffer (generate-new-buffer name))
+ (with-current-buffer (generate-new-buffer name)
(message-clone-locals oldbuf varstr)
(current-buffer))))
(defun message-clone-locals (buffer &optional varstr)
"Clone the local variables from BUFFER to the current buffer."
- (let ((locals (save-excursion
- (set-buffer buffer)
- (buffer-local-variables)))
+ (let ((locals (with-current-buffer buffer (buffer-local-variables)))
(regexp "^gnus\\|^nn\\|^message\\|^sendmail\\|^smtp\\|^user-mail-address"))
(mapcar
(lambda (local)
message-hidden-headers))
(inhibit-point-motion-hooks t)
(after-change-functions nil)
- (end-of-headers 0))
+ (end-of-headers (point-min)))
(when regexps
(save-excursion
(save-restriction
(setq header (buffer-substring begin (point))
header-len (- (point) begin))
(delete-region begin (point))
- (goto-char (1+ end-of-headers))
+ (goto-char end-of-headers)
(insert header)
(setq end-of-headers
(+ end-of-headers header-len))))))))
- (narrow-to-region (1+ end-of-headers) (point-max))))
+ (narrow-to-region end-of-headers (point-max))))
(defun message-hide-header-p (regexps)
(let ((result nil)
;;; Code:
-(eval-when-compile
- (defvar mm-uu-decode-function)
- (defvar mm-uu-binhex-decode-function))
-
(require 'mm-util)
(require 'rfc2047)
(require 'mm-encode)
+(defvar mm-uu-yenc-decode-function)
+(defvar mm-uu-decode-function)
+(defvar mm-uu-binhex-decode-function)
+
;; 8bit treatment gets any char except: 0x32 - 0x7f, LF, TAB, BEL,
;; BS, vertical TAB, form feed, and ^_
;;
;;; Functions for decoding
;;;
-(eval-when-compile (defvar mm-uu-yenc-decode-function))
-
(defun mm-decode-content-transfer-encoding (encoding &optional type)
"Decodes buffer encoded with ENCODING, returning success status.
If TYPE is `text/plain' CRLF->LF translation may occur."
;; a vector in Emacs but is a list in XEmacs)
;; requires that it is lexically scoped.
(timer (run-at-time 2.0 nil 'ignore)))
- (if (boundp 'itimer-list)
+ (if (featurep 'xemacs)
(lambda (process state)
(when (eq 'exit (process-status process))
(if (memq timer itimer-list)
(mm-handle-set-cache handle spec))))))
(defun mm-create-image-xemacs (type)
- (cond
- ((equal type "xbm")
- ;; xbm images require special handling, since
- ;; the only way to create glyphs from these
- ;; (without a ton of work) is to write them
- ;; out to a file, and then create a file
- ;; specifier.
- (let ((file (mm-make-temp-file
- (expand-file-name "emm" mm-tmp-directory)
- nil ".xbm")))
- (unwind-protect
- (progn
- (write-region (point-min) (point-max) file)
- (make-glyph (list (cons 'x file))))
- (ignore-errors
- (delete-file file)))))
- (t
- (make-glyph
- (vector
- (or (mm-image-type-from-buffer)
- (intern type))
- :data (buffer-string))))))
+ (when (featurep 'xemacs)
+ (cond
+ ((equal type "xbm")
+ ;; xbm images require special handling, since
+ ;; the only way to create glyphs from these
+ ;; (without a ton of work) is to write them
+ ;; out to a file, and then create a file
+ ;; specifier.
+ (let ((file (mm-make-temp-file
+ (expand-file-name "emm" mm-tmp-directory)
+ nil ".xbm")))
+ (unwind-protect
+ (progn
+ (write-region (point-min) (point-max) file)
+ (make-glyph (list (cons 'x file))))
+ (ignore-errors
+ (delete-file file)))))
+ (t
+ (make-glyph
+ (vector
+ (or (mm-image-type-from-buffer)
+ (intern type))
+ :data (buffer-string)))))))
(defun mm-image-fit-p (handle)
"Say whether the image in HANDLE will fit the current window."
(let ((image (mm-get-image handle)))
(or (not image)
- (if (fboundp 'glyph-width)
+ (if (featurep 'xemacs)
;; XEmacs' glyphs can actually tell us about their width, so
;; lets be nice and smart about them.
(or mm-inline-large-images
(require 'timer))
(require 'timer)))
+(defvar mm-mime-mule-charset-alist )
+
(eval-and-compile
(mapc
(lambda (elem)
(autoload 'latin-unity-massage-name "latin-unity")
(autoload 'latin-unity-maybe-remap "latin-unity")
(autoload 'latin-unity-representations-feasible-region "latin-unity")
- (autoload 'latin-unity-representations-present-region "latin-unity")
- (defvar latin-unity-coding-systems)
- (defvar latin-unity-ucs-list))
+ (autoload 'latin-unity-representations-present-region "latin-unity"))
+
+(defvar latin-unity-coding-systems)
+(defvar latin-unity-ucs-list)
(defun mm-xemacs-find-mime-charset-1 (begin end)
"Determine which MIME charset to use to send region as message.
(funcall (symbol-value 'set-auto-coding-function)
nil (- (point-max) (point-min)))
(error nil)))))
- ((featurep 'file-coding) ;; XEmacs
+ ((and (featurep 'xemacs) (featurep 'file-coding)) ;; XEmacs
(let ((case-fold-search t)
(end (point-at-eol))
codesys start)
(mm-uu-configure)
-(eval-when-compile
- (defvar file-name)
- (defvar start-point)
- (defvar end-point)
- (defvar entry))
+(defvar file-name)
+(defvar start-point)
+(defvar end-point)
+(defvar entry)
(defun mm-uu-uu-filename ()
(if (looking-at ".+")
(list mm-dissect-disposition
(cons 'filename file-name))))
-(eval-when-compile
- (defvar gnus-newsgroup-name))
+(defvar gnus-newsgroup-name)
(defun mm-uu-emacs-sources-test ()
(setq file-name (match-string 1))
(y-or-n-p "Verify pgp signed part? ")
(message ""))))))
-(eval-when-compile
- (defvar gnus-newsgroup-charset))
+(defvar gnus-newsgroup-charset)
(defun mm-uu-pgp-signed-extract-1 (handles ctl)
(let ((buf (mm-uu-copy-to-buffer (point-min) (point-max))))
(delete-region b (+ b 2)))))))
(defun mm-inline-image-xemacs (handle)
- (insert "\n\n")
- (forward-char -2)
- (let ((annot (make-annotation (mm-get-image handle) nil 'text))
- buffer-read-only)
- (mm-handle-set-undisplayer
- handle
- `(lambda ()
- (let ((b ,(point-marker))
- buffer-read-only)
- (delete-annotation ,annot)
- (delete-region (- b 2) b))))
- (set-extent-property annot 'mm t)
- (set-extent-property annot 'duplicable t)))
+ (when (featurep 'xemacs)
+ (insert "\n\n")
+ (forward-char -2)
+ (let ((annot (make-annotation (mm-get-image handle) nil 'text))
+ buffer-read-only)
+ (mm-handle-set-undisplayer
+ handle
+ `(lambda ()
+ (let ((b ,(point-marker))
+ buffer-read-only)
+ (delete-annotation ,annot)
+ (delete-region (- b 2) b))))
+ (set-extent-property annot 'mm t)
+ (set-extent-property annot 'duplicable t))))
(eval-and-compile
(if (featurep 'xemacs)
;; By default, XEmacs font-lock uses non-duplicable text
;; properties. This code forces all the text properties
;; to be copied along with the text.
- (when (fboundp 'extent-list)
+ (when (featurep 'xemacs)
(map-extents (lambda (ext ignored)
(set-extent-property ext 'duplicable t)
nil)
;;; Code:
(eval-when-compile (require 'cl))
-(require 'password)
+(or (require 'password-cache nil t)
+ (require 'password))
+
(autoload 'mml2015-sign "mml2015")
(autoload 'mml2015-encrypt "mml2015")
(autoload 'mml1991-sign "mml1991")
nil))
(goto-char (point-max)))
+(defvar gnus-extract-address-components)
+
(defun mml-smime-openssl-sign-query ()
;; query information (what certificate) from user when MML tag is
;; added, for use later by the signing process
(defun mml-smime-openssl-verify-test (handle ctl)
smime-openssl-program)
-(eval-and-compile
- (autoload 'epg-make-context "epg"))
+(defvar epg-user-id-alist)
+(defvar epg-digest-algorithm-alist)
+(defvar inhibit-redisplay)
+(defvar password-cache-expiry)
(eval-when-compile
- (defvar epg-user-id-alist)
- (defvar epg-digest-algorithm-alist)
- (defvar inhibit-redisplay)
+ (autoload 'epg-make-context "epg")
(autoload 'epg-context-set-armor "epg")
(autoload 'epg-context-set-signers "epg")
(autoload 'epg-context-result-for "epg")
(autoload 'epg-expand-group "epg-config")
(autoload 'epa-select-keys "epa"))
-(eval-when-compile
- (defvar password-cache-expiry)
- (autoload 'password-read "password")
- (autoload 'password-cache-add "password")
- (autoload 'password-cache-remove "password"))
-
(defvar mml-smime-epg-secret-key-id-list nil)
(defun mml-smime-epg-passphrase-callback (context key-id ignore)
(defvar message-required-mail-headers)
(defvar message-required-news-headers)
(defvar dnd-protocol-alist)
+(defvar mml-dnd-protocol-alist)
(defcustom mml-content-type-parameters
'(name access-type expiration size permission format)
(mail-header-encode-parameter
(symbol-name type) value))))))
-(eval-when-compile
- (defvar ange-ftp-name-format)
- (defvar efs-path-regexp))
+(defvar ange-ftp-name-format)
+(defvar efs-path-regexp)
+
(defun mml-parse-file-name (path)
(if (if (boundp 'efs-path-regexp)
(string-match efs-path-regexp path)
;; pgg wrapper
-(eval-when-compile
- (defvar pgg-default-user-id)
- (defvar pgg-errors-buffer)
- (defvar pgg-output-buffer))
+(defvar pgg-default-user-id)
+(defvar pgg-errors-buffer)
+(defvar pgg-output-buffer)
(defun mml1991-pgg-sign (cont)
(let ((pgg-text-mode t)
;; epg wrapper
-(eval-and-compile
- (autoload 'epg-make-context "epg"))
+(defvar epg-user-id-alist)
+(defvar password-cache-expiry)
-(eval-when-compile
- (defvar epg-user-id-alist)
+(eval-and-compile
+ (autoload 'epg-make-context "epg")
(autoload 'epg-passphrase-callback-function "epg")
(autoload 'epa-select-keys "epa")
(autoload 'epg-list-keys "epg")
(autoload 'epg-configuration "epg-config")
(autoload 'epg-expand-group "epg-config"))
-(eval-when-compile
- (defvar password-cache-expiry)
- (autoload 'password-read "password")
- (autoload 'password-cache-add "password")
- (autoload 'password-cache-remove "password"))
-
(defvar mml1991-epg-secret-key-id-list nil)
(defun mml1991-epg-passphrase-callback (context key-id ignore)
(autoload 'mc-cleanup-recipient-headers "mc-toplev")
(autoload 'mc-sign-generic "mc-toplev"))
-(eval-when-compile
- (defvar mc-default-scheme)
- (defvar mc-schemes))
+(defvar mc-default-scheme)
+(defvar mc-schemes)
(defvar mml2015-decrypt-function 'mailcrypt-decrypt)
(defvar mml2015-verify-function 'mailcrypt-verify)
;;; pgg wrapper
-(eval-when-compile
- (defvar pgg-default-user-id)
- (defvar pgg-errors-buffer)
- (defvar pgg-output-buffer))
+(defvar pgg-default-user-id)
+(defvar pgg-errors-buffer)
+(defvar pgg-output-buffer)
(eval-and-compile
(autoload 'pgg-decrypt-region "pgg")
;;; epg wrapper
-(eval-and-compile
- (autoload 'epg-make-context "epg"))
+(defvar epg-user-id-alist)
+(defvar epg-digest-algorithm-alist)
+(defvar inhibit-redisplay)
-(eval-when-compile
- (defvar epg-user-id-alist)
- (defvar epg-digest-algorithm-alist)
- (defvar inhibit-redisplay)
+(eval-and-compile
+ (autoload 'epg-make-context "epg")
(autoload 'epg-context-set-armor "epg")
(autoload 'epg-context-set-textmode "epg")
(autoload 'epg-context-set-signers "epg")
(autoload 'epg-expand-group "epg-config")
(autoload 'epa-select-keys "epa"))
-(eval-when-compile
- (defvar password-cache-expiry)
- (autoload 'password-read "password")
- (autoload 'password-cache-add "password")
- (autoload 'password-cache-remove "password"))
+(defvar password-cache-expiry)
(defvar mml2015-epg-secret-key-id-list nil)
;;; .netrc and .authinfo rc parsing
;;;
-;; autoload encrypt
-(eval-and-compile
- (autoload 'encrypt-find-model "encrypt")
- (autoload 'encrypt-insert-file-contents "encrypt"))
+(defalias 'netrc-point-at-eol
+ (if (fboundp 'point-at-eol)
+ 'point-at-eol
+ 'line-end-position))
(defgroup netrc nil
"Netrc configuration."
(let ((tokens '("machine" "default" "login"
"password" "account" "macdef" "force"
"port"))
- (encryption-model (encrypt-find-model file))
alist elem result pair)
-
- (if encryption-model
- (encrypt-insert-file-contents file encryption-model)
- (insert-file-contents file))
-
+ (insert-file-contents file)
(goto-char (point-min))
;; Go through the file, line by line.
(while (not (eobp))
(setq type (or type 'tcp))
(while (and (setq service (pop services))
(not (and (= number (cadr service))
- (eq type (caddr service)))))
- )
+ (eq type (car (cddr service)))))))
(car service)))
(defun netrc-find-service-number (name &optional type)
(setq type (or type 'tcp))
(while (and (setq service (pop services))
(not (and (string= name (car service))
- (eq type (caddr service)))))
- )
+ (eq type (car (cddr service)))))))
(cadr service)))
(provide 'netrc)
(unless no-active
(nnmail-save-active nndiary-group-alist nndiary-active-file))))))
-(eval-when-compile (defvar files))
+(defvar files)
(defun nndiary-generate-active-info (dir)
;; Update the active info for this group.
(let* ((group (nnheader-file-to-group
(eval-when-compile (require 'cl))
(defvar nnmail-extra-headers)
+(defvar gnus-newsgroup-name)
+(defvar nnheader-file-coding-system)
+(defvar jka-compr-compression-info-list)
;; Requiring `gnus-util' at compile time creates a circular
;; dependency between nnheader.el and gnus-util.el.
(erase-buffer))
(current-buffer))
-(eval-when-compile (defvar jka-compr-compression-info-list))
(defvar nnheader-numerical-files
(if (boundp 'jka-compr-compression-info-list)
(concat "\\([0-9]+\\)\\("
(car results)
(car (sort results 'file-newer-than-file-p)))))
-(eval-when-compile
- (defvar ange-ftp-path-format)
- (defvar efs-path-regexp))
+(defvar ange-ftp-path-format)
+(defvar efs-path-regexp)
(defun nnheader-re-read-dir (path)
"Re-read directory PATH if PATH is on a remote system."
(if (and (fboundp 'efs-re-read-dir) (boundp 'efs-path-regexp))
You may need it if you want to use an advanced splitting function that
analyzes the body before splitting the article.
If this variable is nil, bodies will not be downloaded; if this
-variable is the symbol `default' the default behaviour is
+variable is the symbol `default' the default behavior is
used (which currently is nil, unless you use a statistical
spam.el test); if this variable is another non-nil value bodies
will be downloaded."
;;; nnmaildir.el --- maildir backend for Gnus
-;; Public domain.
+
+;; This file is in the public domain.
;; Author: Paul Jarc <prj@po.cwru.edu>
(unless no-active
(nnmail-save-active nnml-group-alist nnml-active-file)))))))
-(eval-when-compile (defvar files))
+(defvar files)
(defun nnml-generate-active-info (dir)
;; Update the active info for this group.
(let ((group (directory-file-name dir))
;;; nnnil.el --- empty backend for Gnus
-;; Public domain.
+
+;; This file is in the public domain.
;; Author: Paul Jarc <prj@po.cwru.edu>
+;; This file is part of GNU Emacs.
+
;; 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 3, or (at your option)
(deffoo nnrss-close-group (group &optional server)
t)
-(eval-when-compile
- (defvar mm-text-html-renderer)
- (defvar mm-text-html-washer-alist))
+(defvar mm-text-html-renderer)
+(defvar mm-text-html-washer-alist)
(deffoo nnrss-request-article (article &optional group server buffer)
(setq group (nnrss-decode-group-name group))
;;; ntlm.el --- NTLM (NT LanManager) authentication support
-;; Copyright (C) 2001 Taro Kawagishi
+;; Copyright (C) 2001, 2007 Free Software Foundation, Inc.
+
;; Author: Taro Kawagishi <tarok@transpulse.org>
;; Keywords: NTLM, SASL
;; Version: 1.00
;; Created: February 2001
-;; This program is free software; you can redistribute it and/or modify
+;; This file is part of GNU Emacs.
+
+;; 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 3, or (at your option)
;; any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
+
+;; 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 this program; see the file COPYING. If not, write to the
+;; along with GNU Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
-;;; password.el --- Read passwords from user, possibly using a password cache.
+;;; password-cache.el --- Read passwords, possibly using a password cache.
-;; Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+;; Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007
+;; Free Software Foundation, Inc.
;; Author: Simon Josefsson <simon@josefsson.org>
;; Created: 2003-12-21
;; (password-cache-add "test" "foo")
;; => nil
-;; Note the previous two can be replaced with:
-;; (password-read-and-add "Password? " "test")
-;; ;; Minibuffer prompt for password.
-;; => "foo"
-;; ;; "foo" is now cached with key "test"
-
-
;; (password-read "Password? " "test")
;; ;; No minibuffer prompt
;; => "foo"
;;; Code:
-(eval-when-compile
- (require 'cl))
-
(defcustom password-cache t
"Whether to cache passwords."
:group 'password
(defun password-read-and-add (prompt &optional key)
"Read password, for use with KEY, from user, or from cache if wanted.
Then store the password in the cache. Uses `password-read' and
-`password-cache-add'.
-Custom variables `password-cache' and `password-cache-expiry'
-regulate cache behavior."
+`password-cache-add'. Custom variables `password-cache' and
+`password-cache-expiry' regulate cache behavior.
+
+Warning: the password is cached without checking that it is
+correct. It is better to check the password before caching. If
+you must use this function, take care to check passwords and
+remove incorrect ones from the cache."
(let ((password (password-read prompt key)))
(when (and password key)
(password-cache-add key password))
password))
+(make-obsolete 'password-read-and-add 'password-read "23.1")
+
(defun password-cache-remove (key)
"Remove password indexed by KEY from password cache.
This is typically run be a timer setup from `password-cache-add',
(defun password-cache-add (key password)
"Add password to cache.
-The password is removed by a timer after `password-cache-expiry'
-seconds."
+The password is removed by a timer after `password-cache-expiry' seconds."
(when (and password-cache-expiry (null (intern-soft key password-data)))
(run-at-time password-cache-expiry nil
#'password-cache-remove
(interactive)
(fillarray password-data 0))
-(provide 'password)
+(provide 'password-cache)
;;; arch-tag: ab160494-16c8-4c68-a4a1-73eebf6686e5
-;;; password.el ends here
+;;; password-cache.el ends here
(repeat))))
(repeat)))))
+ (defvar pgg-parse-crc24)
+
(defun pgg-parse-crc24-string (string)
(let ((h (vector nil 183 1230 nil nil nil nil nil nil)))
(ccl-execute-on-string pgg-parse-crc24 h string)
pgg-parse-public-key-algorithm-alist)))
result))
+;; p-d-p only calls this if it is defined, but the compiler does not
+;; recognize that.
+(declare-function pgg-parse-crc24-string "pgg-parse" (string))
+
(defun pgg-decode-packets ()
(if (re-search-forward "^=\\([A-Za-z0-9+/]\\{4\\}\\)$" nil t)
(let ((p (match-beginning 0))
;;; @ utility functions
;;;
+(eval-when-compile
+ (unless (featurep 'xemacs)
+ (defalias 'pgg-run-at-time 'run-at-time)
+ (defalias 'pgg-cancel-timer 'cancel-timer))
+
+ (when (featurep 'xemacs)
+ (defmacro pgg-run-at-time-1 (time repeat function args)
+ (if (condition-case nil
+ (let ((delete-itimer 'delete-itimer)
+ (itimer-driver-start 'itimer-driver-start)
+ (itimer-value 'itimer-value)
+ (start-itimer 'start-itimer))
+ (unless (or (symbol-value 'itimer-process)
+ (symbol-value 'itimer-timer))
+ (funcall itimer-driver-start))
+ ;; Check whether there is a bug to which the difference of
+ ;; the present time and the time when the itimer driver was
+ ;; woken up is subtracted from the initial itimer value.
+ (let* ((inhibit-quit t)
+ (ctime (current-time))
+ (itimer-timer-last-wakeup
+ (prog1
+ ctime
+ (setcar ctime (1- (car ctime)))))
+ (itimer-list nil)
+ (itimer (funcall start-itimer "pgg-run-at-time"
+ 'ignore 5)))
+ (sleep-for 0.1) ;; Accept the timeout interrupt.
+ (prog1
+ (> (funcall itimer-value itimer) 0)
+ (funcall delete-itimer itimer))))
+ (error nil))
+ `(let ((time ,time))
+ (apply #'start-itimer "pgg-run-at-time"
+ ,function (if time (max time 1e-9) 1e-9)
+ ,repeat nil t ,args)))
+ `(let ((time ,time)
+ (itimers (list nil)))
+ (setcar
+ itimers
+ (apply #'start-itimer "pgg-run-at-time"
+ (lambda (itimers repeat function &rest args)
+ (let ((itimer (car itimers)))
+ (if repeat
+ (progn
+ (set-itimer-function
+ itimer
+ (lambda (itimer repeat function &rest args)
+ (set-itimer-restart itimer repeat)
+ (set-itimer-function itimer function)
+ (set-itimer-function-arguments itimer args)
+ (apply function args)))
+ (set-itimer-function-arguments
+ itimer
+ (append (list itimer repeat function) args)))
+ (set-itimer-function
+ itimer
+ (lambda (itimer function &rest args)
+ (delete-itimer itimer)
+ (apply function args)))
+ (set-itimer-function-arguments
+ itimer
+ (append (list itimer function) args)))))
+ 1e-9 (if time (max time 1e-9) 1e-9)
+ nil t itimers ,repeat ,function ,args))))
+
+ (defun pgg-run-at-time (time repeat function &rest args)
+ "Emulating function run as `run-at-time'.
+TIME should be nil meaning now, or a number of seconds from now.
+Return an itimer object which can be used in either `delete-itimer'
+or `cancel-timer'."
+ (pgg-run-at-time-1 time repeat function args))
+ (defun pgg-cancel-timer (timer)
+ "Emulate cancel-timer for xemacs."
+ (let ((delete-itimer 'delete-itimer))
+ (funcall delete-itimer timer)))
+ ))
+
(defun pgg-invoke (func scheme &rest args)
(progn
(require (intern (format "pgg-%s" scheme)))
(defun pgg-clear-string (string)
(fillarray string ?_)))
+(declare-function pgg-clear-string "pgg" (string))
+
(defun pgg-remove-passphrase-from-cache (key &optional notruncate)
"Omit passphrase associated with KEY in time-limited passphrase cache.
(pgg-cancel-timer old-timer)
(unintern interned-timer-key pgg-pending-timers))))
-(eval-when-compile
- (defmacro pgg-run-at-time-1 (time repeat function args)
- (when (featurep 'xemacs)
- (if (condition-case nil
- (let ((delete-itimer 'delete-itimer)
- (itimer-driver-start 'itimer-driver-start)
- (itimer-value 'itimer-value)
- (start-itimer 'start-itimer))
- (unless (or (symbol-value 'itimer-process)
- (symbol-value 'itimer-timer))
- (funcall itimer-driver-start))
- ;; Check whether there is a bug to which the difference of
- ;; the present time and the time when the itimer driver was
- ;; woken up is subtracted from the initial itimer value.
- (let* ((inhibit-quit t)
- (ctime (current-time))
- (itimer-timer-last-wakeup
- (prog1
- ctime
- (setcar ctime (1- (car ctime)))))
- (itimer-list nil)
- (itimer (funcall start-itimer "pgg-run-at-time"
- 'ignore 5)))
- (sleep-for 0.1) ;; Accept the timeout interrupt.
- (prog1
- (> (funcall itimer-value itimer) 0)
- (funcall delete-itimer itimer))))
- (error nil))
- `(let ((time ,time))
- (apply #'start-itimer "pgg-run-at-time"
- ,function (if time (max time 1e-9) 1e-9)
- ,repeat nil t ,args)))
- `(let ((time ,time)
- (itimers (list nil)))
- (setcar
- itimers
- (apply #'start-itimer "pgg-run-at-time"
- (lambda (itimers repeat function &rest args)
- (let ((itimer (car itimers)))
- (if repeat
- (progn
- (set-itimer-function
- itimer
- (lambda (itimer repeat function &rest args)
- (set-itimer-restart itimer repeat)
- (set-itimer-function itimer function)
- (set-itimer-function-arguments itimer args)
- (apply function args)))
- (set-itimer-function-arguments
- itimer
- (append (list itimer repeat function) args)))
- (set-itimer-function
- itimer
- (lambda (itimer function &rest args)
- (delete-itimer itimer)
- (apply function args)))
- (set-itimer-function-arguments
- itimer
- (append (list itimer function) args)))))
- 1e-9 (if time (max time 1e-9) 1e-9)
- nil t itimers ,repeat ,function ,args))))))
-
-(eval-and-compile
- (if (featurep 'xemacs)
- (progn
- (defun pgg-run-at-time (time repeat function &rest args)
- "Emulating function run as `run-at-time'.
-TIME should be nil meaning now, or a number of seconds from now.
-Return an itimer object which can be used in either `delete-itimer'
-or `cancel-timer'."
- (pgg-run-at-time-1 time repeat function args))
- (defun pgg-cancel-timer (timer)
- "Emulate cancel-timer for xemacs."
- (let ((delete-itimer 'delete-itimer))
- (funcall delete-itimer timer)))
- )
- (defalias 'pgg-run-at-time 'run-at-time)
- (defalias 'pgg-cancel-timer 'cancel-timer)))
-
(defmacro pgg-convert-lbt-region (start end lbt)
`(let ((pgg-conversion-end (set-marker (make-marker) ,end)))
(goto-char ,start)
;;; Code:
(require 'mail-utils)
+(defvar parse-time-months)
(defgroup pop3 nil
"Post Office Protocol."
(forward-char)))
(set-marker end nil))
-(eval-when-compile (defvar parse-time-months))
-
;; Copied from message-make-date.
(defun pop3-make-date (&optional now)
"Make a valid date header.
;;; Code:
(require 'mm-util)
-(eval-when-compile (defvar mm-use-ultra-safe-encoding))
+(defvar mm-use-ultra-safe-encoding)
;;;###autoload
(defun quoted-printable-decode-region (from to &optional coding-system)
;;; Code:
(eval-when-compile
- (require 'cl)
- (defvar message-posting-charset))
+ (require 'cl))
+(defvar message-posting-charset)
(require 'qp)
(require 'mm-util)
;; Fixme: This, and the require below may not be the Right Thing, but
;; should be safe just before release. -- fx 2001-02-08
-(eval-when-compile (defvar message-posting-charset))
(defun rfc2047-encodable-p ()
"Return non-nil if any characters in current buffer need encoding in headers.
;;; sasl-cram.el --- CRAM-MD5 module for the SASL client framework
-;; Copyright (C) 2000 Free Software Foundation, Inc.
+;; Copyright (C) 2000, 2007 Free Software Foundation, Inc.
;; Author: Daiki Ueno <ueno@unixuser.org>
;; Kenichi OKADA <okada@opaopa.org>
;; Keywords: SASL, CRAM-MD5
-;; This file is part of FLIM (Faithful Library about Internet Message).
+;; 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 3, 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 3, 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 this program; see the file COPYING. If not, write to the
+;; along with GNU Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;;; sasl-digest.el --- DIGEST-MD5 module for the SASL client framework
-;; Copyright (C) 2000 Free Software Foundation, Inc.
+;; Copyright (C) 2000, 2007 Free Software Foundation, Inc.
;; Author: Daiki Ueno <ueno@unixuser.org>
;; Kenichi OKADA <okada@opaopa.org>
;; Keywords: SASL, DIGEST-MD5
-;; This file is part of FLIM (Faithful Library about Internet Message).
+;; 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 3, 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 3, 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 this program; see the file COPYING. If not, write to the
+;; along with GNU Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
+;;; Commentary:
+
;; This program is implemented from draft-leach-digest-sasl-05.txt.
;;
;; It is caller's responsibility to base64-decode challenges and
;;; sasl-ntlm.el --- NTLM (NT Lan Manager) module for the SASL client framework
-;; Copyright (C) 2000 Free Software Foundation, Inc.
+;; Copyright (C) 2000, 2007 Free Software Foundation, Inc.
;; Author: Taro Kawagishi <tarok@transpulse.org>
;; Keywords: SASL, NTLM
;; Version: 1.00
;; Created: February 2001
-;; This program is free software; you can redistribute it and/or modify
+;; This file is part of GNU Emacs.
+
+;; 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 3, or (at your option)
;; any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
+
+;; 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 this program; see the file COPYING. If not, write to the
+;; along with GNU Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;;; sasl.el --- SASL client framework
-;; Copyright (C) 2000 Free Software Foundation, Inc.
+;; Copyright (C) 2000, 2007 Free Software Foundation, Inc.
;; Author: Daiki Ueno <ueno@unixuser.org>
;; Keywords: SASL
-;; This file is part of FLIM (Faithful Library about Internet Message).
+;; 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 3, 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 3, 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 this program; see the file COPYING. If not, write to the
+;; along with GNU Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;; Author: Shuhei KOBAYASHI <shuhei@aqua.ocn.ne.jp>
;; Keywords: SHA1, FIPS 180-1
-;; This file is part of FLIM (Faithful Library about Internet Message).
+;; 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 3, 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 3, or (at your option)
+;; any later version.
-;; This program is distributed in the hope that it will be useful,
+;; 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 this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; along with GNU Emacs; see the file COPYING. If not, write to the
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;;; Commentary:
;;; Code:
-(require 'password)
+(or (require 'password-cache nil t)
+ (require 'password))
(eval-when-compile
(require 'sasl)
(require 'starttls))
;;; Code:
(require 'dig)
-(require 'password)
+(or (require 'password-cache nil t)
+ (require 'password))
(eval-when-compile (require 'cl))
(eval-and-compile
(insert-buffer-substring smime-details-buffer)
nil))
-(eval-when-compile
- (defvar from))
+(defvar from)
(defun smime-decrypt-region (b e keyfile)
"Decrypt S/MIME message in region between B and E with key in KEYFILE.
;;; spam-wash.el --- wash spam before analysis
-;; Copyright (C) 2004 Free Software Foundation, Inc.
+;; Copyright (C) 2004, 2007 Free Software Foundation, Inc.
;; Author: Andrew Cohen <cohen@andy.bu.edu>
;; Keywords: mail
;; This file is part of GNU Emacs.
-;; This is free software; you can redistribute it and/or modify it
-;; under the terms of the GNU General Public License as published by
+;; 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 3, or (at your option)
;; any later version.
-;; This 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
;;{{{ Main parameters.
(defvar spam-backends nil
"List of spam.el backends with all the pertinent data.
-Populated by spam-install-backend-super.")
+Populated by `spam-install-backend-super'.")
(defgroup spam nil
"Spam configuration."
(defcustom spam-summary-exit-behavior 'default
"Exit behavior at the time of summary exit.
-Note that setting the spam-use-move or spam-use-copy backends on
+Note that setting the `spam-use-move' or `spam-use-copy' backends on
a group through group/topic parameters overrides this mechanism."
- :type '(choice (const 'default :tag
+ :type '(choice (const 'default :tag
"Move spam out of all groups. Move ham out of spam groups.")
- (const 'move-all :tag
+ (const 'move-all :tag
"Move spam out of all groups. Move ham out of all groups.")
- (const 'move-none :tag
+ (const 'move-none :tag
"Never move spam or ham out of any groups."))
:group 'spam)
(defcustom spam-split-symbolic-return-positive nil
"Whether `spam-split' should ALWAYS work with symbols or group names.
-Do not set this if you use `spam-split' in a fancy split
- method."
+Do not set this if you use `spam-split' in a fancy split method."
:type 'boolean
:group 'spam)
(defcustom spam-mark-ham-unread-before-move-from-spam-group nil
"Whether ham should be marked unread before it's moved.
-The article is moved out of a spam group according to ham-process-destination.
+The article is moved out of a spam group according to `ham-process-destination'.
This variable is an official entry in the international Longest Variable Name
Competition."
:type 'boolean
:group 'spam)
(defcustom spam-summary-score-preferred-header nil
- "Preferred header to use for spam-summary-score."
+ "Preferred header to use for `spam-summary-score'."
:type '(choice :tag "Header name"
(symbol :tag "SpamAssassin etc" X-Spam-Status)
(symbol :tag "Bogofilter" X-Bogosity)
:group 'spam-spamassassin)
(defcustom spam-sa-learn-spam-switch "--spam"
- "The switch that sa-learn uses to register spam messages"
+ "The switch that sa-learn uses to register spam messages."
:type 'string
:group 'spam-spamassassin)
(defcustom spam-sa-learn-ham-switch "--ham"
- "The switch that sa-learn uses to register ham messages"
+ "The switch that sa-learn uses to register ham messages."
:type 'string
:group 'spam-spamassassin)
(defcustom spam-sa-learn-unregister-switch "--forget"
- "The switch that sa-learn uses to unregister messages messages"
+ "The switch that sa-learn uses to unregister messages messages."
:type 'string
:group 'spam-spamassassin)
;;{{{ convenience functions
(defun spam-clear-cache (symbol)
- "Clear the spam-caches entry for a check."
+ "Clear the `spam-caches' entry for a check."
(remhash symbol spam-caches))
(defun spam-xor (a b)
(and (or a b) (not (and a b))))
(defun spam-set-difference (list1 list2)
- "Return a set difference of LIST1 and LIST2.
+ "Return a set difference of LIST1 and LIST2.
When either list is nil, the other is returned."
(if (and list1 list2)
;; we have two non-nil lists
registration function SRF, ham unregistration function HUF, spam
unregistration function SUF, and an indication whether the
backend is STATISTICAL."
-
(setq spam-backends (add-to-list 'spam-backends backend))
(while properties
(let ((property (pop properties))
(value (pop properties)))
(if (spam-backend-property-valid-p property)
(put backend property value)
- (gnus-error
- 5
+ (gnus-error
+ 5
"spam-install-backend-super got an invalid property %s"
property)))))
so, that further checks are needed. The value t means that the
message is definitely not spam, and that further spam checks
should be inhibited. Otherwise, a mailgroup name or the symbol
-'spam (depending on spam-split-symbolic-return) is returned where
+'spam (depending on `spam-split-symbolic-return') is returned where
the mail should go, and further checks are also inhibited. The
usual mailgroup name is the value of `spam-split-group', meaning
that the message is definitely a spam."
(setq info (format "Backend %s has the following properties:\n"
backend))
(dolist (property (spam-backend-properties))
- (setq info (format "%s%s=%s\n"
+ (setq info (format "%s%s=%s\n"
info
property
(get backend property))))
(if (and
(spam-classification-valid-p classification)
(spam-backend-function-type-valid-p type))
- (let ((retrieval
- (intern
+ (let ((retrieval
+ (intern
(format "spam-backend-%s-%s-function"
classification
type))))
(funcall retrieval backend))
- (gnus-error
+ (gnus-error
5
"%s was passed invalid backend %s, classification %s, or type %s"
"spam-backend-function"
classification
type)))
-(defun spam-backend-article-list-property (classification
+(defun spam-backend-article-list-property (classification
&optional unregister)
"Property name of article list with CLASSIFICATION and UNREGISTER."
(let* ((r (if unregister "unregister" "register"))
(prop (format "%s-%s" classification r)))
prop))
-(defun spam-backend-get-article-todo-list (backend
- classification
+(defun spam-backend-get-article-todo-list (backend
+ classification
&optional unregister)
- "Get the articles to be processed for BACKEND and CLASSIFICATION.
+ "Get the articles to be processed for BACKEND and CLASSIFICATION.
With UNREGISTER, get articles to be unregistered.
This is a temporary storage function - nothing here persists."
(get
- backend
+ backend
(intern (spam-backend-article-list-property classification unregister))))
(defun spam-backend-put-article-todo-list (backend classification list &optional unregister)
;; install alias with no properties at first
(spam-install-backend-super alias)
-
+
(dolist (property (spam-backend-properties))
(put alias property (get backend property))))
SRF, ham unregistration function HUF, spam unregistration
function SUF. The backend has no incoming check and can't be
statistical."
- (spam-install-backend-super
- backend
+ (spam-install-backend-super
+ backend
'hrf hrf 'srf srf 'huf huf 'suf suf 'mover t))
(defun spam-install-nocheck-backend (backend hrf srf huf suf)
SRF, ham unregistration function HUF, spam unregistration
function SUF. The backend has no incoming check and can't be
statistical (it could be, but in practice that doesn't happen)."
- (spam-install-backend-super
+ (spam-install-backend-super
backend
'hrf hrf 'srf srf 'huf huf 'suf suf))
Accepts incoming CHECK, ham registration function HRF, spam
registration function SRF, ham unregistration function HUF, spam
unregistration function SUF. The backend won't be
-statistical (use spam-install-statistical-backend for that)."
- (spam-install-backend-super
+statistical (use `spam-install-statistical-backend' for that)."
+ (spam-install-backend-super
backend
'check check 'hrf hrf 'srf srf 'huf huf 'suf suf))
Accepts incoming CHECK, ham registration function HRF, spam
registration function SRF, ham unregistration function HUF, spam
unregistration function SUF. The backend will be
-statistical (use spam-install-backend for non-statistical
+statistical (use `spam-install-backend' for non-statistical
backends)."
- (spam-install-backend-super
+ (spam-install-backend-super
backend
'check check 'statistical t 'hrf hrf 'srf srf 'huf huf 'suf suf))
(defun spam-install-statistical-checkonly-backend (backend check)
"Install a statistical BACKEND than can only CHECK for spam."
- (spam-install-backend-super
+ (spam-install-backend-super
backend
'check check 'statistical t))
nil
nil)
-(spam-install-backend 'spam-use-BBDB
+(spam-install-backend 'spam-use-BBDB
'spam-check-BBDB
'spam-BBDB-register-routine
nil
'spam-stat-unregister-ham-routine
'spam-stat-unregister-spam-routine)
-(spam-install-statistical-backend 'spam-use-spamassassin
+(spam-install-statistical-backend 'spam-use-spamassassin
'spam-check-spamassassin
'spam-spamassassin-register-ham-routine
'spam-spamassassin-register-spam-routine
With SPECIFIC-HEADER, returns only that header's score.
Will not return a nil score."
(let (score)
- (dolist (header
+ (dolist (header
(if specific-header
(list specific-header)
(spam-necessary-extra-headers)))
- (setq score
+ (setq score
(spam-extra-header-to-number header headers))
- (when score
+ (when score
(return)))
(or score 0)))
(let (found)
(dolist (backend (spam-backend-list))
(when (and (spam-backend-statistical-p backend)
- (or (symbol-value backend)
+ (or (symbol-value backend)
(memq backend force-symbols)))
(setq found backend)))
found))
processor variables with a classification and a spam-use-*
variable. When the processor variable is nil, just the
classification and spam-use-* check variable are used. This is
-superceded by the new spam backend code, so it's only consulted
+superseded by the new spam backend code, so it's only consulted
for backwards compatibility.")
(defun spam-group-processor-p (group backend &optional classification)
"Checks if GROUP has a BACKEND with CLASSIFICATION registered.
Also accepts the obsolete processors, which can be found in
gnus.el and in spam-list-of-processors. In the case of mover
-backends, checks the setting of spam-summary-exit-behavior in
+backends, checks the setting of `spam-summary-exit-behavior' in
addition to the set values for the group."
(if (and (stringp group)
(symbolp backend))
;; spam-summary-exit-behavior-logic for mover backends
(unless found
(when (spam-backend-mover-p backend)
- (setq
+ (setq
found
(cond
((eq spam-summary-exit-behavior 'move-all) t)
;; move ham out of spam groups
(and (eq classification 'ham)
(spam-group-spam-contents-p group))))
- (t (gnus-error 5 "Unknown spam-summary-exit-behavior: %s"
+ (t (gnus-error 5 "Unknown spam-summary-exit-behavior: %s"
spam-summary-exit-behavior))))))
found))
;; call spam-register-routine with specific articles to unregister,
;; when there are articles to unregister and the check is enabled
(when (and unregister-list (symbol-value backend))
- (spam-backend-put-article-todo-list backend
- classification
+ (spam-backend-put-article-todo-list backend
+ classification
unregister-list
t))))))
gnus-newsgroup-name
backend
classification)
- (spam-backend-put-article-todo-list backend
+ (spam-backend-put-article-todo-list backend
classification
(spam-list-articles
gnus-newsgroup-articles
article)
(gnus-summary-mark-article article gnus-expirable-mark))
(gnus-summary-set-process-mark article)
-
+
(if respool ; respooling is with a "fake" group
(let ((spam-split-disabled
(or spam-split-disabled
- (and (eq classification 'ham)
+ (and (eq classification 'ham)
spam-disable-spam-split-during-ham-respool))))
(gnus-message 9 "Respooling article %d with method %s"
article respool-method)
(gnus-message 9 "Moving article %d to group %s"
article group)
(gnus-summary-move-article nil group))))) ; else move articles
-
+
;; now delete the articles, unless a) copy is t, and there was a copy done
;; b) a move was done to a single group
;; c) backend-supports-deletions is nil
(when articles
(let ((gnus-novice-user nil)) ; don't ask me if I'm sure
(gnus-summary-delete-article nil)))))
-
+
(gnus-summary-yank-process-mark)
(length articles))))
(defun spam-copy-spam-routine (articles)
- (spam-copy-or-move-routine
- t
+ (spam-copy-or-move-routine
+ t
(gnus-parameter-spam-process-destination gnus-newsgroup-name)
articles
'spam))
(defun spam-move-spam-routine (articles)
- (spam-copy-or-move-routine
+ (spam-copy-or-move-routine
nil
(gnus-parameter-spam-process-destination gnus-newsgroup-name)
articles
'spam))
(defun spam-copy-ham-routine (articles)
- (spam-copy-or-move-routine
- t
+ (spam-copy-or-move-routine
+ t
(gnus-parameter-ham-process-destination gnus-newsgroup-name)
articles
'ham))
(defun spam-move-ham-routine (articles)
- (spam-copy-or-move-routine
+ (spam-copy-or-move-routine
nil
(gnus-parameter-ham-process-destination gnus-newsgroup-name)
articles
((equal field 'extra)
(mail-header-extra data-header))
(t
- (gnus-error
- 5
- "spam-fetch-field-fast: unknown field %s requested"
+ (gnus-error
+ 5
+ "spam-fetch-field-fast: unknown field %s requested"
field)
nil))
(gnus-message 6 "Article %d has a nil data header" article)))))
This function can be used as an entry in the variable `nnmail-split-fancy',
for example like this: (: spam-split). It can take checks as
parameters. A string as a parameter will set the
-spam-split-group to that string.
+`spam-split-group' to that string.
See the Info node `(gnus)Fancy Mail Splitting' for more details."
(interactive)
decision))))))))
(defun spam-find-spam ()
- "This function will detect spam in the current newsgroup using spam-split."
+ "Detect spam in the current newsgroup using `spam-split'."
(interactive)
(let* ((group gnus-newsgroup-name)
gnus-newsgroup-unseen))
article-cannot-be-faked)
-
+
(dolist (backend methods)
(when (spam-backend-statistical-p backend)
(setq article-cannot-be-faked t)
(subject (spam-fetch-field-subject-fast article))
(sender (spam-fetch-field-from-fast article))
registry-lookup)
-
+
(unless id
(gnus-message 6 "Article %d has no message ID!" article))
-
+
(when (and id spam-log-to-registry)
(setq registry-lookup (spam-log-registration-type id 'incoming))
(when registry-lookup
(apply 'spam-split methods))))))
(if (equal split-return 'spam)
(gnus-summary-mark-article article gnus-spam-mark))
-
+
(when (and id split-return spam-log-to-registry)
(when (zerop (gnus-registry-group-count id))
(gnus-registry-add-group
id group subject sender))
-
+
(unless registry-lookup
(spam-log-processing-to-registry
id
(delcount 0))
;; clear the old lists right away
- (spam-backend-put-article-todo-list backend
+ (spam-backend-put-article-todo-list backend
classification
nil
nil)
- (spam-backend-put-article-todo-list backend
+ (spam-backend-put-article-todo-list backend
classification
nil
t)
(incf delcount)
(setq rlist (delq article rlist))
(setq ulist (delq article ulist))))
-
+
(unless (zerop delcount)
- (gnus-message
- 9
+ (gnus-message
+ 9
"%d messages were saved the trouble of unregistering and then registering"
delcount))
-
+
;; unregister articles
(unless (zerop (length ulist))
(let ((num (spam-unregister-routine classification backend ulist)))
(when (> num 0)
- (gnus-message
+ (gnus-message
6
"%d %s messages were unregistered by backend %s."
num
classification
backend))))
-
+
;; register articles
(unless (zerop (length rlist))
(let ((num (spam-register-routine classification backend rlist)))
(when (> num 0)
- (gnus-message
+ (gnus-message
6
"%d %s messages were registered by backend %s."
num
backend)))))))))
(defun spam-unregister-routine (classification
- backend
+ backend
specific-articles)
(spam-register-routine classification backend specific-articles t))
(defun spam-register-routine (classification
- backend
+ backend
specific-articles
&optional unregister)
(when (and (spam-classification-valid-p classification)
(save-excursion
(save-window-excursion
(bbdb-records nil t)
- (mapatoms
+ (mapatoms
(lambda (symbol)
(intern (downcase (symbol-name symbol)) bbdb-cache))
bbdb-hashtable))))
(defun spam-enter-list (addresses file &optional remove)
"Enter ADDRESSES into the given FILE.
-Either the whitelist or the blacklist files can be used. With
-REMOVE not nil, remove the ADDRESSES."
+Either the whitelist or the blacklist files can be used.
+With a non-nil REMOVE, remove the ADDRESSES."
(if (stringp addresses)
(spam-enter-list (list addresses) file remove)
;; else, we have a list of addresses here
(spam-report-resend-register-routine articles t))
(defun spam-report-resend-register-routine (articles &optional ham)
- (let* ((resend-to-gp
+ (let* ((resend-to-gp
(if ham
(gnus-parameter-ham-resend-to gnus-newsgroup-name)
(gnus-parameter-spam-resend-to gnus-newsgroup-name)))
;; return something sensible if the score can't be determined
(defun spam-bogofilter-score (&optional recheck)
- "Get the Bogofilter spamicity score"
+ "Get the Bogofilter spamicity score."
(interactive "P")
(save-window-excursion
(gnus-summary-show-article t)
(when (eq spam-bogofilter-valid 'unknown)
(setq spam-bogofilter-valid
(not (string-match "^bogofilter version 0\\.\\([0-9]\\|1[01]\\)\\."
- (shell-command-to-string
+ (shell-command-to-string
(format "%s -V" spam-bogofilter-program))))))
spam-bogofilter-valid)
-
+
(defun spam-check-bogofilter (&optional score)
"Check the Bogofilter backend for the classification of this message."
(if (spam-verify-bogofilter)
(when (stringp article-string)
(with-temp-buffer
(insert article-string)
-
+
(apply 'call-process-region
(point-min) (point-max)
spam-bogofilter-program
;; return something sensible if the score can't be determined
(defun spam-bsfilter-score (&optional recheck)
- "Get the Bsfilter spamicity score"
+ "Get the Bsfilter spamicity score."
(interactive "P")
(save-window-excursion
(gnus-summary-show-article t)
(or score "0"))))
(defun spam-check-bsfilter (&optional score)
- "Check the Bsfilter backend for the classification of this message"
+ "Check the Bsfilter backend for the classification of this message."
(let ((article-buffer-name (buffer-name))
(dir spam-bsfilter-database-directory)
return)
;; return something sensible if the score can't be determined
(defun spam-crm114-score ()
- "Get the CRM114 Mailfilter pR"
+ "Get the CRM114 Mailfilter pR."
(interactive)
(save-window-excursion
(gnus-summary-show-article t)
(or score "0"))))
(defun spam-check-crm114 (&optional score)
- "Check the CRM114 Mailfilter backend for the classification of this message"
+ "Check the CRM114 Mailfilter backend for the classification of this message."
(let ((article-buffer-name (buffer-name))
(db spam-crm114-database-directory)
return)
(defun spam-initialize (&rest symbols)
"Install the spam.el hooks and do other initialization.
When SYMBOLS is given, set those variables to t. This is so you
-can call spam-initialize before you set spam-use-* variables on
+can call `spam-initialize' before you set spam-use-* variables on
explicitly, and matters only if you need the extra headers
-installed through spam-necessary-extra-headers."
+installed through `spam-necessary-extra-headers'."
(interactive)
(dolist (var symbols)
(add-hook 'gnus-summary-prepared-hook 'spam-find-spam))
(defun spam-unload-hook ()
- "Uninstall the spam.el hooks"
+ "Uninstall the spam.el hooks."
(interactive)
(remove-hook 'gnus-save-newsrc-hook 'spam-maybe-spam-stat-save)
(remove-hook 'gnus-get-top-new-news-hook 'spam-maybe-spam-stat-load)
The optional TYPE-SYMBOL is bound to the type of the time value.
Type 0 is the cons cell (HIGH . LOW), type 1 is the list (HIGH
-LOW), and type 3 is the list (HIGH LOW MICRO)."
+LOW), and type 2 is the list (HIGH LOW MICRO)."
(declare (indent 1)
(debug ((&rest (symbolp symbolp symbolp &or [symbolp form] form))
body)))
(defun encode-time-value (high low micro type)
"Encode HIGH, LOW, and MICRO into a time value of type TYPE.
Type 0 is the cons cell (HIGH . LOW), type 1 is the list (HIGH LOW),
-and type 3 is the list (HIGH LOW MICRO)."
+and type 2 is the list (HIGH LOW MICRO)."
(cond
((eq type 0) (cons high low))
((eq type 1) (list high low))
"Transport Layer Security (TLS) parameters."
:group 'comm)
+(defcustom tls-end-of-info
+ (concat
+ "\\("
+ ;; `openssl s_client' regexp. See ssl/ssl_txt.c lines 219-220.
+ ;; According to apps/s_client.c line 1515 `---' is always the last
+ ;; line that is printed by s_client before the real data.
+ "^ Verify return code: .+\n---\n\\|"
+ ;; `gnutls' regexp. See src/cli.c lines 721-.
+ "^- Simple Client Mode:\n"
+ "\\(\n\\|" ; ignore blank lines
+ ;; According to GnuTLS v2.1.5 src/cli.c lines 640-650 and 705-715
+ ;; in `main' the handshake will start after this message. If the
+ ;; handshake fails, the programs will abort.
+ "^\\*\\*\\* Starting TLS handshake\n\\)*"
+ "\\)")
+ "Regexp matching end of TLS client informational messages.
+Client data stream begins after the last character matched by
+this. The default matches `openssl s_client' (version 0.9.8c)
+and `gnutls-cli' (version 2.0.1) output."
+ :version "22.2"
+ :type 'regexp
+ :group 'tls)
+
(defcustom tls-program '("gnutls-cli -p %p %h"
"gnutls-cli -p %p %h --protocols ssl3"
"openssl s_client -connect %h:%p -no_ssl2")
process cmd done)
(if use-temp-buffer
(setq buffer (generate-new-buffer " TLS")))
- (message "Opening TLS connection to `%s'..." host)
- (while (and (not done) (setq cmd (pop cmds)))
- (message "Opening TLS connection with `%s'..." cmd)
- (let ((process-connection-type tls-process-connection-type)
- response)
- (setq process (start-process
- name buffer shell-file-name shell-command-switch
- (format-spec
- cmd
- (format-spec-make
- ?h host
- ?p (if (integerp port)
- (int-to-string port)
- port)))))
- (while (and process
- (memq (process-status process) '(open run))
- (save-excursion
- (set-buffer buffer) ;; XXX "blue moon" nntp.el bug
+ (with-current-buffer buffer
+ (message "Opening TLS connection to `%s'..." host)
+ (while (and (not done) (setq cmd (pop cmds)))
+ (message "Opening TLS connection with `%s'..." cmd)
+ (let ((process-connection-type tls-process-connection-type)
+ response)
+ (setq process (start-process
+ name buffer shell-file-name shell-command-switch
+ (format-spec
+ cmd
+ (format-spec-make
+ ?h host
+ ?p (if (integerp port)
+ (int-to-string port)
+ port)))))
+ (while (and process
+ (memq (process-status process) '(open run))
+ (progn
+ (goto-char (point-min))
+ (not (setq done (re-search-forward tls-success nil t)))))
+ (unless (accept-process-output process 1)
+ (sit-for 1)))
+ (message "Opening TLS connection with `%s'...%s" cmd
+ (if done "done" "failed"))
+ (if done
+ (setq done process)
+ (delete-process process))))
+ (when done
+ (save-excursion
+ (set-buffer buffer)
+ (when
+ (or
+ (and tls-checktrust
+ (progn
+ (goto-char (point-min))
+ (re-search-forward tls-untrusted nil t))
+ (or
+ (and (not (eq tls-checktrust 'ask))
+ (message "The certificate presented by `%s' is NOT trusted." host))
+ (not (yes-or-no-p
+ (format "The certificate presented by `%s' is NOT trusted. Accept anyway? " host)))))
+ (and tls-hostmismatch
+ (progn
(goto-char (point-min))
- (not (setq done (re-search-forward tls-success nil t)))))
- (unless (accept-process-output process 1)
- (sit-for 1)))
- (message "Opening TLS connection with `%s'...%s" cmd
- (if done "done" "failed"))
- (if done
- (setq done process)
- (delete-process process))))
- (when done
- (save-excursion
- (set-buffer buffer)
- (when
- (or
- (and tls-checktrust
- (progn
- (goto-char (point-min))
- (re-search-forward tls-untrusted nil t))
- (or
- (and (not (eq tls-checktrust 'ask))
- (message "The certificate presented by `%s' is NOT trusted." host))
- (not (yes-or-no-p
- (format "The certificate presented by `%s' is NOT trusted. Accept anyway? " host)))))
- (and tls-hostmismatch
- (progn
- (goto-char (point-min))
- (re-search-forward tls-hostmismatch nil t))
- (not (yes-or-no-p
- (format "Host name in certificate doesn't match `%s'. Connect anyway? " host)))))
- (setq done nil)
- (delete-process process))))
- (message "Opening TLS connection to `%s'...%s"
- host (if done "done" "failed"))
+ (re-search-forward tls-hostmismatch nil t))
+ (not (yes-or-no-p
+ (format "Host name in certificate doesn't match `%s'. Connect anyway? " host)))))
+ (setq done nil)
+ (delete-process process))))
+ (message "Opening TLS connection to `%s'...%s"
+ host (if done "done" "failed")))
(when use-temp-buffer
(if done (set-process-buffer process nil))
(kill-buffer buffer))
(defun utf7-encode (string &optional for-imap)
"Encode UTF-7 STRING. Use IMAP modification if FOR-IMAP is non-nil."
- (let ((default-enable-multibyte-characters t))
- (with-temp-buffer
- (insert string)
- (utf7-encode-internal for-imap)
- (buffer-string))))
+ (if (and (coding-system-p 'utf-7) (coding-system-p 'utf-7-imap))
+ ;; Emacs 23 with proper support for IMAP
+ (encode-coding-string string (if for-imap 'utf-7-imap 'utf-7))
+ (let ((default-enable-multibyte-characters t))
+ (with-temp-buffer
+ (insert string)
+ (utf7-encode-internal for-imap)
+ (buffer-string)))))
(defun utf7-decode (string &optional for-imap)
"Decode UTF-7 STRING. Use IMAP modification if FOR-IMAP is non-nil."
- (let ((default-enable-multibyte-characters nil))
- (with-temp-buffer
- (insert string)
- (utf7-decode-internal for-imap)
- (mm-enable-multibyte)
- (buffer-string))))
+ (if (and (coding-system-p 'utf-7) (coding-system-p 'utf-7-imap))
+ ;; Emacs 23 with proper support for IMAP
+ (decode-coding-string string (if for-imap 'utf-7-imap 'utf-7))
+ (let ((default-enable-multibyte-characters nil))
+ (with-temp-buffer
+ (insert string)
+ (utf7-decode-internal for-imap)
+ (mm-enable-multibyte)
+ (buffer-string)))))
(provide 'utf7)
'char-int
'identity)))
+(defgroup uudecode nil
+ "Decoding of uuencoded data."
+ :group 'mail
+ :group 'news)
+
(defcustom uudecode-decoder-program "uudecode"
"*Non-nil value should be a string that names a uu decoder.
The program should expect to read uu data on its standard
input and write the converted data to its standard output."
:type 'string
- :group 'gnus-extract)
+ :group 'uudecode)
(defcustom uudecode-decoder-switches nil
"*List of command line flags passed to `uudecode-decoder-program'."
- :group 'gnus-extract
+ :group 'uudecode
:type '(repeat string))
(defcustom uudecode-use-external
(executable-find uudecode-decoder-program)
"*Use external uudecode program."
:version "22.1"
- :group 'gnus-extract
+ :group 'uudecode
:type 'boolean)
(defconst uudecode-alphabet "\040-\140")
`message-insert-formatted-citation-line', not
`message-insert-formated-citation-line'.
+2007-10-29 Glenn Morris <rgm@gnu.org>
+
+ * gnus-refcard.tex: Restore Feb 2007 copyright clarifications
+ lost in update to Gnus trunk.
+
2007-10-27 Reiner Steib <Reiner.Steib@gmx.de>
* gnus.texi (Troubleshooting): Adjust Gnus version number.
\begin{center}
Copyright \copyright\ 1995, 2000, 2002, 2003, 2004,
2005, 2006, 2007 Free Software Foundation, Inc.\\*
- Copyright \copyright\ 2001, 2002, 2003, 2004, 2005 \author.\\*
- Created from the Gnus manual Copyright \copyright\ 1994 Lars Magne
- Ingebrigtsen.\\*
- and the Emacs Help Bindings feature (C-h b).\\*
- Gnus logo copyright \copyright\ 1995 Luis Fernandes.\\*
\end{center}
Permission is granted to make and distribute copies of this reference