X-Git-Url: http://cgit.sxemacs.org/?a=blobdiff_plain;f=lisp%2Fmessage.el;h=5884c8e908e4f31fea62bfd843cdde885c4165e9;hb=409ace46cb71159f112cb72dc02b04f7644e2c52;hp=3dc5647c7386876aa4317b64b88dce132e3182e1;hpb=5edabb7b1f9ba3eec0492c5a9058ec44eb27f816;p=gnus diff --git a/lisp/message.el b/lisp/message.el index 3dc5647c7..5884c8e90 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -686,6 +686,7 @@ Done before generating the new subject of a forward." (defcustom message-send-mail-function (cond ((eq send-mail-function 'smtpmail-send-it) 'message-smtpmail-send-it) ((eq send-mail-function 'feedmail-send-it) 'feedmail-send-it) + ((eq send-mail-function 'sendmail-query-once) 'sendmail-query-once) ((eq send-mail-function 'mailclient-send-it) 'message-send-mail-with-mailclient) (t (message-send-mail-function))) @@ -1135,7 +1136,7 @@ Note: Many newsgroups frown upon nontraditional reply styles. You probably want to set this variable only for specific groups, e.g. using `gnus-posting-styles': - (eval (set (make-local-variable 'message-cite-reply-above) 'above))" + (eval (set (make-local-variable 'message-cite-reply-position) 'above))" :type '(choice (const :tag "Reply inline" 'traditional) (const :tag "Reply above" 'above) (const :tag "Reply below" 'below)) @@ -1228,7 +1229,7 @@ It is a vector of the following headers: (defvar message-send-actions nil "A list of actions to be performed upon successful sending of a message.") (defvar message-return-action nil - "Action to return to the caller after sending or postphoning a message.") + "Action to return to the caller after sending or postponing a message.") (defvar message-exit-actions nil "A list of actions to be performed upon exiting after sending a message.") (defvar message-kill-actions nil @@ -1926,7 +1927,7 @@ You must have the \"hashcash\" binary installed, see `hashcash-path'." (defvar message-send-mail-real-function nil "Internal send mail function.") -(defvar message-bogus-system-names "^localhost\\.\\|\\.local$" +(defvar message-bogus-system-names "\\`localhost\\.\\|\\.local\\'" "The regexp of bogus system names.") (defcustom message-valid-fqdn-regexp @@ -3468,8 +3469,12 @@ Message buffers and is not meant to be called directly." (defun message-point-in-header-p () "Return t if point is in the header." (save-excursion - (not (re-search-backward - (concat "^" (regexp-quote mail-header-separator) "\n") nil t)))) + (and + (not + (re-search-backward + (concat "^" (regexp-quote mail-header-separator) "\n") nil t)) + (re-search-forward + (concat "^" (regexp-quote mail-header-separator) "\n") nil t)))) (defun message-do-auto-fill () "Like `do-auto-fill', but don't fill in message header." @@ -3756,22 +3761,9 @@ To use this automatically, you may add this function to (while (re-search-forward citexp nil t) (replace-match (if remove "" "\n")))))) -(defun message-yank-original (&optional arg) - "Insert the message being replied to, if any. -Puts point before the text and mark after. -Normally indents each nonblank line ARG spaces (default 3). However, -if `message-yank-prefix' is non-nil, insert that prefix on each line. - -This function uses `message-cite-function' to do the actual citing. - -Just \\[universal-argument] as argument means don't indent, insert no -prefix, and don't delete any headers." - (interactive "P") +(defun message--yank-original-internal (arg) (let ((modified (buffer-modified-p)) body-text) - ;; eval the let forms contained in message-cite-style - (eval - `(let ,message-cite-style (when (and message-reply-buffer message-cite-function) (when (equal message-cite-reply-position 'above) @@ -3811,7 +3803,23 @@ prefix, and don't delete any headers." ;; Add a `message-setup-very-last-hook' here? ;; Add `gnus-article-highlight-citation' here? (unless modified - (setq message-checksum (message-checksum)))))))) + (setq message-checksum (message-checksum)))))) + +(defun message-yank-original (&optional arg) + "Insert the message being replied to, if any. +Puts point before the text and mark after. +Normally indents each nonblank line ARG spaces (default 3). However, +if `message-yank-prefix' is non-nil, insert that prefix on each line. + +This function uses `message-cite-function' to do the actual citing. + +Just \\[universal-argument] as argument means don't indent, insert no +prefix, and don't delete any headers." + (interactive "P") + ;; eval the let forms contained in message-cite-style + (eval + `(let ,message-cite-style + (message--yank-original-internal ',arg)))) (defun message-yank-buffer (buffer) "Insert BUFFER into the current buffer and quote it." @@ -4662,6 +4670,8 @@ If you always want Gnus to send messages in one piece, set (set-buffer mailbuf) (push 'mail message-sent-message-via))) +(defvar sendmail-program) + (defun message-send-mail-with-sendmail () "Send off the prepared buffer with sendmail." (require 'sendmail) @@ -4697,16 +4707,7 @@ If you always want Gnus to send messages in one piece, set (cpr (apply 'call-process-region (append - (list (point-min) (point-max) - (cond ((boundp 'sendmail-program) - sendmail-program) - ((file-exists-p "/usr/sbin/sendmail") - "/usr/sbin/sendmail") - ((file-exists-p "/usr/lib/sendmail") - "/usr/lib/sendmail") - ((file-exists-p "/usr/ucblib/sendmail") - "/usr/ucblib/sendmail") - (t "fakemail")) + (list (point-min) (point-max) sendmail-program nil errbuf nil "-oi") message-sendmail-extra-arguments ;; Always specify who from, @@ -6792,10 +6793,13 @@ want to get rid of this query permanently."))) addr)) (cons (downcase (mail-strip-quoted-names addr)) addr))) (message-tokenize-header recipients))) - ;; Remove first duplicates. (Why not all duplicates? Is this a bug?) + ;; Remove all duplicates. (let ((s recipients)) (while s - (setq recipients (delq (assoc (car (pop s)) s) recipients)))) + (let ((address (car (pop s)))) + (while (assoc address s) + (setq recipients (delq (assoc address s) recipients) + s (delq (assoc address s) s)))))) ;; Remove hierarchical lists that are contained within each other, ;; if message-hierarchical-addresses is defined.