+Mon Feb 1 21:18:00 1999 Lars Magne Ingebrigtsen <larsi@menja.ifi.uio.no>
+
+ * gnus.el: Pterodactyl Gnus v0.75 is released.
+
+1999-02-01 21:54:26 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * gnus-art.el (article-display-x-face): Don't narrow to head.
+
+1999-02-01 21:48:39 Michael Cook <cook@sightpath.com>
+
+ * gnus-cite.el (gnus-cited-lines-visible): Accept a cons.
+
+1999-02-01 20:59:38 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * mail-source.el (mail-source-fetch-directory): Ignore
+ directories.
+
+ * gnus-cus.el (gnus-group-parameters): Addition.
+
+ * gnus-art.el (article-strip-banner): Do symbolic banners.
+ (article-strip-banner): New keystroke.
+
+1999-02-01 20:54:32 Michael Cook <cook@sightpath.com>
+
+ * gnus-art.el (article-strip-banner): New command.
+
+1999-02-01 20:53:45 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * gnus-art.el (gnus-treat-strip-banners): New variable.
+
+1999-01-28 05:34:56 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * mail-source.el (mail-source-read-passwd): Use `read-passwd' if it
+ has been exist.
+
+Thu Jan 28 01:38:34 1999 Shenghuo ZHU <zsh@cs.rochester.edu>
+
+ * message.el (message-draft-coding-system): Check coding-system.
+ * mm-util.el (mm-text-coding-system): Ditto.
+
+1999-01-28 12:11:31 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * mail-source.el (mail-source-fetch-pop): Save excursion.
+
+1999-01-28 08:14:21 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * mail-source.el (mail-source-movemail-args): Not constant.
+ (mail-source-movemail-args): Removed.
+ (mail-source-fetch-with-program): New function.
+ (mail-source-fetch-pop): Use program and function.
+ (mail-source-movemail-program): Removed.
+
+ * gnus-art.el (gnus-treat-date-iso8601): New variable.
+ (gnus-treat-date-user-defined): New variable.
+
+1999-01-28 08:07:12 Per Abrahamsen <abraham@dina.kvl.dk>
+
+ * nnmail.el (nnmail-fix-eudora-headers): New function.
+
+1999-01-28 08:05:19 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * mm-bodies.el (mm-encode-body): Use mail-parse-charset.
+
+1999-01-27 08:06:38 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * smiley.el (smiley-deformed-regexp-alist): Removed =>.
+ (smiley-nosey-regexp-alist): Ditto.
+
+ * gnus-art.el (gnus-treatment-function-alist): Do
+ gnus-article-add-buttons-to-head later.
+ (gnus-treat-capitalize-sentences): New variable.
+ (article-capitalize-sentences): New command and keystroke.
+
+ * gnus-group.el (gnus-group-catchup-current): Do group.
+
+ * message.el (message-default-charset): Add group.
+
Wed Jan 27 05:24:53 1999 Lars Magne Ingebrigtsen <larsi@menja.ifi.uio.no>
* gnus.el: Pterodactyl Gnus v0.74 is released.
(setq errstring (buffer-string))
(kill-buffer nil)
(cons status errstring)))))
- (condition-case ()
- (delete-file tempfile)
- (error nil)))))
+ (ignore-errors
+ (delete-file tempfile)))))
(if (string-match "XEmacs" emacs-version)
(defalias 'base64-insert-char 'insert-char)
;; Author: Shenghuo Zhu <zsh@cs.rochester.edu>
;; Create Date: Oct 1, 1998
-;; $Revision: 1.1.1.8 $
+;; $Revision: 1.1.1.9 $
;; Time-stamp: <Tue Oct 6 23:48:38 EDT 1998 zsh>
;; Keywords: binhex
(insert-file-contents-literally file-name)))
(error "Can not binhex")))
(and work-buffer (kill-buffer work-buffer))
- (condition-case ()
- (if file-name (delete-file file-name))
- (error))
- )))
+ (ignore-errors
+ (if file-name (delete-file file-name))))))
(provide 'binhex)
:group 'gnus-article-treat
:type gnus-article-treat-custom)
+(defcustom gnus-treat-strip-banner t
+ "Strip banners from articles.
+The banner to be stripped is specified in the `banner' group parameter."
+ :group 'gnus-article-treat
+ :type gnus-article-treat-custom)
+
(defcustom gnus-treat-highlight-headers 'head
"Highlight the headers."
:group 'gnus-article-treat
:group 'gnus-article-treat
:type gnus-article-treat-custom)
+(defcustom gnus-treat-date-iso8601 nil
+ "Display the date in the ISO8601 format."
+ :group 'gnus-article-treat
+ :type gnus-article-treat-custom)
+
+(defcustom gnus-treat-date-user-defined nil
+ "Display the date in a user-defined format.
+The format is defined by the `gnus-article-time-format' variable."
+ :group 'gnus-article-treat
+ :type gnus-article-treat-custom)
+
(defcustom gnus-treat-strip-trailing-blank-lines nil
"Strip trailing blank lines."
:group 'gnus-article-treat
:group 'gnus-article-treat
:type gnus-article-treat-custom)
+(defcustom gnus-treat-capitalize-sentences nil
+ "Capitalize sentence-starting words."
+ :group 'gnus-article-treat
+ :type gnus-article-treat-custom)
+
+(defcustom gnus-treat-fill-long-lines nil
+ "Fill long lines."
+ :group 'gnus-article-treat
+ :type gnus-article-treat-custom)
+
;;; Internal variables
(defvar article-goto-body-goes-to-point-min-p nil)
(defvar gnus-article-mime-handle-alist-1 nil)
(defvar gnus-treatment-function-alist
- '((gnus-treat-highlight-signature gnus-article-highlight-signature)
+ '((gnus-treat-strip-banner gnus-article-strip-banner)
+ (gnus-treat-highlight-signature gnus-article-highlight-signature)
(gnus-treat-buttonize gnus-article-add-buttons)
- (gnus-treat-buttonize-head gnus-article-add-buttons-to-head)
(gnus-treat-fill-article gnus-article-fill-cited-article)
+ (gnus-treat-fill-long-lines gnus-article-fill-long-lines)
(gnus-treat-strip-cr gnus-article-remove-cr)
(gnus-treat-hide-headers gnus-article-hide-headers)
(gnus-treat-hide-boring-headers gnus-article-hide-boring-headers)
(gnus-treat-date-local gnus-article-date-local)
(gnus-treat-date-lapsed gnus-article-date-lapsed)
(gnus-treat-date-original gnus-article-date-original)
+ (gnus-treat-date-user-defined gnus-article-date-user)
+ (gnus-treat-date-iso8601 gnus-article-date-iso8601)
(gnus-treat-strip-trailing-blank-lines
gnus-article-remove-trailing-blank-lines)
(gnus-treat-strip-leading-blank-lines
gnus-article-strip-multiple-blank-lines)
(gnus-treat-strip-blank-lines gnus-article-strip-blank-lines)
(gnus-treat-overstrike gnus-article-treat-overstrike)
+ (gnus-treat-buttonize-head gnus-article-add-buttons-to-head)
(gnus-treat-display-xface gnus-article-display-x-face)
(gnus-treat-display-smileys gnus-smiley-display)
(gnus-treat-display-picons gnus-article-display-picons)))
(widen))
(forward-line 1)))))))
+(defun article-capitalize-sentences ()
+ "Capitalize the first word in each sentence."
+ (interactive)
+ (save-excursion
+ (let ((buffer-read-only nil)
+ (paragraph-start "^[\n\^L]"))
+ (article-goto-body)
+ (while (not (eobp))
+ (capitalize-word 1)
+ (forward-sentence)))))
+
(defun article-remove-cr ()
"Translate CRLF pairs into LF, and then CR into LF.."
(interactive)
(case-fold-search t)
from last)
(save-restriction
- (nnheader-narrow-to-headers)
+ (goto-char (point-min))
(setq from (message-fetch-field "from"))
(goto-char (point-min))
(while (and gnus-article-x-face-command
(case-fold-search t)
(ct (message-fetch-field "Content-Type" t))
(cte (message-fetch-field "Content-Transfer-Encoding" t))
- (ctl (and ct (condition-case ()
- (mail-header-parse-content-type ct)
- (error nil))))
+ (ctl (and ct (ignore-errors
+ (mail-header-parse-content-type ct))))
(charset (cond
(prompt
(mm-read-coding-system "Charset to decode: "))
(gnus-article-hide-text-type
(match-beginning 0) (match-end 0) 'pem))))))
+(defun article-strip-banner ()
+ "Strip the banner specified by the `banner' group parameter."
+ (interactive)
+ (save-excursion
+ (save-restriction
+ (let ((inhibit-point-motion-hooks t)
+ (banner (gnus-group-get-parameter gnus-newsgroup-name 'banner))
+ (gnus-signature-limit nil)
+ buffer-read-only beg end)
+ (when banner
+ (article-goto-body)
+ (cond
+ ((eq banner 'signature)
+ (when (gnus-article-narrow-to-signature)
+ (widen)
+ (forward-line -1)
+ (delete-region (point) (point-max))))
+ ((stringp banner)
+ (while (re-search-forward banner nil t)
+ (delete-region (match-beginning 0) (match-end 0))))))))))
+
(defun article-hide-signature (&optional arg)
"Hide the signature in the current article.
If given a negative prefix, always show; if given a positive prefix,
"Place point at the start of the body."
(goto-char (point-min))
(cond
+ ;; This variable is only bound when dealing with separate
+ ;; MIME body parts.
(article-goto-body-goes-to-point-min-p
t)
((search-forward "\n\n" nil t)
article-hide-boring-headers
article-treat-overstrike
article-fill-long-lines
+ article-capitalize-sentences
article-remove-cr
article-display-x-face
article-de-quoted-unreadable
article-mime-decode-quoted-printable
article-hide-pgp
+ article-strip-banner
article-hide-pem
article-hide-signature
article-remove-trailing-blank-lines
:type 'string)
(defcustom gnus-cited-lines-visible nil
- "The number of lines of hidden cited text to remain visible."
+ "The number of lines of hidden cited text to remain visible.
+Or a pair (cons) of numbers which are the number of lines at the top
+and bottom of the text, respectively, to remain visible."
:group 'gnus-cite
:type '(choice (const :tag "none" nil)
- integer))
+ integer
+ (cons :tag "Top and Bottom" integer integer)))
(defcustom gnus-cite-parse-max-size 25000
"Maximum article size (in bytes) where parsing citations is allowed.
;; Skip past lines we want to leave visible.
(when (and beg end gnus-cited-lines-visible)
(goto-char beg)
- (forward-line gnus-cited-lines-visible)
+ (forward-line (if (consp gnus-cited-lines-visible)
+ (car gnus-cited-lines-visible)
+ gnus-cited-lines-visible))
(if (>= (point) end)
(setq beg nil)
- (setq beg (point-marker))))
+ (setq beg (point-marker))
+ (when (consp gnus-cited-lines-visible)
+ (goto-char end)
+ (forward-line (- (cdr gnus-cited-lines-visible)))
+ (if (<= (point) beg)
+ (setq beg nil)
+ (setq end (point-marker))))))
(when (and beg end)
;; We use markers for the end-points to facilitate later
;; wrapping and mangling of text.
`gcc' header (this symbol takes precedence over any default `Gcc'
rules as described later).")
+ (banner (choice :tag "Banner"
+ (const signature)
+ string ) "\
+Banner to be removed from articles.")
+a
(auto-expire (const :tag "Automatic Expire" t) "\
All articles that are read will be marked as expirable.")
(car groups)
(format "these %d groups" (length groups)))))))
n
- (while (setq groups (pop groups))
+ (while (setq group (pop groups))
;; Virtual groups have to be given special treatment.
(let ((method (gnus-find-method-for-group group)))
(when (eq 'nnvirtual (car method))
(and (car entry)
(or (eq (car entry) t)
(not (zerop (car entry))))))
- (condition-case ()
- (gnus-summary-read-group group nil t nil t)
- (error nil))
+ (ignore-errors
+ (gnus-summary-read-group group nil t nil t))
(when (eq (current-buffer) (get-buffer gnus-summary-buffer))
(gnus-summary-exit))))
;; Exit Emacs.
(while (re-search-forward
"\\(^[^ \t]+\\)[ \t]+[0-9]+[ \t]+[0-9]+" nil t)
(goto-char (match-end 1))
- (condition-case ()
- (push (cons (match-string 1)
- (max 0 (- (1+ (read cur)) (read cur))))
- groups)
- (error nil)))))
+ (ignore-errors
+ (push (cons (match-string 1)
+ (max 0 (- (1+ (read cur)) (read cur))))
+ groups)))))
(setq groups (sort groups
(lambda (l1 l2)
(string< (car l1) (car l2)))))
:type 'file)
(defcustom gnus-site-init-file
- (condition-case nil
- (concat (file-name-directory
- (directory-file-name installation-directory))
- "site-lisp/gnus-init")
- (error nil))
+ (ignore-errors
+ (concat (file-name-directory
+ (directory-file-name installation-directory))
+ "site-lisp/gnus-init"))
"*The site-wide Gnus Emacs-Lisp startup file name, or nil if none.
If a file with the `.el' or `.elc' suffixes exists, it will be read instead."
:group 'gnus-start
"e" gnus-article-emphasize
"w" gnus-article-fill-cited-article
"Q" gnus-article-fill-long-lines
+ "C" gnus-article-capitalize-sentences
"c" gnus-article-remove-cr
"q" gnus-article-de-quoted-unreadable
"f" gnus-article-display-x-face
"c" gnus-article-hide-citation
"C" gnus-article-hide-citation-in-followups
"p" gnus-article-hide-pgp
+ "B" gnus-article-strip-banner
"P" gnus-article-hide-pem
"\C-c" gnus-article-hide-citation-maybe)
["Signature" gnus-article-hide-signature t]
["Citation" gnus-article-hide-citation t]
["PGP" gnus-article-hide-pgp t]
+ ["Banner" gnus-article-strip-banner t]
["Boring headers" gnus-article-hide-boring-headers t])
("Highlight"
["All" gnus-article-highlight t]
["Emphasis" gnus-article-emphasize t]
["Word wrap" gnus-article-fill-cited-article t]
["Fill long lines" gnus-article-fill-long-lines t]
+ ["Capitalize sentences" gnus-article-capitalize-sentences t]
["CR" gnus-article-remove-cr t]
["Show X-Face" gnus-article-display-x-face t]
["Quoted-Printable" gnus-article-de-quoted-unreadable t]
(defun gnus-summary-make-local-variables ()
"Make all the local summary buffer variables."
- (let ((locals gnus-summary-local-variables)
- global local)
- (while (setq local (pop locals))
+ (let (global)
+ (dolist (local gnus-summary-local-variables)
(if (consp local)
(progn
(if (eq (cdr local) 'global)
(setq global (symbol-value (car local)))
;; Use the value from the list.
(setq global (eval (cdr local))))
- (make-local-variable (car local))
- (set (car local) global))
+ (set (make-local-variable (car local)) global))
;; Simple nil-valued local variable.
- (make-local-variable local)
- (set local nil)))))
+ (set (make-local-variable local) nil)))))
(defun gnus-summary-clear-local-variables ()
(let ((locals gnus-summary-local-variables))
If N is negative, print the N previous articles. If N is nil and articles
have been marked with the process mark, print these instead.
-If the optional second argument FILENAME is nil, send the image to the
+If the optional first argument FILENAME is nil, send the image to the
printer. If FILENAME is a string, save the PostScript image in a file with
that name. If FILENAME is a number, prompt the user for the name of the file
to save in."
(save-buffer (save-excursion
(nnheader-set-temp-buffer " *Gnus Save*")))
(num (length articles))
- header article file)
- (while articles
- (setq header (gnus-summary-article-header
- (setq article (pop articles))))
+ header file)
+ (dolist (article articles)
+ (setq header (gnus-summary-article-header article))
(if (not (vectorp header))
;; This is a pseudo-article.
(if (assq 'name header)
(require 'gnus-msg)
(eval-when-compile
+ (require 'cl)
(autoload 'vm-mode "vm")
(autoload 'vm-save-message "vm")
(autoload 'vm-forward-message "vm")
"Inhibit loading `win-vm' if using a window-system.
Has to be set before gnus-vm is loaded.")
-(or gnus-vm-inhibit-window-system
- (condition-case nil
- (when window-system
- (require 'win-vm))
- (error nil)))
+(unless gnus-vm-inhibit-window-system
+ (ignore-errors
+ (when window-system
+ (require 'win-vm))))
(when (not (featurep 'vm))
(load "vm"))
:link '(custom-manual "(gnus)Exiting Gnus")
:group 'gnus)
-(defconst gnus-version-number "0.74"
+(defconst gnus-version-number "0.75"
"Version number for this version of Gnus.")
(defconst gnus-version (format "Pterodactyl Gnus v%s" gnus-version-number)
(kill-buffer (current-buffer))))))))
(defcustom gnus-select-method
- (condition-case nil
+ (ignore-errors
(nconc
- (list 'nntp (or (condition-case nil
- (gnus-getenv-nntpserver)
- (error nil))
+ (list 'nntp (or (ignore-errors
+ (gnus-getenv-nntpserver))
(when (and gnus-default-nntp-server
(not (string= gnus-default-nntp-server "")))
gnus-default-nntp-server)
(if (or (null gnus-nntp-service)
(equal gnus-nntp-service "nntp"))
nil
- (list gnus-nntp-service)))
- (error nil))
+ (list gnus-nntp-service))))
"*Default method for selecting a newsgroup.
This variable should be a list, where the first element is how the
news is to be fetched, the second is the address.
"The mail-fetching library."
:group 'gnus)
-(defcustom mail-source-movemail-program "movemail"
- "*A command to be executed to move mail from the inbox.
-The default is \"movemail\".
-
-This can also be a function. In that case, the function will be
-called with two parameters -- the name of the INBOX file, and the file
-to be moved to."
- :group 'mail-source
- :type '(choice string
- function))
-
-(defcustom mail-source-movemail-args nil
- "*Extra arguments to give to `mail-source-movemail-program' to move mail from the inbox.
-The default is nil."
- :group 'mail-source
- :type '(choice string
- (constant nil)))
-
(defcustom mail-source-crash-box "~/.emacs-mail-crash-box"
"File where mail will be stored while processing it."
:group 'mail-source
(:server (getenv "MAILHOST"))
(:port "pop3")
(:user (or (user-login-name) (getenv "LOGNAME") (getenv "USER")))
+ (:program)
+ (:args)
+ (:function)
(:password))
(maildir
(:path)))
CALLBACK will be called with the name of the file where (some of)
the mail from SOURCE is put.
Return the number of files that were found."
- (let ((function (cadr (assq (car source) mail-source-fetcher-alist)))
- (found 0))
- (unless function
- (error "%S is an invalid mail source specification" source))
- ;; If there's anything in the crash box, we do it first.
- (when (file-exists-p mail-source-crash-box)
- (message "Processing mail from %s..." mail-source-crash-box)
- (setq found (mail-source-callback
- callback mail-source-crash-box)))
- (+ found (funcall function source callback))))
+ (save-excursion
+ (let ((function (cadr (assq (car source) mail-source-fetcher-alist)))
+ (found 0))
+ (unless function
+ (error "%S is an invalid mail source specification" source))
+ ;; If there's anything in the crash box, we do it first.
+ (when (file-exists-p mail-source-crash-box)
+ (message "Processing mail from %s..." mail-source-crash-box)
+ (setq found (mail-source-callback
+ callback mail-source-crash-box)))
+ (+ found (funcall function source callback)))))
(defun mail-source-make-complex-temp-name (prefix)
(let ((newname (make-temp-name prefix))
(delete-file mail-source-crash-box))
0)
(funcall callback mail-source-crash-box info)
- (if mail-source-delete-incoming
- (when (file-exists-p mail-source-crash-box)
- (delete-file mail-source-crash-box))
- (let ((incoming
- (mail-source-make-complex-temp-name
- (expand-file-name
- "Incoming" mail-source-directory))))
- (unless (file-exists-p (file-name-directory incoming))
- (make-directory (file-name-directory incoming) t))
- (rename-file mail-source-crash-box incoming t)))
+ (when (file-exists-p mail-source-crash-box)
+ ;; Delete or move the incoming mail out of the way.
+ (if mail-source-delete-incoming
+ (delete-file mail-source-crash-box)
+ (let ((incoming
+ (mail-source-make-complex-temp-name
+ (expand-file-name
+ "Incoming" mail-source-directory))))
+ (unless (file-exists-p (file-name-directory incoming))
+ (make-directory (file-name-directory incoming) t))
+ (rename-file mail-source-crash-box incoming t))))
1))
(defun mail-source-movemail (from to)
(unwind-protect
(save-excursion
(setq errors (generate-new-buffer " *mail source loss*"))
- (buffer-disable-undo errors)
- (if (functionp mail-source-movemail-program)
- (condition-case err
- (progn
- (funcall mail-source-movemail-program from to)
- (setq result 0))
- (error
- (save-excursion
- (set-buffer errors)
- (insert (prin1-to-string err))
- (setq result 255))))
- (let ((default-directory "/"))
- (setq result
- (apply
- 'call-process
- (append
- (list
- (expand-file-name
- mail-source-movemail-program exec-directory)
- nil errors nil from to)
- (when mail-source-movemail-args
- mail-source-movemail-args))))))
+ (let ((default-directory "/"))
+ (setq result
+ (apply
+ 'call-process
+ (append
+ (list
+ (expand-file-name "movemail" exec-directory)
+ nil errors nil from to)))))
(when (file-exists-p to)
(set-file-modes to mail-source-default-file-modes))
(if (and (not (buffer-modified-p errors))
(apply 'format prompt args)
prompt)))
(unless mail-source-read-passwd
- (if (load "passwd" t)
+ (if (or (fboundp 'read-passwd) (load "passwd" t))
(setq mail-source-read-passwd 'read-passwd)
(unless (fboundp 'ange-ftp-read-passwd)
(autoload 'ange-ftp-read-passwd "ange-ftp"))
(setq mail-source-read-passwd 'ange-ftp-read-passwd)))
(funcall mail-source-read-passwd prompt)))
+(defun mail-source-fetch-with-program (program args to)
+ (zerop (apply 'call-process program nil nil nil
+ (append (split-string args) (list to)))))
+
+;;;
+;;; Different fetchers
+;;;
+
(defun mail-source-fetch-file (source callback)
"Fetcher for single-file sources."
(mail-source-bind (file source)
(defun mail-source-fetch-directory (source callback)
"Fetcher for directory sources."
(mail-source-bind (directory source)
- (let ((files (directory-files
- path t
- (concat (regexp-quote suffix) "$")))
- (found 0)
- (mail-source-string (format "directory:%s" path))
- file)
- (while (setq file (pop files))
- (when (mail-source-movemail file mail-source-crash-box)
+ (let ((found 0)
+ (mail-source-string (format "directory:%s" path)))
+ (dolist (file (directory-files
+ path t (concat (regexp-quote suffix) "$")))
+ (when (and (file-regular-p file)
+ (mail-source-movemail file mail-source-crash-box))
(incf found (mail-source-callback callback file))))
found)))
(format "Password for %s at %s: " user server))))
(unless (assoc from mail-source-password-cache)
(push (cons from password) mail-source-password-cache))
- (let ((pop3-password password)
- (pop3-maildrop user)
- (pop3-mailhost server))
- (if (pop3-movemail mail-source-crash-box)
- (mail-source-callback callback server)
- ;; We nix out the password in case the error
- ;; was because of a wrong password being given.
- (setq mail-source-password-cache
- (delq (assoc from mail-source-password-cache)
- mail-source-password-cache))
- 0)))))
+ (when server
+ (setenv "MAILHOST" server))
+ (if (cond
+ (program
+ (when (listp args)
+ (setq args (eval args)))
+ (mail-source-fetch-with-program
+ program args mail-source-crash-box))
+ (function
+ (funcall function mail-source-crash-box))
+ ;; The default is to use pop3.el.
+ (t
+ (let ((pop3-password password)
+ (pop3-maildrop user)
+ (pop3-mailhost server))
+ (save-excursion (pop3-movemail mail-source-crash-box)))))
+ (mail-source-callback callback server)
+ ;; We nix out the password in case the error
+ ;; was because of a wrong password being given.
+ (setq mail-source-password-cache
+ (delq (assoc from mail-source-password-cache)
+ mail-source-password-cache))
+ 0))))
(provide 'mail-source)
;; Ignore errors in case this is used in Emacs 19.
;; Don't use ignore-errors because this is copied into loaddefs.el.
;;;###autoload
-(condition-case nil
- (define-mail-user-agent 'message-user-agent
- 'message-mail 'message-send-and-exit
- 'message-kill-buffer 'message-send-hook)
- (error nil))
+(ignore-errors
+ (define-mail-user-agent 'message-user-agent
+ 'message-mail 'message-send-and-exit
+ 'message-kill-buffer 'message-send-hook))
(defvar message-mh-deletable-headers '(Message-ID Date Lines Sender)
"If non-nil, delete the deletable headers before feeding to mh.")
(const :tag "unsent" unsent)))
(defcustom message-default-charset nil
- "Default charset used in non-MULE XEmacsen.")
+ "Default charset used in non-MULE XEmacsen."
+ :group 'message
+ :type 'symbol)
;;; Internal variables.
;;; Well, not really internal.
(cond
((not (fboundp 'coding-system-p)) nil)
((coding-system-p 'emacs-mule) 'emacs-mule)
- ((coding-system-p 'escape-quoted) 'escape-quoted)
+ ((memq 'escape-quoted (mm-get-coding-system-list)) 'escape-quoted)
((coding-system-p 'no-conversion) 'no-conversion)
(t nil))
"Coding system to compose mail.")
(save-excursion
(goto-char (point-min))
(if (re-search-forward "[^\x0-\x7f]" nil t)
- (mm-read-charset "Charset used in the article: ")
+ (or mail-parse-charset
+ (mm-read-charset "Charset used in the article: "))
;; The logic in `mml-generate-mime-1' confirms that it's OK
;; to return nil here.
nil))
(when (or no-strict-mime
(mail-fetch-field "mime-version"))
(setq ct (mail-fetch-field "content-type")
- ctl (condition-case () (mail-header-parse-content-type ct)
- (error nil))
+ ctl (ignore-errors (mail-header-parse-content-type ct))
cte (mail-fetch-field "content-transfer-encoding")
cd (mail-fetch-field "content-disposition")
description (mail-fetch-field "content-description")
(not (string-match "/" (car ctl))))
(mm-dissect-singlepart
'("text/plain") nil no-strict-mime
- (and cd (condition-case ()
- (mail-header-parse-content-disposition cd)
- (error nil)))
+ (and cd (ignore-errors (mail-header-parse-content-disposition cd)))
description)
(setq type (split-string (car ctl) "/"))
(setq subtype (cadr type)
(mail-header-remove-comments
cte)))))
no-strict-mime
- (and cd (condition-case ()
- (mail-header-parse-content-disposition cd)
- (error nil)))
+ (and cd (ignore-errors (mail-header-parse-content-disposition cd)))
description id))))
(when id
(when (string-match " *<\\(.*\\)> *" id)
"Remove the displayed MIME part represented by HANDLE."
(when (listp handle)
(let ((object (mm-handle-undisplayer handle)))
- (condition-case ()
- (cond
- ;; Internally displayed part.
- ((mm-annotationp object)
- (delete-annotation object))
- ((or (functionp object)
- (and (listp object)
- (eq (car object) 'lambda)))
- (funcall object))
- ;; Externally displayed part.
- ((consp object)
- (condition-case ()
- (delete-file (car object))
- (error nil))
- (condition-case ()
- (delete-directory (file-name-directory (car object)))
- (error nil))
- (condition-case ()
- (kill-buffer (cdr object))
- (error nil)))
- ((bufferp object)
- (when (buffer-live-p object)
- (kill-buffer object))))
- (error nil))
+ (ignore-errors
+ (cond
+ ;; Internally displayed part.
+ ((mm-annotationp object)
+ (delete-annotation object))
+ ((or (functionp object)
+ (and (listp object)
+ (eq (car object) 'lambda)))
+ (funcall object))
+ ;; Externally displayed part.
+ ((consp object)
+ (ignore-errors (delete-file (car object)))
+ (ignore-errors (delete-directory (file-name-directory (car object))))
+ (ignore-errors (kill-buffer (cdr object))))
+ ((bufferp object)
+ (when (buffer-live-p object)
+ (kill-buffer object)))))
(mm-handle-set-undisplayer handle nil))))
(defun mm-display-inline (handle)
)
((null encoding)
)
- ;;((eq encoding 'x-uuencode)
- ;; (condition-case ()
- ;; (uudecode-encode-region (point-min) (point-max))
- ;; (error nil)))
((functionp encoding)
- (condition-case ()
- (funcall encoding (point-min) (point-max))
- (error nil)))
+ (ignore-errors (funcall encoding (point-min) (point-max))))
(t
(message "Unknown encoding %s; defaulting to 8bit" encoding))))
(cond
((not (fboundp 'coding-system-p)) nil)
(mm-running-xemacs ;; XEmacs
- (and (coding-system-p 'no-conversion) 'no-conversion))
+ 'no-conversion)
(mm-running-ntemacs ;; NTEmacs
(and (coding-system-p 'raw-text-dos) 'raw-text-dos))
((coding-system-p 'raw-text) 'raw-text) ;; Emacs
;; Copyright (c) 1998 by Shenghuo Zhu <zsh@cs.rochester.edu>
;; Author: Shenghuo Zhu <zsh@cs.rochester.edu>
-;; $Revision: 1.1.1.12 $
+;; $Revision: 1.1.1.13 $
;; Keywords: news postscript uudecode binhex shar
;; This file is not part of GNU Emacs, but the same permissions
(when (and (mail-fetch-field "mime-version")
(setq ct (mail-fetch-field "content-type")))
(setq cte (message-fetch-field "content-transfer-encoding" t)
- ctl (condition-case () (mail-header-parse-content-type ct)
- (error nil))
+ ctl (ignore-errors (mail-header-parse-content-type ct))
charset (and ctl (mail-content-type-get ctl 'charset)))
(if (stringp cte)
(setq cte (intern (downcase (mail-header-remove-whitespace
(setq end-char (point))
(when (or (not (eq type 'binhex))
(setq file-name
- (condition-case nil
- (binhex-decode-region start-char end-char t)
- (error nil))))
+ (ignore-errors
+ (binhex-decode-region start-char end-char t))))
(if (> start-char text-start)
(push
(mm-make-handle (mm-uu-copy-to-buffer text-start start-char)
"Translate TAB characters into SPACE characters."
(subst-char-in-region (point-min) (point-max) ?\t ? t))
+(defun nnmail-fix-eudora-headers ()
+ "Eudora has a broken References line, but an OK In-Reply-To."
+ (goto-char (point-min))
+ (when (re-search-forward "^X-Mailer:.*Eudora" nil t)
+ (goto-char (point-min))
+ (when (re-search-forward "^References:" nil t)
+ (beginning-of-line)
+ (insert "X-Gnus-Broken-Eudora-"))))
+
;;; Utility functions
(defun nnmail-split-fancy ()
((numberp days)
(setq days (days-to-time days))
;; Compare the time with the current time.
- (condition-case ()
- (time-less-p days (time-since time))
- (error nil)))))))
+ (ignore-errors (time-less-p days (time-since time))))))))
(defun nnmail-check-syntax ()
"Check (and modify) the syntax of the message in the current buffer."
(deffoo nnml-open-server (server &optional defs)
(nnoo-change-server 'nnml server defs)
(when (not (file-exists-p nnml-directory))
- (condition-case ()
- (make-directory nnml-directory t)
- (error)))
+ (ignore-errors (make-directory nnml-directory t)))
(cond
((not (file-exists-p nnml-directory))
(nnml-close-server)
(let ((chars (nnmail-insert-lines))
(art (concat (int-to-string article) "\t"))
headers)
- (when (condition-case ()
- (progn
- (nnmail-write-region
- (point-min) (point-max)
- (or (nnml-article-to-file article)
- (concat nnml-current-directory
- (int-to-string article)))
- nil (if (nnheader-be-verbose 5) nil 'nomesg))
- t)
- (error nil))
+ (when (ignore-errors
+ (nnmail-write-region
+ (point-min) (point-max)
+ (or (nnml-article-to-file article)
+ (concat nnml-current-directory
+ (int-to-string article)))
+ nil (if (nnheader-be-verbose 5) nil 'nomesg))
+ t)
(setq headers (nnml-parse-head chars article))
;; Replace the NOV line in the NOV file.
(save-excursion
(nnheader-message 5 "Deleting article %s in %s..." article group)
(funcall nnmail-delete-file-function article))))
;; Try to delete the directory itself.
- (condition-case ()
- (delete-directory nnml-current-directory)
- (error nil)))
+ (ignore-errors (delete-directory nnml-current-directory)))
;; Remove the group from all structures.
(setq nnml-group-alist
(delq (assoc group nnml-group-alist) nnml-group-alist)
(nnml-possibly-change-directory group server)
(let ((new-dir (nnmail-group-pathname new-name nnml-directory))
(old-dir (nnmail-group-pathname group nnml-directory)))
- (when (condition-case ()
- (progn
- (make-directory new-dir t)
- t)
- (error nil))
+ (when (ignore-errors
+ (make-directory new-dir t)
+ t)
;; We move the articles file by file instead of renaming
;; the directory -- there may be subgroups in this group.
;; One might be more clever, I guess.
(when (file-exists-p overview)
(rename-file overview (concat new-dir nnml-nov-file-name))))
(when (<= (length (directory-files old-dir)) 2)
- (condition-case ()
- (delete-directory old-dir)
- (error nil)))
+ (ignore-errors (delete-directory old-dir)))
;; That went ok, so we change the internal structures.
(let ((entry (assoc group nnml-group-alist)))
(when entry
(setq found t)
;; We return the article number.
(setq number
- (condition-case ()
- (read (current-buffer))
- (error nil)))))
+ (ignore-errors (read (current-buffer))))))
number)))
(defun nnml-retrieve-headers-with-nov (articles &optional fetch-old)
("\\(:-+\\]+\\)\\W" 1 "FaceGoofy.xpm")
("\\(:-*D\\)\\W" 1 "FaceGrinning.xpm")
("\\(:-*[)>}»]+\\)\\W" 1 "FaceHappy.xpm")
- ("\\(=[)>»]+\\)\\W" 1 "FaceHappy.xpm")
+ ("\\(=[)»]+\\)\\W" 1 "FaceHappy.xpm")
("\\(:-*[/\\\"]\\)[^/]\\W" 1 "FaceIronic.xpm")
("\\([8|]-*[|Oo%]\\)\\W" 1 "FaceKOed.xpm")
("\\([:|]-*#+\\)\\W" 1 "FaceNyah.xpm")
("\\(:-+D\\)\\W" 1 "FaceGrinning.xpm")
("\\(:-+[}»]+\\)\\W" 1 "FaceHappy.xpm")
("\\(:-*)+\\)\\W" 1 "FaceHappy.xpm")
- ("\\(=[)>]+\\)\\W" 1 "FaceHappy.xpm")
+ ("\\(=[)]+\\)\\W" 1 "FaceHappy.xpm")
("\\(:-+[/\\\"]+\\)\\W" 1 "FaceIronic.xpm")
("\\([8|]-+[|Oo%]\\)\\W" 1 "FaceKOed.xpm")
("\\([:|]-+#+\\)\\W" 1 "FaceNyah.xpm")
(insert-file-contents-literally tempfile)))
(message "Can not uudecode")))
(and work-buffer (kill-buffer work-buffer))
- (condition-case ()
- (or file-name (delete-file tempfile))
- (error))
- )))
+ (ignore-errors (or file-name (delete-file tempfile))))))
(if (string-match "XEmacs" emacs-version)
(defalias 'uudecode-insert-char 'insert-char)
+1999-02-01 21:05:18 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * gnus.texi (Article Hiding): Addition.
+
+1999-01-28 08:08:28 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * gnus.texi (Washing Mail): Addition.
+
+1999-01-27 14:30:39 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * gnus.texi (Article Washing): Addition.
+
1999-01-25 04:24:01 Lars Magne Ingebrigtsen <larsi@gnus.org>
* message.texi (MIME): New.
\input texinfo @c -*-texinfo-*-
@setfilename gnus
-@settitle Pterodactyl Gnus 0.74 Manual
+@settitle Pterodactyl Gnus 0.75 Manual
@synindex fn cp
@synindex vr cp
@synindex pg cp
@tex
@titlepage
-@title Pterodactyl Gnus 0.74 Manual
+@title Pterodactyl Gnus 0.75 Manual
@author by Lars Magne Ingebrigtsen
@page
spool or your mbox file. All at the same time, if you want to push your
luck.
-This manual corresponds to Pterodactyl Gnus 0.74.
+This manual corresponds to Pterodactyl Gnus 0.75.
@end ifinfo
Hide @sc{pem} (privacy enhanced messages) cruft
(@code{gnus-article-hide-pem}).
+@item W W B
+@kindex W W B (Summary)
+@findex gnus-article-strip-banner
+Strip the banner specified by the @code{banner} group parameter
+(@code{gnus-article-strip-banner}). This is mainly used to hide those
+annoying banners and/or signatures that some mailing lists and moderated
+groups adds to all the messages. The way to use this function is to add
+the @code{banner} group parameter (@pxref{Group Parameters}) to the
+group you want banners stripped from. The parameter either be a string,
+which will be interpreted as a regulax expression matching text to be
+removed, or the symbol @code{signature}, meaning that the (last)
+signature should be removed.
+
@item W W c
@kindex W W c (Summary)
@findex gnus-article-hide-citation
@findex gnus-article-fill-long-lines
Fill long lines (@code{gnus-article-fill-long-lines}).
+@item W C
+@kindex W C (Summary)
+@findex gnus-article-capitalize-sentencse
+Capitalize the first word in each sentence
+(@code{gnus-article-capitalize-sentences}).
+
@item W c
@kindex W c (Summary)
@findex gnus-article-remove-cr
@item :password
The password to give to the POP server. If not specified, the user is
prompted.
+
+@item :program
+The program to use to fetch mail from the POP server.
+
+@item :args
+The arguments to give to the program. If this is a string, it is used
+as such. If this is a list, it is @code{eval}ed first, and the result
+is used.
+
+@item :function
+The function to use to fetch mail from the POP server. The function is
+called with one parameter---the name of the file where the mail should
+be moved to.
@end table
+If the @code{:program} and @code{:function} keywords aren't specified,
+@code{pop3-movemail} will be used.
+
+Here are some examples. Fetch from the default POP server, using the
+default user name, and default fetcher:
+
+@lisp
+(pop)
+@end lisp
+
+Fetch from a named server with a named user and password:
+
+@lisp
+(pop :server "my.pop.server"
+ :user "user-name" :password "secret")
+@end lisp
+
+Use @samp{movemail} to move the mail:
+
+@lisp
+(pop :program "movemail"
+ :args (format "po:%s %s %s" user mail-source-crash-box password))
+@end lisp
+
@end table
@findex nnmail-remove-tabs
Translate all @samp{TAB} characters into @samp{SPACE} characters.
+@item nnmail-fix-eudora-headers
+@findex nnmail-fix-eudora-headers
+@cindex Eudora
+Eudora produces broken @code{References} headers, but OK
+@code{In-Reply-To} headers. This function will get rid of the
+@code{References} headers.
+
@end table
@item nnmail-prepare-incoming-message-hook
@table @emph
@item X-Newsreader
-This is considered to be a ``vanity header'', while I consider it to be
-consumer information. After seeing so many badly formatted articles
-coming from @code{tin} and @code{Netscape} I know not to use either of
-those for posting articles. I would not have known that if it wasn't
-for the @code{X-Newsreader} header.
+@itemx User-Agent
+These are considered to be ``vanity headers'', while I consider them
+to be consumer information. After seeing so many badly formatted
+articles coming from @code{tin} and @code{Netscape} I know not to use
+either of those for posting articles. I would not have known that if
+it wasn't for the @code{X-Newsreader} header.
@end table
@item USEFOR
\input texinfo @c -*-texinfo-*-
@setfilename message
-@settitle Pterodactyl Message 0.74 Manual
+@settitle Pterodactyl Message 0.75 Manual
@synindex fn cp
@synindex vr cp
@synindex pg cp
@tex
@titlepage
-@title Pterodactyl Message 0.74 Manual
+@title Pterodactyl Message 0.75 Manual
@author by Lars Magne Ingebrigtsen
@page
* Key Index:: List of Message mode keys.
@end menu
-This manual corresponds to Pterodactyl Message 0.74. Message is
+This manual corresponds to Pterodactyl Message 0.75. Message is
distributed with the Gnus distribution bearing the same version number
as this manual.