summaryrefslogtreecommitdiff
path: root/lisp/gnus
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/gnus')
-rw-r--r--lisp/gnus/ChangeLog123
-rw-r--r--lisp/gnus/gmm-utils.el4
-rw-r--r--lisp/gnus/gnus-art.el4
-rw-r--r--lisp/gnus/gnus-msg.el9
-rw-r--r--lisp/gnus/gnus-registry.el2
-rw-r--r--lisp/gnus/gnus-util.el2
-rw-r--r--lisp/gnus/message.el123
-rw-r--r--lisp/gnus/nnmail.el7
8 files changed, 186 insertions, 88 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index add0bb47c25..8f094dd6537 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,73 @@
+2007-04-10 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * gnus-msg.el (gnus-inews-yank-articles): Use
+ message-exchange-point-and-mark instead of exchange-point-and-mark.
+
+2007-04-09 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * message.el (message-yank-original): Make sure cited text ends with
+ newline; don't exchange point and mark.
+
+2007-04-07 Chong Yidong <cyd@stupidchicken.com>
+
+ * tls.el (open-tls-stream): Properly handle case where there
+ is no associated buffer.
+
+2007-04-03 Thien-Thi Nguyen <ttn@gnu.org>
+
+ * gnus-msg.el (gnus-inews-yank-articles): Fix bug: After
+ message-yank-original, make sure (< mark TEXT point).
+
+2007-03-31 Reiner Steib <Reiner.Steib@gmx.de>
+
+ * nnmail.el (nnmail-spool-file): Mark as obsolete.
+ (nnmail-get-new-mail): Reformat.
+
+ * gnus-registry.el (gnus-registry-cache-save): Add FIXME comment.
+
+ * gmm-utils.el: Fix Commentary.
+ (gmm-tool-bar-from-list): Fix typo in doc string.
+
+2007-03-27 Thien-Thi Nguyen <ttn@gnu.org>
+
+ * message.el (message-yank-original): Fix bug:
+ Don't switch point and mark unnecessarily.
+
+2007-03-25 Andreas Seltenreich <uwi7@rz.uni-karlsruhe.de>
+
+ * gnus-msg.el (gnus-setup-message, gnus-inews-add-send-actions): Move
+ evaluation of gnus-extended-version to ensure correct generation of the
+ User-Agent header when message-generate-headers-first is used.
+
+2007-03-24 Reiner Steib <Reiner.Steib@gmx.de>
+
+ * gnus-art.el (gnus-button-alist): Also catch `<f1> k ...'.
+ (gnus-treat-display-x-face): Fix doc string.
+
+2007-03-20 Andreas Seltenreich <uwi7@rz.uni-karlsruhe.de>
+
+ * message.el (message-required-news-headers):
+ * gnus-util.el (gnus-intern-safe): Fix typo in docstring.
+
+2007-03-15 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * message.el (message-generate-new-buffers): Change the meaning of the
+ nil value; add `standard' to the choices; treat t as `unique'; improve
+ doc string.
+ (gnus-select-frame-set-input-focus): Autoload.
+ (message-buffer-name): Search for the existing message buffer if
+ message-generate-new-buffers is nil or `standard'; treat the value t of
+ message-generate-new-buffers as `unique'.
+ (message-pop-to-buffer): Raise the frame already displaying the message
+ buffer; clear the echo area after querying.
+ (message-setup): Pass the `continue' argument to compose-mail.
+ (message-mail): Prefer `switch-function' if it is given; search for the
+ existing message buffer if the `continue' argument is non-nil; pass
+ continue and switch-function arguments to compose-mail by way of
+ message-setup.
+ (message-mail-other-window): Adjust argument of message-setup.
+ (message-mail-other-frame): Ditto.
+
2007-02-28 Katsumi Yamaoka <yamaoka@jpl.org>
* message.el (message-make-in-reply-to): Quote name containing
@@ -1514,15 +1584,6 @@
* gnus-start.el (gnus-no-server-1): Mention
`gnus-level-default-subscribed' in doc string.
-2005-11-26 Dave Love <fx@gnu.org>
-
- * tls.el (open-tls-stream): Rename arg SERVICE to PORT.
- (tls-program, tls-success): Provide openssl alternative.
-
- * starttls.el: Doc fixes.
- (starttls-open-stream-gnutls, starttls-open-stream): Rename arg
- SERVICE to PORT.
-
2005-12-09 Reiner Steib <Reiner.Steib@gmx.de>
* gnus-start.el (gnus-start-draft-setup): Enforce
@@ -2577,14 +2638,6 @@
* gnus-art.el (gnus-emphasis-alist): Disable the strikethru thingy.
-2005-06-02 Katsumi Yamaoka <yamaoka@jpl.org>
-
- * pop3.el (pop3-md5): Run md5 in the binary mode.
- (pop3-md5-program-args): New variable.
-
- * starttls.el (starttls-set-process-query-on-exit-flag):
- Use eval-and-compile.
-
2005-05-31 Katsumi Yamaoka <yamaoka@jpl.org>
* gnus-art.el (article-display-x-face): Replace
@@ -2620,16 +2673,6 @@
(nntp-open-ssl-stream): Ditto.
(nntp-open-tls-stream): Ditto.
- * pgg.el: Don't bind itimer vars; don't autoload itimer functions.
- (pgg-run-at-time-1): New macro.
- (pgg-run-at-time): Use it.
-
- * starttls.el (starttls-set-process-query-on-exit-flag): Alias to
- set-process-query-on-exit-flag or process-kill-without-query.
- (starttls-open-stream-gnutls): Use it instead of
- process-kill-without-query.
- (starttls-open-stream): Ditto.
-
2005-05-31 Simon Josefsson <jas@extundo.com>
* imap.el (imap-ssl-open): Use imap-process-connection-type,
@@ -3547,13 +3590,6 @@
* gnus-msg.el (gnus-summary-resend-default-address): Add :version.
- * tls.el (tls-process-connection-type, tls-success)
- (tls-certtool-program): Add :version.
-
- * starttls.el (starttls-gnutls-program, starttls-use-gnutls)
- (starttls-extra-arguments, starttls-process-connection-type)
- (starttls-connect, starttls-failure, starttls-success):
-
* spam-stat.el (spam-stat): Add :version.
* sieve.el (sieve): Add :version.
@@ -4041,12 +4077,6 @@
* message.el (message-tokenize-header): Fix 2004-09-06 change
which used point-min in the wrong place.
-2004-10-12 Simon Josefsson <jas@extundo.com>
-
- * net/tls.el (tls-certtool-program): New variable.
- (tls-certificate-information): New function, based on
- ssl-certificate-information.
-
2004-10-11 Reiner Steib <Reiner.Steib@gmx.de>
* message.el (message-bury): Use `window-dedicated-p'.
@@ -4486,19 +4516,6 @@
* sieve.el (sieve-deactivate-all): Fix format string mismatch.
-2004-05-26 Simon Josefsson <jas@extundo.com>
-
- * starttls.el: Merge with my GNUTLS based starttls.el.
- (starttls-gnutls-program, starttls-use-gnutls)
- (starttls-extra-arguments, starttls-process-connection-type)
- (starttls-connect, starttls-failure, starttls-success): New variables.
- (starttls-program, starttls-extra-args): Doc fix.
- (starttls-negotiate-gnutls, starttls-open-stream-gnutls):
- New functions.
- (starttls-negotiate, starttls-open-stream):
- Check `starttls-use-gnutls' and pass on to corresponding *-gnutls
- function if it is set.
-
2004-08-30 Andreas Schwab <schwab@suse.de>
* rfc2231.el (rfc2231-parse-string): Restore whitespace syntax for
diff --git a/lisp/gnus/gmm-utils.el b/lisp/gnus/gmm-utils.el
index 84b69edb575..9241e96d042 100644
--- a/lisp/gnus/gmm-utils.el
+++ b/lisp/gnus/gmm-utils.el
@@ -26,7 +26,7 @@
;; This library provides self-contained utility functions. The functions are
;; used in Gnus, Message and MML, but within this library there are no
-;; dependencies on Gnus, Message, or MML or Gnus.
+;; dependencies on Gnus, Message, or MML.
;;; Code:
@@ -217,7 +217,7 @@ Within each entry of ICON-LIST, the first element is a menu
command, the second element is an icon file name and the third
element is a test function. You can use \\[describe-key]
<menu-entry> to find out the name of a menu command. The fourth
-and all following elements are passed a the PROPS argument to the
+and all following elements are passed as the PROPS argument to the
function `tool-bar-local-item'.
If ZAP-LIST is a list, remove those item from the default
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index c6ac13af6c9..552f3a68f49 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -1332,7 +1332,7 @@ See Info node `(gnus)Customizing Articles' for details."
(executable-find "icontopbm")))
'head)
"Display X-Face headers.
-Valid values are nil, t, `head', `last', an integer or a predicate.
+Valid values are nil and `head'.
See Info node `(gnus)Customizing Articles' and Info node
`(gnus)X-Face' for details."
:group 'gnus-article-treat
@@ -6620,7 +6620,7 @@ positives are possible."
0 (>= gnus-button-emacs-level 1) gnus-button-handle-describe-function 2)
("\\b\\(C-h\\|<?[Ff]1>?\\)[ \t\n]+v[ \t\n]+\\([^ \t\n]+\\)[ \t\n]+RET"
0 (>= gnus-button-emacs-level 1) gnus-button-handle-describe-variable 2)
- ("`\\(\\b\\(C-h\\|<?[Ff]1>?\\)[ \t\n]+k[ \t\n]+\\([^']+\\)\\)'"
+ ("`\\(\\(C-h\\|<?[Ff]1>?\\)[ \t\n]+k[ \t\n]+\\([^']+\\)\\)'"
;; Unlike the other regexps we really have to require quoting
;; here to determine where it ends.
1 (>= gnus-button-emacs-level 1) gnus-button-handle-describe-key 3)
diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el
index cace5028f96..055fc75626a 100644
--- a/lisp/gnus/gnus-msg.el
+++ b/lisp/gnus/gnus-msg.el
@@ -393,6 +393,13 @@ Thank you for your help in stamping out bugs.
(setq mml-buffer-list nil)
(add-hook 'message-header-setup-hook 'gnus-inews-insert-gcc)
(add-hook 'message-header-setup-hook 'gnus-inews-insert-archive-gcc)
+ ;; message-newsreader and message-mailer were formerly set in
+ ;; gnus-inews-add-send-actions, but this is too late when
+ ;; message-generate-headers-first is used. --ansel
+ (add-hook 'message-mode-hook
+ (lambda nil
+ (setq message-newsreader
+ (setq message-mailer (gnus-extended-version)))))
;; #### FIXME: for a reason that I did not manage to identify yet,
;; the variable `gnus-newsgroup-name' does not honor a dynamically
;; scoped or setq'ed value from a caller like `C-u gnus-summary-mail'.
@@ -514,7 +521,6 @@ Gcc: header for archiving purposes."
(setq message-post-method
`(lambda (arg)
(gnus-post-method arg ,gnus-newsgroup-name)))
- (setq message-newsreader (setq message-mailer (gnus-extended-version)))
(message-add-action
`(when (gnus-buffer-exists-p ,buffer)
(set-window-configuration ,winconf))
@@ -765,6 +771,7 @@ active, the entire article will be yanked."
(nnheader-narrow-to-headers)
(nnheader-parse-naked-head)))))
(message-yank-original)
+ (message-exchange-point-and-mark)
(setq beg (or beg (mark t))))
(when articles
(insert "\n")))
diff --git a/lisp/gnus/gnus-registry.el b/lisp/gnus/gnus-registry.el
index f32ed6f1414..3e4d3d0127c 100644
--- a/lisp/gnus/gnus-registry.el
+++ b/lisp/gnus/gnus-registry.el
@@ -154,6 +154,8 @@ way."
(gnus-load file)
(gnus-message 5 "Reading %s...done" file))))
+;; FIXME: Get rid of duplicated code, cf. `gnus-save-newsrc-file' in
+;; `gnus-start.el'. --rsteib
(defun gnus-registry-cache-save ()
"Save the registry cache file."
(interactive)
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el
index 4f8e8539e88..25d6dfd47b6 100644
--- a/lisp/gnus/gnus-util.el
+++ b/lisp/gnus/gnus-util.el
@@ -122,7 +122,7 @@ This is a compatibility function for different Emacsen."
(put 'gnus-eval-in-buffer-window 'edebug-form-spec '(form body))
(defmacro gnus-intern-safe (string hashtable)
- "Set hash value. Arguments are STRING, VALUE, and HASHTABLE."
+ "Get hash value. Arguments are STRING and HASHTABLE."
`(let ((symbol (intern ,string ,hashtable)))
(or (boundp symbol)
(set symbol nil))
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index 55a7653dba1..baf98611308 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -226,7 +226,7 @@ Also see `message-required-news-headers' and
"*Headers to be generated or prompted for when posting an article.
RFC977 and RFC1036 require From, Date, Newsgroups, Subject,
Message-ID. Organization, Lines, In-Reply-To, Expires, and
-User-Agent are optional. If don't you want message to insert some
+User-Agent are optional. If you don't want message to insert some
header, remove it from this list."
:group 'message-news
:group 'message-headers
@@ -433,16 +433,36 @@ nil means let mailer mail back a message to report errors."
:type 'boolean)
(defcustom message-generate-new-buffers 'unique
- "*Non-nil means create a new message buffer whenever `message-setup' is called.
-If this is a function, call that function with three parameters: The type,
-the to address and the group name. (Any of these may be nil.) The function
-should return the new buffer name."
+ "*Say whether to create a new message buffer to compose a message.
+Valid values include:
+
+nil
+ Generate the buffer name in the Message way (e.g., *mail*, *news*,
+ *mail to whom*, *news on group*, etc.) and continue editing in the
+ existing buffer of that name. If there is no such buffer, it will
+ be newly created.
+
+`unique' or t
+ Create the new buffer with the name generated in the Message way.
+
+`unsent'
+ Similar to `unique' but the buffer name begins with \"*unsent \".
+
+`standard'
+ Similar to nil but the buffer name is simpler like *mail message*.
+
+function
+ If this is a function, call that function with three parameters:
+ The type, the To address and the group name (any of these may be nil).
+ The function should return the new buffer name."
:group 'message-buffers
:link '(custom-manual "(message)Message Buffers")
- :type '(choice (const :tag "off" nil)
- (const :tag "unique" unique)
- (const :tag "unsent" unsent)
- (function fun)))
+ :type '(choice (const nil)
+ (sexp :tag "unique" :format "unique\n" :value unique
+ :match (lambda (widget value) (memq value '(unique t))))
+ (const unsent)
+ (const standard)
+ (function :format "\n %{%t%}: %v")))
(defcustom message-kill-buffer-on-exit nil
"*Non-nil means that the message buffer will be killed after sending a message."
@@ -1622,7 +1642,8 @@ functionality to work."
(autoload 'rmail-output "rmailout")
(autoload 'gnus-delay-article "gnus-delay")
(autoload 'gnus-make-local-hook "gnus-util")
- (autoload 'gnus-extract-address-components "gnus-util"))
+ (autoload 'gnus-extract-address-components "gnus-util")
+ (autoload 'gnus-select-frame-set-input-focus "gnus-util"))
@@ -3325,12 +3346,16 @@ prefix, and don't delete any headers."
(delete-windows-on message-reply-buffer t)
(push-mark (save-excursion
(insert-buffer-substring message-reply-buffer)
+ (unless (bolp)
+ (insert ?\n))
(point)))
(unless arg
- (funcall message-cite-function))
- (message-exchange-point-and-mark)
- (unless (bolp)
- (insert ?\n))
+ (funcall message-cite-function)
+ (unless (eq (char-before (mark t)) ?\n)
+ (let ((pt (point)))
+ (goto-char (mark t))
+ (insert-before-markers ?\n)
+ (goto-char pt))))
(unless modified
(setq message-checksum (message-checksum))))))
@@ -5501,7 +5526,7 @@ between beginning of field and beginning of line."
"Return a new (unique) buffer name based on TYPE and TO."
(cond
;; Generate a new buffer name The Message Way.
- ((eq message-generate-new-buffers 'unique)
+ ((memq message-generate-new-buffers '(unique t))
(generate-new-buffer-name
(concat "*" type
(if to
@@ -5525,20 +5550,51 @@ between beginning of field and beginning of line."
"")
(if (and group (not (string= group ""))) (concat " on " group) "")
"*")))
- ;; Use standard name.
+ ;; Search for the existing message buffer with the specified name.
(t
- (format "*%s message*" type))))
+ (let* ((new (if (eq message-generate-new-buffers 'standard)
+ (generate-new-buffer-name (concat "*" type " message*"))
+ (let ((message-generate-new-buffers 'unique))
+ (message-buffer-name type to group))))
+ (regexp (concat "\\`"
+ (regexp-quote
+ (if (string-match "<[0-9]+>\\'" new)
+ (substring new 0 (match-beginning 0))
+ new))
+ "\\(?:<\\([0-9]+\\)>\\)?\\'"))
+ (case-fold-search nil))
+ (or (cdar
+ (last
+ (sort
+ (delq nil
+ (mapcar
+ (lambda (b)
+ (when (and (string-match regexp (setq b (buffer-name b)))
+ (eq (with-current-buffer b major-mode)
+ 'message-mode))
+ (cons (string-to-number (or (match-string 1 b) "1"))
+ b)))
+ (buffer-list)))
+ 'car-less-than-car)))
+ new)))))
(defun message-pop-to-buffer (name)
"Pop to buffer NAME, and warn if it already exists and is modified."
(let ((buffer (get-buffer name)))
(if (and buffer
(buffer-name buffer))
- (progn
- (set-buffer (pop-to-buffer buffer))
+ (let ((window (get-buffer-window buffer 0)))
+ (if window
+ ;; Raise the frame already displaying the message buffer.
+ (progn
+ (gnus-select-frame-set-input-focus (window-frame window))
+ (select-window window))
+ (set-buffer (pop-to-buffer buffer)))
(when (and (buffer-modified-p)
- (not (y-or-n-p
- "Message already being composed; erase? ")))
+ (not (prog1
+ (y-or-n-p
+ "Message already being composed; erase? ")
+ (message nil))))
(error "Message being composed")))
(set-buffer (pop-to-buffer name)))
(erase-buffer)
@@ -5598,7 +5654,8 @@ between beginning of field and beginning of line."
nil
mua)))
-(defun message-setup (headers &optional replybuffer actions switch-function)
+(defun message-setup (headers &optional replybuffer actions
+ continue switch-function)
(let ((mua (message-mail-user-agent))
subject to field yank-action)
(if (not (and message-this-is-mail mua))
@@ -5621,7 +5678,7 @@ between beginning of field and beginning of line."
(format "%s" (car item))
(cdr item)))
headers)
- nil switch-function yank-action actions)))))
+ continue switch-function yank-action actions)))))
(defun message-headers-to-generate (headers included-headers excluded-headers)
"Return a list that includes all headers from HEADERS.
@@ -5770,11 +5827,21 @@ are not included."
other-headers continue switch-function
yank-action send-actions)
"Start editing a mail message to be sent.
-OTHER-HEADERS is an alist of header/value pairs."
+OTHER-HEADERS is an alist of header/value pairs. CONTINUE says whether
+to continue editing a message already being composed. SWITCH-FUNCTION
+is a function used to switch to and display the mail buffer."
(interactive)
(let ((message-this-is-mail t) replybuffer)
(unless (message-mail-user-agent)
- (message-pop-to-buffer (message-buffer-name "mail" to)))
+ (funcall
+ (or switch-function 'message-pop-to-buffer)
+ ;; Search for the existing message buffer if `continue' is non-nil.
+ (let ((message-generate-new-buffers
+ (when (or (not continue)
+ (eq message-generate-new-buffers 'standard)
+ (functionp message-generate-new-buffers))
+ message-generate-new-buffers)))
+ (message-buffer-name "mail" to))))
;; FIXME: message-mail should do something if YANK-ACTION is not
;; insert-buffer.
(and (consp yank-action) (eq (car yank-action) 'insert-buffer)
@@ -5783,7 +5850,7 @@ OTHER-HEADERS is an alist of header/value pairs."
(nconc
`((To . ,(or to "")) (Subject . ,(or subject "")))
(when other-headers other-headers))
- replybuffer send-actions)
+ replybuffer send-actions continue switch-function)
;; FIXME: Should return nil if failure.
t))
@@ -6655,7 +6722,7 @@ you."
(message-pop-to-buffer (message-buffer-name "mail" to))))
(let ((message-this-is-mail t))
(message-setup `((To . ,(or to "")) (Subject . ,(or subject "")))
- nil nil 'switch-to-buffer-other-window)))
+ nil nil nil 'switch-to-buffer-other-window)))
;;;###autoload
(defun message-mail-other-frame (&optional to subject)
@@ -6670,7 +6737,7 @@ you."
(message-pop-to-buffer (message-buffer-name "mail" to))))
(let ((message-this-is-mail t))
(message-setup `((To . ,(or to "")) (Subject . ,(or subject "")))
- nil nil 'switch-to-buffer-other-frame)))
+ nil nil nil 'switch-to-buffer-other-frame)))
;;;###autoload
(defun message-news-other-window (&optional newsgroups subject)
diff --git a/lisp/gnus/nnmail.el b/lisp/gnus/nnmail.el
index 736e58cd5a2..b080088b2ef 100644
--- a/lisp/gnus/nnmail.el
+++ b/lisp/gnus/nnmail.el
@@ -247,6 +247,10 @@ This variable is a list of mail source specifiers.
This variable is obsolete; `mail-sources' should be used instead."
:group 'nnmail-files
:type 'sexp)
+(make-obsolete-variable 'nnmail-spool-file
+ "This option is obsolete in Gnus 5.9. \
+Use `mail-sources' instead.")
+;; revision 5.29 / p0-85 / Gnus 5.9
(defcustom nnmail-resplit-incoming nil
"*If non-nil, re-split incoming procmail sorted mail."
@@ -1749,7 +1753,8 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details."
&optional group spool-func)
"Read new incoming mail."
(let* ((sources (or mail-sources
- (if (listp nnmail-spool-file) nnmail-spool-file
+ (if (listp nnmail-spool-file)
+ nnmail-spool-file
(list nnmail-spool-file))))
fetching-sources
(group-in group)