Gnus development mailing list
 help / color / mirror / Atom feed
From: Raymond Scholz <ray-2003@zonix.de>
Subject: Re: Extending `gnus-confirm-mail-reply-to-news'?
Date: Sun, 12 Jan 2003 16:37:28 +0100	[thread overview]
Message-ID: <gd.y1yptr29y6f.fsf@fly.verified.de> (raw)
In-Reply-To: <m3k7ha5u5e.fsf@quimbies.gnus.org>

[-- Attachment #1: Type: text/plain, Size: 697 bytes --]

* Lars Magne Ingebrigtsen <larsi@gnus.org> wrote:

> Sounds useful to me, so I've applied the patch.  Could you send me a
> ChangeLog entry (as well as the documentation)?

Here it is with some typos fixed in gnus-msg.el as well.  And if
`gnus-confirm-mail-reply-to-news' is defined as a function, the group
name is passed as an argument now.

2003-01-12  Raymond Scholz  <ray-2003@zonix.de>

	* gnus-msg.el (gnus-confirm-mail-reply-to-news):  May be a
	regexp or a function too.
	(gnus-confirm-treat-mail-like-news): New variable.  Ask for
	confirmation even if the original article is mail.

Cheers, Ray
-- 
Ich bin ein Fenster-Wechsel-Fetischist.
                              (Kai Großjohann)

[-- Attachment #2: patch.01 --]
[-- Type: application/octet-stream, Size: 2632 bytes --]

Index: lisp/gnus-msg.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/gnus-msg.el,v
retrieving revision 6.113
diff -u -r6.113 gnus-msg.el
--- lisp/gnus-msg.el	2003/01/12 14:37:20	6.113
+++ lisp/gnus-msg.el	2003/01/12 15:36:30
@@ -257,12 +257,13 @@
   "If non-nil, Gnus requests confirmation when replying to news.
 This is done because new users often reply by mistake when reading
 news.
-This can also be a function which should return non-nil iff a
-confirmation is needed, or a regexp, in which case a confirmation is
-asked if the group name matches the regexp."
+This can also be a function receiving the group name as the only
+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."
   :group 'gnus-message
   :type '(choice (const :tag "No" nil)
-		 (const :tag "Yes" nil)
+		 (const :tag "Yes" t)
 		 (regexp :tag "Iff group matches regexp")
 		 (function :tag "Iff function evaluates to non-nil")))
 
@@ -1060,7 +1061,7 @@
 	    (not (cond ((stringp gnus-confirm-mail-reply-to-news)
 			(string-match gnus-confirm-mail-reply-to-news gnus-newsgroup-name))
 		       ((functionp gnus-confirm-mail-reply-to-news)
-			(funcall gnus-confirm-mail-reply-to-news))
+			(funcall gnus-confirm-mail-reply-to-news gnus-newsgroup-name))
 		       (t gnus-confirm-mail-reply-to-news)))
 	    (y-or-n-p "Really reply by mail to article author? "))
     (let* ((article
Index: texi/gnus.texi
===================================================================
RCS file: /usr/local/cvsroot/gnus/texi/gnus.texi,v
retrieving revision 6.381
diff -u -r6.381 gnus.texi
--- texi/gnus.texi	2003/01/12 14:37:33	6.381
+++ texi/gnus.texi	2003/01/12 15:38:11
@@ -10997,8 +10997,19 @@
 @item gnus-confirm-mail-reply-to-news
 @vindex gnus-confirm-mail-reply-to-news
 If non-@code{nil}, Gnus requests confirmation when replying to news.
+This can also be a function receiving the group name as the only
+parameter which should return non-@code{nil} if a confirmation is
+needed, or a regular expression matching group names, where
+confirmation is should be asked for.
+
 If you find yourself never wanting to reply to mail, but occasionally
 press R anyway, this variable might be for you.
+
+@item gnus-confirm-treat-mail-like-news
+@vindex gnus-confirm-treat-mail-like-news
+If non-@code{nil}, Gnus also requests confirmation according to
+@code{gnus-confirm-mail-reply-to-news} when replying to mail.  This is
+useful for treating mailing lists like newsgroups.
 
 @end table
 

  reply	other threads:[~2003-01-12 15:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-12 14:11 Raymond Scholz
2003-01-12 14:18 ` Lars Magne Ingebrigtsen
2003-01-12 15:37   ` Raymond Scholz [this message]
2003-01-12 19:53     ` Lars Magne Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=gd.y1yptr29y6f.fsf@fly.verified.de \
    --to=ray-2003@zonix.de \
    --cc=rscholz@zonix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).