* setq-default docstring fix
@ 2004-05-04 17:37 Romain Francoise
2004-05-04 17:43 ` Romain Francoise
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Romain Francoise @ 2004-05-04 17:37 UTC (permalink / raw)
Hi,
The docstring for setq-default mentions an argument named VAR, but it
is really named SYMBOL. Could someone please install this?
(Bug exposed by Juanma's very nice changes to help-fns.)
2004-05-04 Romain Francoise <romain@orebokech.com> (tiny change)
* data.c: Fix docstring.
Index: src/data.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/data.c,v
retrieving revision 1.236
diff -c -r1.236 data.c
*** src/data.c 29 Apr 2004 18:21:48 -0000 1.236
--- src/data.c 4 May 2004 17:30:42 -0000
***************
*** 1461,1468 ****
}
DEFUN ("setq-default", Fsetq_default, Ssetq_default, 2, UNEVALLED, 0,
! doc: /* Set the default value of variable VAR to VALUE.
! VAR, the variable name, is literal (not evaluated);
VALUE is an expression: it is evaluated and its value returned.
The default value of a variable is seen in buffers
that do not have their own values for the variable.
--- 1461,1468 ----
}
DEFUN ("setq-default", Fsetq_default, Ssetq_default, 2, UNEVALLED, 0,
! doc: /* Set the default value of variable SYMBOL to VALUE.
! SYMBOL, the variable name, is literal (not evaluated);
VALUE is an expression: it is evaluated and its value returned.
The default value of a variable is seen in buffers
that do not have their own values for the variable.
--
Romain Francoise <romain@orebokech.com> | There are doors that open by
it's a miracle -- http://orebokech.com/ | themselves.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: setq-default docstring fix
2004-05-04 17:37 setq-default docstring fix Romain Francoise
@ 2004-05-04 17:43 ` Romain Francoise
2004-05-04 17:53 ` Stefan Monnier
2004-05-05 20:20 ` Richard Stallman
2 siblings, 0 replies; 7+ messages in thread
From: Romain Francoise @ 2004-05-04 17:43 UTC (permalink / raw)
Romain Francoise <romain@orebokech.com> writes:
> 2004-05-04 Romain Francoise <romain@orebokech.com> (tiny change)
> * data.c: Fix docstring.
Or, rather,
2004-05-04 Romain Francoise <romain@orebokech.com> (tiny change)
* data.c (Fsetq_default): Fix docstring.
--
Romain Francoise <romain@orebokech.com> | It was fourteen degrees below
it's a miracle -- http://orebokech.com/ | on a screeching march 23.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: setq-default docstring fix
2004-05-04 17:37 setq-default docstring fix Romain Francoise
2004-05-04 17:43 ` Romain Francoise
@ 2004-05-04 17:53 ` Stefan Monnier
2004-05-04 18:06 ` Romain Francoise
2004-05-04 18:29 ` Juri Linkov
2004-05-05 20:20 ` Richard Stallman
2 siblings, 2 replies; 7+ messages in thread
From: Stefan Monnier @ 2004-05-04 17:53 UTC (permalink / raw)
> The docstring for setq-default mentions an argument named VAR, but it
> is really named SYMBOL. Could someone please install this?
I'd rather fix the arglist to use `var'.
Stefan
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: setq-default docstring fix
2004-05-04 17:53 ` Stefan Monnier
@ 2004-05-04 18:06 ` Romain Francoise
2004-05-04 18:29 ` Juri Linkov
1 sibling, 0 replies; 7+ messages in thread
From: Romain Francoise @ 2004-05-04 18:06 UTC (permalink / raw)
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> I'd rather fix the arglist to use `var'.
Okay then.
Index: src/data.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/data.c,v
retrieving revision 1.236
diff -c -r1.236 data.c
*** src/data.c 29 Apr 2004 18:21:48 -0000 1.236
--- src/data.c 4 May 2004 18:05:49 -0000
***************
*** 1468,1478 ****
that do not have their own values for the variable.
More generally, you can use multiple variables and values, as in
! (setq-default SYMBOL VALUE SYMBOL VALUE...)
! This sets each SYMBOL's default value to the corresponding VALUE.
! The VALUE for the Nth SYMBOL can refer to the new default values
of previous SYMs.
! usage: (setq-default SYMBOL VALUE [SYMBOL VALUE...]) */)
(args)
Lisp_Object args;
{
--- 1468,1478 ----
that do not have their own values for the variable.
More generally, you can use multiple variables and values, as in
! (setq-default VAR VALUE VAR VALUE...)
! This sets each VAR's default value to the corresponding VALUE.
! The VALUE for the Nth VAR can refer to the new default values
of previous SYMs.
! usage: (setq-default VAR VALUE [VAR VALUE...]) */)
(args)
Lisp_Object args;
{
--
Romain Francoise <romain@orebokech.com> | All you've been is a piece of
it's a miracle -- http://orebokech.com/ | blood wrapped in skin.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: setq-default docstring fix
2004-05-04 17:53 ` Stefan Monnier
2004-05-04 18:06 ` Romain Francoise
@ 2004-05-04 18:29 ` Juri Linkov
1 sibling, 0 replies; 7+ messages in thread
From: Juri Linkov @ 2004-05-04 18:29 UTC (permalink / raw)
Cc: emacs-devel
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> The docstring for setq-default mentions an argument named VAR, but it
>> is really named SYMBOL. Could someone please install this?
>
> I'd rather fix the arglist to use `var'.
The Emacs Lisp reference manual describes it as `symbol'. But then it
uses `form' instead of `value' for the second argument. I don't have
an opinion about the name, I only want to point out that it should be
consistently used in all documentation.
BTW, I suggest to change the argument names of `rassq' and `rassoc' too:
Index: emacs/src/fns.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/fns.c,v
retrieving revision 1.362
diff -u -r1.362 fns.c
--- emacs/src/fns.c 26 Apr 2004 21:44:22 -0000 1.362
+++ emacs/src/fns.c 1 May 2004 04:04:32 -0000
@@ -1603,10 +1603,10 @@
}
DEFUN ("rassq", Frassq, Srassq, 2, 2, 0,
- doc: /* Return non-nil if KEY is `eq' to the cdr of an element of LIST.
-The value is actually the first element of LIST whose cdr is KEY. */)
- (key, list)
- register Lisp_Object key;
+ doc: /* Return non-nil if VALUE is `eq' to the cdr of an element of LIST.
+The value is actually the first element of LIST whose cdr is VALUE. */)
+ (value, list)
+ register Lisp_Object value;
Lisp_Object list;
{
Lisp_Object result;
@@ -1615,19 +1615,19 @@
{
if (!CONSP (list)
|| (CONSP (XCAR (list))
- && EQ (XCDR (XCAR (list)), key)))
+ && EQ (XCDR (XCAR (list)), value)))
break;
list = XCDR (list);
if (!CONSP (list)
|| (CONSP (XCAR (list))
- && EQ (XCDR (XCAR (list)), key)))
+ && EQ (XCDR (XCAR (list)), value)))
break;
list = XCDR (list);
if (!CONSP (list)
|| (CONSP (XCAR (list))
- && EQ (XCDR (XCAR (list)), key)))
+ && EQ (XCDR (XCAR (list)), value)))
break;
list = XCDR (list);
@@ -1645,10 +1645,10 @@
}
DEFUN ("rassoc", Frassoc, Srassoc, 2, 2, 0,
- doc: /* Return non-nil if KEY is `equal' to the cdr of an element of LIST.
-The value is actually the first element of LIST whose cdr equals KEY. */)
- (key, list)
- Lisp_Object key, list;
+ doc: /* Return non-nil if VALUE is `equal' to the cdr of an element of LIST.
+The value is actually the first element of LIST whose cdr equals VALUE. */)
+ (value, list)
+ Lisp_Object value, list;
{
Lisp_Object result, cdr;
@@ -1657,21 +1657,21 @@
if (!CONSP (list)
|| (CONSP (XCAR (list))
&& (cdr = XCDR (XCAR (list)),
- EQ (cdr, key) || !NILP (Fequal (cdr, key)))))
+ EQ (cdr, value) || !NILP (Fequal (cdr, value)))))
break;
list = XCDR (list);
if (!CONSP (list)
|| (CONSP (XCAR (list))
&& (cdr = XCDR (XCAR (list)),
- EQ (cdr, key) || !NILP (Fequal (cdr, key)))))
+ EQ (cdr, value) || !NILP (Fequal (cdr, value)))))
break;
list = XCDR (list);
if (!CONSP (list)
|| (CONSP (XCAR (list))
&& (cdr = XCDR (XCAR (list)),
- EQ (cdr, key) || !NILP (Fequal (cdr, key)))))
+ EQ (cdr, value) || !NILP (Fequal (cdr, value)))))
break;
list = XCDR (list);
--
Juri Linkov
http://www.jurta.org/emacs/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: setq-default docstring fix
2004-05-04 17:37 setq-default docstring fix Romain Francoise
2004-05-04 17:43 ` Romain Francoise
2004-05-04 17:53 ` Stefan Monnier
@ 2004-05-05 20:20 ` Richard Stallman
2004-05-05 20:56 ` Romain Francoise
2 siblings, 1 reply; 7+ messages in thread
From: Richard Stallman @ 2004-05-05 20:20 UTC (permalink / raw)
Cc: emacs-devel
The docstring for setq-default mentions an argument named VAR, but it
is really named SYMBOL.
How did do you reach the conclusion that SYMBOL is its real name?
As far as I can see, the doc string calls in VAR part of the time
and SYMBOL part of the time, which you could think of as an inconsistency,
but was not a real inconsistency the way it was done.
But it would lose nothing to change it to say VAR uniformly.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: setq-default docstring fix
2004-05-05 20:20 ` Richard Stallman
@ 2004-05-05 20:56 ` Romain Francoise
0 siblings, 0 replies; 7+ messages in thread
From: Romain Francoise @ 2004-05-05 20:56 UTC (permalink / raw)
Cc: emacs-devel
Richard Stallman <rms@gnu.org> writes:
> As far as I can see, the doc string calls in VAR part of the time and
> SYMBOL part of the time, which you could think of as an inconsistency,
> but was not a real inconsistency the way it was done.
Yes, I was merely suggesting we should fix the inconsistency. A new
feature was installed in HEAD that makes arguments from the arglist be
displayed in another color in the docstring: VAR wasn't highlighted when
VALUE and SYMBOL were. It might be confusing to less experienced users.
> But it would lose nothing to change it to say VAR uniformly.
I already sent a patch to that effect to emacs-devel.
--
Romain Francoise <romain@orebokech.com> | Shine the headlight, straight
it's a miracle -- http://orebokech.com/ | into my eyes.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2004-05-05 20:56 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-04 17:37 setq-default docstring fix Romain Francoise
2004-05-04 17:43 ` Romain Francoise
2004-05-04 17:53 ` Stefan Monnier
2004-05-04 18:06 ` Romain Francoise
2004-05-04 18:29 ` Juri Linkov
2004-05-05 20:20 ` Richard Stallman
2004-05-05 20:56 ` Romain Francoise
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.