Commit ed797193 authored by Gnus developers's avatar Gnus developers Committed by Katsumi Yamaoka

Merge changes made in Gnus trunk.

nnir.el: Batch header retrieval.
proto-stream.el: New library to provide protocol-specific TLS/STARTTLS connections for IMAP, NNTP, SMTP, POP3 and similar protocols.
nnimap.el (nnimap-open-connection): Use it.
proto-stream.el (open-proto-stream): Complete the documentation.
nnimap.el (nnimap-open-connection): Check for "OK" from the greeting.
nntp.el: Use proto-streams for the relevant connections types.
nntp.el (nntp-open-connection): Switch on STARTTLS on supported servers.
proto-stream.el (open-proto-stream): Add a way to specify what the end of a command is.
proto-stream.el (proto-stream-open-tls): Delete output from openssl if we're using tls.el.
proto-stream.el (proto-stream-open-network): If we don't have gnutls-cli or gnutls built in, then don't try to establish a STARTTLS connection.
color.el (color-lab->srgb): Fix function call name.
proto-stream.el: Fix the syntax in the comment.
nntp.el (nntp-open-connection): Fix the STARTTLS command syntax.
proto-stream.el (proto-stream-open-starttls): Actually implement the starttls.el STARTTLS.
proto-stream.el (proto-stream-always-use-starttls): New variable.
proto-stream.el (proto-stream-open-starttls): De-duplicate the starttls code.
proto-stream.el (proto-stream-open-starttls): Folded back into the main function.
proto-stream.el (proto-stream-command): Refactor out.
nnimap.el (nnimap-stream): Change default to `undecided'.
nnimap.el (nnimap-open-connection): If `nnimap-stream' is `undecided', try ssl first, and then network.
nnimap.el (nnimap-open-connection-1): Respect nnimap-server-port.
nnimap.el (nnimap-open-connection): Be more backwards-compatible.
proto-stream.el (open-protocol-stream): Renamed from open-proto-stream.
proto-stream.el (proto-stream-open-network): When doing opportunistic TLS upgrades we don't really care about the identity of the peer.
gnus.texi (Customizing the IMAP Connection): Note the new defaults.
gnus.texi (Direct Functions): Note the STARTTLS upgrade.
proto-stream.el (proto-stream-open-network): Force starttls.el to use gnutls-cli, since that what we've checked for.
proto-stream.el (proto-stream-always-use-starttls): Only default to t if open-gnutls-stream exists.
proto-stream.el (proto-stream-open-network): If STARTTLS failed, then just open a normal connection.
proto-stream.el (proto-stream-open-network): Wait until the greeting before doing STARTTLS.
nnimap.el (nnimap-open-connection-1): Always upgrade to STARTTLS (for backwards compatibility).
nnimap.el (nnimap-open-connection-1): Really respect nnimap-server-port.
nntp.el (nntp-open-connection): Provide a :success condition.
nnimap.el (nnimap-open-connection-1): Ditto.
proto-stream.el (proto-stream-open-network): See what the response to the STARTTLS command is.
proto-stream.el (proto-stream-open-network): Add some comments.
proto-stream.el: Fix example.
proto-stream.el (open-protocol-stream): Actually mention the STARTTLS upgrade.
nnir.el (nnir-get-active): Skip nnir-ignored-newsgroups when searching.
nnir.el (nnir-ignore-newsgroups): Fix default value.
nnir.el (nnir-run-gmane): Use mm-delete-duplicates instead of delete-dups that is not available in XEmacs 21.4.
mm-util.el (mm-delete-duplicates): Add comment.
gnus-sum.el (gnus-summary-delete-article): If delete fails don't change the registry.
nnimap.el (nnimap-open-connection-1): w32 open-network-stream doesn't seem to accept strings-with-numbers as port numbers.
color.el: fix docstring to use English rather than math notation for intervals.
shr.el (shr-find-fill-point): Don't break before apostrophes.
nnir.el (nnir-request-move-article): Bail out if no move support in group.
color.el (color-rgb->hsv): Fix docstring.
nnir.el (nnir-get-active): Improve active list retrieval.
shr.el (shr-find-fill-point): Work better for kinsoku chars and apostrophes.
gnus-gravatar.el (gnus-gravatar-size): Set gnus-gravatar-size to nil.
nnimap.el (nnimap-open-connection-1): Use gnus-string-match-p.
nnimap.el (nnimap-open-connection-1): Fix PREAUTH.
proto-stream.el (open-protocol-stream): All starttls connections are handled by the network handler.
gnus-gravatar.el (gnus-gravatar-insert): Delete unnecessary binding to t of inhibit-read-only since it is inside gnus-with-article-headers.
gnus-gravatar.el (gnus-gravatar-transform-address): Use mail-extract-address-components that supports non-ASCII names rather than mail-header-parse-addresses.
shr.el (shr-find-fill-point): Don't break line between kinsoku-bol characters.
gnus-gravatar.el (gnus-gravatar-insert): Allow LWSP in the middle of names.
nnmaildir.el (nnmaildir-request-set-mark): Add article to add-mark funcall.
gnus-msg.el: Remove nastygram thing.
message.el (message-from-style): Fix comment.
message.el (message-user-organization): Do not use gnus-local-organization.
gnus.el: Remove gnus-local-organization.
rtree.el: New file to handle range trees.
nnir.el, gnus-sum.el: Redo the way nnir handles registry updates.
rtree.el (rtree-extract): Simplify.
gnus-win.el (gnus-configure-windows): Remove Gnus 3.x setting support.
gnus-msg.el: Mark gnus-outgoing-message-group as obsolete.
gnus.texi (Archived Messages): Remove gnus-outgoing-message-group.
gnus-win.el (gnus-configure-frame): Remove old compatibility code.
rtree.el (rtree-memq): Rewrite it as a non-recursive function.
rtree.el (rtree-add, rtree-delq, rtree-length): Implement.
rtree.el (rtree-add): Make code slightly faster.
nnir.el: Allow modified summary-line-format in nnir summary buffers.
parent 66feec8b
2010-12-02 Julien Danjou <julien@danjou.info>
* gnus.texi (Archived Messages): Remove gnus-outgoing-message-group.
2010-11-28 Lars Magne Ingebrigtsen <larsi@gnus.org>
* gnus.texi (Customizing the IMAP Connection): Note the new defaults.
(Direct Functions): Note the STARTTLS upgrade.
2010-11-27 Glenn Morris <rgm@gnu.org>
James Clark <none@example.com>
......
......@@ -13342,21 +13342,6 @@ case you should set @code{gnus-message-archive-group} to @code{nil};
this will disable archiving.
@table @code
@item gnus-outgoing-message-group
@vindex gnus-outgoing-message-group
All outgoing messages will be put in this group. If you want to store
all your outgoing mail and articles in the group @samp{nnml:archive},
you set this variable to that value. This variable can also be a list of
group names.
If you want to have greater control over what group to put each
message in, you can set this variable to a function that checks the
current newsgroup name and then returns a suitable group name (or list
of names).
This variable can be used instead of @code{gnus-message-archive-group},
but the latter is the preferred method.
@item gnus-gcc-mark-as-read
@vindex gnus-gcc-mark-as-read
If non-@code{nil}, automatically mark @code{Gcc} articles as read.
......@@ -14453,7 +14438,9 @@ functions is also affected by commonly understood variables
@findex nntp-open-network-stream
@item nntp-open-network-stream
This is the default, and simply connects to some port or other on the
remote system.
remote system. If both Emacs and the server supports it, the
connection will be upgraded to an encrypted @acronym{STARTTLS}
connection automatically.
@findex nntp-open-tls-stream
@item nntp-open-tls-stream
......@@ -14887,12 +14874,17 @@ typical port would be @code{"imap"} or @code{"imaps"}.
How @code{nnimap} should connect to the server. Possible values are:
@table @code
@item undecided
This is the default, and this first tries the @code{ssl} setting, and
then tries the @code{network} setting.
@item ssl
This is the default, and this uses standard
@acronym{TLS}/@acronym{SSL} connection.
This uses standard @acronym{TLS}/@acronym{SSL} connections.
@item network
Non-encrypted and unsafe straight socket connection.
Non-encrypted and unsafe straight socket connection, but will upgrade
to encrypted @acronym{STARTTLS} if both Emacs and the server
supports it.
@item starttls
Encrypted @acronym{STARTTLS} over the normal @acronym{IMAP} port.
2010-12-02 Andrew Cohen <cohen@andy.bu.edu>
* nnir.el (nnir-summary-line-format): New variable.
(nnir-mode): Use it.
(nnir-artlist-*,nnir-aritem-*): Reimplement as macros.
(nnir-article-ids): Reimplement as defsubst.
(nnir-retrieve-headers): Don't mangle the subject header.
(nnir-run-imap): Use 100 as RSV score.
(nnir-run-find-grep): Fix for full server searching.
(nnir-run-gmane): Better restriction to gmane groups.
* gnus-sum.el (gnus-summary-line-format-alist): Add specs for nnir
summary buffers.
2010-12-02 Julien Danjou <julien@danjou.info>
* gnus-win.el (gnus-configure-frame): Remove old compatibility code.
* gnus-msg.el: Mark gnus-outgoing-message-group as obsolete.
* gnus-win.el (gnus-configure-windows): Remove Gnus 3.x setting
support.
2010-12-01 Andrew Cohen <cohen@andy.bu.edu>
* nnir.el: Update to handle the registry better.
(autoload): Silence byte-compiler.
(nnir-open-server): Add a hook for nnir groups.
(nnir-request-move-article): Don't mangle the header. Better to use
formating variables (which will be added in the future).
(nnir-registry-action): Update the registry using the original article
group name.
(nnir-mode): Install nnir-specific hooks for updating the registry.
* gnus-sum.el
(gnus-article-original-subject,gnus-newsgroup-original-name): Remove
obsolete variables.
(gnus-summary-move-article): Remove use of obsolete variables.
(gnus-summary-local-variables): Make move and delete hooks local to
summary buffers.
2010-12-01 Lars Magne Ingebrigtsen <larsi@gnus.org>
* rtree.el: New file.
2010-12-01 Julien Danjou <julien@danjou.info>
* message.el (message-user-organization): Do not use
gnus-local-organization.
* gnus.el: Remove gnus-local-organization.
* gnus-msg.el: Remove nastygram thing.
2010-12-01 Teodor Zlatanov <tzz@lifelogs.com>
* nnmaildir.el (nnmaildir-request-set-mark): Add article to add-mark
funcall.
2010-12-01 Katsumi Yamaoka <yamaoka@jpl.org>
* gnus-gravatar.el (gnus-gravatar-insert): Allow LWSP in the middle of
names.
* shr.el (shr-find-fill-point): Don't break line between kinsoku-bol
characters.
* gnus-gravatar.el (gnus-gravatar-insert): Delete unnecessary binding
to t of inhibit-read-only since it is inside gnus-with-article-headers.
Suggested by Štěpán Němec <stepnem@gmail.com>.
(gnus-gravatar-transform-address): Use mail-extract-address-components
that supports non-ASCII names rather than mail-header-parse-addresses.
2010-11-30 Lars Magne Ingebrigtsen <larsi@gnus.org>
* proto-stream.el (open-protocol-stream): All starttls connections are
handled by the network handler.
2010-11-30 Julien Danjou <julien@danjou.info>
* nnimap.el (nnimap-open-connection-1): Use gnus-string-match-p.
(nnimap-open-connection-1): Fix PREAUTH.
* gnus-gravatar.el (gnus-gravatar-size): Set gnus-gravatar-size to nil.
2010-11-30 Katsumi Yamaoka <yamaoka@jpl.org>
* shr.el (shr-char-breakable-p, shr-char-nospace-p)
(shr-char-kinsoku-bol-p, shr-char-kinsoku-eol-p): New macros.
(shr-insert): Use them.
(shr-find-fill-point): Work better for kinsoku chars and apostrophes.
2010-11-29 Andrew Cohen <cohen@andy.bu.edu>
* nnir.el (nnir-request-move-article): Bail out if original group
doesn't support article moves.
(nnir-get-active): Improve active list retrieval.
2010-11-29 Lars Magne Ingebrigtsen <larsi@gnus.org>
* shr.el (shr-find-fill-point): Don't break before apostrophes.
2010-11-29 Binjo <binjo.cn@gmail.com> (tiny change)
* nnimap.el (nnimap-open-connection-1): w32 open-network-stream doesn't
seem to accept strings-with-numbers as port numbers,
2010-11-29 Andrew Cohen <cohen@andy.bu.edu>
* gnus-sum.el (gnus-summary-delete-article): If delete fails don't
change the registry.
2010-11-29 Katsumi Yamaoka <yamaoka@jpl.org>
* nnir.el (nnir-run-gmane): Use mm-delete-duplicates instead of
delete-dups that is not available in XEmacs 21.4.
* mm-util.el (mm-delete-duplicates): Add comment.
2010-11-28 Andrew Cohen <cohen@andy.bu.edu>
* nnir.el (nnir-ignored-newsgroups): New variable.
(nnir-get-active): Use it.
2010-11-28 Lars Magne Ingebrigtsen <larsi@gnus.org>
* proto-stream.el (proto-stream-open-network): Add some comments.
* nntp.el (nntp-open-connection): Provide a :success condition.
* nnimap.el (nnimap-open-connection-1): Ditto.
* proto-stream.el (proto-stream-open-network): See what the response to
the STARTTLS command is.
* nnimap.el (nnimap-open-connection-1): Always upgrade to STARTTLS (for
backwards compatibility).
(nnimap-open-connection-1): Really respect nnimap-server-port.
* proto-stream.el (proto-stream-open-network): When doing opportunistic
TLS upgrades we don't really care about the identity of the peer.
(proto-stream-open-network): Force starttls.el to use gnutls-cli, since
that what we've checked for.
(proto-stream-always-use-starttls): Only default to t if
open-gnutls-stream exists.
(proto-stream-open-network): If STARTTLS failed, then just open a
normal connection.
(proto-stream-open-network): Wait until the greeting before doing
STARTTLS.
* nntp.el (nntp-open-connection): Report what the connection error is.
* proto-stream.el (open-protocol-stream): Renamed from
open-proto-stream.
2010-11-27 Lars Magne Ingebrigtsen <larsi@gnus.org>
* nnimap.el (nnimap-stream): Change default to `undecided'.
(nnimap-open-connection): If `nnimap-stream' is `undecided', try ssl
first, and then network.
(nnimap-open-connection-1): Respect nnimap-server-port.
(nnimap-open-connection): Be more backwards-compatible.
* proto-stream.el (proto-stream-always-use-starttls): New variable.
(proto-stream-open-starttls): De-duplicate the starttls code.
(proto-stream-open-starttls): Folded back into the main function.
(proto-stream-open-network): Fix typo in the gnutls path.
(proto-stream-command): Refactor out.
* nntp.el (nntp-open-connection): Fix the STARTTLS command syntax.
* proto-stream.el (proto-stream-open-starttls): Actually implement the
starttls.el STARTTLS.
* color.el (color-lab->srgb): Fix function call name.
* proto-stream.el (proto-stream-open-tls): Delete output from openssl
if we're using tls.el.
(proto-stream-open-network): If we don't have gnutls-cli or gnutls
built in, then don't try to establish a STARTTLS connection.
* nntp.el (nntp-open-connection): Switch on STARTTLS on supported
servers.
* proto-stream.el (open-proto-stream): Use network, not stream.
(open-proto-stream): Add a way to specify what the end of a command is.
* nntp.el (nntp-open-connection): Use proto-streams for the relevant
connections types.
(nntp-open-network-stream): Remove.
(nntp-open-ssl-stream): Remove.
(nntp-open-tls-stream): Remove.
(nntp-ssl-program): Remove.
* nnimap.el (nnimap-open-connection): Check for "OK" from the greeting.
2010-11-27 Andrew Cohen <cohen@andy.bu.edu>
* nnir.el: Fix typos.
(nnir-retrieve-headers-override-function): Rename variable to reflect
new semantics.
(nnir-article-group, nnir-article-number, nnir-article-rsv): New helper
macros.
(nnir-request-article, nnir-request-move-article): Use them.
(nnir-categorize): New function.
(nnir-run-query): Use it.
(nnir-retrieve-headers): Rewrite to batch header retrieval.
(nnir-run-gmane): nnir-retrieve-headers now returns the headers already
sorted.
(nnir-group-full-name): Use gnus-group-full-name instead.
(nnir-artlist-artitem-group, nnir-artlist-artitem-number)
(nnir-artlist-artitem-rsv, nnir-sort-groups-by-server): Obsolete.
2010-11-27 Lars Magne Ingebrigtsen <larsi@gnus.org>
* nnimap.el (nnimap-open-connection): Fix typo in STARTTLS command.
* proto-stream.el: New library to provide protocol-specific
TLS/STARTTLS connections for IMAP, NNTP, SMTP, POP3 and similar
protocols.
(open-proto-stream): Complete the documentation.
(proto-stream-open-network): Fix some typos.
* nnimap.el (nnimap-open-connection): Use it.
2010-11-27 Yuri Karaban <tech@askold.net> (tiny change)
* pop3.el (pop3-open-server): Read server greeting before starting TLS
......
......@@ -36,7 +36,7 @@
(defun color-rgb->hex (red green blue)
"Return hexadecimal notation for RED GREEN BLUE color.
RED GREEN BLUE must be values between [0,1]."
RED GREEN BLUE must be values between 0 and 1 inclusively."
(format "#%02x%02x%02x"
(* red 255) (* green 255) (* blue 255)))
......@@ -53,7 +53,8 @@ RED GREEN BLUE must be values between [0,1]."
(defun color-rgb->hsv (red green blue)
"Convert RED GREEN BLUE values to HSV representation.
Hue is in radian. Saturation and values are between [0,1]."
Hue is in radians. Saturation and values are between 0 and 1
inclusively."
(let* ((r (float red))
(g (float green))
(b (float blue))
......@@ -80,7 +81,7 @@ Hue is in radian. Saturation and values are between [0,1]."
(defun color-rgb->hsl (red green blue)
"Convert RED GREEN BLUE colors to their HSL representation.
RED, GREEN and BLUE must be between [0,1]."
RED, GREEN and BLUE must be between 0 and 1 inclusively."
(let* ((r red)
(g green)
(b blue)
......@@ -108,7 +109,7 @@ RED, GREEN and BLUE must be between [0,1]."
(defun color-srgb->xyz (red green blue)
"Converts RED GREEN BLUE colors from the sRGB color space to CIE XYZ.
RED, BLUE and GREEN must be between [0,1]."
RED, BLUE and GREEN must be between 0 and 1 inclusively."
(let ((r (if (<= red 0.04045)
(/ red 12.95)
(expt (/ (+ red 0.055) 1.055) 2.4)))
......@@ -191,12 +192,12 @@ none is set, `color-d65-xyz' is used."
(apply 'color-xyz->lab (color-srgb->xyz red green blue)))
(defun color-rgb->normalize (color)
"Normalize a RGB color to values between [0,1]."
"Normalize a RGB color to values between 0 and 1 inclusively."
(mapcar (lambda (x) (/ x 65535.0)) (x-color-values color)))
(defun color-lab->srgb (L a b)
"Converts CIE L*a*b* to RGB."
(apply 'color-xyz->rgb (color-lab->xyz L a b)))
(apply 'color-xyz->srgb (color-lab->xyz L a b)))
(defun color-cie-de2000 (color1 color2 &optional kL kC kH)
"Computes the CIEDE2000 color distance between COLOR1 and COLOR2.
......
......@@ -26,13 +26,15 @@
(require 'gravatar)
(require 'gnus-art)
(require 'mail-extr) ;; Because of binding `mail-extr-disable-voodoo'.
(defgroup gnus-gravatar nil
"Gnus Gravatar."
:group 'gnus-visual)
(defcustom gnus-gravatar-size 32
"How big should gravatars be displayed."
(defcustom gnus-gravatar-size nil
"How big should gravatars be displayed.
If nil, default to `gravatar-size'."
:type 'integer
:version "24.1"
:group 'gnus-gravatar)
......@@ -51,30 +53,25 @@
(defun gnus-gravatar-transform-address (header category &optional force)
(gnus-with-article-headers
(let ((addresses
(mail-header-parse-addresses
;; mail-header-parse-addresses does not work (reliably) on
;; decoded headers.
(or
(ignore-errors
(mail-encode-encoded-word-string
(or (mail-fetch-field header) "")))
(mail-fetch-field header))))
(gravatar-size gnus-gravatar-size)
name)
(let* ((mail-extr-disable-voodoo t)
(addresses (mail-extract-address-components
(or (mail-fetch-field header) "") t))
(gravatar-size gnus-gravatar-size)
name)
(dolist (address addresses)
(when (setq name (cdr address))
(setcdr address (setq name (mail-decode-encoded-word-string name))))
(when (and (setq name (car address))
(string-match "\\` +" name))
(setcar address (setq name (substring name (match-end 0)))))
(when (or force
(not (and gnus-gravatar-too-ugly
(or (string-match gnus-gravatar-too-ugly
(car address))
(cadr address))
(and name
(string-match gnus-gravatar-too-ugly
name))))))
(ignore-errors
(gravatar-retrieve
(car address)
(cadr address)
'gnus-gravatar-insert
(list header address category))))))))
......@@ -87,12 +84,15 @@ Set image category to CATEGORY."
(when (buffer-live-p (current-buffer))
(gnus-article-goto-header header)
(mail-header-narrow-to-field)
(let ((real-name (cdr address))
(mail-address (car address)))
(let ((real-name (car address))
(mail-address (cadr address)))
(when (if real-name
(re-search-forward (concat (regexp-quote real-name) "\\|"
(regexp-quote mail-address))
nil t)
(re-search-forward
(concat (gnus-replace-in-string
(regexp-quote real-name) "[\t ]+" "[\t\n ]+")
"\\|"
(regexp-quote mail-address))
nil t)
(search-forward mail-address nil t))
(goto-char (1- (match-beginning 0)))
;; If we're on the " quoting the name, go backward
......@@ -103,8 +103,7 @@ Set image category to CATEGORY."
;; example we were fetching someaddress, and then we change to
;; another mail with the same someaddress.
(unless (memq 'gnus-gravatar (text-properties-at (point)))
(let ((inhibit-read-only t)
(point (point)))
(let ((point (point)))
(unless (featurep 'xemacs)
(setq gravatar (append gravatar gnus-gravatar-properties)))
(gnus-put-image gravatar nil category)
......
......@@ -55,7 +55,7 @@ method to use when posting."
(sexp :tag "Methods" ,gnus-select-method)))
(defcustom gnus-outgoing-message-group nil
"*All outgoing messages will be put in this group.
"All outgoing messages will be put in this group.
If you want to store all your outgoing mail and articles in the group
\"nnml:archive\", you set this variable to that value. This variable
can also be a list of group names.
......@@ -70,6 +70,8 @@ of names)."
(string :tag "Group")
(repeat :tag "List of groups" (string :tag "Group"))))
(make-obsolete-variable 'gnus-outgoing-message-group 'gnus-message-archive-group "24.1")
(defcustom gnus-mailing-list-groups nil
"*If non-nil a regexp matching groups that are really mailing lists.
This is useful when you're reading a mailing list that has been
......@@ -397,7 +399,6 @@ Thank you for your help in stamping out bugs.
(message-mode-hook (copy-sequence message-mode-hook)))
(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
......@@ -826,7 +827,6 @@ header line with the old Message-ID."
(gnus-summary-mark-as-read ,article gnus-canceled-mark)))))
message-send-actions)
;; Add Gcc header.
(gnus-inews-insert-archive-gcc)
(gnus-inews-insert-gcc))))
......@@ -1294,7 +1294,6 @@ composing a new message."
(goto-char (point-max))
(insert mail-header-separator)
;; Add Gcc header.
(gnus-inews-insert-archive-gcc)
(gnus-inews-insert-gcc)
(goto-char (point-min))
(when (re-search-forward "^To:\\|^Newsgroups:" nil 'move)
......@@ -1307,24 +1306,6 @@ See `gnus-summary-mail-forward' for ARG."
(interactive "P")
(gnus-summary-mail-forward arg t))
(defvar gnus-nastygram-message
"The following article was inappropriately posted to %s.\n\n"
"Format string to insert in nastygrams.
The current group name will be inserted at \"%s\".")
(defun gnus-summary-mail-nastygram (n)
"Send a nastygram to the author of the current article."
(interactive "P")
(when (or gnus-expert-user
(gnus-y-or-n-p
"Really send a nastygram to the author of the current article? "))
(let ((group gnus-newsgroup-name))
(gnus-summary-reply-with-original n)
(set-buffer gnus-message-buffer)
(message-goto-body)
(insert (format gnus-nastygram-message group))
(message-send-and-exit))))
(defun gnus-summary-mail-crosspost-complaint (n)
"Send a complaint about crossposting to the current article(s)."
(interactive "P")
......@@ -1580,7 +1561,6 @@ this is a reply."
(gnus-setup-message 'compose-bounce
(message-bounce)
;; Add Gcc header.
(gnus-inews-insert-archive-gcc)
(gnus-inews-insert-gcc)
;; If there are references, we fetch the article we answered to.
(when parent
......@@ -1694,44 +1674,13 @@ this is a reply."
(gnus-group-mark-article-read group (cdr group-art)))
(kill-buffer (current-buffer)))))))))
(defun gnus-inews-insert-gcc ()
"Insert Gcc headers based on `gnus-outgoing-message-group'."
(save-excursion
(save-restriction
(message-narrow-to-headers)
(let* ((group gnus-outgoing-message-group)
(gcc (cond
((functionp group)
(funcall group))
((or (stringp group) (listp group))
group))))
(when gcc
(insert "Gcc: "
(if (stringp gcc)
(if (string-match " " gcc)
(concat "\"" gcc "\"")
gcc)
(mapconcat (lambda (group)
(if (string-match " " group)
(concat "\"" group "\"")
group))
gcc " "))
"\n"))))))
(defun gnus-inews-insert-archive-gcc (&optional group)
(defun gnus-inews-insert-gcc (&optional group)
"Insert the Gcc to say where the article is to be archived."
(setq group (cond (group
(gnus-group-decoded-name group))
(gnus-newsgroup-name
(gnus-group-decoded-name gnus-newsgroup-name))
(t
"")))
(let* ((var gnus-message-archive-group)
(let* ((group (or group gnus-newsgroup-name))
(group (when group (gnus-group-decoded-name group)))
(var (or gnus-outgoing-message-group gnus-message-archive-group))
(gcc-self-val
(and gnus-newsgroup-name
(not (equal gnus-newsgroup-name ""))
(gnus-group-find-parameter
gnus-newsgroup-name 'gcc-self)))
(and group (gnus-group-find-parameter group 'gcc-self)))
result
(groups
(cond
......
This diff is collapsed.
......@@ -228,50 +228,6 @@ See the Gnus manual for an explanation of the syntax used.")
(pop list))
(cadr (assq (car list) gnus-window-configuration)))
(defun gnus-windows-old-to-new (setting)
;; First we take care of the really, really old Gnus 3 actions.
(when (symbolp setting)
(setq setting
;; Take care of ooold GNUS 3.x values.
(cond ((eq setting 'SelectArticle) 'article)
((memq setting '(SelectNewsgroup SelectSubject ExpandSubject))
'summary)
((memq setting '(ExitNewsgroup)) 'group)
(t setting))))
(if (or (listp setting)
(not (and gnus-window-configuration
(memq setting '(group summary article)))))
setting
(let* ((elem
(cond
((eq setting 'group)
(gnus-window-configuration-element
'(group newsgroups ExitNewsgroup)))
((eq setting 'summary)
(gnus-window-configuration-element
'(summary SelectNewsgroup SelectSubject ExpandSubject)))
((eq setting 'article)
(gnus-window-configuration-element
'(article SelectArticle)))))
(total (apply '+ elem))
(types '(group summary article))
(pbuf (if (eq setting 'newsgroups) 'group 'summary))
(i 0)
perc out)
(while (< i 3)
(or (not (numberp (nth i elem)))
(zerop (nth i elem))
(progn
(setq perc (if (= i 2)
1.0
(/ (float (nth i elem)) total)))
(push (if (eq pbuf (nth i types))
(list (nth i types) perc 'point)
(list (nth i types) perc))
out)))
(incf i))
`(vertical 1.0 ,@(nreverse out)))))
;;;###autoload
(defun gnus-add-configuration (conf)
"Add the window configuration CONF to `gnus-buffer-configuration'."
......@@ -293,18 +249,9 @@ See the Gnus manual for an explanation of the syntax used.")
(defun gnus-configure-frame (split &optional window)
"Split WINDOW according to SPLIT."
(let ((current-window
(or (get-buffer-window (current-buffer)) (selected-window))))
(unless window
(setq window current-window))
(let* ((current-window (or (get-buffer-window (current-buffer)) (selected-window)))
(window (or window current-window)))
(select-window window)
;; This might be an old-style buffer config.
(when (vectorp split)
(setq split (append split nil)))
(when (or (consp (car split))
(vectorp (car split)))
(push 1.0 split)
(push 'vertical split))
;; The SPLIT might be something that is to be evaled to
;; return a new SPLIT.
(while (and (not (assq (car split) gnus-window-to-buffer))
......@@ -423,56 +370,55 @@ See the Gnus manual for an explanation of the syntax used.")
(set-window-configuration setting)
(setq gnus-current-window-configuration setting)
(setq force (or force gnus-always-force-window-configuration))
(setq setting (gnus-windows-old-to-new setting))
(let ((split (if (symbolp setting)
(cadr (assq setting gnus-buffer-configuration))
setting))
all-visible)
(cadr (assq setting gnus-buffer-configuration))
setting))
all-visible)
(setq gnus-frame-split-p nil)
(unless split
(error "No such setting in `gnus-buffer-configuration': %s" setting))
(error "No such setting in `gnus-buffer-configuration': %s" setting))
(if (and (setq all-visible (gnus-all-windows-visible-p split))
(not force))
;; All the windows mentioned are already visible, so we just
;; put point in the assigned buffer, and do not touch the
;; winconf.
(select-window all-visible)
;; Make sure "the other" buffer, nntp-server-buffer, is live.
(unless (gnus-buffer-live-p nntp-server-buffer)
(nnheader-init-server-buffer))