* gnus.el: Fix copyright. Remove trailing spaces.
2001-01-21 00:00:00 ShengHuo ZHU <zsh@cs.rochester.edu>
+ * gnus.el: Fix copyright. Remove trailing spaces.
+
* message.el (message-forward): Use mule4.
2001-01-20 09:00:00 ShengHuo ZHU <zsh@cs.rochester.edu>
;;; dgnushack.el --- a hack to set the load path for byte-compiling
-;; Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000
+;; Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
;; Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;;; gnus-agent.el --- unplugged support for Gnus
-;; Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 1998, 1999, 2000, 2001
+;; Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; This file is part of GNU Emacs.
;;; gnus-art.el --- article mode commands for Gnus
-;; Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
+;; Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: news
((eq elem 'to-address)
(let ((to (message-fetch-field "to"))
(to-address
- (gnus-group-find-parameter
+ (gnus-group-find-parameter
(if (boundp 'gnus-newsgroup-name)
gnus-newsgroup-name "") 'to-address)))
(when (and to to-address
(save-restriction
(article-narrow-to-head)
(when (and buffer-read-only ;; When type `W f'
- (progn
+ (progn
(goto-char (point-min))
(not (re-search-forward "^X-Face:[\t ]*" nil t)))
(gnus-buffer-live-p gnus-original-article-buffer))
(setq x-faces
(concat
(or x-faces "")
- (buffer-substring
+ (buffer-substring
(match-beginning 0)
(1- (re-search-forward
"^\\($\\|[^ \t]\\)" nil t))))))))
;;; gnus-ems.el --- functions for making Gnus work under different Emacsen
-;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000
+;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001
;; Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
(defvar gnus-article-compface-xbm
(condition-case ()
- (eq 0 (string-match "#define"
+ (eq 0 (string-match "#define"
(shell-command-to-string "uncompface -X")))
(error nil))
"Non-nil means the compface program supports the -X option.
;;; gnus-group.el --- group mode commands for Gnus
-;; Copyright (C) 1996, 1997, 1998, 1999, 2000
+;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
;; Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;;; gnus-msg.el --- mail and post interface for Gnus
-;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000
+;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001
;; Free Software Foundation, Inc.
;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
(gnus-summary-remove-process-mark article))
(gnus-copy-article-buffer)
(let ((message-reply-buffer gnus-article-copy)
- (message-reply-headers
+ (message-reply-headers
(with-current-buffer gnus-article-copy
;; The headers are decoded.
(nnheader-parse-head t))))
(set-buffer article-buffer)
(let ((gnus-newsgroup-charset (or gnus-article-charset
gnus-newsgroup-charset))
- (gnus-newsgroup-ignored-charsets
+ (gnus-newsgroup-ignored-charsets
(or gnus-article-ignored-charsets
gnus-newsgroup-ignored-charsets)))
(save-restriction
(gnus-summary-reply-with-original n t))
(defun gnus-summary-mail-forward (&optional arg post)
- "Forward the current message to another user.
+ "Forward the current message to another user.
If ARG is nil, see `message-forward-as-mime' and `message-forward-show-mml';
if ARG is 1, decode the message and forward directly inline;
if ARG is 2, forward message as an rfc822 MIME section;
(interactive "P")
(let ((message-forward-as-mime message-forward-as-mime)
(message-forward-show-mml message-forward-show-mml))
- (cond
+ (cond
((null arg))
((eq arg 1) (setq message-forward-as-mime nil
message-forward-show-mml t))
(defun gnus-summary-resend-message (address n)
"Resend the current article to ADDRESS."
- (interactive
- (list (message-read-from-minibuffer "Resend message(s) to: ")
+ (interactive
+ (list (message-read-from-minibuffer "Resend message(s) to: ")
current-prefix-arg))
(let ((articles (gnus-summary-work-articles n))
article)
(concat "^" (regexp-quote mail-header-separator) "$")
nil t)
(replace-match "" t t ))
- (unless (setq group-art
+ (unless (setq group-art
(gnus-request-accept-article group method t t))
(gnus-message 1 "Couldn't store article in group %s: %s"
group (gnus-status-message method))
(let ((active (gnus-active group)))
(if active
(if (< (cdr active) (cdr group-art))
- (gnus-set-active group (cons (car active)
+ (gnus-set-active group (cons (car active)
(cdr group-art))))
(gnus-activate-group group)))
(let ((buffer (gnus-summary-buffer-name group))
(mark gnus-read-mark)
(article (cdr group-art)))
- (unless
- (and
+ (unless
+ (and
(get-buffer buffer)
(with-current-buffer buffer
(when gnus-newsgroup-prepared
(when (and gnus-newsgroup-auto-expire
(memq mark gnus-auto-expirable-marks))
(setq mark gnus-expirable-mark))
- (setq mark (gnus-request-update-mark
+ (setq mark (gnus-request-update-mark
group article mark))
(gnus-mark-article-as-read article mark)
(setq gnus-newsgroup-active (gnus-active group))
t)))
- (gnus-group-make-articles-read group
+ (gnus-group-make-articles-read group
(list article))
(when (gnus-group-auto-expirable-p group)
(gnus-add-marked-articles
;;; gnus-topic.el --- a folding minor mode for Gnus group buffers
-;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000
+;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001
;; Free Software Foundation, Inc.
;; Author: Ilja Weis <kult@uni-paderborn.de>
;;; gnus-util.el --- utility functions for Gnus
-;; Copyright (C) 1996, 1997, 1998, 1999, 2000
+;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
;; Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
(property value start end properties &optional object)
"Like `gnus-add-text-properties', only applied on where PROPERTY is VALUE."
(let (point)
- (while (and start
+ (while (and start
(< start end) ;; XEmacs will loop for every when start=end.
(setq point (text-property-not-all start end property value)))
(gnus-add-text-properties start point properties object)
(property value start end properties &optional object)
"Like `remove-text-properties', only applied on where PROPERTY is VALUE."
(let (point)
- (while (and start
+ (while (and start
(< start end)
(setq point (text-property-not-all start end property value)))
(remove-text-properties start point properties object)
;;; gnus-win.el --- window configuration functions for Gnus
-;; Copyright (C) 1996, 1997, 1998, 1999, 2000
+;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
;; Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;;; gnus-xmas.el --- Gnus functions for XEmacs
-;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000
-;; Free Software Foundation, Inc.
+;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001
+;; Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: news
;;; gnus.el --- a newsreader for GNU Emacs
;; Copyright (C) 1987, 1988, 1989, 1990, 1993, 1994, 1995, 1996,
-;; 1997, 1998, 2000 Free Software Foundation, Inc.
+;; 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
;; Lars Magne Ingebrigtsen <larsi@gnus.org>
`(quote (repeat (list (regexp :tag "Group")
,parameter-type)))))
(variable-default (plist-get rest :variable-default)))
- (list
+ (list
'progn
`(defcustom ,variable ,variable-default
,variable-document
:type '(choice (const nil)
integer))
-(gnus-define-group-parameter
+(gnus-define-group-parameter
auto-expire
:type bool
:function gnus-group-auto-expirable-p
:variable-group nnmail-expire
:variable-type '(choice (const nil)
regexp)
- :parameter-type '(const :tag "Automatic Expire" t)
- :parameter-document
+ :parameter-type '(const :tag "Automatic Expire" t)
+ :parameter-document
"All articles that are read will be marked as expirable.")
-(gnus-define-group-parameter
+(gnus-define-group-parameter
total-expire
:type bool
:function gnus-group-total-expirable-p
:function-document
"Check whether GROUP is total-expirable or not."
- :variable gnus-total-expirable-newsgroups
+ :variable gnus-total-expirable-newsgroups
:variable-default nil
:variable-document
"*Groups in which to perform expiry of all read articles.
:variable-group nnmail-expire
:variable-type '(choice (const nil)
regexp)
- :parameter-type '(const :tag "Total Expire" t)
- :parameter-document
+ :parameter-type '(const :tag "Total Expire" t)
+ :parameter-document
"All read articles will be put through the expiry process
This happens even if they are not marked as expirable.
(let ((prefix "")
group)
(while (not group)
- (when (string-match
+ (when (string-match
gnus-invalid-group-regexp
(setq group (read-string (concat prefix prompt)
(cons (or default "") 0)
display-time-mail-function imap-password mail-mode-hook
mc-pgp-always-sign
nnoo-definition-alist
- url-current-callback-func url-be-asynchronous
+ url-current-callback-func url-be-asynchronous
url-current-callback-data url-working-buffer
url-current-mime-headers w3-meta-charset-content-type-regexp
w3-meta-content-type-charset-regexp))
url-retrieve w3-form-encode-xwfu window-at
window-edges x-color-values x-popup-menu browse-url
frame-char-height frame-char-width))
- (maybe-bind '(buffer-display-table
+ (maybe-bind '(buffer-display-table
buffer-file-coding-system font-lock-defaults
global-face-data gnus-article-x-face-too-ugly
gnus-newsgroup-charset gnus-newsgroup-emphasis-alist
;;; mailcap.el --- MIME media types configuration
-;; Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
+;; Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
;; Author: William M. Perry <wmperry@aventail.com>
;; Lars Magne Ingebrigtsen <larsi@gnus.org>
"Text of warning message displayed by `mailcap-maybe-eval'.
Make sure that this text consists only of few text lines. Otherwise,
Gnus might fail to display all of it.")
-
+
(defun mailcap-maybe-eval ()
"Maybe evaluate a buffer of Emacs Lisp code."
(let ((lisp-buffer (current-buffer)))
;;; mm-decode.el --- Functions for decoding MIME things
-;; Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
+;; Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; MORIOKA Tomohiko <morioka@jaist.ac.jp>
"List of media types that are to be displayed inline."
:type '(repeat string)
:group 'mime-display)
-
+
(defcustom mm-automatic-display
'("text/plain" "text/enriched" "text/richtext" "text/html"
"text/x-vcard" "image/.*" "message/delivery-status" "multipart/.*"
(defvar mm-verify-function-alist
'(("application/pgp-signature" mml2015-verify "PGP" mml2015-verify-test)
- ("application/x-gnus-pgp-signature" mm-uu-pgp-signed-extract-1 "PGP"
+ ("application/x-gnus-pgp-signature" mm-uu-pgp-signed-extract-1 "PGP"
mm-uu-pgp-signed-test)
- ("application/pkcs7-signature" mml-smime-verify "S/MIME"
+ ("application/pkcs7-signature" mml-smime-verify "S/MIME"
mml-smime-verify-test)
- ("application/x-pkcs7-signature" mml-smime-verify "S/MIME"
+ ("application/x-pkcs7-signature" mml-smime-verify "S/MIME"
mml-smime-verify-test)))
(defcustom mm-verify-option 'never
"Option of verifying signed parts.
-`never', not verify; `always', always verify;
+`never', not verify; `always', always verify;
`known', only verify known protocols. Otherwise, ask user."
:type '(choice (item always)
(item never)
(defvar mm-decrypt-function-alist
'(("application/pgp-encrypted" mml2015-decrypt "PGP" mml2015-decrypt-test)
- ("application/x-gnus-pgp-encrypted" mm-uu-pgp-encrypted-extract-1 "PGP"
+ ("application/x-gnus-pgp-encrypted" mm-uu-pgp-encrypted-extract-1 "PGP"
mm-uu-pgp-encrypted-test)))
(defcustom mm-decrypt-option nil
"Option of decrypting encrypted parts.
-`never', not decrypt; `always', always decrypt;
+`never', not decrypt; `always', always decrypt;
`known', only decrypt known protocols. Otherwise, ask user."
:type '(choice (item always)
(item never)
"Keymap for input viewer with completion.")
;; Should we bind other key to minibuffer-complete-word?
-(define-key mm-viewer-completion-map " " 'self-insert-command)
+(define-key mm-viewer-completion-map " " 'self-insert-command)
(defvar mm-viewer-completion-map
(let ((map (make-sparse-keymap 'mm-viewer-completion-map)))
cte (mail-fetch-field "content-transfer-encoding")
cd (mail-fetch-field "content-disposition")
description (mail-fetch-field "content-description")
- from (cadr (mail-extract-address-components
+ from (cadr (mail-extract-address-components
(or (mail-fetch-field "from") "")))
id (mail-fetch-field "content-id"))))
(when cte
(mm-handle-set-undisplayer handle (cons file buffer)))
(message "Displaying %s..." (format method file))
'external)))))))
-
+
(defun mm-mailcap-command (method file type-list)
(let ((ctl (cdr type-list))
(beg 0)
(and (mm-valid-image-format-p format)
(mm-image-fit-p handle)))
-(defun mm-find-part-by-type (handles type &optional notp recursive)
+(defun mm-find-part-by-type (handles type &optional notp recursive)
"Search in HANDLES for part with TYPE.
If NOTP, returns first non-matching part.
If RECURSIVE, search recursively."
(setq handles (cdr handles)))
handle))
-(defun mm-find-raw-part-by-type (ctl type &optional notp)
+(defun mm-find-raw-part-by-type (ctl type &optional notp)
(goto-char (point-min))
- (let* ((boundary (concat "--" (mm-handle-multipart-ctl-parameter ctl
+ (let* ((boundary (concat "--" (mm-handle-multipart-ctl-parameter ctl
'boundary)))
(close-delimiter (concat "^" (regexp-quote boundary) "--[ \t]*$"))
start
(save-excursion
(save-restriction
(narrow-to-region start (1- (point)))
- (when (let ((ctl (ignore-errors
- (mail-header-parse-content-type
+ (when (let ((ctl (ignore-errors
+ (mail-header-parse-content-type
(mail-fetch-field "content-type")))))
(if notp
(not (equal (car ctl) type))
(save-excursion
(save-restriction
(narrow-to-region start end)
- (when (let ((ctl (ignore-errors
- (mail-header-parse-content-type
+ (when (let ((ctl (ignore-errors
+ (mail-header-parse-content-type
(mail-fetch-field "content-type")))))
(if notp
(not (equal (car ctl) type))
(defsubst mm-set-handle-multipart-parameter (handle parameter value)
;; HANDLE could be a CTL.
(if handle
- (put-text-property 0 (length (car handle)) parameter value
+ (put-text-property 0 (length (car handle)) parameter value
(car handle))))
(defun mm-possibly-verify-or-decrypt (parts ctl)
(let ((subtype (cadr (split-string (car ctl) "/")))
(mm-security-handle ctl) ;; (car CTL) is the type.
protocol func functest)
- (cond
+ (cond
((equal subtype "signed")
- (unless (and (setq protocol
+ (unless (and (setq protocol
(mm-handle-multipart-ctl-parameter ctl 'protocol))
(not (equal protocol "multipart/mixed")))
;; The message is broken or draft-ietf-openpgp-multsig-01.
(if (cond
((eq mm-verify-option 'never) nil)
((eq mm-verify-option 'always) t)
- ((eq mm-verify-option 'known)
- (and func
- (or (not (setq functest
- (nth 3 (assoc protocol
+ ((eq mm-verify-option 'known)
+ (and func
+ (or (not (setq functest
+ (nth 3 (assoc protocol
mm-verify-function-alist))))
(funcall functest parts ctl))))
(t (y-or-n-p
(save-excursion
(if func
(funcall func parts ctl)
- (mm-set-handle-multipart-parameter
- mm-security-handle 'gnus-details
+ (mm-set-handle-multipart-parameter
+ mm-security-handle 'gnus-details
(format "Unknown sign protocol (%s)" protocol))))))
((equal subtype "encrypted")
- (unless (setq protocol
+ (unless (setq protocol
(mm-handle-multipart-ctl-parameter ctl 'protocol))
;; The message is broken.
(let ((parts parts))
(while parts
- (if (assoc (mm-handle-media-type (car parts))
+ (if (assoc (mm-handle-media-type (car parts))
mm-decrypt-function-alist)
(setq protocol (mm-handle-media-type (car parts))
parts nil)
((eq mm-decrypt-option 'never) nil)
((eq mm-decrypt-option 'always) t)
((eq mm-decrypt-option 'known)
- (and func
- (or (not (setq functest
- (nth 3 (assoc protocol
+ (and func
+ (or (not (setq functest
+ (nth 3 (assoc protocol
mm-decrypt-function-alist))))
(funcall functest parts ctl))))
- (t (y-or-n-p
+ (t (y-or-n-p
(format "Decrypt (%s) part? "
(or (nth 2 (assoc protocol mm-decrypt-function-alist))
(format "protocol=%s" protocol))))))
(save-excursion
(if func
(setq parts (funcall func parts ctl))
- (mm-set-handle-multipart-parameter
- mm-security-handle 'gnus-details
+ (mm-set-handle-multipart-parameter
+ mm-security-handle 'gnus-details
(format "Unknown encrypt protocol (%s)" protocol))))))
(t nil))
parts))
;;; mm-encode.el --- Functions for encoding MIME things
-;; Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
+;; Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; MORIOKA Tomohiko <morioka@jaist.ac.jp>
;;; mm-util.el --- Utility functions for Mule and low level things
-;; Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
+;; Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; MORIOKA Tomohiko <morioka@jaist.ac.jp>
(iso-8859-4 latin-iso8859-4)
(iso-8859-5 cyrillic-iso8859-5)
;; Non-mule (X)Emacs uses the last mule-charset for 8bit characters.
- ;; The fake mule-charset, gnus-koi8-r, tells Gnus that the default
+ ;; The fake mule-charset, gnus-koi8-r, tells Gnus that the default
;; charset is koi8-r, not iso-8859-5.
(koi8-r cyrillic-iso8859-5 gnus-koi8-r)
(iso-8859-6 arabic-iso8859-6)
(eval-and-compile
(defalias 'mm-char-or-char-int-p
- (cond
+ (cond
((fboundp 'char-or-char-int-p) 'char-or-char-int-p)
- ((fboundp 'char-valid-p) 'char-valid-p)
+ ((fboundp 'char-valid-p) 'char-valid-p)
(t 'identity))))
(defvar mm-coding-system-list nil)
"A mapping from invalid charset names to the real charset names.")
(defvar mm-binary-coding-system
- (cond
+ (cond
((mm-coding-system-p 'binary) 'binary)
((mm-coding-system-p 'no-conversion) 'no-conversion)
(t nil))
"Text coding system for write.")
(defvar mm-auto-save-coding-system
- (cond
+ (cond
((mm-coding-system-p 'emacs-mule)
(if (memq system-type '(windows-nt ms-dos ms-windows))
- (if (mm-coding-system-p 'emacs-mule-dos)
+ (if (mm-coding-system-p 'emacs-mule-dos)
'emacs-mule-dos mm-binary-coding-system)
'emacs-mule))
((mm-coding-system-p 'escape-quoted) 'escape-quoted)
(progn
(setq mail-parse-mule-charset
(and (boundp 'current-language-environment)
- (car (last
- (assq 'charset
- (assoc current-language-environment
+ (car (last
+ (assq 'charset
+ (assoc current-language-environment
language-info-alist))))))
(if (or (not mail-parse-mule-charset)
(eq mail-parse-mule-charset 'ascii))
(let (charset)
(setq charset
(and (boundp 'current-language-environment)
- (car (last (assq 'charset
- (assoc current-language-environment
+ (car (last (assq 'charset
+ (assoc current-language-environment
language-info-alist))))))
(if (eq charset 'ascii) (setq charset nil))
(or charset
(after-insert-file-functions nil)
(enable-local-eval nil)
(find-file-hooks nil)
- (inhibit-file-name-operation (if inhibit
+ (inhibit-file-name-operation (if inhibit
'insert-file-contents
inhibit-file-name-operation))
(inhibit-file-name-handlers
(if inhibit
- (append mm-inhibit-file-name-handlers
+ (append mm-inhibit-file-name-handlers
inhibit-file-name-handlers)
inhibit-file-name-handlers)))
(insert-file-contents filename visit beg end replace)))
Optional fourth argument specifies the coding system to use when
encoding the file.
If INHIBIT is non-nil, inhibit mm-inhibit-file-name-handlers."
- (let ((coding-system-for-write
- (or codesys mm-text-coding-system-for-write
+ (let ((coding-system-for-write
+ (or codesys mm-text-coding-system-for-write
mm-text-coding-system))
- (inhibit-file-name-operation (if inhibit
+ (inhibit-file-name-operation (if inhibit
'append-to-file
inhibit-file-name-operation))
(inhibit-file-name-handlers
(if inhibit
- (append mm-inhibit-file-name-handlers
+ (append mm-inhibit-file-name-handlers
inhibit-file-name-handlers)
inhibit-file-name-handlers)))
(append-to-file start end filename)))
-(defun mm-write-region (start end filename &optional append visit lockname
+(defun mm-write-region (start end filename &optional append visit lockname
coding-system inhibit)
"Like `write-region'.
If INHIBIT is non-nil, inhibit mm-inhibit-file-name-handlers."
- (let ((coding-system-for-write
- (or coding-system mm-text-coding-system-for-write
+ (let ((coding-system-for-write
+ (or coding-system mm-text-coding-system-for-write
mm-text-coding-system))
- (inhibit-file-name-operation (if inhibit
+ (inhibit-file-name-operation (if inhibit
'write-region
inhibit-file-name-operation))
(inhibit-file-name-handlers
(if inhibit
- (append mm-inhibit-file-name-handlers
+ (append mm-inhibit-file-name-handlers
inhibit-file-name-handlers)
inhibit-file-name-handlers)))
(write-region start end filename append visit lockname)))
;;; mm-view.el --- Functions for viewing MIME objects
-;; Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
+;; Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; This file is part of GNU Emacs.
(and (boundp 'w3-meta-charset-content-type-regexp)
(re-search-forward
w3-meta-charset-content-type-regexp nil t)))
- (setq charset (or (w3-coding-system-for-mime-charset
- (buffer-substring-no-properties
- (match-beginning 2)
+ (setq charset (or (w3-coding-system-for-mime-charset
+ (buffer-substring-no-properties
+ (match-beginning 2)
(match-end 2)))
charset)))
(delete-region (point-min) (point-max))
(mm-handle-type handle) 'charset)))
(if (or (eq charset 'gnus-decoded)
;; This is probably not entirely correct, but
- ;; makes rfc822 parts with embedded multiparts work.
+ ;; makes rfc822 parts with embedded multiparts work.
(eq mail-parse-charset 'gnus-decoded))
(save-restriction
(narrow-to-region (point) (point))
(setq handles gnus-article-mime-handles))
(when handles
(setq gnus-article-mime-handles
- (nconc gnus-article-mime-handles
- (if (listp (car handles))
+ (nconc gnus-article-mime-handles
+ (if (listp (car handles))
handles (list handles))))))
(fundamental-mode)
(goto-char (point-min)))
(narrow-to-region b b)
(mm-insert-part handle)
(let (gnus-article-mime-handles
- ;; disable prepare hook
- gnus-article-prepare-hook
+ ;; disable prepare hook
+ gnus-article-prepare-hook
(gnus-newsgroup-charset
(or charset gnus-newsgroup-charset)))
(run-hooks 'gnus-article-decode-hook)
(insert "----------\n\n")
(when handles
(setq gnus-article-mime-handles
- (nconc gnus-article-mime-handles
- (if (listp (car handles))
+ (nconc gnus-article-mime-handles
+ (if (listp (car handles))
handles (list handles)))))
(mm-handle-set-undisplayer
handle
;;; mml-smime.el --- S/MIME support for MML
-;; Copyright (c) 2000 Free Software Foundation, Inc.
+;; Copyright (c) 2000, 2001 Free Software Foundation, Inc.
;; Author: Simon Josefsson <simon@josefsson.org>
;; Keywords: Gnus, MIME, S/MIME, MML
(smime-get-key-by-email
(completing-read "Sign this part with what signature? "
smime-keys nil nil
- (and (listp (car-safe smime-keys))
+ (and (listp (car-safe smime-keys))
(caar smime-keys))))))))
(defun mml-smime-get-file-cert ()
(while (not result)
(setq who (read-from-minibuffer
(format "%sLookup certificate for: " (or bad ""))
- (cadr (funcall gnus-extract-address-components
+ (cadr (funcall gnus-extract-address-components
(or (save-excursion
(save-restriction
(message-narrow-to-headers)
(insert-buffer (mm-handle-multipart-original-buffer ctl))
(goto-char (point-min))
(insert (format "Content-Type: %s; " (mm-handle-media-type ctl)))
- (insert (format "protocol=\"%s\"; "
+ (insert (format "protocol=\"%s\"; "
(mm-handle-multipart-ctl-parameter ctl 'protocol)))
- (insert (format "micalg=\"%s\"; "
+ (insert (format "micalg=\"%s\"; "
(mm-handle-multipart-ctl-parameter ctl 'micalg)))
(insert (format "boundary=\"%s\"\n\n"
(mm-handle-multipart-ctl-parameter ctl 'boundary)))
(if (not good-signature)
(progn
;; we couldn't verify message, fail with openssl output as message
- (mm-set-handle-multipart-parameter
+ (mm-set-handle-multipart-parameter
mm-security-handle 'gnus-info "Failed")
(mm-set-handle-multipart-parameter
- mm-security-handle 'gnus-details
- (concat "OpenSSL failed to verify message:\n"
- "---------------------------------\n"
+ mm-security-handle 'gnus-details
+ (concat "OpenSSL failed to verify message:\n"
+ "---------------------------------\n"
openssl-output)))
;; verify mail addresses in mail against those in certificate
(when (and (smime-pkcs7-region (point-min) (point-max))
(delete-region (point-min) (point)))
(setq addresses (mapcar 'downcase addresses))))
(if (not (member (downcase (or (mm-handle-multipart-from ctl) "")) addresses))
- (mm-set-handle-multipart-parameter
+ (mm-set-handle-multipart-parameter
mm-security-handle 'gnus-info "Sender address forged")
(if good-certificate
- (mm-set-handle-multipart-parameter
+ (mm-set-handle-multipart-parameter
mm-security-handle 'gnus-info "Ok (sender authenticated)")
(mm-set-handle-multipart-parameter
mm-security-handle 'gnus-info "Integrity OK (sender unknown)")))
(mm-set-handle-multipart-parameter
- mm-security-handle 'gnus-details
+ mm-security-handle 'gnus-details
(concat "Sender clamed to be: " (mm-handle-multipart-from ctl) "\n"
(if addresses
- (concat "Addresses in certificate: "
+ (concat "Addresses in certificate: "
(mapconcat 'identity addresses ", "))
"No addresses found in certificate. (Requires OpenSSL 0.9.6 or later.)")
- "\n" "\n"
- "OpenSSL output:\n"
+ "\n" "\n"
+ "OpenSSL output:\n"
"---------------\n" openssl-output "\n"
"Certificate(s) inside S/MIME signature:\n"
"---------------------------------------\n"
;;; mml.el --- A package for parsing and validating MML documents
-;; Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
+;; Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; This file is part of GNU Emacs.
(defvar mml-generate-multipart-alist nil
"*Alist of multipart generation functions.
Each entry has the form (NAME . FUNCTION), where
-NAME is a string containing the name of the part (without the
+NAME is a string containing the name of the part (without the
leading \"/multipart/\"),
FUNCTION is a Lisp function which is called to generate the part.
(defvar mml-buffer-list nil)
-(defun mml-generate-new-buffer (name)
+(defun mml-generate-new-buffer (name)
(let ((buf (generate-new-buffer name)))
(push buf mml-buffer-list)
buf))
(setq raw (cdr (assq 'raw tag))
point (point)
contents (mml-read-part (eq 'mml (car tag)))
- charsets (if raw nil
+ charsets (if raw nil
(mm-find-mime-charset-region point (point))))
(when (and (not raw) (memq nil charsets))
(if (or (memq 'unknown-encoding mml-confirmation-set)
Message contains characters with unknown encoding. Really send?")
(set (make-local-variable 'mml-confirmation-set)
(push 'unknown-encoding mml-confirmation-set))))
- (if (setq use-ascii
+ (if (setq use-ascii
(or (memq 'use-ascii mml-confirmation-set)
(y-or-n-p "Use ASCII as charset?")))
(setq charsets (delq nil charsets))
(forward-line 1))
(nreverse struct)))
-(defun mml-parse-singlepart-with-multiple-charsets
+(defun mml-parse-singlepart-with-multiple-charsets
(orig-tag beg end &optional use-ascii)
(save-excursion
(save-restriction
(if (re-search-forward "<#\\(/\\)?mml." nil t)
(setq count (+ count (if (match-beginning 1) -1 1)))
(goto-char (point-max))))
- (buffer-substring-no-properties beg (if (> count 0)
+ (buffer-substring-no-properties beg (if (> count 0)
(point)
(match-beginning 0))))
(if (re-search-forward
(buffer-string)))))
(defun mml-generate-mime-1 (cont)
- (let ((mm-use-ultra-safe-encoding
+ (let ((mm-use-ultra-safe-encoding
(or mm-use-ultra-safe-encoding (assq 'sign cont))))
(save-restriction
(narrow-to-region (point) (point))
(if (and (not raw)
(member (car (split-string type "/")) '("text" "message")))
(with-temp-buffer
- (setq charset (mm-charset-to-coding-system
+ (setq charset (mm-charset-to-coding-system
(cdr (assq 'charset cont))))
(when (eq charset 'ascii)
(setq charset nil))
nil t)
(delete-region (+ (match-beginning 0) 2)
(+ (match-beginning 0) 3))))))
- (cond
+ (cond
((eq (car cont) 'mml)
(let ((mml-boundary (funcall mml-boundary-function
(incf mml-multipart-number)))
(let ((mm-7bit-chars (concat mm-7bit-chars "\x1b")))
;; ignore 0x1b, it is part of iso-2022-jp
(setq encoding (mm-body-7-or-8))))
- (t
+ (t
(setq charset (mm-encode-body charset))
(setq encoding (mm-body-encoding
charset (cdr (assq 'encoding cont))))))
(concat "access-type="
(if (member (nth 0 name) '("ftp@" "anonymous@"))
"anon-ftp"
- "ftp")))))
+ "ftp")))))
(when url
(mml-insert-parameter
(mail-header-encode-parameter "url" url)
(save-excursion
(set-buffer (setq buffer (mml-generate-new-buffer " *mml*")))
(mm-insert-part handle)
- (if (setq mmlp (equal (mm-handle-media-type handle)
+ (if (setq mmlp (equal (mm-handle-media-type handle)
"message/rfc822"))
(mime-to-mml)))))
(if mmlp
(equal (mm-handle-media-type handle) "text/plain"))
(mml-insert-mml-markup handle buffer textp)))
(cond
- (mmlp
+ (mmlp
(insert-buffer buffer)
(goto-char (point-max))
(insert "<#/mml>\n"))
(interactive "P")
(let ((buf (current-buffer))
(message-options message-options)
- (message-posting-charset (or (gnus-setup-posting-charset
+ (message-posting-charset (or (gnus-setup-posting-charset
(save-restriction
(message-narrow-to-headers-or-head)
(message-fetch-field "Newsgroups")))
;;; mml2015.el --- MIME Security with Pretty Good Privacy (PGP)
-;; Copyright (C) 2000 Free Software Foundation, Inc.
+;; Copyright (C) 2000, 2001 Free Software Foundation, Inc.
;; Author: Shenghuo Zhu <zsh@cs.rochester.edu>
;; Keywords: PGP MIME MML
(eval-when-compile (require 'cl))
(require 'mm-decode)
-(defvar mml2015-use (or
+(defvar mml2015-use (or
(progn
(ignore-errors
(require 'gpg))
mml2015-mailcrypt-verify
mml2015-mailcrypt-decrypt
mml2015-mailcrypt-clear-verify
- mml2015-mailcrypt-clear-decrypt)
+ mml2015-mailcrypt-clear-decrypt)
(gpg mml2015-gpg-sign
mml2015-gpg-encrypt
mml2015-gpg-verify
(defun mml2015-mailcrypt-decrypt (handle ctl)
(catch 'error
(let (child handles result)
- (unless (setq child (mm-find-part-by-type
- (cdr handle)
+ (unless (setq child (mm-find-part-by-type
+ (cdr handle)
"application/octet-stream" nil t))
- (mm-set-handle-multipart-parameter
+ (mm-set-handle-multipart-parameter
mm-security-handle 'gnus-info "Corrupted")
(throw 'error handle))
(with-temp-buffer
(mm-insert-part child)
- (setq result
+ (setq result
(condition-case err
(funcall mml2015-decrypt-function)
- (error
- (mm-set-handle-multipart-parameter
- mm-security-handle 'gnus-details (cadr err))
+ (error
+ (mm-set-handle-multipart-parameter
+ mm-security-handle 'gnus-details (cadr err))
nil)
(quit
- (mm-set-handle-multipart-parameter
- mm-security-handle 'gnus-details "Quit.")
+ (mm-set-handle-multipart-parameter
+ mm-security-handle 'gnus-details "Quit.")
nil)))
(unless (car result)
- (mm-set-handle-multipart-parameter
+ (mm-set-handle-multipart-parameter
mm-security-handle 'gnus-info "Failed")
(throw 'error handle))
(setq handles (mm-dissect-buffer t)))
(mm-destroy-parts handle)
- (mm-set-handle-multipart-parameter
+ (mm-set-handle-multipart-parameter
mm-security-handle 'gnus-info "OK")
(if (listp (car handles))
handles
(defun mml2015-mailcrypt-clear-decrypt ()
(let (result)
- (setq result
+ (setq result
(condition-case err
(funcall mml2015-decrypt-function)
- (error
- (mm-set-handle-multipart-parameter
- mm-security-handle 'gnus-details (cadr err))
+ (error
+ (mm-set-handle-multipart-parameter
+ mm-security-handle 'gnus-details (cadr err))
nil)
(quit
- (mm-set-handle-multipart-parameter
- mm-security-handle 'gnus-details "Quit.")
+ (mm-set-handle-multipart-parameter
+ mm-security-handle 'gnus-details "Quit.")
nil)))
(if (car result)
- (mm-set-handle-multipart-parameter
+ (mm-set-handle-multipart-parameter
mm-security-handle 'gnus-info "OK")
- (mm-set-handle-multipart-parameter
+ (mm-set-handle-multipart-parameter
mm-security-handle 'gnus-info "Failed"))))
(defun mml2015-fix-micalg (alg)
(defun mml2015-mailcrypt-verify (handle ctl)
(catch 'error
(let (part)
- (unless (setq part (mm-find-raw-part-by-type
- ctl (or (mm-handle-multipart-ctl-parameter
+ (unless (setq part (mm-find-raw-part-by-type
+ ctl (or (mm-handle-multipart-ctl-parameter
ctl 'protocol)
"application/pgp-signature")
t))
- (mm-set-handle-multipart-parameter
+ (mm-set-handle-multipart-parameter
mm-security-handle 'gnus-info "Corrupted")
(throw 'error handle))
(with-temp-buffer
(insert "-----BEGIN PGP SIGNED MESSAGE-----\n")
- (insert (format "Hash: %s\n\n"
+ (insert (format "Hash: %s\n\n"
(or (mml2015-fix-micalg
- (mm-handle-multipart-ctl-parameter
+ (mm-handle-multipart-ctl-parameter
ctl 'micalg))
"SHA1")))
(save-restriction
(if (looking-at "^-")
(insert "- "))
(forward-line)))
- (unless (setq part (mm-find-part-by-type
+ (unless (setq part (mm-find-part-by-type
(cdr handle) "application/pgp-signature" nil t))
- (mm-set-handle-multipart-parameter
+ (mm-set-handle-multipart-parameter
mm-security-handle 'gnus-info "Corrupted")
(throw 'error handle))
(save-restriction
(replace-match "-----END PGP SIGNATURE-----" t t)))
(unless (condition-case err
(funcall mml2015-verify-function)
- (error
- (mm-set-handle-multipart-parameter
- mm-security-handle 'gnus-details (cadr err))
+ (error
+ (mm-set-handle-multipart-parameter
+ mm-security-handle 'gnus-details (cadr err))
nil)
(quit
- (mm-set-handle-multipart-parameter
- mm-security-handle 'gnus-details "Quit.")
+ (mm-set-handle-multipart-parameter
+ mm-security-handle 'gnus-details "Quit.")
nil))
- (mm-set-handle-multipart-parameter
+ (mm-set-handle-multipart-parameter
mm-security-handle 'gnus-info "Failed")
(throw 'error handle)))
- (mm-set-handle-multipart-parameter
+ (mm-set-handle-multipart-parameter
mm-security-handle 'gnus-info "OK")
handle)))
(defun mml2015-mailcrypt-clear-verify ()
(if (condition-case err
(funcall mml2015-verify-function)
- (error
- (mm-set-handle-multipart-parameter
- mm-security-handle 'gnus-details (cadr err))
+ (error
+ (mm-set-handle-multipart-parameter
+ mm-security-handle 'gnus-details (cadr err))
nil)
(quit
- (mm-set-handle-multipart-parameter
- mm-security-handle 'gnus-details "Quit.")
+ (mm-set-handle-multipart-parameter
+ mm-security-handle 'gnus-details "Quit.")
nil))
- (mm-set-handle-multipart-parameter
+ (mm-set-handle-multipart-parameter
mm-security-handle 'gnus-info "OK")
- (mm-set-handle-multipart-parameter
+ (mm-set-handle-multipart-parameter
mm-security-handle 'gnus-info "Failed")))
(defun mml2015-mailcrypt-sign (cont)
(mc-sign-generic (message-options-get 'message-sender)
nil nil nil nil)
- (let ((boundary
+ (let ((boundary
(funcall mml-boundary-function (incf mml-multipart-number)))
hash point)
(goto-char (point-min))
(error "Cannot find signature part." ))
(replace-match "-----END PGP MESSAGE-----" t t)
(goto-char (match-beginning 0))
- (unless (re-search-backward "^-----BEGIN PGP SIGNATURE-----\r?$"
+ (unless (re-search-backward "^-----BEGIN PGP SIGNATURE-----\r?$"
nil t)
(error "Cannot find signature part." ))
(replace-match "-----BEGIN PGP MESSAGE-----" t t)
(let ((mc-pgp-always-sign
(or mc-pgp-always-sign
(eq t (or (message-options-get 'message-sign-encrypt)
- (message-options-set
+ (message-options-set
'message-sign-encrypt
(or (y-or-n-p "Sign the message? ")
'not))))
'never)))
(mm-with-unibyte-current-buffer-mule4
- (mc-encrypt-generic
+ (mc-encrypt-generic
(or (message-options-get 'message-recipients)
(message-options-set 'message-recipients
- (mc-cleanup-recipient-headers
+ (mc-cleanup-recipient-headers
(read-string "Recipients: "))))
nil nil nil
(message-options-get 'message-sender))))
(goto-char (point-min))
(unless (looking-at "-----BEGIN PGP MESSAGE-----")
(error "Fail to encrypt the message."))
- (let ((boundary
+ (let ((boundary
(funcall mml-boundary-function (incf mml-multipart-number))))
(insert (format "Content-Type: multipart/encrypted; boundary=\"%s\";\n"
boundary))
(let ((cipher (current-buffer)) plain result)
(if (with-temp-buffer
(prog1
- (gpg-decrypt cipher (setq plain (current-buffer))
+ (gpg-decrypt cipher (setq plain (current-buffer))
mml2015-result-buffer nil)
- (mm-set-handle-multipart-parameter
- mm-security-handle 'gnus-details
+ (mm-set-handle-multipart-parameter
+ mm-security-handle 'gnus-details
(with-current-buffer mml2015-result-buffer
(buffer-string)))
(set-buffer cipher)
(let (result)
(setq result (mml2015-gpg-decrypt-1))
(if (car result)
- (mm-set-handle-multipart-parameter
+ (mm-set-handle-multipart-parameter
mm-security-handle 'gnus-info "OK")
- (mm-set-handle-multipart-parameter
+ (mm-set-handle-multipart-parameter
mm-security-handle 'gnus-info "Failed"))))
(defun mml2015-gpg-verify (handle ctl)
(catch 'error
(let (part message signature)
- (unless (setq part (mm-find-raw-part-by-type
- ctl (or (mm-handle-multipart-ctl-parameter
+ (unless (setq part (mm-find-raw-part-by-type
+ ctl (or (mm-handle-multipart-ctl-parameter
ctl 'protocol)
"application/pgp-signature")
t))
- (mm-set-handle-multipart-parameter
+ (mm-set-handle-multipart-parameter
mm-security-handle 'gnus-info "Corrupted")
(throw 'error handle))
(with-temp-buffer
(insert part)
(with-temp-buffer
(setq signature (current-buffer))
- (unless (setq part (mm-find-part-by-type
+ (unless (setq part (mm-find-part-by-type
(cdr handle) "application/pgp-signature" nil t))
- (mm-set-handle-multipart-parameter
+ (mm-set-handle-multipart-parameter
mm-security-handle 'gnus-info "Corrupted")
(throw 'error handle))
(mm-insert-part part)
(unless (condition-case err
(prog1
(gpg-verify message signature mml2015-result-buffer)
- (mm-set-handle-multipart-parameter
- mm-security-handle 'gnus-details
+ (mm-set-handle-multipart-parameter
+ mm-security-handle 'gnus-details
(with-current-buffer mml2015-result-buffer
(buffer-string))))
- (error
- (mm-set-handle-multipart-parameter
- mm-security-handle 'gnus-details (cadr err))
+ (error
+ (mm-set-handle-multipart-parameter
+ mm-security-handle 'gnus-details (cadr err))
nil)
(quit
- (mm-set-handle-multipart-parameter
- mm-security-handle 'gnus-details "Quit.")
+ (mm-set-handle-multipart-parameter
+ mm-security-handle 'gnus-details "Quit.")
nil))
- (mm-set-handle-multipart-parameter
+ (mm-set-handle-multipart-parameter
mm-security-handle 'gnus-info "Failed")
(throw 'error handle)))
- (mm-set-handle-multipart-parameter
+ (mm-set-handle-multipart-parameter
mm-security-handle 'gnus-info "OK"))
handle)))
(if (condition-case err
(prog1
(gpg-verify-cleartext (current-buffer) mml2015-result-buffer)
- (mm-set-handle-multipart-parameter
- mm-security-handle 'gnus-details
+ (mm-set-handle-multipart-parameter
+ mm-security-handle 'gnus-details
(with-current-buffer mml2015-result-buffer
(buffer-string))))
- (error
- (mm-set-handle-multipart-parameter
- mm-security-handle 'gnus-details (cadr err))
+ (error
+ (mm-set-handle-multipart-parameter
+ mm-security-handle 'gnus-details (cadr err))
nil)
(quit
- (mm-set-handle-multipart-parameter
- mm-security-handle 'gnus-details "Quit.")
+ (mm-set-handle-multipart-parameter
+ mm-security-handle 'gnus-details "Quit.")
nil))
- (mm-set-handle-multipart-parameter
+ (mm-set-handle-multipart-parameter
mm-security-handle 'gnus-info "OK")
- (mm-set-handle-multipart-parameter
+ (mm-set-handle-multipart-parameter
mm-security-handle 'gnus-info "Failed")))
(defun mml2015-gpg-sign (cont)
- (let ((boundary
+ (let ((boundary
(funcall mml-boundary-function (incf mml-multipart-number)))
(text (current-buffer)) signature)
(goto-char (point-max))
(insert "\n"))
(with-temp-buffer
(unless (gpg-sign-detached text (setq signature (current-buffer))
- mml2015-result-buffer
+ mml2015-result-buffer
nil
(message-options-get 'message-sender)
t t) ; armor & textmode
(goto-char (point-max)))))
(defun mml2015-gpg-encrypt (cont)
- (let ((boundary
+ (let ((boundary
(funcall mml-boundary-function (incf mml-multipart-number)))
(text (current-buffer))
cipher)
(mm-with-unibyte-current-buffer-mule4
(with-temp-buffer
- (unless (gpg-sign-encrypt
+ (unless (gpg-sign-encrypt
text (setq cipher (current-buffer))
- mml2015-result-buffer
+ mml2015-result-buffer
(split-string
- (or
+ (or
(message-options-get 'message-recipients)
(message-options-set 'message-recipients
(read-string "Recipients: ")))
;;; nnmail.el --- mail support functions for the Gnus mail backends
-;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000
+;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001
;; Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
GROUP: Mail will be stored in GROUP (a string).
\(FIELD VALUE [- RESTRICT [- RESTRICT [...]]] SPLIT): If the message
- field FIELD (a regexp) contains VALUE (a regexp), store the messages
+ field FIELD (a regexp) contains VALUE (a regexp), store the messages
as specified by SPLIT. If RESTRICT (a regexp) matches some string
after FIELD and before the end of the matched VALUE, return NIL,
otherwise process SPLIT. Multiple RESTRICTs add up, further
(any \"procmail@informatik\\\\.rwth-aachen\\\\.de\" \"procmail.list\")
(any \"SmartList@informatik\\\\.rwth-aachen\\\\.de\" \"SmartList.list\")
;; Both lists below have the same suffix, so prevent
- ;; cross-posting to mkpkg.list of messages posted only to
+ ;; cross-posting to mkpkg.list of messages posted only to
;; the bugs- list, but allow cross-posting when the
;; message was really cross-posted.
(any \"bugs-mypackage@somewhere\" \"mypkg.bugs\")
(any \"mypackage@somewhere\" - \"bugs-mypackage\" \"mypkg.list\")
- ;;
+ ;;
;; People...
(any \"larsi@ifi\\\\.uio\\\\.no\" \"people.Lars Magne Ingebrigtsen\"))
;; Unmatched mail goes to the catch all group.
(let (lines chars)
(save-excursion
(goto-char (point-min))
- (unless (search-forward "\n\n" nil t)
+ (unless (search-forward "\n\n" nil t)
(goto-char (point-max))
(insert "\n"))
(setq chars (- (point-max) (point)))
;;; nnslashdot.el --- interfacing with Slashdot
-;; Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+;; Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: news
"by <a[^>]+>\\([^<]+\\)</a>[ \t\n]*.*(\\([^)]+\\))")
(progn
(goto-char (- (match-end 0) 5))
- (setq from (concat
+ (setq from (concat
(nnweb-decode-entities-string (match-string 1))
" <" (match-string 2) ">")))
(setq from "")
(concat subject " (" score ")")
from date
(concat "<" (nnslashdot-sid-strip sid) "%"
- (number-to-string (1+ article))
+ (number-to-string (1+ article))
"@slashdot>")
(if parent
(concat "<" (nnslashdot-sid-strip sid) "%"
"by <a[^>]+>\\([^<]+\\)</a>[ \t\n]*.*(\\([^)]+\\))")
(progn
(goto-char (- (match-end 0) 5))
- (setq from (concat
+ (setq from (concat
(nnweb-decode-entities-string (match-string 1))
" <" (match-string 2) ">")))
(setq from "")
(1+ article) (concat subject " (" score ")")
from date
(concat "<" (nnslashdot-sid-strip sid) "%"
- (number-to-string (1+ article))
+ (number-to-string (1+ article))
"@slashdot>")
(if parent
(concat "<" (nnslashdot-sid-strip sid) "%"
sid elem description articles gname)
(condition-case why
;; First we do the Ultramode to get info on all the latest groups.
- (progn
+ (progn
(mm-with-unibyte-buffer
(nnweb-insert "http://slashdot.org/slashdot.xml" t)
(goto-char (point-min))
(nnslashdot-write-groups)
(nnslashdot-generate-active)
t))
-
+
(deffoo nnslashdot-request-newgroups (date &optional server)
(nnslashdot-possibly-change-server nil server)
(nnslashdot-generate-active)
(defun nnslashdot-write-groups ()
(with-temp-file (expand-file-name "groups" nnslashdot-directory)
(prin1 nnslashdot-groups (current-buffer))))
-
+
(defun nnslashdot-init (server)
"Initialize buffers and such."
(unless (file-exists-p nnslashdot-directory)
;;; nnvirtual.el --- virtual newsgroups access for Gnus
-;; Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000
+;; Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
;; Free Software Foundation, Inc.
;; Author: David Moore <dmoore@ucsd.edu>
(gnus-request-post (gnus-find-method-for-group group)))))
-(deffoo nnvirtual-request-expire-articles (articles group
+(deffoo nnvirtual-request-expire-articles (articles group
&optional server force)
(nnvirtual-possibly-change-server server)
(setq nnvirtual-component-groups
;;; pop3.el --- Post Office Protocol (RFC 1460) interface
-;; Copyright (C) 1996, 1997, 1998, 1999, 2000
+;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
;; Free Software Foundation, Inc.
;; Author: Richard L. Pieri <ratinox@peorth.gweep.net>
;;; rfc2047.el --- Functions for encoding and decoding rfc2047 messages
-;; Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
+;; Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; MORIOKA Tomohiko <morioka@jaist.ac.jp>
"Alist of RFC2047 encodings to encoding functions.")
(defvar rfc2047-q-encoding-alist
- '(("\\(Resent-\\)?\\(From\\|Cc\\|To\\|Bcc\\|Reply-To\\|Sender\\):"
+ '(("\\(Resent-\\)?\\(From\\|Cc\\|To\\|Bcc\\|Reply-To\\|Sender\\):"
. "-A-Za-z0-9!*+/" )
;; = (\075), _ (\137), ? (\077) are used in the encoded word.
;; Avoid using 8bit characters. Some versions of Emacs has bug!
(mm-encode-coding-region (point-min) (point-max)
mail-parse-charset)))
((null method)
- (and (delq 'ascii
- (mm-find-charset-region (point-min)
+ (and (delq 'ascii
+ (mm-find-charset-region (point-min)
(point-max)))
(if (or (message-options-get
- 'rfc2047-encode-message-header-encode-any)
+ 'rfc2047-encode-message-header-encode-any)
(message-options-set
'rfc2047-encode-message-header-encode-any
- (y-or-n-p
+ (y-or-n-p
"Some texts are not encoded. Encode anyway?")))
(rfc2047-encode-region (point-min) (point-max))
(error "Cannot send unencoded text."))))
;; Anything except most CTLs, WSP
(setq word-chars "\010\012\014\041-\177"))
(let (mail-parse-mule-charset
- words point current
+ words point current
result word)
(save-restriction
(narrow-to-region b e)
(mm-decode-coding-string
(cond
((equal "B" encoding)
- (base64-decode-string
+ (base64-decode-string
(rfc2047-pad-base64 string)))
((equal "Q" encoding)
(quoted-printable-decode-string
;;; smime.el --- S/MIME support library
-;; Copyright (c) 2000 Free Software Foundation, Inc.
+;; Copyright (c) 2000, 2001 Free Software Foundation, Inc.
;; Author: Simon Josefsson <simon@josefsson.org>
;; Keywords: SMIME X.509 PEM OpenSSL
:type 'directory
:group 'smime)
-(defcustom smime-openssl-program
- (and (condition-case ()
+(defcustom smime-openssl-program
+ (and (condition-case ()
(eq 0 (call-process "openssl" nil nil nil "version"))
(error nil))
"openssl")
(interactive)
(with-current-buffer (or buffer (current-buffer))
(smime-sign-region
- (point-min) (point-max)
+ (point-min) (point-max)
(or keyfile
(smime-get-key-by-email
(completing-read "Sign using which signature? " smime-keys nil nil
nil."
(interactive)
(with-current-buffer (or buffer (current-buffer))
- (smime-encrypt-region
+ (smime-encrypt-region
(point-min) (point-max)
(or certfiles
(list (read-file-name "Recipient's S/MIME certificate: "
(error "No CA configured.")))))
(with-current-buffer buffer
(erase-buffer))
- (if (apply 'smime-call-openssl-region b e buffer "smime" "-verify"
+ (if (apply 'smime-call-openssl-region b e buffer "smime" "-verify"
"-out" "/dev/null" CAs)
(message "S/MIME message verified succesfully.")
(message "S/MIME message NOT verified successfully.")
(let ((buffer (get-buffer-create smime-details-buffer)))
(with-current-buffer buffer
(erase-buffer))
- (if (apply 'smime-call-openssl-region b e buffer "smime" "-verify"
+ (if (apply 'smime-call-openssl-region b e buffer "smime" "-verify"
"-noverify" "-out" '("/dev/null"))
(message "S/MIME message verified succesfully.")
(message "S/MIME message NOT verified successfully.")
(defun smime-decrypt-region (b e keyfile)
(let ((buffer (generate-new-buffer (generate-new-buffer-name "*smime*")))
CAs)
- (when (apply 'smime-call-openssl-region b e buffer "smime" "-decrypt"
+ (when (apply 'smime-call-openssl-region b e buffer "smime" "-decrypt"
"-recip" (list keyfile))
-
+
)
(with-current-buffer (get-buffer-create smime-details-buffer)
(goto-char (point-max))
(insert-buffer buffer))
(kill-buffer buffer)))
-
+
;; Verify+Decrypt buffer
(defun smime-verify-buffer (&optional buffer)
Uses current buffer if BUFFER is nil, queries user of KEYFILE is nil."
(interactive)
(with-current-buffer (or buffer (current-buffer))
- (smime-decrypt-region
+ (smime-decrypt-region
(point-min) (point-max)
(expand-file-name
(or keyfile
(smime-get-key-by-email
(completing-read "Decrypt with which key? " smime-keys nil nil
- (and (listp (car-safe smime-keys))
+ (and (listp (car-safe smime-keys))
(caar smime-keys)))))))))
;; Various operations
(when (smime-call-openssl-region b e buffer "x509" "-email" "-noout")
(delete-region b e)
(insert-buffer-substring buffer)
- t)))
+ t)))
(defalias 'smime-point-at-eol
(if (fboundp 'point-at-eol)
(erase-buffer)
(insert "\nYour keys:\n")
(dolist (key smime-keys)
- (insert
+ (insert
(format "\t\t%s: %s\n" (car key) (cadr key))))
(insert "\nTrusted Certificate Authoritys:\n")
(insert "\nKnown Certificates:\n"))))
;;; time-date.el --- Date and time handling functions
-;; Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
+;; Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Masanobu Umeda <umerin@mse.kyutech.ac.jp>