unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: Why looking-at-p works?
       [not found]       ` <87efkwtfp1.fsf@mbork.pl>
@ 2018-03-07 13:06         ` Marcin Borkowski
  2018-03-07 19:53           ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Marcin Borkowski @ 2018-03-07 13:06 UTC (permalink / raw)
  To: Emacs developers; +Cc: John Mastro, Drew Adams

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

How about this patch?

On 2018-03-07, at 10:09, Marcin Borkowski <mbork@mbork.pl> wrote:

> On 2018-03-06, at 23:23, Drew Adams <drew.adams@oracle.com> wrote:
>
>>> Where is it documented?  I could find it neither in the Elisp
>>> Reference nor in let's docstring.
>>
>> You might need to read a tiny bit between the lines, but this
>> (from (elisp) `Local Variables') pretty much suggests it:
>>
>>   Sometimes it is useful to give a variable a "local value"-a
>>   value that takes effect only within a certain part of a Lisp
>>   program.
>>
>> It might have said "is in effect" instead of "takes effect".
>>
>>   To take another example, the 'let' special form explicitly
>>   establishes local bindings for specific variables, which
>>   take effect within the body of the 'let' form.
>>
>> Again, "are in effect only" instead of "take effect".
>>
>> (Consider suggesting a doc improvement for this point -
>> `M-x report-emacs-bug'.  And yes, probably the doc string
>> should mention "_local_ variable".)
>
> Thanks (to you, and also to Nick) for pointing me here.  I would not
> call this very explicit;-).  I'll try to prepare a patch for the docs
> today.
>
> Best,


-- 
Marcin Borkowski
http://mbork.pl

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Reword-docs-of-let-and-let.patch --]
[-- Type: text/x-patch, Size: 2541 bytes --]

From dfd9978d839eccf744835e2e1daed9e140800214 Mon Sep 17 00:00:00 2001
From: Marcin Borkowski <mbork@mbork.pl>
Date: Wed, 7 Mar 2018 14:03:57 +0100
Subject: [PATCH] Reword docs of let and let*

Make it slightly more prominent that local bindings are destroyed in
case of an error within let's body.
---
 doc/lispref/variables.texi | 4 ++--
 src/eval.c                 | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi
index e025d3fd10..49eba3816e 100644
--- a/doc/lispref/variables.texi
+++ b/doc/lispref/variables.texi
@@ -155,7 +155,7 @@ Local Variables
 
   Global variables have values that last until explicitly superseded
 with new values.  Sometimes it is useful to give a variable a
-@dfn{local value}---a value that takes effect only within a certain
+@dfn{local value}---a value that is in effect only within a certain
 part of a Lisp program.  When a variable has a local value, we say
 that it is @dfn{locally bound} to that value, and that it is a
 @dfn{local variable}.
@@ -165,7 +165,7 @@ Local Variables
 function call; these local bindings take effect within the body of the
 function.  To take another example, the @code{let} special form
 explicitly establishes local bindings for specific variables, which
-take effect within the body of the @code{let} form.
+are in effect only within the body of the @code{let} form.
 
   We also speak of the @dfn{global binding}, which is where
 (conceptually) the global value is kept.
diff --git a/src/eval.c b/src/eval.c
index 08a73b1e4a..bc08f0d084 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -843,7 +843,7 @@ DEFUN ("internal-make-var-non-special", Fmake_var_non_special,
 
 \f
 DEFUN ("let*", FletX, SletX, 1, UNEVALLED, 0,
-       doc: /* Bind variables according to VARLIST then eval BODY.
+       doc: /* Bind local variables according to VARLIST then eval BODY.
 The value of the last form in BODY is returned.
 Each element of VARLIST is a symbol (which is bound to nil)
 or a list (SYMBOL VALUEFORM) (which binds SYMBOL to the value of VALUEFORM).
@@ -902,7 +902,7 @@ usage: (let* VARLIST BODY...)  */)
 }
 
 DEFUN ("let", Flet, Slet, 1, UNEVALLED, 0,
-       doc: /* Bind variables according to VARLIST then eval BODY.
+       doc: /* Bind local variables according to VARLIST then eval BODY.
 The value of the last form in BODY is returned.
 Each element of VARLIST is a symbol (which is bound to nil)
 or a list (SYMBOL VALUEFORM) (which binds SYMBOL to the value of VALUEFORM).
-- 
2.16.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: Why looking-at-p works?
  2018-03-07 13:06         ` Why looking-at-p works? Marcin Borkowski
@ 2018-03-07 19:53           ` Eli Zaretskii
  2018-03-08  4:20             ` Marcin Borkowski
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2018-03-07 19:53 UTC (permalink / raw)
  To: Marcin Borkowski; +Cc: john.b.mastro, drew.adams, emacs-devel

> From: Marcin Borkowski <mbork@mbork.pl>
> Date: Wed, 07 Mar 2018 14:06:29 +0100
> Cc: John Mastro <john.b.mastro@gmail.com>, Drew Adams <drew.adams@oracle.com>
> 
> How about this patch?

Thanks, I fixed this with a slightly different text, and I see no need
to change the doc string in eval.c.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Why looking-at-p works?
  2018-03-07 19:53           ` Eli Zaretskii
@ 2018-03-08  4:20             ` Marcin Borkowski
  2018-03-08  4:40               ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Marcin Borkowski @ 2018-03-08  4:20 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: john.b.mastro, drew.adams, emacs-devel


On 2018-03-07, at 20:53, Eli Zaretskii <eliz@gnu.org> wrote:

>> From: Marcin Borkowski <mbork@mbork.pl>
>> Date: Wed, 07 Mar 2018 14:06:29 +0100
>> Cc: John Mastro <john.b.mastro@gmail.com>, Drew Adams <drew.adams@oracle.com>
>> 
>> How about this patch?
>
> Thanks, I fixed this with a slightly different text, and I see no need
> to change the doc string in eval.c.

Out of curiosity, where can I see your changes?

-- 
Marcin Borkowski
http://mbork.pl



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Why looking-at-p works?
  2018-03-08  4:20             ` Marcin Borkowski
@ 2018-03-08  4:40               ` Eli Zaretskii
  2018-03-08 20:33                 ` Marcin Borkowski
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2018-03-08  4:40 UTC (permalink / raw)
  To: emacs-devel, Marcin Borkowski; +Cc: john.b.mastro, drew.adams

On March 8, 2018 6:20:17 AM GMT+02:00, Marcin Borkowski <mbork@mbork.pl> wrote:
> 
> On 2018-03-07, at 20:53, Eli Zaretskii <eliz@gnu.org> wrote:
> 
> >> From: Marcin Borkowski <mbork@mbork.pl>
> >> Date: Wed, 07 Mar 2018 14:06:29 +0100
> >> Cc: John Mastro <john.b.mastro@gmail.com>, Drew Adams
> <drew.adams@oracle.com>
> >> 
> >> How about this patch?
> >
> > Thanks, I fixed this with a slightly different text, and I see no
> need
> > to change the doc string in eval.c.
> 
> Out of curiosity, where can I see your changes?

On the release branch.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Why looking-at-p works?
  2018-03-08  4:40               ` Eli Zaretskii
@ 2018-03-08 20:33                 ` Marcin Borkowski
  0 siblings, 0 replies; 5+ messages in thread
From: Marcin Borkowski @ 2018-03-08 20:33 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: john.b.mastro, drew.adams, emacs-devel


On 2018-03-08, at 05:40, Eli Zaretskii <eliz@gnu.org> wrote:

> On March 8, 2018 6:20:17 AM GMT+02:00, Marcin Borkowski <mbork@mbork.pl> wrote:
>> 
>> On 2018-03-07, at 20:53, Eli Zaretskii <eliz@gnu.org> wrote:
>> 
>> >> From: Marcin Borkowski <mbork@mbork.pl>
>> >> Date: Wed, 07 Mar 2018 14:06:29 +0100
>> >> Cc: John Mastro <john.b.mastro@gmail.com>, Drew Adams
>> <drew.adams@oracle.com>
>> >> 
>> >> How about this patch?
>> >
>> > Thanks, I fixed this with a slightly different text, and I see no
>> need
>> > to change the doc string in eval.c.
>> 
>> Out of curiosity, where can I see your changes?
>
> On the release branch.

Thanks.

-- 
Marcin Borkowski
http://mbork.pl



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-03-08 20:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <87tvtttz49.fsf@mbork.pl>
     [not found] ` <CAOj2CQQNkxYH7BUzEFQY-MiRf44eq_-6FHn-MXhQE_cXsCHR=Q@mail.gmail.com>
     [not found]   ` <87ina9szq2.fsf@mbork.pl>
     [not found]     ` <53ed13d7-1228-4325-83cc-ebea329221ea@default>
     [not found]       ` <87efkwtfp1.fsf@mbork.pl>
2018-03-07 13:06         ` Why looking-at-p works? Marcin Borkowski
2018-03-07 19:53           ` Eli Zaretskii
2018-03-08  4:20             ` Marcin Borkowski
2018-03-08  4:40               ` Eli Zaretskii
2018-03-08 20:33                 ` Marcin Borkowski

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).