;;; gnus-msg.el --- mail and post interface for Semi-gnus
;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
-;; Free Software Foundation, Inc.
+;; 2005 Free Software Foundation, Inc.
;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
;; Lars Magne Ingebrigtsen <larsi@gnus.org>
(defcustom gnus-gcc-mark-as-read nil
"If non-nil, automatically mark Gcc articles as read."
- :version "21.4"
+ :version "22.1"
:group 'gnus-message
:type 'boolean)
If it is `all', attach files as external parts;
if a regexp and matches the Gcc group name, attach files as external parts;
if nil, attach files as normal parts."
- :version "21.4"
+ :version "22.1"
:group 'gnus-message
:type '(choice (const nil :tag "None")
(const all :tag "Any")
"gnus-agent.el" "gnus-cache.el" "gnus-srvr.el"
"mm-util.el" "mm-decode.el" "nnmail.el" "nntp.el" "message.el")
"Files whose variables will be reported in `gnus-bug'."
- :version "21.4"
+ :version "22.1"
:group 'gnus-message
:type '(repeat (string :tag "File")))
'(mm-mime-mule-charset-alist
nnmail-split-fancy message-minibuffer-local-map)
"Variables that should not be reported in `gnus-bug'."
- :version "21.4"
+ :version "22.1"
:group 'gnus-message
:type '(repeat (symbol :tag "Variable")))
'(nndraft nnml nnimap nnmaildir nnmh nnfolder nndir)
"A list of back ends that are not used in \"real\" newsgroups.
This variable is used only when `gnus-post-method' is `current'."
- :version "21.4"
+ :version "22.1"
:group 'gnus-group-foreign
:type '(repeat (symbol :tag "Back end")))
:group 'gnus-message
:type 'boolean)
-(defcustom gnus-confirm-mail-reply-to-news nil
+(defcustom gnus-confirm-mail-reply-to-news (and gnus-novice-user
+ (not gnus-expert-user))
"If non-nil, Gnus requests confirmation when replying to news.
This is done because new users often reply by mistake when reading
news.
parameter which should return non-nil iff a confirmation is needed, or
a regexp, in which case a confirmation is asked for iff the group name
matches the regexp."
- :version "21.4"
+ :version "22.1"
:group 'gnus-message
:type '(choice (const :tag "No" nil)
(const :tag "Yes" t)
when replying by mail. See the `gnus-confirm-mail-reply-to-news' variable
for fine-tuning this.
If nil, Gnus will never ask for confirmation if replying to mail."
- :version "21.4"
+ :version "22.1"
:group 'gnus-message
:type 'boolean)
"If non-nil, Gnus tries to suggest a default address to resend to.
If nil, the address field will always be empty after invoking
`gnus-summary-resend-message'."
- :version "21.4"
+ :version "22.1"
:group 'gnus-message
:type 'boolean)
(list (or (assq 'References message-header-format-alist)
'(References . message-shorten-references)))
(list (cons 'References
- (mapconcat 'identity (nreverse refs) " "))))
- (backward-delete-char 1))
+ (mapconcat 'identity (nreverse refs) " ")))))
(setq beg (mark t))
(pop-mark))
(t gnus-select-method))))
\f
-;; Dummies to avoid byte-compile warning.
-(eval-when-compile
- (defvar xemacs-codename))
-
-(defun gnus-message-make-user-agent (&optional include-mime-info max-column
- newline-product)
- "Return a user-agent info. If INCLUDE-MIME-INFO is non-nil and the
-variable `mime-edit-user-agent-value' is bound, the value will be
-included in the return value, and `gnus-user-agent' is ignored. If
-MAX-COLUMN is specified, the return value will be folded up as it were
-filled. NEWLINE-PRODUCT specifies whether a newline should be
-inserted in front of each product-token. If the value is t or `hard',
-it works strictly. Otherwise, if it is non-nil (e.g. `soft'), it
-works semi-strictly.
-
-Here is an odd example, which inserts a User-Agent: header when you
-begin to compose a message:
-
-\(add-hook 'gnus-message-setup-hook
- (lambda nil
- (setq message-user-agent nil)
- (save-excursion
- (save-restriction
- (message-narrow-to-headers)
- (goto-char (point-max))
- (insert \"User-Agent: \"
- (gnus-message-make-user-agent t 76 'soft)
- \"\\n\")))))
-"
- (let ((gnus-v (gnus-extended-version))
- user-agent)
- (cond ((and include-mime-info
- (boundp 'mime-edit-user-agent-value))
- (setq user-agent (concat gnus-v " " mime-edit-user-agent-value)))
- ((eq gnus-user-agent 'gnus-mime-edit)
- (setq user-agent
- (if (boundp 'mime-edit-user-agent-value)
- (concat gnus-v " " mime-edit-user-agent-value)
- gnus-v)))
- (t
- (setq user-agent (if (stringp gnus-user-agent)
- gnus-user-agent
- (concat gnus-v
- (let ((emacs-v (gnus-emacs-version)))
- (when emacs-v
- (concat " " emacs-v))))))))
+(defun gnus-message-make-user-agent (&optional dummy max-column
+ newline-product)
+ "Return a user-agent info. If MAX-COLUMN is specified, the return
+value will be folded up as it were filled. NEWLINE-PRODUCT specifies
+whether a newline should be inserted in front of each product-token;
+if the value is t or `hard', it works strictly. Otherwise, if it is
+non-nil (e.g. `soft'), it works semi-strictly."
+ (let ((user-agent (gnus-extended-version)))
(when max-column
(unless (natnump max-column)
(setq max-column 76))
(when (and filep v)
(setq v (with-temp-buffer
(insert-file-contents v)
- (goto-char (point-max))
- (skip-chars-backward "\n")
- (delete-region (+ (point) (if (bolp) 0 1)) (point-max))
- (buffer-string))))
+ (buffer-substring (point-min)
+ (progn
+ (goto-char (point-max))
+ (if (zerop (skip-chars-backward "\n"))
+ (point)
+ (1+ (point))))))))
(if (eq element 'import)
(progn
(if (member v stack)