diff options
Diffstat (limited to 'lisp/mail')
-rw-r--r-- | lisp/mail/binhex.el | 4 | ||||
-rw-r--r-- | lisp/mail/blessmail.el | 1 | ||||
-rw-r--r-- | lisp/mail/emacsbug.el | 110 | ||||
-rw-r--r-- | lisp/mail/feedmail.el | 100 | ||||
-rw-r--r-- | lisp/mail/hashcash.el | 20 | ||||
-rw-r--r-- | lisp/mail/mail-extr.el | 1 | ||||
-rw-r--r-- | lisp/mail/mail-hist.el | 1 | ||||
-rw-r--r-- | lisp/mail/mailheader.el | 1 | ||||
-rw-r--r-- | lisp/mail/metamail.el | 1 | ||||
-rw-r--r-- | lisp/mail/mspools.el | 26 | ||||
-rw-r--r-- | lisp/mail/rmail-spam-filter.el | 1 | ||||
-rw-r--r-- | lisp/mail/rmail.el | 28 | ||||
-rw-r--r-- | lisp/mail/rmailedit.el | 1 | ||||
-rw-r--r-- | lisp/mail/rmailkwd.el | 1 | ||||
-rw-r--r-- | lisp/mail/rmailmm.el | 1 | ||||
-rw-r--r-- | lisp/mail/rmailmsc.el | 1 | ||||
-rw-r--r-- | lisp/mail/rmailout.el | 1 | ||||
-rw-r--r-- | lisp/mail/rmailsort.el | 1 | ||||
-rw-r--r-- | lisp/mail/rmailsum.el | 1 | ||||
-rw-r--r-- | lisp/mail/sendmail.el | 131 | ||||
-rw-r--r-- | lisp/mail/supercite.el | 36 | ||||
-rw-r--r-- | lisp/mail/uudecode.el | 3 |
22 files changed, 258 insertions, 213 deletions
diff --git a/lisp/mail/binhex.el b/lisp/mail/binhex.el index e131db76af8..42d2f35baed 100644 --- a/lisp/mail/binhex.el +++ b/lisp/mail/binhex.el @@ -221,7 +221,8 @@ If HEADER-ONLY is non-nil only decode header and return filename." (goto-char start) (when (re-search-forward binhex-begin-line end t) (setq work-buffer (generate-new-buffer " *binhex-work*")) - (with-current-buffer work-buffer (set-buffer-multibyte nil)) + (unless (featurep 'xemacs) + (with-current-buffer work-buffer (set-buffer-multibyte nil))) (beginning-of-line) (setq bits 0 counter 0) (while tmp @@ -327,5 +328,4 @@ If HEADER-ONLY is non-nil only decode header and return filename." (provide 'binhex) -;; arch-tag: 8476badd-1e76-4f1d-a640-f9a38c72eed8 ;;; binhex.el ends here diff --git a/lisp/mail/blessmail.el b/lisp/mail/blessmail.el index 4520ea61d03..545350170ec 100644 --- a/lisp/mail/blessmail.el +++ b/lisp/mail/blessmail.el @@ -5,6 +5,7 @@ ;; Maintainer: FSF ;; Keywords: internal +;; Package: emacs ;; This file is part of GNU Emacs. diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el index 373e2231e94..d84e60fb604 100644 --- a/lisp/mail/emacsbug.el +++ b/lisp/mail/emacsbug.el @@ -7,6 +7,7 @@ ;; Author: K. Shane Hartman ;; Maintainer: FSF ;; Keywords: maint mail +;; Package: emacs ;; This file is part of GNU Emacs. @@ -37,17 +38,14 @@ :group 'maint :group 'mail) +(define-obsolete-variable-alias 'report-emacs-bug-pretest-address + 'report-emacs-bug-address "24.1") + (defcustom report-emacs-bug-address "bug-gnu-emacs@gnu.org" "Address of mailing list for GNU Emacs bugs." :group 'emacsbug :type 'string) -(defcustom report-emacs-bug-pretest-address "bug-gnu-emacs@gnu.org" - "Address of mailing list for GNU Emacs pretest bugs." - :group 'emacsbug - :type 'string - :version "23.2") ; emacs-pretest-bug -> bug-gnu-emacs - (defcustom report-emacs-bug-no-confirmation nil "If non-nil, suppress the confirmations asked for the sake of novice users." :group 'emacsbug @@ -75,6 +73,53 @@ (declare-function x-server-vendor "xfns.c" (&optional terminal)) (declare-function x-server-version "xfns.c" (&optional terminal)) (declare-function message-sort-headers "message" ()) +(defvar message-strip-special-text-properties) + +(defun report-emacs-bug-can-use-xdg-email () + "Check if xdg-email can be used, i.e. we are on Gnome, KDE or xfce4." + (and (getenv "DISPLAY") + (executable-find "xdg-email") + (or (getenv "GNOME_DESKTOP_SESSION_ID") + ;; GNOME_DESKTOP_SESSION_ID is deprecated, check on Dbus also. + (condition-case nil + (eq 0 (call-process + "dbus-send" nil nil nil + "--dest=org.gnome.SessionManager" + "--print-reply" + "/org/gnome/SessionManager" + "org.gnome.SessionManager.CanShutdown")) + (error nil)) + (equal (getenv "KDE_FULL_SESSION") "true") + (condition-case nil + (eq 0 (call-process + "/bin/sh" nil nil nil + "-c" + "xprop -root _DT_SAVE_MODE|grep xfce4")) + (error nil))))) + +(defun report-emacs-bug-insert-to-mailer () + (interactive) + (save-excursion + (let* ((to (progn + (goto-char (point-min)) + (forward-line) + (and (looking-at "^To: \\(.*\\)") + (match-string-no-properties 1)))) + (subject (progn + (forward-line) + (and (looking-at "^Subject: \\(.*\\)") + (match-string-no-properties 1)))) + (body (progn + (forward-line 2) + (if (> (point-max) (point)) + (buffer-substring-no-properties (point) (point-max)))))) + (if (and to subject body) + (start-process "xdg-email" nil "xdg-email" + "--subject" subject + "--body" body + (concat "mailto:" to)) + (error "Subject, To or body not found"))))) + ;;;###autoload (defun report-emacs-bug (topic &optional recent-keys) @@ -89,32 +134,26 @@ Prompts for bug subject. Leaves you in a mail buffer." (setq topic (concat emacs-version "; " topic)) (when (string-match "^\\(\\([.0-9]+\\)*\\)\\.[0-9]+$" emacs-version) (setq topic (concat (match-string 1 emacs-version) "; " topic)))) - ;; If there are four numbers in emacs-version (three for MS-DOS), - ;; this is a pretest version. - (let* ((pretest-p (string-match (if (eq system-type 'ms-dos) - "\\..*\\." - "\\..*\\..*\\.") - emacs-version)) - (from-buffer (current-buffer)) - (reporting-address (if pretest-p - report-emacs-bug-pretest-address - report-emacs-bug-address)) - ;; Put these properties on semantically-void text. - ;; report-emacs-bug-hook deletes these regions before sending. - (prompt-properties '(field emacsbug-prompt - intangible but-helpful - rear-nonsticky t)) - user-point message-end-point) + (let ((from-buffer (current-buffer)) + ;; Put these properties on semantically-void text. + ;; report-emacs-bug-hook deletes these regions before sending. + (prompt-properties '(field emacsbug-prompt + intangible but-helpful + rear-nonsticky t)) + (can-xdg-email (report-emacs-bug-can-use-xdg-email)) + user-point message-end-point) (setq message-end-point (with-current-buffer (get-buffer-create "*Messages*") (point-max-marker))) - (compose-mail reporting-address topic) + (compose-mail report-emacs-bug-address topic) ;; The rest of this does not execute if the user was asked to ;; confirm and said no. - ;; Message-mode sorts the headers before sending. We sort now so - ;; that report-emacs-bug-orig-text remains valid. (Bug#5178) - (if (eq major-mode 'message-mode) - (message-sort-headers)) + (when (eq major-mode 'message-mode) + ;; Message-mode sorts the headers before sending. We sort now so + ;; that report-emacs-bug-orig-text remains valid. (Bug#5178) + (message-sort-headers) + ;; Stop message-mode stealing the properties we will add. + (set (make-local-variable 'message-strip-special-text-properties) nil)) (rfc822-goto-eoh) (forward-line 1) (let ((signature (buffer-substring (point) (point-max)))) @@ -123,7 +162,7 @@ Prompts for bug subject. Leaves you in a mail buffer." (backward-char (length signature))) (unless report-emacs-bug-no-explanations ;; Insert warnings for novice users. - (when (string-match "@gnu\\.org$" reporting-address) + (when (string-match "@gnu\\.org$" report-emacs-bug-address) (insert "This bug report will be sent to the Free Software Foundation,\n") (let ((pos (point))) (insert "not to your local site managers!") @@ -135,17 +174,12 @@ Prompts for bug subject. Leaves you in a mail buffer." (insert " if possible, because the Emacs maintainers usually do not have translators to read other languages for them.\n\n") (insert (format "Your report will be posted to the %s mailing list" - reporting-address)) - ;; Nowadays all bug reports end up there. -;;; (if pretest-p (insert ".\n\n") - (insert "\nand the gnu.emacs.bug news group, and at http://debbugs.gnu.org.\n\n")) + report-emacs-bug-address)) + (insert "\nand the gnu.emacs.bug news group, and at http://debbugs.gnu.org.\n\n")) (insert "Please describe exactly what actions triggered the bug\n" "and the precise symptoms of the bug. If you can, give\n" "a recipe starting from `emacs -Q':\n\n") - ;; Stop message-mode stealing the properties we are about to add. - (if (boundp 'message-strip-special-text-properties) - (set (make-local-variable 'message-strip-special-text-properties) nil)) (add-text-properties (save-excursion (rfc822-goto-eoh) (line-beginning-position 2)) @@ -240,6 +274,9 @@ usually do not have translators to read other languages for them.\n\n") ;; This is so the user has to type something in order to send easily. (use-local-map (nconc (make-sparse-keymap) (current-local-map))) (define-key (current-local-map) "\C-c\C-i" 'report-emacs-bug-info) + (if can-xdg-email + (define-key (current-local-map) "\C-cm" + 'report-emacs-bug-insert-to-mailer)) ;; Could test major-mode instead. (cond ((memq mail-user-agent '(message-user-agent gnus-user-agent)) (setq report-emacs-bug-send-command "message-send-and-exit" @@ -259,6 +296,9 @@ usually do not have translators to read other languages for them.\n\n") report-emacs-bug-send-command)))) (princ (substitute-command-keys " Type \\[kill-buffer] RET to cancel (don't send it).\n")) + (if can-xdg-email + (princ (substitute-command-keys + " Type \\[report-emacs-bug-insert-to-mailer] to insert text to you preferred mail program.\n"))) (terpri) (princ (substitute-command-keys " Type \\[report-emacs-bug-info] to visit in Info the Emacs Manual section diff --git a/lisp/mail/feedmail.el b/lisp/mail/feedmail.el index 77d82f6076f..5c6da623fed 100644 --- a/lisp/mail/feedmail.el +++ b/lisp/mail/feedmail.el @@ -314,7 +314,7 @@ (defcustom feedmail-confirm-outgoing nil - "*If non-nil, give a y-or-n confirmation prompt before sending mail. + "If non-nil, give a y-or-n confirmation prompt before sending mail. This is done after the message is completely prepped, and you'll be looking at the top of the message in a buffer when you get the prompt. If set to the symbol 'queued, give the confirmation prompt only while @@ -330,7 +330,7 @@ cases. You can give a timeout for the prompt; see variable (defcustom feedmail-confirm-outgoing-timeout nil - "*If non-nil, a timeout in seconds at the send confirmation prompt. + "If non-nil, a timeout in seconds at the send confirmation prompt. If a positive number, it's a timeout before sending. If a negative number, it's a timeout before not sending. This will not work if your version of Emacs doesn't include the function `y-or-n-p-with-timeout' @@ -341,7 +341,7 @@ version of Emacs doesn't include the function `y-or-n-p-with-timeout' (defcustom feedmail-nuke-bcc t - "*If non-nil remove Bcc: lines from the message headers. + "If non-nil remove Bcc: lines from the message headers. In any case, the Bcc: lines do participate in the composed address list. You may want to leave them in if you're using sendmail \(see `feedmail-buffer-eating-function'\)." @@ -351,7 +351,7 @@ list. You may want to leave them in if you're using sendmail (defcustom feedmail-nuke-resent-bcc t - "*If non-nil remove Resent-Bcc: lines from the message headers. + "If non-nil remove Resent-Bcc: lines from the message headers. In any case, the Resent-Bcc: lines do participate in the composed address list. You may want to leave them in if you're using sendmail \(see `feedmail-buffer-eating-function'\)." @@ -361,7 +361,7 @@ address list. You may want to leave them in if you're using sendmail (defcustom feedmail-deduce-bcc-where nil - "*Where Bcc:/Resent-Bcc: addresses should appear in the envelope list. + "Where Bcc:/Resent-Bcc: addresses should appear in the envelope list. Addresses for the message envelope are deduced by examining appropriate address headers in the message. Generally, they will show up in the list of deduced addresses in the order that the headers @@ -387,7 +387,7 @@ delivery agent that processes the addresses backwards." (defcustom feedmail-fill-to-cc t - "*If non-nil do smart filling of addressee header lines. + "If non-nil do smart filling of addressee header lines. Smart filling means breaking long lines at appropriate points and making continuation lines. Despite the function name, it includes To:, Cc:, Bcc: (and their Resent-* forms), as well as From: and @@ -399,14 +399,14 @@ as-is. The filling is done after mail address alias expansion." (defcustom feedmail-fill-to-cc-fill-column default-fill-column - "*Fill column used by `feedmail-fill-to-cc'." + "Fill column used by `feedmail-fill-to-cc'." :group 'feedmail-headers :type 'integer ) (defcustom feedmail-nuke-bcc-in-fcc nil - "*If non-nil remove [Resent-]Bcc: lines in message copies saved via Fcc:. + "If non-nil remove [Resent-]Bcc: lines in message copies saved via Fcc:. This is independent of whether the Bcc: header lines are actually sent with the message (see feedmail-nuke-bcc). Though not implied in the name, the same Fcc: treatment applies to both Bcc: and Resent-Bcc: lines." @@ -416,7 +416,7 @@ the same Fcc: treatment applies to both Bcc: and Resent-Bcc: lines." (defcustom feedmail-nuke-body-in-fcc nil - "*If non-nil remove body of message in copies saved via Fcc:. + "If non-nil remove body of message in copies saved via Fcc:. If a positive integer value, leave (up to) that many lines of the beginning of the body intact. The result is that the Fcc: copy will consist only of the message headers, serving as a sort of an outgoing @@ -427,7 +427,7 @@ message log." (defcustom feedmail-force-expand-mail-aliases nil - "*If non-nil, force the calling of `expand-mail-aliases'. + "If non-nil, force the calling of `expand-mail-aliases'. Normally, feedmail tries to figure out if you're using mailalias or mailabbrevs and only calls `expand-mail-aliases' if it thinks you're using the mailalias package. This user option can be used to force @@ -439,7 +439,7 @@ out." (defcustom feedmail-nuke-empty-headers t - "*If non-nil, remove header lines which have no contents. + "If non-nil, remove header lines which have no contents. A completely empty Subject: header is always removed, regardless of the setting of this variable. The only time you would want them left in would be if you used some headers whose presence indicated @@ -457,7 +457,7 @@ but common in some proprietary systems." ;; RFC-822 and RFC-1123, but are you *really* one of those cases ;; they're talking about? I doubt it.) (defcustom feedmail-sender-line nil - "*If non-nil and the email has no Sender: header, use this value. + "If non-nil and the email has no Sender: header, use this value. May be nil, in which case nothing in particular is done with respect to Sender: lines. By design, will not replace an existing Sender: line, but you can achieve that with a fiddle-plex 'replace action. @@ -484,7 +484,7 @@ header is fiddled after the From: header is fiddled." (defcustom feedmail-force-binary-write t - "*If non-nil, force writing file as binary (this applies to queues and Fcc:). + "If non-nil, force writing file as binary (this applies to queues and Fcc:). On systems where there is a difference between binary and text files, feedmail will temporarily manipulate the value of `buffer-file-type' to make the writing as binary. If nil, writing will be in text mode. @@ -496,7 +496,7 @@ variables or other means, this option has no effect." (defcustom feedmail-from-line t - "*If non-nil and the email has no From: header, use this value. + "If non-nil and the email has no From: header, use this value. May be t, in which case a default is computed (and you probably won't be happy with it). May be nil, in which case nothing in particular is done with respect to From: lines. By design, will not replace an @@ -526,7 +526,7 @@ to arrange for the message to get a From: line." (defcustom feedmail-deduce-envelope-from t - "*If non-nil, deduce message envelope \"from\" from header From: or Sender:. + "If non-nil, deduce message envelope \"from\" from header From: or Sender:. In other words, if there is a Sender: header in the message, temporarily change the value of `user-mail-address' to be the same while the message is being sent. If there is no Sender: header, use the From: header, @@ -555,14 +555,14 @@ influence what they will use as the envelope." (defcustom feedmail-x-mailer-line-user-appendage nil - "*See feedmail-x-mailer-line." + "See feedmail-x-mailer-line." :group 'feedmail-headers :type '(choice (const nil) (const t) string) ) (defcustom feedmail-x-mailer-line t - "*Control the form of an X-Mailer: header in an outgoing message. + "Control the form of an X-Mailer: header in an outgoing message. Moderately useful for debugging, keeping track of your correspondents' mailer preferences, or just wearing your MUA on your sleeve. You should probably know that some people are fairly emotional about the @@ -592,7 +592,7 @@ by feedmail to either \"X-Mailer\" or \"X-Resent-Mailer\"." (defcustom feedmail-message-id-generator t - "*Specifies the creation of a Message-Id: header field. + "Specifies the creation of a Message-Id: header field. If nil, nothing is done about Message-Id:. @@ -622,7 +622,7 @@ in the saved message if you use Fcc:." (defcustom feedmail-message-id-suffix nil - "*If non-nil, used as a suffix for generating unique Message-Id: headers. + "If non-nil, used as a suffix for generating unique Message-Id: headers. The function `feedmail-default-message-id-generator' creates its work based on a formatted date-time string, a random number, and a domain-looking suffix. You can control the suffix used by assigning a string value to this variable. @@ -637,7 +637,7 @@ automatically." ;; this was suggested in various forms by several people; first was ;; Tony DeSimone in Oct 1992; sorry to be so tardy (defcustom feedmail-date-generator t - "*Specifies the creation of a Date: header field. + "Specifies the creation of a Date: header field. If nil, nothing is done about Date:. @@ -671,7 +671,7 @@ in the saved message if you use Fcc:." (defcustom feedmail-fiddle-headers-upwardly t - "*Non-nil means fiddled header fields should go at the top of the header. + "Non-nil means fiddled header fields should go at the top of the header. nil means insert them at the bottom. This is mostly a novelty issue since the standards define the ordering of header fields to be immaterial and it's fairly likely that some MTA along the way will have its own idea of what the @@ -777,7 +777,7 @@ you are at accomplishing inherently inefficient things." (defcustom feedmail-enable-queue nil - "*If non-nil, provide for stashing outgoing messages in a queue. + "If non-nil, provide for stashing outgoing messages in a queue. This is the master on/off switch for feedmail message queuing. Queuing is quite handy for laptop-based users. It's also handy if you get a lot of mail and process it more or less sequentially. For @@ -804,7 +804,7 @@ To transmit all the messages in the queue, invoke the command (defcustom feedmail-queue-runner-confirm-global nil - "*If non-nil, give a y-or-n confirmation prompt before running the queue. + "If non-nil, give a y-or-n confirmation prompt before running the queue. Prompt even if the queue is about to be processed as a result of a call to `feedmail-run-the-queue-no-prompts'. This gives you a way to bail out without having to answer no to the individual message prompts." @@ -814,7 +814,7 @@ without having to answer no to the individual message prompts." (defcustom feedmail-queue-directory (concat (getenv "HOME") "/mail/q") - "*Name of a directory where messages will be queued. + "Name of a directory where messages will be queued. Directory will be created if necessary. Should be a string that doesn't end with a slash. Default is \"$HOME/mail/q\"." :group 'feedmail-queue @@ -824,7 +824,7 @@ doesn't end with a slash. Default is \"$HOME/mail/q\"." (defcustom feedmail-queue-draft-directory (concat (getenv "HOME") "/mail/draft") - "*Name of a directory where draft messages will be queued. + "Name of a directory where draft messages will be queued. Directory will be created if necessary. Should be a string that doesn't end with a slash. Default is \"$HOME/mail/draft\"." :group 'feedmail-queue @@ -833,7 +833,7 @@ doesn't end with a slash. Default is \"$HOME/mail/draft\"." (defcustom feedmail-ask-before-queue t - "*If non-nil, feedmail will ask what you want to do with the message. + "If non-nil, feedmail will ask what you want to do with the message. Default choices for the message action prompt will include sending it immediately, putting it in the main queue, putting it in the draft queue, or returning to the buffer to continue editing. Only matters if @@ -845,7 +845,7 @@ without a prompt." (defcustom feedmail-ask-before-queue-prompt "FQM: Message action (q, i, d, e, ?)? [%s]: " - "*A string which will be used for the message action prompt. + "A string which will be used for the message action prompt. If it contains a \"%s\", that will be replaced with the value of `feedmail-ask-before-queue-default'." :group 'feedmail-queue @@ -854,7 +854,7 @@ If it contains a \"%s\", that will be replaced with the value of (defcustom feedmail-ask-before-queue-reprompt "FQM: Please type q, i, d, or e; or ? for help [%s]: " - "*A string which will be used for repompting after invalid input. + "A string which will be used for repompting after invalid input. If it contains a \"%s\", that will be replaced with the value of `feedmail-ask-before-queue-default'." :group 'feedmail-queue @@ -863,7 +863,7 @@ If it contains a \"%s\", that will be replaced with the value of (defcustom feedmail-ask-before-queue-default "queue" - "*Meaning if user hits return in response to the message action prompt. + "Meaning if user hits return in response to the message action prompt. Should be a character or a string; if a string, only the first character is significant. Useful values are those described in the help for the message action prompt." @@ -947,7 +947,7 @@ It may contain embedded line breaks. It will be printed via `princ'." (defcustom feedmail-queue-chatty t - "*If non-nil, blat a few status messages and such in the mini-buffer. + "If non-nil, blat a few status messages and such in the mini-buffer. If nil, just do the work and don't pester people about what's going on. In some cases, though, specific options inspire mini-buffer prompting. That's not affected by this variable setting. Also does not control @@ -958,7 +958,7 @@ reporting of error/abnormal conditions." (defcustom feedmail-queue-chatty-sit-for 2 - "*Duration of pause after most queue-related messages. + "Duration of pause after most queue-related messages. After some messages are divulged, it is prudent to pause before something else obliterates them. This value controls the duration of the pause." @@ -968,7 +968,7 @@ the pause." (defcustom feedmail-queue-run-orderer nil - "*If non-nil, name a function which will sort the queued messages. + "If non-nil, name a function which will sort the queued messages. The function is called during a running of the queue for sending, and takes one argument, a list of the files in the queue directory. It may contain the names of non-message files, and it's okay to leave @@ -982,7 +982,7 @@ they were placed in the queue." (defcustom feedmail-queue-use-send-time-for-date nil - "*If non-nil, use send time for the Date: header value. + "If non-nil, use send time for the Date: header value. This variable is used by the default date generating function, feedmail-default-date-generator. If nil, the default, the last-modified timestamp of the queue file is used to create the @@ -994,7 +994,7 @@ used." (defcustom feedmail-queue-use-send-time-for-message-id nil - "*If non-nil, use send time for the Message-Id: header value. + "If non-nil, use send time for the Message-Id: header value. This variable is used by the default Message-Id: generating function, `feedmail-default-message-id-generator'. If nil, the default, the last-modified timestamp of the queue file is used to create the @@ -1006,7 +1006,7 @@ used." (defcustom feedmail-ask-for-queue-slug nil - "*If non-nil, prompt user for part of the queue file name. + "If non-nil, prompt user for part of the queue file name. The file will automatically get the FQM suffix and an embedded sequence number for uniqueness, so don't specify that. feedmail will get rid of all characters other than alphanumeric and hyphen in the @@ -1023,7 +1023,7 @@ based on the subjects of the messages." (defcustom feedmail-queue-slug-maker 'feedmail-queue-subject-slug-maker - "*If non-nil, a function which creates part of the queued file name. + "If non-nil, a function which creates part of the queued file name. Takes a single argument giving the name of the directory into which the message will be queued. The returned string should be just the non-directory filename part, without FQM suffix or uniquifying @@ -1036,7 +1036,7 @@ any." (defcustom feedmail-queue-default-file-slug t - "*Indicates what to use for subject-less messages when forming a file name. + "Indicates what to use for subject-less messages when forming a file name. When feedmail queues a message, it creates a unique file name. By default, the file name is based in part on the subject of the message being queued. If there is no subject, consult this variable. See documentation for the @@ -1059,7 +1059,7 @@ it's not expected to be a complete filename." (defcustom feedmail-queue-fqm-suffix ".fqm" - "*The FQM suffix used to distinguish feedmail queued message files. + "The FQM suffix used to distinguish feedmail queued message files. You probably want this to be a period followed by some letters and/or digits. The distinction is to be able to tell them from other random files that happen to be in the `feedmail-queue-directory' or @@ -1071,7 +1071,7 @@ queued message." (defcustom feedmail-nuke-buffer-after-queue nil - "*If non-nil, silently kill the buffer after a message is queued. + "If non-nil, silently kill the buffer after a message is queued. You might like that since a side-effect of queueing the message is that its buffer name gets changed to the filename. That means that the buffer won't be reused for the next message you compose. If you @@ -1084,7 +1084,7 @@ message buffers." (defcustom feedmail-queue-auto-file-nuke nil - "*If non-nil, automatically delete queue files when a message is sent. + "If non-nil, automatically delete queue files when a message is sent. Normally, feedmail will notice such files when you send a message in immediate mode (i.e., not when you're running the queue) and will ask if you want to delete them. Since the answer is usually yes, setting this @@ -1154,7 +1154,7 @@ It shows the simple addresses and gets a confirmation. Use as: (defcustom feedmail-last-chance-hook nil - "*User's last opportunity to modify the message on its way out. + "User's last opportunity to modify the message on its way out. It has already had all the header prepping from the standard package. The next step after running the hook will be to push the buffer into a subprocess that mails the mail. The hook might be interested in @@ -1172,7 +1172,7 @@ reused and things will get confused." (defcustom feedmail-before-fcc-hook nil - "*User's last opportunity to modify the message before Fcc action. + "User's last opportunity to modify the message before Fcc action. It has already had all the header prepping from the standard package. The next step after running the hook will be to save the message via Fcc: processing. The hook might be interested in these: (1) @@ -1189,7 +1189,7 @@ internal buffers will be reused and things will get confused." (defcustom feedmail-queue-runner-mode-setter '(lambda (&optional arg) (mail-mode)) - "*A function to set the proper mode of a message file. + "A function to set the proper mode of a message file. Called when the message is read back out of the queue directory with a single argument, the optional argument used in the call to `feedmail-run-the-queue' or `feedmail-run-the-queue-no-prompts'. @@ -1204,7 +1204,7 @@ Called with funcall, not `call-interactively'." (defcustom feedmail-queue-alternative-mail-header-separator nil - "*Alternative header demarcation for queued messages. + "Alternative header demarcation for queued messages. If you sometimes get alternative values for `mail-header-separator' in queued messages, set the value of this variable to whatever it is. For example, `rmail-resend' uses a `mail-header-separator' value of empty @@ -1221,7 +1221,7 @@ set `mail-header-separator' to the value of (defcustom feedmail-queue-runner-message-sender 'mail-send-and-exit - "*Function to initiate sending a message file. + "Function to initiate sending a message file. Called for each message read back out of the queue directory with a single argument, the optional argument used in the call to `feedmail-run-the-queue' or `feedmail-run-the-queue-no-prompts'. @@ -1238,7 +1238,7 @@ your chance to have something different. Called with `funcall', not '(lambda (fqm-file &optional arg) (delete-file fqm-file) (if (and arg feedmail-queue-chatty) (message "FQM: Nuked %s" fqm-file))) - "*Function that will be called after a message has been sent. + "Function that will be called after a message has been sent. Not called in the case of errors. This function is called with two arguments: the name of the message queue file for the message just sent, and the optional argument used in the call to `feedmail-run-the-queue' @@ -1265,7 +1265,7 @@ variable, but may depend on its value as described here.") (defcustom feedmail-buffer-eating-function 'feedmail-buffer-to-binmail - "*Function used to send the prepped buffer to a subprocess. + "Function used to send the prepped buffer to a subprocess. The function's three (mandatory) arguments are: (1) the buffer containing the prepped message; (2) a buffer where errors should be directed; and (3) a list containing the addresses individually as @@ -1281,7 +1281,7 @@ to nil. If you use the binmail form, check the value of (defcustom feedmail-binmail-template (if mail-interactive "/bin/mail %s" "/bin/rmail %s") - "*Command template for the subprocess which will get rid of the mail. + "Command template for the subprocess which will get rid of the mail. It can result in any command understandable by /bin/sh. Might not work at all in non-Unix environments. The single '%s', if present, gets replaced by the space-separated, simplified list of addressees. @@ -1446,7 +1446,7 @@ with various lower-level mechanisms to provide features such as queueing." ;; From a VM mailing list discussion and some suggestions from Samuel Mikes <smikes@alumni.hmc.edu> (defun feedmail-queue-express-to-queue () - "*Send message directly to the queue, with a minimum of fuss and bother." + "Send message directly to the queue, with a minimum of fuss and bother." (interactive) (let ((feedmail-enable-queue t) (feedmail-ask-before-queue nil) @@ -1458,7 +1458,7 @@ with various lower-level mechanisms to provide features such as queueing." (defun feedmail-queue-express-to-draft () - "*Send message directly to the draft queue, with a minimum of fuss and bother." + "Send message directly to the draft queue, with a minimum of fuss and bother." (interactive) (let ((feedmail-queue-directory feedmail-queue-draft-directory)) (feedmail-queue-express-to-queue) diff --git a/lisp/mail/hashcash.el b/lisp/mail/hashcash.el index 86364ab7835..efa27c3305d 100644 --- a/lisp/mail/hashcash.el +++ b/lisp/mail/hashcash.el @@ -1,6 +1,7 @@ ;;; hashcash.el --- Add hashcash payments to email -;; Copyright (C) 2003, 2004, 2005, 2007, 2008, 2009, 2010 Free Software Foundation +;; Copyright (C) 2003, 2004, 2005, 2007, 2008, 2009, 2010 +;; Free Software Foundation ;; Written by: Paul Foley <mycroft@actrix.gen.nz> (1997-2002) ;; Maintainer: Paul Foley <mycroft@actrix.gen.nz> @@ -47,6 +48,7 @@ ;;; Code: +;; For Emacs <22.2 and XEmacs. (eval-and-compile (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) @@ -115,8 +117,6 @@ For example, you may want to set this to '(\"-Z2\") to reduce header length." (require 'mail-utils) (eval-and-compile - (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))) - (if (fboundp 'point-at-bol) (defalias 'hashcash-point-at-bol 'point-at-bol) (defalias 'hashcash-point-at-bol 'line-beginning-position)) @@ -131,10 +131,10 @@ For example, you may want to set this to '(\"-Z2\") to reduce header length." (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" ()) +(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 @@ -277,7 +277,7 @@ BUFFER defaults to the current buffer." (unless buffer (setq buffer (current-buffer))) (let (entry) (while (setq entry (rassq buffer hashcash-process-alist)) - (accept-process-output (car entry))))) + (accept-process-output (car entry) 1)))) (defun hashcash-processes-running-p (buffer) "Return non-nil if hashcash processes in BUFFER are still running." @@ -287,7 +287,7 @@ BUFFER defaults to the current buffer." "Ask user whether to wait for hashcash processes to finish." (interactive) (when (hashcash-processes-running-p (current-buffer)) - (if (y-or-n-p + (if (y-or-n-p "Hashcash process(es) still running; wait for them to finish? ") (hashcash-wait-async) (hashcash-cancel-async)))) @@ -376,4 +376,4 @@ Prefix arg sets default accept amount temporarily." (provide 'hashcash) -;; arch-tag: 0e7fe983-a124-4392-9788-0dbcbd2c4d62 +;;; hashcash.el ends here diff --git a/lisp/mail/mail-extr.el b/lisp/mail/mail-extr.el index 51c490da7ab..342d735c939 100644 --- a/lisp/mail/mail-extr.el +++ b/lisp/mail/mail-extr.el @@ -6,6 +6,7 @@ ;; Author: Joe Wells <jbw@cs.bu.edu> ;; Maintainer: FSF ;; Keywords: mail +;; Package: mail-utils ;; This file is part of GNU Emacs. diff --git a/lisp/mail/mail-hist.el b/lisp/mail/mail-hist.el index 6700d6d2733..f129f29ea33 100644 --- a/lisp/mail/mail-hist.el +++ b/lisp/mail/mail-hist.el @@ -6,6 +6,7 @@ ;; Author: Karl Fogel <kfogel@red-bean.com> ;; Created: March, 1994 ;; Keywords: mail, history +;; Package: mail-utils ;; This file is part of GNU Emacs. diff --git a/lisp/mail/mailheader.el b/lisp/mail/mailheader.el index 44967b05bc8..960d3c65487 100644 --- a/lisp/mail/mailheader.el +++ b/lisp/mail/mailheader.el @@ -5,6 +5,7 @@ ;; Author: Erik Naggum <erik@naggum.no> ;; Keywords: tools, mail, news +;; Package: mail-utils ;; This file is part of GNU Emacs. diff --git a/lisp/mail/metamail.el b/lisp/mail/metamail.el index 64c7c57f8db..47326b636a1 100644 --- a/lisp/mail/metamail.el +++ b/lisp/mail/metamail.el @@ -40,7 +40,6 @@ (defgroup metamail nil "Metamail interface for Emacs." :group 'mail - :group 'hypermedia :group 'processes) (defcustom metamail-program-name "metamail" diff --git a/lisp/mail/mspools.el b/lisp/mail/mspools.el index 705c06977bb..1a397db7a0d 100644 --- a/lisp/mail/mspools.el +++ b/lisp/mail/mspools.el @@ -172,7 +172,16 @@ your primary spool is. If this fails, set it to something like (defvar mspools-buffer "*spools*" "Name of buffer for displaying spool info.") -(defvar mspools-mode-map nil +(defvar mspools-mode-map + (let ((map (make-sparse-keymap))) + (define-key map "\C-c\C-c" 'mspools-visit-spool) + (define-key map "\C-m" 'mspools-visit-spool) + (define-key map " " 'mspools-visit-spool) + (define-key map "?" 'mspools-help) + (define-key map "q" 'mspools-quit) + (define-key map "n" 'next-line) + (define-key map "p" 'previous-line) + (define-key map "g" 'revert-buffer)) "Keymap for the *spools* buffer.") ;;; Code @@ -320,21 +329,6 @@ Buffer is not displayed if SHOW is non-nil." )))) (car (nth line-num mspools-files)))) -;;; Keymap - -(if mspools-mode-map - () - (setq mspools-mode-map (make-sparse-keymap)) - - (define-key mspools-mode-map "\C-c\C-c" 'mspools-visit-spool) - (define-key mspools-mode-map "\C-m" 'mspools-visit-spool) - (define-key mspools-mode-map " " 'mspools-visit-spool) - (define-key mspools-mode-map "?" 'mspools-help) - (define-key mspools-mode-map "q" 'mspools-quit) - (define-key mspools-mode-map "n" 'next-line) - (define-key mspools-mode-map "p" 'previous-line) - (define-key mspools-mode-map "g" 'revert-buffer)) - ;;; Spools mode functions (defun mspools-revert-buffer (ignore noconfirm) diff --git a/lisp/mail/rmail-spam-filter.el b/lisp/mail/rmail-spam-filter.el index a3eee899a68..33f3be30cc2 100644 --- a/lisp/mail/rmail-spam-filter.el +++ b/lisp/mail/rmail-spam-filter.el @@ -4,6 +4,7 @@ ;; Free Software Foundation, Inc. ;; Keywords: email, spam, filter, rmail ;; Author: Eli Tziperman <eli AT deas.harvard.edu> +;; Package: rmail ;; This file is part of GNU Emacs. diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index 3ab87fa21f7..47e52f27aa1 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -3840,9 +3840,7 @@ The message should be narrowed to just the headers." (1- (point)) (point-max))))))) -(declare-function mail-sendmail-delimit-header "sendmail" ()) -(declare-function mail-header-end "sendmail" ()) -(declare-function mail-position-on-field "sendmail" (field &optional soft)) +(autoload 'mail-position-on-field "sendmail") (defun rmail-retry-failure () "Edit a mail message which is based on the contents of the current message. @@ -3928,18 +3926,19 @@ specifying headers which should not be copied into the new message." ;; Insert original text as initial text of new draft message. ;; Bind inhibit-read-only since the header delimiter ;; of the previous message was probably read-only. - (let ((inhibit-read-only t)) + (let ((inhibit-read-only t) + eoh) (erase-buffer) (insert-buffer-substring rmail-this-buffer bounce-start bounce-end) (goto-char (point-min)) (if bounce-indent (indent-rigidly (point-min) (point-max) bounce-indent)) - ;; FIXME better to replace sendmail functions. - (require 'sendmail) - (mail-sendmail-delimit-header) + (rfc822-goto-eoh) + (setq eoh (point)) + (insert mail-header-separator) (save-restriction - (narrow-to-region (point-min) (mail-header-end)) + (narrow-to-region (point-min) eoh) (rmail-delete-headers rmail-retry-ignored-headers) (rmail-delete-headers "^\\(sender\\|return-path\\|received\\):") (setq resending (mail-fetch-field "resent-to")) @@ -4241,7 +4240,7 @@ encoded string (and the same mask) will decode the string." ;;; Start of automatically extracted autoloads. ;;;### (autoloads (rmail-edit-current-message) "rmailedit" "rmailedit.el" -;;;;;; "60db8013bf16d7999914a16cda435287") +;;;;;; "4bf8a5cdfc921b9e30680ee71b7f9ca6") ;;; Generated autoloads from rmailedit.el (autoload 'rmail-edit-current-message "rmailedit" "\ @@ -4253,7 +4252,7 @@ Edit the contents of this message. ;;;### (autoloads (rmail-next-labeled-message rmail-previous-labeled-message ;;;;;; rmail-read-label rmail-kill-label rmail-add-label) "rmailkwd" -;;;;;; "rmailkwd.el" "7027ce1ac922c0dd51262b641e4d42c1") +;;;;;; "rmailkwd.el" "112240cbb53c402294013cc49987771a") ;;; Generated autoloads from rmailkwd.el (autoload 'rmail-add-label "rmailkwd" "\ @@ -4296,7 +4295,7 @@ With prefix argument N moves forward N messages with these labels. ;;;*** -;;;### (autoloads (rmail-mime) "rmailmm" "rmailmm.el" "4a7502b4aeb3bd5f2111b48cc6512924") +;;;### (autoloads (rmail-mime) "rmailmm" "rmailmm.el" "9f67f3b67de9b700b128b73c52abfefa") ;;; Generated autoloads from rmailmm.el (autoload 'rmail-mime "rmailmm" "\ @@ -4312,7 +4311,7 @@ attachments as specfied by `rmail-mime-attachment-dirs-alist'. ;;;*** ;;;### (autoloads (set-rmail-inbox-list) "rmailmsc" "rmailmsc.el" -;;;;;; "b2a72d4e370f2d2b31b6f8f0794820e4") +;;;;;; "c3575020691d5769bcf08ecc932304c3") ;;; Generated autoloads from rmailmsc.el (autoload 'set-rmail-inbox-list "rmailmsc" "\ @@ -4328,7 +4327,7 @@ This applies only to the current session. ;;;### (autoloads (rmail-sort-by-labels rmail-sort-by-lines rmail-sort-by-correspondent ;;;;;; rmail-sort-by-recipient rmail-sort-by-author rmail-sort-by-subject -;;;;;; rmail-sort-by-date) "rmailsort" "rmailsort.el" "5a3b5ee477d2fbf79d0c566d776a7fd4") +;;;;;; rmail-sort-by-date) "rmailsort" "rmailsort.el" "b96e85edd736f23f1e9d54a299268d1e") ;;; Generated autoloads from rmailsort.el (autoload 'rmail-sort-by-date "rmailsort" "\ @@ -4387,7 +4386,7 @@ If prefix argument REVERSE is non-nil, sorts in reverse order. ;;;### (autoloads (rmail-summary-by-senders rmail-summary-by-topic ;;;;;; rmail-summary-by-regexp rmail-summary-by-recipients rmail-summary-by-labels -;;;;;; rmail-summary) "rmailsum" "rmailsum.el" "26b95919c7e1f8c5609ce7323aee77ae") +;;;;;; rmail-summary) "rmailsum" "rmailsum.el" "4715fb58fb191bf6b192458ea75524b2") ;;; Generated autoloads from rmailsum.el (autoload 'rmail-summary "rmailsum" "\ @@ -4458,5 +4457,4 @@ following the containing message. (provide 'rmail) -;; arch-tag: 65d257d3-c281-4a65-9c38-e61af95af2f0 ;;; rmail.el ends here diff --git a/lisp/mail/rmailedit.el b/lisp/mail/rmailedit.el index d01773fe6c9..02f36fd47e7 100644 --- a/lisp/mail/rmailedit.el +++ b/lisp/mail/rmailedit.el @@ -5,6 +5,7 @@ ;; Maintainer: FSF ;; Keywords: mail +;; Package: rmail ;; This file is part of GNU Emacs. diff --git a/lisp/mail/rmailkwd.el b/lisp/mail/rmailkwd.el index 5b9b95e5bbb..5c44b5cafa2 100644 --- a/lisp/mail/rmailkwd.el +++ b/lisp/mail/rmailkwd.el @@ -5,6 +5,7 @@ ;; Maintainer: FSF ;; Keywords: mail +;; Package: rmail ;; This file is part of GNU Emacs. diff --git a/lisp/mail/rmailmm.el b/lisp/mail/rmailmm.el index e8ca11ee349..3882c9e47c8 100644 --- a/lisp/mail/rmailmm.el +++ b/lisp/mail/rmailmm.el @@ -6,6 +6,7 @@ ;; Alex Schroeder ;; Maintainer: FSF ;; Keywords: mail +;; Package: rmail ;; This file is part of GNU Emacs. diff --git a/lisp/mail/rmailmsc.el b/lisp/mail/rmailmsc.el index fe8a627fe6b..bbb8233d89c 100644 --- a/lisp/mail/rmailmsc.el +++ b/lisp/mail/rmailmsc.el @@ -5,6 +5,7 @@ ;; Maintainer: FSF ;; Keywords: mail +;; Package: rmail ;; This file is part of GNU Emacs. diff --git a/lisp/mail/rmailout.el b/lisp/mail/rmailout.el index a6ff75e4efe..93d512336dc 100644 --- a/lisp/mail/rmailout.el +++ b/lisp/mail/rmailout.el @@ -5,6 +5,7 @@ ;; Maintainer: FSF ;; Keywords: mail +;; Package: rmail ;; This file is part of GNU Emacs. diff --git a/lisp/mail/rmailsort.el b/lisp/mail/rmailsort.el index f44f36bd5ee..f4fd52c10c7 100644 --- a/lisp/mail/rmailsort.el +++ b/lisp/mail/rmailsort.el @@ -6,6 +6,7 @@ ;; Author: Masanobu UMEDA <umerin@mse.kyutech.ac.jp> ;; Maintainer: FSF ;; Keywords: mail +;; Package: rmail ;; This file is part of GNU Emacs. diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el index 80c65cdfb57..0b8abbca6a5 100644 --- a/lisp/mail/rmailsum.el +++ b/lisp/mail/rmailsum.el @@ -5,6 +5,7 @@ ;; Maintainer: FSF ;; Keywords: mail +;; Package: rmail ;; This file is part of GNU Emacs. diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el index 3cc1bf5fe19..081e743dcd8 100644 --- a/lisp/mail/sendmail.el +++ b/lisp/mail/sendmail.el @@ -285,14 +285,14 @@ regardless of what part of it (if any) is included in the cited text.") ;;;###autoload (defcustom mail-citation-prefix-regexp - (purecopy "\\([ \t]*\\(\\w\\|[_.]\\)+>+\\|[ \t]*[]>|}]\\)+") + (purecopy "\\([ \t]*\\(\\w\\|[_.]\\)+>+\\|[ \t]*[]>|]\\)+") "Regular expression to match a citation prefix plus whitespace. It should match whatever sort of citation prefixes you want to handle, with whitespace before and after; it should also match just whitespace. The default value matches citations like `foo-bar>' plus whitespace." :type 'regexp :group 'sendmail - :version "20.3") + :version "24.1") (defvar mail-abbrevs-loaded nil) (defvar mail-mode-map @@ -1096,23 +1096,23 @@ external program defined by `sendmail-program'." ;; Delete Resent-BCC ourselves (if (save-excursion (beginning-of-line) (looking-at "resent-bcc")) - (delete-region (save-excursion (beginning-of-line) (point)) - (save-excursion (end-of-line) (1+ (point)))))) -;;; Apparently this causes a duplicate Sender. -;;; ;; If the From is different than current user, insert Sender. -;;; (goto-char (point-min)) -;;; (and (re-search-forward "^From:" delimline t) -;;; (progn -;;; (require 'mail-utils) -;;; (not (string-equal -;;; (mail-strip-quoted-names -;;; (save-restriction -;;; (narrow-to-region (point-min) delimline) -;;; (mail-fetch-field "From"))) -;;; (user-login-name)))) -;;; (progn -;;; (forward-line 1) -;;; (insert "Sender: " (user-login-name) "\n"))) + (delete-region (line-beginning-position) + (line-beginning-position 2)))) + ;; Apparently this causes a duplicate Sender. + ;; ;; If the From is different than current user, insert Sender. + ;; (goto-char (point-min)) + ;; (and (re-search-forward "^From:" delimline t) + ;; (progn + ;; (require 'mail-utils) + ;; (not (string-equal + ;; (mail-strip-quoted-names + ;; (save-restriction + ;; (narrow-to-region (point-min) delimline) + ;; (mail-fetch-field "From"))) + ;; (user-login-name)))) + ;; (progn + ;; (forward-line 1) + ;; (insert "Sender: " (user-login-name) "\n"))) ;; Don't send out a blank subject line (goto-char (point-min)) (if (re-search-forward "^Subject:\\([ \t]*\n\\)+\\b" delimline t) @@ -1179,9 +1179,9 @@ external program defined by `sendmail-program'." nil errbuf nil "-oi") (and envelope-from (list "-f" envelope-from)) -;;; ;; Don't say "from root" if running under su. -;;; (and (equal (user-real-login-name) "root") -;;; (list "-f" (user-login-name))) + ;; ;; Don't say "from root" if running under su. + ;; (and (equal (user-real-login-name) "root") + ;; (list "-f" (user-login-name))) (and mail-alias-file (list (concat "-oA" mail-alias-file))) (if mail-interactive @@ -1663,6 +1663,7 @@ If the current line has `mail-yank-prefix', insert it on the new line." ;; in middle of loading the file. ;;;###autoload (add-hook 'same-window-buffer-names (purecopy "*mail*")) +;;;###autoload (add-hook 'same-window-buffer-names (purecopy "*unsent mail*")) ;;;###autoload (defun mail (&optional noerase to subject in-reply-to cc replybuffer actions) @@ -1713,48 +1714,48 @@ The seventh argument ACTIONS is a list of actions to take when the message is sent, we apply FUNCTION to ARGS. This is how Rmail arranges to mark messages `answered'." (interactive "P") -;;; This is commented out because I found it was confusing in practice. -;;; It is easy enough to rename *mail* by hand with rename-buffer -;;; if you want to have multiple mail buffers. -;;; And then you can control which messages to save. --rms. -;;; (let ((index 1) -;;; buffer) -;;; ;; If requested, look for a mail buffer that is modified and go to it. -;;; (if noerase -;;; (progn -;;; (while (and (setq buffer -;;; (get-buffer (if (= 1 index) "*mail*" -;;; (format "*mail*<%d>" index)))) -;;; (not (buffer-modified-p buffer))) -;;; (setq index (1+ index))) -;;; (if buffer (switch-to-buffer buffer) -;;; ;; If none exists, start a new message. -;;; ;; This will never re-use an existing unmodified mail buffer -;;; ;; (since index is not 1 anymore). Perhaps it should. -;;; (setq noerase nil)))) -;;; ;; Unless we found a modified message and are happy, start a new message. -;;; (if (not noerase) -;;; (progn -;;; ;; Look for existing unmodified mail buffer. -;;; (while (and (setq buffer -;;; (get-buffer (if (= 1 index) "*mail*" -;;; (format "*mail*<%d>" index)))) -;;; (buffer-modified-p buffer)) -;;; (setq index (1+ index))) -;;; ;; If none, make a new one. -;;; (or buffer -;;; (setq buffer (generate-new-buffer "*mail*"))) -;;; ;; Go there and initialize it. -;;; (switch-to-buffer buffer) -;;; (erase-buffer) -;;; (setq default-directory (expand-file-name "~/")) -;;; (auto-save-mode auto-save-default) -;;; (mail-mode) -;;; (mail-setup to subject in-reply-to cc replybuffer actions) -;;; (if (and buffer-auto-save-file-name -;;; (file-exists-p buffer-auto-save-file-name)) -;;; (message "Auto save file for draft message exists; consider M-x mail-recover")) -;;; t)) + ;; This is commented out because I found it was confusing in practice. + ;; It is easy enough to rename *mail* by hand with rename-buffer + ;; if you want to have multiple mail buffers. + ;; And then you can control which messages to save. --rms. + ;; (let ((index 1) + ;; buffer) + ;; ;; If requested, look for a mail buffer that is modified and go to it. + ;; (if noerase + ;; (progn + ;; (while (and (setq buffer + ;; (get-buffer (if (= 1 index) "*mail*" + ;; (format "*mail*<%d>" index)))) + ;; (not (buffer-modified-p buffer))) + ;; (setq index (1+ index))) + ;; (if buffer (switch-to-buffer buffer) + ;; ;; If none exists, start a new message. + ;; ;; This will never re-use an existing unmodified mail buffer + ;; ;; (since index is not 1 anymore). Perhaps it should. + ;; (setq noerase nil)))) + ;; ;; Unless we found a modified message and are happy, start a new message. + ;; (if (not noerase) + ;; (progn + ;; ;; Look for existing unmodified mail buffer. + ;; (while (and (setq buffer + ;; (get-buffer (if (= 1 index) "*mail*" + ;; (format "*mail*<%d>" index)))) + ;; (buffer-modified-p buffer)) + ;; (setq index (1+ index))) + ;; ;; If none, make a new one. + ;; (or buffer + ;; (setq buffer (generate-new-buffer "*mail*"))) + ;; ;; Go there and initialize it. + ;; (switch-to-buffer buffer) + ;; (erase-buffer) + ;; (setq default-directory (expand-file-name "~/")) + ;; (auto-save-mode auto-save-default) + ;; (mail-mode) + ;; (mail-setup to subject in-reply-to cc replybuffer actions) + ;; (if (and buffer-auto-save-file-name + ;; (file-exists-p buffer-auto-save-file-name)) + ;; (message "Auto save file for draft message exists; consider M-x mail-recover")) + ;; t)) (if (eq noerase 'new) (pop-to-buffer (generate-new-buffer "*mail*")) @@ -1775,7 +1776,7 @@ The seventh argument ACTIONS is a list of actions to take (mail-mode) ;; Disconnect the buffer from its visited file ;; (in case the user has actually visited a file *mail*). -;;; (set-visited-file-name nil) + ;; (set-visited-file-name nil) (let (initialized) (and (not (and noerase (not (eq noerase 'new)))) diff --git a/lisp/mail/supercite.el b/lisp/mail/supercite.el index f3636c6504f..1660721fe21 100644 --- a/lisp/mail/supercite.el +++ b/lisp/mail/supercite.el @@ -34,7 +34,6 @@ (require 'regi) -(require 'sendmail) ;; For mail-header-end. ;; start user configuration variables ;; vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv @@ -1484,18 +1483,22 @@ non-nil." "Does nothing. Use this instead of nil to get a blank header." ()) -(defun sc-no-blank-line-or-header() +(declare-function mh-in-header-p "mh-utils" ()) + +(defun sc-no-blank-line-or-header () "Similar to `sc-no-header' except it removes the preceding blank line." - (if (not (bobp)) - (if (and (eolp) - (progn (forward-line -1) - (or (= (point) (mail-header-end)) - (and (eq major-mode 'mh-letter-mode) - (with-no-warnings - (mh-in-header-p)))))) - (progn (forward-line) - (let ((kill-lines-magic t)) - (kill-line)))))) + (and (not (bobp)) + (eolp) + (progn (forward-line -1) + (or (= (point) + (save-excursion + (rfc822-goto-eoh) + (line-beginning-position 2))) + (and (eq major-mode 'mh-letter-mode) + (mh-in-header-p)))) + (progn + (forward-line) + (kill-line)))) (defun sc-header-on-said () "\"On <date>, <from> said:\" unless: @@ -1616,21 +1619,20 @@ error occurs." (cadr err) sc-eref-style) (beep)))))) -(defun sc-electric-mode (&optional arg) - " -Mode for viewing Supercite reference headers. Commands are: +(defun sc-electric-mode (&optional style) + "Mode for viewing Supercite reference headers. Commands are: \n\\{sc-electric-mode-map} `sc-electric-mode' is not intended to be run interactively, but rather accessed through Supercite's electric reference feature. See -`sc-insert-reference' for more details. Optional ARG is the initial +`sc-insert-reference' for more details. Optional STYLE is the initial header style to use, unless not supplied or invalid, in which case `sc-preferred-header-style' is used." (let ((info sc-mail-info)) (setq sc-eref-style - (or (sc-valid-index-p arg) + (or (sc-valid-index-p style) (sc-valid-index-p sc-preferred-header-style) 0)) diff --git a/lisp/mail/uudecode.el b/lisp/mail/uudecode.el index 335e1e10c47..7ab2fcd1c62 100644 --- a/lisp/mail/uudecode.el +++ b/lisp/mail/uudecode.el @@ -216,7 +216,7 @@ If FILE-NAME is non-nil, save the result to FILE-NAME." (skip-chars-forward non-data-chars end)) (if file-name (with-temp-file file-name - (set-buffer-multibyte nil) + (unless (featurep 'xemacs) (set-buffer-multibyte nil)) (insert (apply 'concat (nreverse result)))) (or (markerp end) (setq end (set-marker (make-marker) end))) (goto-char start) @@ -236,5 +236,4 @@ If FILE-NAME is non-nil, save the result to FILE-NAME." (provide 'uudecode) -;; arch-tag: e1f09ed5-62b4-4677-9f13-4e81c4fe8ce3 ;;; uudecode.el ends here |