* [PATCH] Autoload `message-y-or-n-p' macro in gnus.el at compile time.
@ 2004-01-15 9:36 Steve Youngs
2004-01-15 9:51 ` [PATCH] Autoload `message-y-or-n-p' macro in gnus.el at compile Simon Josefsson
0 siblings, 1 reply; 7+ messages in thread
From: Steve Youngs @ 2004-01-15 9:36 UTC (permalink / raw)
[-- Attachment #1: Type: text/plain, Size: 1807 bytes --]
Over at XEmacs.org, they've got a couple of awk scripts to help them
find mis-compiled macros and stuff. It turned up this
one... `message-y-or-n-p', which is defined in message.el isn't
getting picked up in gnus.el (where it's used in `gnu-read-group').
Anyway, I was just about to commit this when I had a thought (yep,
occasionally I do have em). Should this patch go into gnus.el, or
into dgnushack.el?
Gnus patch:
ChangeLog files diff command: cvs -q diff -U 0
Files affected: lisp/ChangeLog
Source files diff command: cvs -q diff -uN
Files affected: lisp/gnus.el
Index: lisp/ChangeLog
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/ChangeLog,v
retrieving revision 7.86
diff -u -U0 -r7.86 ChangeLog
--- lisp/ChangeLog 14 Jan 2004 14:32:21 -0000 7.86
+++ lisp/ChangeLog 15 Jan 2004 09:30:19 -0000
@@ -0,0 +1,4 @@
+2004-01-15 Steve Youngs <sryoungs@bigpond.net.au>
+
+ * gnus.el: Autoload `message-y-or-n-p'.
+
Index: lisp/gnus.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/gnus.el,v
retrieving revision 7.6
diff -u -u -r7.6 gnus.el
--- lisp/gnus.el 10 Jan 2004 04:26:59 -0000 7.6
+++ lisp/gnus.el 15 Jan 2004 09:30:15 -0000
@@ -3909,6 +3909,9 @@
(setq valids (cdr valids)))
outs))
+(eval-when-compile
+ (autoload 'message-y-or-n-p "message" nil 'macro))
+
(defun gnus-read-group (prompt &optional default)
"Prompt the user for a group name.
Disallow invalid group names."
--
|---<Steve Youngs>---------------<GnuPG KeyID: A94B3003>---|
| Ashes to ashes, dust to dust. |
| The proof of the pudding, is under the crust. |
|------------------------------<sryoungs@bigpond.net.au>---|
[-- Attachment #2: Type: application/pgp-signature, Size: 256 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Autoload `message-y-or-n-p' macro in gnus.el at compile
2004-01-15 9:36 [PATCH] Autoload `message-y-or-n-p' macro in gnus.el at compile time Steve Youngs
@ 2004-01-15 9:51 ` Simon Josefsson
2004-01-15 11:22 ` Steve Youngs
0 siblings, 1 reply; 7+ messages in thread
From: Simon Josefsson @ 2004-01-15 9:51 UTC (permalink / raw)
Steve Youngs <sryoungs@bigpond.net.au> writes:
> Over at XEmacs.org, they've got a couple of awk scripts to help them
> find mis-compiled macros and stuff. It turned up this
> one... `message-y-or-n-p', which is defined in message.el isn't
> getting picked up in gnus.el (where it's used in `gnu-read-group').
I think gnus-read-group should be fixed. There is a `gnus-y-or-n-p'.
> Anyway, I was just about to commit this when I had a thought (yep,
> occasionally I do have em). Should this patch go into gnus.el, or
> into dgnushack.el?
If gnus-read-group is fixed, is it still required?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Autoload `message-y-or-n-p' macro in gnus.el at compile
2004-01-15 9:51 ` [PATCH] Autoload `message-y-or-n-p' macro in gnus.el at compile Simon Josefsson
@ 2004-01-15 11:22 ` Steve Youngs
2004-01-15 12:18 ` Reiner Steib
2004-01-15 13:28 ` Simon Josefsson
0 siblings, 2 replies; 7+ messages in thread
From: Steve Youngs @ 2004-01-15 11:22 UTC (permalink / raw)
[-- Attachment #1: Type: text/plain, Size: 1436 bytes --]
* Simon Josefsson <jas@extundo.com> writes:
> Steve Youngs <sryoungs@bigpond.net.au> writes:
>> Over at XEmacs.org, they've got a couple of awk scripts to help them
>> find mis-compiled macros and stuff. It turned up this
>> one... `message-y-or-n-p', which is defined in message.el isn't
>> getting picked up in gnus.el (where it's used in `gnu-read-group').
> I think gnus-read-group should be fixed. There is a `gnus-y-or-n-p'.
Who says it's broken? And besides, `gnus-y-or-n-p' and
`message-y-or-n-p' are _very_ different animals. The former is not
much more that `y-or-no-p' with a different name, but the latter has
the option of displaying a "help" buffer as well as the prompt.
>> Anyway, I was just about to commit this when I had a thought (yep,
>> occasionally I do have em). Should this patch go into gnus.el, or
>> into dgnushack.el?
> If gnus-read-group is fixed, is it still required?
By the time you "fixed" `gnus-read-group', _maintaining it's current
intended functionality_, you will have re-invented `message-y-or-n-p'.
So what'd be the point, especially when a quick (eval-when-compile
(autoload macro)) will do the job just as well?
--
|---<Steve Youngs>---------------<GnuPG KeyID: A94B3003>---|
| Ashes to ashes, dust to dust. |
| The proof of the pudding, is under the crust. |
|------------------------------<sryoungs@bigpond.net.au>---|
[-- Attachment #2: Type: application/pgp-signature, Size: 256 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Autoload `message-y-or-n-p' macro in gnus.el at compile
2004-01-15 11:22 ` Steve Youngs
@ 2004-01-15 12:18 ` Reiner Steib
2004-01-15 13:28 ` Simon Josefsson
1 sibling, 0 replies; 7+ messages in thread
From: Reiner Steib @ 2004-01-15 12:18 UTC (permalink / raw)
On Thu, Jan 15 2004, Steve Youngs wrote:
> By the time you "fixed" `gnus-read-group', _maintaining it's current
> intended functionality_, you will have re-invented `message-y-or-n-p'.
> So what'd be the point, especially when a quick (eval-when-compile
> (autoload macro)) will do the job just as well?
I don't know which solution is preferable:
(1) Your suggestion:
(eval-when-compile
(autoload 'message-y-or-n-p "message" nil 'macro))
(2) Adding `message-y-or-n-p' to the existing `eval-and-compile' form:
,----
| ;; Define some autoload functions Gnus might use.
| (eval-and-compile
|
| ;; This little mapcar goes through the list below and marks the
| ;; symbols in question as autoloaded functions.
| [...]
`----
--8<---------------cut here---------------start------------->8---
--- gnus.el.~7.6.~ Sun Jan 11 18:44:40 2004
+++ gnus.el Thu Jan 15 13:11:48 2004
@@ -2556,7 +2556,7 @@
("qp" quoted-printable-decode-region quoted-printable-decode-string)
("ps-print" ps-print-preprint)
("message" :interactive t
- message-send-and-exit message-yank-original)
+ message-send-and-exit message-yank-original message-y-or-n-p)
("babel" babel-as-string)
("nnmail" nnmail-split-fancy nnmail-article-group)
("nnvirtual" nnvirtual-catchup-group nnvirtual-convert-headers)
--8<---------------cut here---------------end--------------->8---
Bye, Reiner.
--
,,,
(o o)
---ooO-(_)-Ooo--- PGP key available via WWW http://rsteib.home.pages.de/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Autoload `message-y-or-n-p' macro in gnus.el at compile
2004-01-15 11:22 ` Steve Youngs
2004-01-15 12:18 ` Reiner Steib
@ 2004-01-15 13:28 ` Simon Josefsson
2004-01-15 21:51 ` Steve Youngs
2004-01-16 20:56 ` Xavier Maillard
1 sibling, 2 replies; 7+ messages in thread
From: Simon Josefsson @ 2004-01-15 13:28 UTC (permalink / raw)
Steve Youngs <sryoungs@bigpond.net.au> writes:
> * Simon Josefsson <jas@extundo.com> writes:
>
> > Steve Youngs <sryoungs@bigpond.net.au> writes:
> >> Over at XEmacs.org, they've got a couple of awk scripts to help them
> >> find mis-compiled macros and stuff. It turned up this
> >> one... `message-y-or-n-p', which is defined in message.el isn't
> >> getting picked up in gnus.el (where it's used in `gnu-read-group').
>
> > I think gnus-read-group should be fixed. There is a `gnus-y-or-n-p'.
>
> Who says it's broken? And besides, `gnus-y-or-n-p' and
> `message-y-or-n-p' are _very_ different animals. The former is not
> much more that `y-or-no-p' with a different name, but the latter has
> the option of displaying a "help" buffer as well as the prompt.
Ah, sorry. Then I agree with your patch, but shouldn't there be
another nil in there? (autoload 'message-y-or-n-p "message" nil
'macro) makes the INTERACTIVE argument 'macro, which seems weird.
(autoload FUNCTION FILE &optional DOCSTRING INTERACTIVE TYPE)
Fifth arg TYPE indicates the type of the object:
nil or omitted says FUNCTION is a function,
`keymap' says FUNCTION is really a keymap, and
`macro' or t says FUNCTION is really a macro.
> >> Anyway, I was just about to commit this when I had a thought (yep,
> >> occasionally I do have em). Should this patch go into gnus.el, or
> >> into dgnushack.el?
>
> > If gnus-read-group is fixed, is it still required?
>
> By the time you "fixed" `gnus-read-group', _maintaining it's current
> intended functionality_, you will have re-invented `message-y-or-n-p'.
> So what'd be the point, especially when a quick (eval-when-compile
> (autoload macro)) will do the job just as well?
None, I was mislead by the function names. I assumed message-y-or-n-p
and gnus-y-or-n-p was yet another duplicated function definition.
OTTH, I guess the functionality provided by message-y-or-n-p might be
a candidate for moving into a "utilities" library, it seems generally
useful. Especially now that both Message and Gnus use it.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Autoload `message-y-or-n-p' macro in gnus.el at compile
2004-01-15 13:28 ` Simon Josefsson
@ 2004-01-15 21:51 ` Steve Youngs
2004-01-16 20:56 ` Xavier Maillard
1 sibling, 0 replies; 7+ messages in thread
From: Steve Youngs @ 2004-01-15 21:51 UTC (permalink / raw)
[-- Attachment #1: Type: text/plain, Size: 628 bytes --]
* Simon Josefsson <jas@extundo.com> writes:
> Ah, sorry. Then I agree with your patch, but shouldn't there be
> another nil in there? (autoload 'message-y-or-n-p "message" nil
> 'macro) makes the INTERACTIVE argument 'macro, which seems weird.
Yep, you're right. I must have been in too much of a hurry when I
sent the patch. A correct patch has been applied to CVS.
--
|---<Steve Youngs>---------------<GnuPG KeyID: A94B3003>---|
| Ashes to ashes, dust to dust. |
| The proof of the pudding, is under the crust. |
|------------------------------<sryoungs@bigpond.net.au>---|
[-- Attachment #2: Type: application/pgp-signature, Size: 256 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Autoload `message-y-or-n-p' macro in gnus.el at compile
2004-01-15 13:28 ` Simon Josefsson
2004-01-15 21:51 ` Steve Youngs
@ 2004-01-16 20:56 ` Xavier Maillard
1 sibling, 0 replies; 7+ messages in thread
From: Xavier Maillard @ 2004-01-16 20:56 UTC (permalink / raw)
[-- Attachment #1: Type: text/plain, Size: 449 bytes --]
On 15 Jan 2004, Simon Josefsson said:
<snip>
> OTTH, I guess the functionality provided by message-y-or-n-p might be
> a candidate for moving into a "utilities" library, it seems generally
> useful. Especially now that both Message and Gnus use it.
Yep I agree with that and since we have discussed about that before, it
makes me think, it is more than needed ;)
zeDek
--
.o. Xavier Maillard Tel: +33 6 68 04 64 37
..o
ooo
[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2004-01-16 20:56 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-15 9:36 [PATCH] Autoload `message-y-or-n-p' macro in gnus.el at compile time Steve Youngs
2004-01-15 9:51 ` [PATCH] Autoload `message-y-or-n-p' macro in gnus.el at compile Simon Josefsson
2004-01-15 11:22 ` Steve Youngs
2004-01-15 12:18 ` Reiner Steib
2004-01-15 13:28 ` Simon Josefsson
2004-01-15 21:51 ` Steve Youngs
2004-01-16 20:56 ` Xavier Maillard
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).