* "Emacs 21"
@ 2006-10-06 6:02 Richard Stallman
2006-10-06 7:12 ` CHENG Gao
` (3 more replies)
0 siblings, 4 replies; 30+ messages in thread
From: Richard Stallman @ 2006-10-06 6:02 UTC (permalink / raw)
Would someone please volunteer to check all uses of "21" in the
manuals to make sure there is nothing which inappropriately presume
that is the version number? Antinews should say it is for version 21,
but nothing else should.
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: "Emacs 21"
2006-10-06 6:02 "Emacs 21" Richard Stallman
@ 2006-10-06 7:12 ` CHENG Gao
2006-10-06 7:30 ` Romain Francoise
2006-10-06 16:54 ` Stuart D. Herring
` (2 subsequent siblings)
3 siblings, 1 reply; 30+ messages in thread
From: CHENG Gao @ 2006-10-06 7:12 UTC (permalink / raw)
*On Fri, 06 Oct 2006 02:02:23 -0400
* Richard Stallman <rms@gnu.org> climbed out of the dark hell and cried out:
> Would someone please volunteer to check all uses of "21" in the
> manuals to make sure there is nothing which inappropriately presume
> that is the version number? Antinews should say it is for version 21,
> but nothing else should.
In faq.texi, line 3851:
,----
| VM 7 works well with Emacs 21. Older versions of VM suitable for use
`----
should this be changed to "with Emacs 21 and later"?
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: "Emacs 21"
2006-10-06 7:12 ` CHENG Gao
@ 2006-10-06 7:30 ` Romain Francoise
2006-10-06 9:54 ` CHENG Gao
` (2 more replies)
0 siblings, 3 replies; 30+ messages in thread
From: Romain Francoise @ 2006-10-06 7:30 UTC (permalink / raw)
Cc: emacs-devel
CHENG Gao <chenggao@gmail.com> writes:
> In faq.texi, line 3851:
> ,----
> | VM 7 works well with Emacs 21. Older versions of VM suitable for use
> `----
> should this be changed to "with Emacs 21 and later"?
Do we know for a fact that VM works with Emacs 22? It's been
unmaintained for ages.
--
Romain Francoise <romain@orebokech.com> | The sea! the sea! the open
it's a miracle -- http://orebokech.com/ | sea! The blue, the fresh, the
| ever free! --Bryan W. Procter
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: "Emacs 21"
2006-10-06 7:30 ` Romain Francoise
@ 2006-10-06 9:54 ` CHENG Gao
2006-10-06 16:58 ` Romain Francoise
2006-10-06 13:04 ` Andrew M. Scott
2006-10-06 13:17 ` Piet van Oostrum
2 siblings, 1 reply; 30+ messages in thread
From: CHENG Gao @ 2006-10-06 9:54 UTC (permalink / raw)
*On Fri, 06 Oct 2006 09:30:03 +0200
* Romain Francoise <romain@orebokech.com> climbed out of the dark hell and cried out:
> Do we know for a fact that VM works with Emacs 22? It's been
> unmaintained for ages.
I trust so. Reading from gnu.emacs.vm.info, some uses vm with cvs emacs.
Robert Widhopf-Fenk maintains a patched version for long time.
(http://www.robf.de/Hacking/elisp/index.html)
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: "Emacs 21"
2006-10-06 7:30 ` Romain Francoise
2006-10-06 9:54 ` CHENG Gao
@ 2006-10-06 13:04 ` Andrew M. Scott
2006-10-07 1:07 ` Richard Stallman
2006-10-06 13:17 ` Piet van Oostrum
2 siblings, 1 reply; 30+ messages in thread
From: Andrew M. Scott @ 2006-10-06 13:04 UTC (permalink / raw)
Romain> Do we know for a fact that VM works with Emacs 22? It's
Romain> been unmaintained for ages.
I have been using VM 7.19 daily with CVS Emacs-22.X for at least 18
months. :-)
Andy Scott
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: "Emacs 21"
2006-10-06 7:30 ` Romain Francoise
2006-10-06 9:54 ` CHENG Gao
2006-10-06 13:04 ` Andrew M. Scott
@ 2006-10-06 13:17 ` Piet van Oostrum
2 siblings, 0 replies; 30+ messages in thread
From: Piet van Oostrum @ 2006-10-06 13:17 UTC (permalink / raw)
>>>>> Romain Francoise <romain@orebokech.com> (RF) wrote:
>RF> CHENG Gao <chenggao@gmail.com> writes:
>>> In faq.texi, line 3851:
>>> ,----
>>> | VM 7 works well with Emacs 21. Older versions of VM suitable for use
>>> `----
>>> should this be changed to "with Emacs 21 and later"?
>RF> Do we know for a fact that VM works with Emacs 22? It's been
>RF> unmaintained for ages.
I use it all the time with 22.0.50.
--
Piet van Oostrum <piet@cs.uu.nl>
URL: http://www.cs.uu.nl/~piet [PGP 8DAE142BE17999C4]
Private email: piet@vanoostrum.org
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: "Emacs 21"
2006-10-06 6:02 "Emacs 21" Richard Stallman
2006-10-06 7:12 ` CHENG Gao
@ 2006-10-06 16:54 ` Stuart D. Herring
2006-10-06 19:10 ` Reiner Steib
2006-10-07 1:07 ` Richard Stallman
2006-10-06 17:21 ` Stuart D. Herring
2006-10-06 19:48 ` Stuart D. Herring
3 siblings, 2 replies; 30+ messages in thread
From: Stuart D. Herring @ 2006-10-06 16:54 UTC (permalink / raw)
Cc: emacs-devel
> Would someone please volunteer to check all uses of "21" in the
> manuals to make sure there is nothing which inappropriately presume
> that is the version number? Antinews should say it is for version 21,
> but nothing else should.
I checked the Emacs user's manual, finding a very few things that probably
need attention. I give the file basename, a node name, and a comment:
cc-mode: Performance Issues
Mentions Emacs 21.3 "as of this writing". Obviously that's true, but
discussing 22 instead would be more useful.
eshell: Known problems
Suggests that 21 is current.
gnus-faq: [1.3]
Suggests that 21 is current.
gnus: Image Enhancements
Talks about Emacs 21 on Windows not supporting images. (This is true, but
it fails to mention that 22 does.)
mh-e: Preface
Describes 22.1 as being in the future.
mh-e: appendix From Bill Wohler
Somewhat offtopic: it says 21.4 was released in 2004? I thought it was
2005 sometime, but I could be wrong.
tramp: FAQ
Also offtopic: some version/port-related text needs cleanup (look for "???").
url: Disk Caching
Implies that 21 is current.
I just searched for \<21\> in everything in man/, so there might be
something subtle that I missed.
Davis
--
This product is sold by volume, not by mass. If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during
shipping.
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: "Emacs 21"
2006-10-06 9:54 ` CHENG Gao
@ 2006-10-06 16:58 ` Romain Francoise
0 siblings, 0 replies; 30+ messages in thread
From: Romain Francoise @ 2006-10-06 16:58 UTC (permalink / raw)
Okay, thanks everyone. I updated the VM node in the FAQ.
--
Romain Francoise <romain@orebokech.com> | The sea! the sea! the open
it's a miracle -- http://orebokech.com/ | sea! The blue, the fresh, the
| ever free! --Bryan W. Procter
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: "Emacs 21"
2006-10-06 6:02 "Emacs 21" Richard Stallman
2006-10-06 7:12 ` CHENG Gao
2006-10-06 16:54 ` Stuart D. Herring
@ 2006-10-06 17:21 ` Stuart D. Herring
2006-10-06 18:26 ` CHENG Gao
2006-10-07 1:07 ` Richard Stallman
2006-10-06 19:48 ` Stuart D. Herring
3 siblings, 2 replies; 30+ messages in thread
From: Stuart D. Herring @ 2006-10-06 17:21 UTC (permalink / raw)
Cc: emacs-devel
> Would someone please volunteer to check all uses of "21" in the
> manuals to make sure there is nothing which inappropriately presume
> that is the version number? Antinews should say it is for version 21,
> but nothing else should.
OK, I've looked at the Lisp Introduction now; it's more complicated. The
number 21 is used on 75 lines; 54 of these are non-comment references to
the version number (instead of just the integer). 15 of those are
references to the CVS version 21.0.100 (presumably current at the time of
writing), including in example pathnames. (There are already comments
noting this inclusion.) Most of the rest are comparisons between 20 (or
19) and 21 in terms of error reporting, mark handling, echo area resizing,
and mode line formats.
A few examples detect the version of Emacs, but do so using string
comparison against `emacs-version' rather than the numeric variables, and
phrase the result in terms of "21" or "not 21", so that's an implication
of currency as well.
So I imagine that the version-detection examples need to be changed
(although I see nothing wrong with determining ">=21" and "<21"), and the
comparisons need to note that they apply to 21 or later. I'm not sure
what to do with the CVS references. Any thoughts? If there's a
consensus, I can do the changes, but I'd like to know what they should be
first.
Davis
--
This product is sold by volume, not by mass. If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during
shipping.
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: "Emacs 21"
2006-10-06 17:21 ` Stuart D. Herring
@ 2006-10-06 18:26 ` CHENG Gao
2006-10-06 18:46 ` Romain Francoise
` (2 more replies)
2006-10-07 1:07 ` Richard Stallman
1 sibling, 3 replies; 30+ messages in thread
From: CHENG Gao @ 2006-10-06 18:26 UTC (permalink / raw)
Emacs FAQ 5.5:
,----[ (info "(efaq)Displaying the current line or column") ]
| As of Emacs 20, you can similarly display the current column with
| `M-x column-number-mode', or by putting the form
|
| (setq column-number-mode t)
|
| in your `.emacs' file.
`----
Just feel "As of Emacs 20" is weird here. Should it be removed?
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: "Emacs 21"
2006-10-06 18:26 ` CHENG Gao
@ 2006-10-06 18:46 ` Romain Francoise
2006-10-06 18:50 ` CHENG Gao
2006-10-06 18:48 ` David Kastrup
2006-10-07 1:07 ` Richard Stallman
2 siblings, 1 reply; 30+ messages in thread
From: Romain Francoise @ 2006-10-06 18:46 UTC (permalink / raw)
Cc: emacs-devel
CHENG Gao <chenggao@gmail.com> writes:
> Just feel "As of Emacs 20" is weird here. Should it be removed?
No, it just means that this feature was added in Emacs 20. This is
useful because not all readers will be using Emacs 22; the FAQ is also
distributed outside Emacs, on the GNU website.
--
Romain Francoise <romain@orebokech.com> | The sea! the sea! the open
it's a miracle -- http://orebokech.com/ | sea! The blue, the fresh, the
| ever free! --Bryan W. Procter
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: "Emacs 21"
2006-10-06 18:26 ` CHENG Gao
2006-10-06 18:46 ` Romain Francoise
@ 2006-10-06 18:48 ` David Kastrup
2006-10-06 22:16 ` Kim F. Storm
2006-10-07 1:07 ` Richard Stallman
2006-10-07 1:07 ` Richard Stallman
2 siblings, 2 replies; 30+ messages in thread
From: David Kastrup @ 2006-10-06 18:48 UTC (permalink / raw)
Cc: emacs-devel
CHENG Gao <chenggao@gmail.com> writes:
> Emacs FAQ 5.5:
>
> ,----[ (info "(efaq)Displaying the current line or column") ]
> | As of Emacs 20, you can similarly display the current column with
> | `M-x column-number-mode', or by putting the form
> |
> | (setq column-number-mode t)
> |
> | in your `.emacs' file.
> `----
>
> Just feel "As of Emacs 20" is weird here. Should it be removed?
I think we don't need to worry about pre-20 versions in the
documentation except in the sections pertaining to history.
Even pre-21 would in my opinion be irrelevant: features that first
appeared in Emacs 21.1 can, in my opinion, just be explained without
bothering to say when they were introduced.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: "Emacs 21"
2006-10-06 18:46 ` Romain Francoise
@ 2006-10-06 18:50 ` CHENG Gao
0 siblings, 0 replies; 30+ messages in thread
From: CHENG Gao @ 2006-10-06 18:50 UTC (permalink / raw)
*On Fri, 06 Oct 2006 20:46:06 +0200
* Romain Francoise <romain@orebokech.com> climbed out of the dark hell and cried out:
> No, it just means that this feature was added in Emacs 20. This is
> useful because not all readers will be using Emacs 22; the FAQ is also
> distributed outside Emacs, on the GNU website.
Thanks for explanation.
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: "Emacs 21"
2006-10-06 16:54 ` Stuart D. Herring
@ 2006-10-06 19:10 ` Reiner Steib
2006-10-07 1:07 ` Richard Stallman
1 sibling, 0 replies; 30+ messages in thread
From: Reiner Steib @ 2006-10-06 19:10 UTC (permalink / raw)
Cc: Richard Stallman, ding, emacs-devel
[ Cc-ing ding@gnus ]
On Fri, Oct 06 2006, Stuart D. Herring wrote:
> gnus-faq: [1.3]
> Suggests that 21 is current.
>
> gnus: Image Enhancements
> Talks about Emacs 21 on Windows not supporting images. (This is true, but
> it fails to mention that 22 does.)
I've fixed those in Gnus CVS. The changed will propagate to Emacs
with Miles' next sync.
,----[ gnus.texi ]
| @node Image Enhancements
| @section Image Enhancements
|
| XEmacs, as well as Emacs 21@footnote{Emacs 21 on MS Windows doesn't
| support images, Emacs 22 does.} and up, are able to display pictures and
| stuff, so Gnus has taken advantage of that.
`----
,----[ gnus-faq.texi ]
| Gnus is released independent from releases of Emacs and XEmacs.
| Therefore, the version bundled with Emacs or the version in XEmacs'
| package system might not be up to date (e.g. Gnus 5.9 bundled with Emacs
| 20 is outdated).
| @c
| You can get the latest released version of Gnus from
| @uref{http://www.gnus.org/dist/gnus.tar.gz} or via anonymous FTP from
| @uref{ftp://ftp.gnus.org/pub/gnus/gnus.tar.gz}.
`----
If someone would like to improve the wording, feel free to do so.
Bye, Reiner.
--
,,,
(o o)
---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: "Emacs 21"
2006-10-06 6:02 "Emacs 21" Richard Stallman
` (2 preceding siblings ...)
2006-10-06 17:21 ` Stuart D. Herring
@ 2006-10-06 19:48 ` Stuart D. Herring
3 siblings, 0 replies; 30+ messages in thread
From: Stuart D. Herring @ 2006-10-06 19:48 UTC (permalink / raw)
Cc: emacs-devel
> Would someone please volunteer to check all uses of "21" in the
> manuals to make sure there is nothing which inappropriately presume
> that is the version number? Antinews should say it is for version 21,
> but nothing else should.
Finally, I checked the Lisp Reference Manual, which you (RMS) fixed on
March 6th. It's still fixed; nothing to do here.
Davis
--
This product is sold by volume, not by mass. If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during
shipping.
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: "Emacs 21"
2006-10-06 18:48 ` David Kastrup
@ 2006-10-06 22:16 ` Kim F. Storm
2006-10-07 1:07 ` Richard Stallman
1 sibling, 0 replies; 30+ messages in thread
From: Kim F. Storm @ 2006-10-06 22:16 UTC (permalink / raw)
Cc: emacs-devel, CHENG Gao
David Kastrup <dak@gnu.org> writes:
> Even pre-21 would in my opinion be irrelevant: features that first
> appeared in Emacs 21.1 can, in my opinion, just be explained without
> bothering to say when they were introduced.
I agree.
If there is a problem with the FAQ, we could just say at the beginning
of the FAQ that it covers version 21 and newer of GNU Emacs.
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: "Emacs 21"
2006-10-06 13:04 ` Andrew M. Scott
@ 2006-10-07 1:07 ` Richard Stallman
0 siblings, 0 replies; 30+ messages in thread
From: Richard Stallman @ 2006-10-07 1:07 UTC (permalink / raw)
Cc: emacs-devel
Romain> Do we know for a fact that VM works with Emacs 22? It's
Romain> been unmaintained for ages.
I have been using VM 7.19 daily with CVS Emacs-22.X for at least 18
months. :-)
That's good. Would someone please update the faq?
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: "Emacs 21"
2006-10-06 18:26 ` CHENG Gao
2006-10-06 18:46 ` Romain Francoise
2006-10-06 18:48 ` David Kastrup
@ 2006-10-07 1:07 ` Richard Stallman
2 siblings, 0 replies; 30+ messages in thread
From: Richard Stallman @ 2006-10-07 1:07 UTC (permalink / raw)
Cc: emacs-devel
Just feel "As of Emacs 20" is weird here. Should it be removed?
I just removed it. Anything else like that should be deleted too.
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: "Emacs 21"
2006-10-06 18:48 ` David Kastrup
2006-10-06 22:16 ` Kim F. Storm
@ 2006-10-07 1:07 ` Richard Stallman
1 sibling, 0 replies; 30+ messages in thread
From: Richard Stallman @ 2006-10-07 1:07 UTC (permalink / raw)
Cc: emacs-devel, chenggao
> Just feel "As of Emacs 20" is weird here. Should it be removed?
I think we don't need to worry about pre-20 versions in the
documentation except in the sections pertaining to history.
Even pre-21 would in my opinion be irrelevant: features that first
appeared in Emacs 21.1 can, in my opinion, just be explained without
bothering to say when they were introduced.
That is right.
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: "Emacs 21"
2006-10-06 17:21 ` Stuart D. Herring
2006-10-06 18:26 ` CHENG Gao
@ 2006-10-07 1:07 ` Richard Stallman
2006-10-10 22:13 ` Stuart D. Herring
1 sibling, 1 reply; 30+ messages in thread
From: Richard Stallman @ 2006-10-07 1:07 UTC (permalink / raw)
Cc: emacs-devel
Most of the rest are comparisons between 20 (or
19) and 21 in terms of error reporting, mark handling, echo area resizing,
and mode line formats.
I am not sure whether you are talking about passages that describe
differences between specific Emacs versions, or about teaching the
user how to write code that tests the Emacs version. Which?
The former, we should remove. This manual is meant for the current
Emacs version. Discussing older Emacs versions is a digression which
gets in the way of the intended purpose.
The latter, we should update (if necessary) so that they handle Emacs
22 properly.
I'm not sure
what to do with the CVS references.
If they are just intended as example version numbers, any value is
fine. If they are meant to be the version of a recent Emacs, just
update them to 22.1.
Can you do these things and send diffs?
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: "Emacs 21"
2006-10-06 16:54 ` Stuart D. Herring
2006-10-06 19:10 ` Reiner Steib
@ 2006-10-07 1:07 ` Richard Stallman
1 sibling, 0 replies; 30+ messages in thread
From: Richard Stallman @ 2006-10-07 1:07 UTC (permalink / raw)
Cc: emacs-devel
Could you please help out by keeping track of which of these have been
dealt with, and remind people in a few days of the ones that remain?
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: "Emacs 21"
2006-10-07 1:07 ` Richard Stallman
@ 2006-10-10 22:13 ` Stuart D. Herring
2006-10-10 22:34 ` David Kastrup
2006-10-11 18:50 ` Richard Stallman
0 siblings, 2 replies; 30+ messages in thread
From: Stuart D. Herring @ 2006-10-10 22:13 UTC (permalink / raw)
Cc: emacs-devel
> Most of the rest are comparisons between 20 (or
> 19) and 21 in terms of error reporting, mark handling, echo area
> resizing,
> and mode line formats.
>
> I am not sure whether you are talking about passages that describe
> differences between specific Emacs versions, or about teaching the
> user how to write code that tests the Emacs version. Which?
There are both; the passage you quote was talking about describing
differences, and the paragraph after it (that you did not quote) was
talking about testing the Emacs version.
> The former, we should remove. This manual is meant for the current
> Emacs version. Discussing older Emacs versions is a digression which
> gets in the way of the intended purpose.
Are you sure? This is the Lisp introduction, and for version 21 included
all these discussions. Certainly 20 is less relevant once 22 is out, and
19 even less so, but do you really mean to remove all of it? (I am not
arguing either way on the matter, just describing past practice.)
> The latter, we should update (if necessary) so that they handle Emacs
> 22 properly.
By "properly", do you mean "recognize as distinct from all prior (and
perhaps subsequent) Emacs versions, or do you merely mean that they should
not produce literally false output (e.g., diagnosing Emacs 22 as 20)? Or
do you mean that all such tests should make logical divisions such as
"older than Emacs 21" and "not older than Emacs 21", regardless of which
divisions they make? Finally, can such tests use `emacs-major-version'
and such, introduced in 19.23?
> I'm not sure
> what to do with the CVS references.
>
> If they are just intended as example version numbers, any value is
> fine. If they are meant to be the version of a recent Emacs, just
> update them to 22.1.
They are in most cases part of example filenames that sometimes will not
exist on users' machines (e.g., lisp/TAGS and lisp/abbrev.el, the latter
for an example of `directory-files-and-attributes'). The only mention of
the version number outside of a path is as a mention of where the named
file came from (that is, the CVS Emacs sources for version foo).
So they are neither example version numbers nor versions of recent
Emacsen; they are filenames and sources of files. The files don't seem
particularly relevant since they are from an old CVS Emacs version, and
perhaps all the text that discusses them would be better rewritten to
discuss toy (or even imaginary) files.
> Can you do these things and send diffs?
Please send along clarifications (and more guidance about the CVS names)
and I'll do just that.
Davis
--
This product is sold by volume, not by mass. If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during
shipping.
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: "Emacs 21"
2006-10-10 22:13 ` Stuart D. Herring
@ 2006-10-10 22:34 ` David Kastrup
2006-10-11 18:50 ` Richard Stallman
1 sibling, 0 replies; 30+ messages in thread
From: David Kastrup @ 2006-10-10 22:34 UTC (permalink / raw)
Cc: Richard Stallman, emacs-devel
"Stuart D. Herring" <herring@lanl.gov> writes:
> By "properly", do you mean "recognize as distinct from all prior (and
> perhaps subsequent) Emacs versions, or do you merely mean that they should
> not produce literally false output (e.g., diagnosing Emacs 22 as 20)? Or
> do you mean that all such tests should make logical divisions such as
> "older than Emacs 21" and "not older than Emacs 21", regardless of which
> divisions they make? Finally, can such tests use `emacs-major-version'
> and such, introduced in 19.23?
People writing software for Emacs 19.23 would better consult the Emacs
Lisp manual corresponding to their version of Emacs.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: "Emacs 21"
2006-10-10 22:13 ` Stuart D. Herring
2006-10-10 22:34 ` David Kastrup
@ 2006-10-11 18:50 ` Richard Stallman
2006-10-27 22:15 ` Stuart D. Herring
1 sibling, 1 reply; 30+ messages in thread
From: Richard Stallman @ 2006-10-11 18:50 UTC (permalink / raw)
Cc: emacs-devel
Are you sure? This is the Lisp introduction, and for version 21 included
all these discussions. Certainly 20 is less relevant once 22 is out, and
19 even less so, but do you really mean to remove all of it? (I am not
arguing either way on the matter, just describing past practice.)
For a beginner learning Lisp on Emacs 22, talking about old Emacs
versions is a digression. Digressions interfere with communication.
Unless there is some special important reason I can't envision,
it is better to eliminate everything about old versions.
> The latter, we should update (if necessary) so that they handle Emacs
> 22 properly.
By "properly", do you mean "recognize as distinct from all prior (and
perhaps subsequent) Emacs versions, or do you merely mean that they should
not produce literally false output (e.g., diagnosing Emacs 22 as 20)?
Each of these examples serves an educational purpose.
So each should be updated so as to serve its purpose well
in a world where Emacs 22 is being used.
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: "Emacs 21"
2006-10-11 18:50 ` Richard Stallman
@ 2006-10-27 22:15 ` Stuart D. Herring
2006-11-04 0:54 ` Kim F. Storm
0 siblings, 1 reply; 30+ messages in thread
From: Stuart D. Herring @ 2006-10-27 22:15 UTC (permalink / raw)
Cc: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 2686 bytes --]
> For a beginner learning Lisp on Emacs 22, talking about old Emacs
> versions is a digression. Digressions interfere with communication.
> Unless there is some special important reason I can't envision,
> it is better to eliminate everything about old versions.
> [snip]
> Each of these examples serves an educational purpose.
> So each should be updated so as to serve its purpose well
> in a world where Emacs 22 is being used.
OK, here's the (long) patch for the Lisp Introduction to do all that. In
lieu of a description, here's a ChangeLog entry for it:
2006-10-27 Stuart D. Herring <herring@lanl.gov>
* emacs-lisp-intro.texi (Top): remove menu entry for "Complete
zap-to-char".
(Top, Emacs Initialization): remove version reference for X
colors.
(Making Errors, Void Function, Void Variable)
(Wrong Type of Argument, debug, debug-on-entry): remove discussion
of Emacs 20 error reporting.
(else): make impossible outcome obvious.
(Review): use `emacs-major-version' instead of `emacs-version'.
Document `='.
(Finding More): remove discussion of old `describe-function'
behavior.
(Finding More, fwd-para summary, lengths-list-file)
(lengths-list-many-files, Files List): use 22.1 instead of
21.0.100 as a dummy version number.
(mark-whole-buffer overview): use version 22 `mark-whole-buffer'.
(Body of mark-whole-buffer): update call to `push-mark'. Merge
paragraphs describing `push-mark' call to include 21 information.
(zap-to-char): remove discussion of version 19 function, and the
description of error-handling in `kill-region'. Include function
source in node. Remove "Complete zap-to-char" menu item.
(Complete zap-to-char): delete node.
(zap-to-char interactive): simplify discussion of "*" in the
interactive spec, omitting version 19 bug.
(search-forward): simplify discussion of character/string
distinction.
(kill-region): merge version 21 information.
(Recursive Definition Parts): use `when' in recursive template.
(Recursion with list): remove Emacs 20 instructions.
(Recursion with list, Every, recursive-graph-body-print): use
`when' instead of `if'+`progn'.
(lengths-list-file): remove Emacs 19 commentary, old path Texinfo
comment.
(Files List): use @dots instead of ".." directory in example list.
(Simple Extension): clean up testing of Emacs version and minor
mode calls, and rewrite motivation for version-specific
customization
(Mode Line): don't mention that :eval was new in 21.
(debug-on-entry): rewrite motivation for deliberate debugging.
Davis
--
This product is sold by volume, not by mass. If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during
shipping.
[-- Attachment #2: lispintro.patch --]
[-- Type: application/octet-stream, Size: 46634 bytes --]
*** emacs-lisp-intro.texi.~1.42.~ 2006-08-21 12:53:59.000000000 -0600
--- emacs-lisp-intro.texi 2006-10-27 14:02:30.000000000 -0600
***************
*** 527,533 ****
@code{zap-to-char}
- * Complete zap-to-char:: The complete implementation.
* zap-to-char interactive:: A three part interactive expression.
* zap-to-char body:: A short overview.
* search-forward:: How to search for a string.
--- 527,532 ----
***************
*** 707,713 ****
* Loading Files:: Load (i.e., evaluate) files automatically.
* Autoload:: Make functions available.
* Simple Extension:: Define a function; bind it to a key.
! * X11 Colors:: Colors in version 19 in X.
* Miscellaneous::
* Mode Line:: How to customize your mode line.
--- 706,712 ----
* Loading Files:: Load (i.e., evaluate) files automatically.
* Autoload:: Make functions available.
* Simple Extension:: Define a function; bind it to a key.
! * X11 Colors:: Setting colors to use in X.
* Miscellaneous::
* Mode Line:: How to customize your mode line.
***************
*** 1376,1391 ****
(this is an unquoted list)
@end smallexample
- @noindent
- What you see depends on which version of Emacs you are running. GNU
- Emacs version 21 provides more information than version 20 and before.
- First, the more recent result of generating an error; then the
- earlier, version 20 result.
-
@need 1250
@noindent
! In GNU Emacs version 21, a @file{*Backtrace*} window will open up and
! you will see the following in it:
@smallexample
@group
--- 1375,1384 ----
(this is an unquoted list)
@end smallexample
@need 1250
@noindent
! A @file{*Backtrace*} window will open up and you will see the
! following in it:
@smallexample
@group
***************
*** 1464,1494 ****
have a set of instructions for the computer to obey and those
instructions must be to add the numbers that follow the @code{+}.
- @need 1250
- In GNU Emacs version 20, and in earlier versions, you will see only
- one line of error message; it will appear in the echo area and look
- like this:
-
- @smallexample
- Symbol's function definition is void:@: this
- @end smallexample
-
- @noindent
- (Also, your terminal may beep at you---some do, some don't; and others
- blink. This is just a device to get your attention.) The message goes
- away as soon as you type another key, even just to move the cursor.
-
- We know the meaning of the word @samp{Symbol}. It refers to the first
- atom of the list, the word @samp{this}. The word @samp{function}
- refers to the instructions that tell the computer what to do.
- (Technically, the symbol tells the computer where to find the
- instructions, but this is a complication we can ignore for the
- moment.)
-
- The error message can be understood: @samp{Symbol's function
- definition is void:@: this}. The symbol (that is, the word
- @samp{this}) lacks instructions for the computer to carry out.
-
@node Names & Definitions, Lisp Interpreter, Making Errors, List Processing
@comment node-name, next, previous, up
@section Symbol Names and Function Definitions
--- 1457,1462 ----
***************
*** 1805,1812 ****
@need 1250
@noindent
! In GNU Emacs version 21, you will create a @file{*Backtrace*} buffer
! that says:
@smallexample
@group
--- 1773,1779 ----
@need 1250
@noindent
! You will create a @file{*Backtrace*} buffer that says
@smallexample
@group
***************
*** 1825,1841 ****
(Remember, to quit the debugger and make the debugger window go away,
type @kbd{q} in the @file{*Backtrace*} buffer.)
- @need 800
- In GNU Emacs 20 and before, you will produce an error message that says:
-
- @smallexample
- Symbol's function definition is void:@: fill-column
- @end smallexample
-
- @noindent
- (The message will go away away as soon as you move the cursor or type
- another key.)
-
@node Void Variable, , Void Function, Variables
@comment node-name, next, previous, up
@subsection Error Message for a Symbol Without a Value
--- 1792,1797 ----
***************
*** 1854,1861 ****
@need 1500
@noindent
! In GNU Emacs 21, you will create a @file{*Backtrace*} buffer that
! says:
@smallexample
@group
--- 1810,1816 ----
@need 1500
@noindent
! You will create a @file{*Backtrace*} buffer that says
@smallexample
@group
***************
*** 1891,1906 ****
definition, the error message reported that the symbol's value as a
variable was void.
- @need 800
- In GNU Emacs version 20 and before, your error message will say:
-
- @example
- Symbol's value as variable is void:@: +
- @end example
-
- @noindent
- The meaning is the same as in GNU Emacs 21.
-
@node Arguments, set & setq, Variables, List Processing
@comment node-name, next, previous, up
@section Arguments
--- 1846,1851 ----
***************
*** 2180,2196 ****
would have been a number, such as 37, rather than a symbol like
@code{hello}. But then you would not have got the error message.
- @need 1250
- In GNU Emacs version 20 and before, the echo area displays an error
- message that says:
-
- @smallexample
- Wrong type argument:@: number-or-marker-p, hello
- @end smallexample
-
- This says, in different words, the same as the top line of the
- @file{*Backtrace*} buffer.
-
@node message, , Wrong Type of Argument, Arguments
@comment node-name, next, previous, up
@subsection The @code{message} Function
--- 2125,2130 ----
***************
*** 4032,4038 ****
@smallexample
@group
(if (> 4 5) ; @r{if-part}
! (message "5 is greater than 4!") ; @r{then-part}
(message "4 is not greater than 5!")) ; @r{else-part}
@end group
@end smallexample
--- 3966,3972 ----
@smallexample
@group
(if (> 4 5) ; @r{if-part}
! (message "4 is greater than 5?!") ; @r{then-part}
(message "4 is not greater than 5!")) ; @r{else-part}
@end group
@end smallexample
***************
*** 4429,4437 ****
@smallexample
@group
! (if (string-equal
! (number-to-string 21)
! (substring (emacs-version) 10 12))
(message "This is version 21 Emacs")
(message "This is not version 21 Emacs"))
@end group
--- 4363,4369 ----
@smallexample
@group
! (if (= emacs-major-version 21)
(message "This is version 21 Emacs")
(message "This is not version 21 Emacs"))
@end group
***************
*** 4452,4464 ****
@itemx >
@itemx <=
@itemx >=
The @code{<} function tests whether its first argument is smaller than
! its second argument. A corresponding function, @code{>}, tests whether
! the first argument is greater than the second. Likewise, @code{<=}
! tests whether the first argument is less than or equal to the second and
! @code{>=} tests whether the first argument is greater than or equal to
! the second. In all cases, both arguments must be numbers or markers
! (markers indicate positions in buffers).
@item string<
@itemx string-lessp
--- 4384,4398 ----
@itemx >
@itemx <=
@itemx >=
+ @itemx =
The @code{<} function tests whether its first argument is smaller than
! its second argument. A corresponding function, @code{>}, tests
! whether the first argument is greater than the second. Likewise,
! @code{<=} tests whether the first argument is less than or equal to
! the second and @code{>=} tests whether the first argument is greater
! than or equal to the second. Finally, @code{=} tests whether the
! arguments are numerically equal. In all cases, both arguments must be
! numbers or markers (markers indicate positions in buffers).
@item string<
@itemx string-lessp
***************
*** 4591,4602 ****
then @key{RET}).
@cindex Find source of function
! In versions 20 and higher, when a function is written in Emacs Lisp,
! @code{describe-function} will also tell you the location of the
! function definition. If you move point over the file name and press
! the @key{RET} key, which in this case means @code{help-follow} rather
! than `return' or `enter', Emacs will take you directly to the function
! definition.
More generally, if you want to see a function in its original source
file, you can use the @code{find-tags} function to jump to it.
--- 4525,4535 ----
then @key{RET}).
@cindex Find source of function
! When a function is written in Emacs Lisp, @code{describe-function}
! will also tell you the location of the function definition. If you
! move point over the file name and press the @key{RET} key, which in
! this case means @code{help-follow} rather than `return' or `enter',
! Emacs will take you directly to the function definition.
More generally, if you want to see a function in its original source
file, you can use the @code{find-tags} function to jump to it.
***************
*** 4619,4625 ****
@key{RET}}. (On some keyboards, the @key{META} key is labelled
@key{ALT}.)
! @c !!! 21.0.100 tags table location in this paragraph
@cindex TAGS table, specifying
@findex find-tags
Depending on how the initial default values of your copy of Emacs are
--- 4552,4558 ----
@key{RET}}. (On some keyboards, the @key{META} key is labelled
@key{ALT}.)
! @c !!! 22.1 tags table location in this paragraph
@cindex TAGS table, specifying
@findex find-tags
Depending on how the initial default values of your copy of Emacs are
***************
*** 4629,4635 ****
if it has already been created for you, will be in a subdirectory of
the @file{/usr/local/share/emacs/} directory; thus you would use the
@code{M-x visit-tags-table} command and specify a pathname such as
! @file{/usr/local/share/emacs/21.0.100/lisp/TAGS} or
@file{/usr/local/src/emacs/src/TAGS}. If the tags table has
not already been created, you will have to create it yourself.
--- 4562,4568 ----
if it has already been created for you, will be in a subdirectory of
the @file{/usr/local/share/emacs/} directory; thus you would use the
@code{M-x visit-tags-table} command and specify a pathname such as
! @file{/usr/local/share/emacs/22.1/lisp/TAGS} or
@file{/usr/local/src/emacs/src/TAGS}. If the tags table has
not already been created, you will have to create it yourself.
***************
*** 4818,4832 ****
@end ifnottex
@need 1250
! In GNU Emacs 20, the code for the complete function looks like this:
@smallexample
@group
(defun mark-whole-buffer ()
! "Put point at beginning and mark at end of buffer."
(interactive)
(push-mark (point))
! (push-mark (point-max))
(goto-char (point-min)))
@end group
@end smallexample
--- 4751,4768 ----
@end ifnottex
@need 1250
! In GNU Emacs 22, the code for the complete function looks like this:
@smallexample
@group
(defun mark-whole-buffer ()
! "Put point at beginning and mark at end of buffer.
! You probably should not use this function in Lisp programs;
! it is usually a mistake for a Lisp function to use any subroutine
! that uses or sets the mark."
(interactive)
(push-mark (point))
! (push-mark (point-max) nil t)
(goto-char (point-min)))
@end group
@end smallexample
***************
*** 4866,4872 ****
@smallexample
@group
(push-mark (point))
! (push-mark (point-max))
(goto-char (point-min))
@end group
@end smallexample
--- 4802,4808 ----
@smallexample
@group
(push-mark (point))
! (push-mark (point-max) nil t)
(goto-char (point-min))
@end group
@end smallexample
***************
*** 4889,4922 ****
line causes Emacs to determine the position of point and set a mark
there.
! The next line of @code{mark-whole-buffer} is @code{(push-mark (point-max)}.
! This expression sets a mark at the point in the buffer
! that has the highest number. This will be the end of the buffer (or,
! if the buffer is narrowed, the end of the accessible portion of the
! buffer. @xref{Narrowing & Widening, , Narrowing and Widening}, for
! more about narrowing.) After this mark has been set, the previous
! mark, the one set at point, is no longer set, but Emacs remembers its
! position, just as all other recent marks are always remembered. This
! means that you can, if you wish, go back to that position by typing
! @kbd{C-u C-@key{SPC}} twice.
!
! (In GNU Emacs 21, the @code{(push-mark (point-max)} is slightly more
! complicated than shown here. The line reads
!
! @smallexample
! (push-mark (point-max) nil t)
! @end smallexample
!
! @noindent
! (The expression works nearly the same as before. It sets a mark at
! the highest numbered place in the buffer that it can. However, in
! this version, @code{push-mark} has two additional arguments. The
! second argument to @code{push-mark} is @code{nil}. This tells the
! function it @emph{should} display a message that says `Mark set' when
! it pushes the mark. The third argument is @code{t}. This tells
@code{push-mark} to activate the mark when Transient Mark mode is
turned on. Transient Mark mode highlights the currently active
! region. It is usually turned off.)
Finally, the last line of the function is @code{(goto-char
(point-min)))}. This is written exactly the same way as it is written
--- 4825,4847 ----
line causes Emacs to determine the position of point and set a mark
there.
! The next line of @code{mark-whole-buffer} is @code{(push-mark
! (point-max) nil t)}. This expression sets a mark at the point in the
! buffer that has the highest number. This will be the end of the
! buffer (or, if the buffer is narrowed, the end of the accessible
! portion of the buffer. @xref{Narrowing & Widening, , Narrowing and
! Widening}, for more about narrowing.) After this mark has been set,
! the previous mark, the one set at point, is no longer set, but Emacs
! remembers its position, just as all other recent marks are always
! remembered. This means that you can, if you wish, go back to that
! position by typing @kbd{C-u C-@key{SPC}} twice. We also see here that
! @code{push-mark} has two additional, optional arguments. The second
! argument to @code{push-mark} is @code{nil}. This tells the function
! it, as is the default, @emph{should} display the message `Mark set' to
! the user. The third argument is @code{t}. This tells
@code{push-mark} to activate the mark when Transient Mark mode is
turned on. Transient Mark mode highlights the currently active
! region. It is usually turned off.
Finally, the last line of the function is @code{(goto-char
(point-min)))}. This is written exactly the same way as it is written
***************
*** 7238,7283 ****
@section @code{zap-to-char}
@findex zap-to-char
! The @code{zap-to-char} function barely changed between GNU Emacs
! version 19 and GNU Emacs version 21. However, @code{zap-to-char}
! calls another function, @code{kill-region}, which enjoyed a major rewrite
! on the way to version 21.
!
! The @code{kill-region} function in Emacs 19 is complex, but does not
! use code that is important at this time. We will skip it.
!
! The @code{kill-region} function in Emacs 21 is easier to read than the
! same function in Emacs 19 and introduces a very important concept,
! that of error handling. We will walk through the function.
!
! But first, let us look at the interactive @code{zap-to-char} function.
!
! @menu
! * Complete zap-to-char:: The complete implementation.
! * zap-to-char interactive:: A three part interactive expression.
! * zap-to-char body:: A short overview.
! * search-forward:: How to search for a string.
! * progn:: The @code{progn} special form.
! * Summing up zap-to-char:: Using @code{point} and @code{search-forward}.
! @end menu
!
! @node Complete zap-to-char, zap-to-char interactive, zap-to-char, zap-to-char
! @ifnottex
! @unnumberedsubsec The Complete @code{zap-to-char} Implementation
! @end ifnottex
!
! The GNU Emacs version 19 and version 21 implementations of the
! @code{zap-to-char} function are nearly identical in form, and they
! work alike. The function removes the text in the region between the
! location of the cursor (i.e., of point) up to and including the next
! occurrence of a specified character. The text that @code{zap-to-char}
! removes is put in the kill ring; and it can be retrieved from the kill
! ring by typing @kbd{C-y} (@code{yank}). If the command is given an
! argument, it removes text through that number of occurrences. Thus,
! if the cursor were at the beginning of this sentence and the character
! were @samp{s}, @samp{Thus} would be removed. If the argument were
! two, @samp{Thus, if the curs} would be removed, up to and including
! the @samp{s} in @samp{cursor}.
If the specified character is not found, @code{zap-to-char} will say
``Search failed'', tell you the character you typed, and not remove
--- 7163,7178 ----
@section @code{zap-to-char}
@findex zap-to-char
! The @code{zap-to-char} function removes the text in the region between
! the location of the cursor (i.e., of point) up to and including the
! next occurrence of a specified character. The text that
! @code{zap-to-char} removes is put in the kill ring; and it can be
! retrieved from the kill ring by typing @kbd{C-y} (@code{yank}). If
! the command is given an argument, it removes text through that number
! of occurrences. Thus, if the cursor were at the beginning of this
! sentence and the character were @samp{s}, @samp{Thus} would be
! removed. If the argument were two, @samp{Thus, if the curs} would be
! removed, up to and including the @samp{s} in @samp{cursor}.
If the specified character is not found, @code{zap-to-char} will say
``Search failed'', tell you the character you typed, and not remove
***************
*** 7289,7295 ****
deletion command.
@need 800
! Here is the complete text of the version 19 implementation of the function:
@c v 19
@smallexample
--- 7184,7193 ----
deletion command.
@need 800
! Here is the complete text of the version 19 implementation of the
! function, which is somewhat simpler than more recent versions but
! contains all essential behavior. Following sections will discuss
! portions of the function definition in detail.
@c v 19
@smallexample
***************
*** 7306,7311 ****
--- 7204,7217 ----
@end group
@end smallexample
+ @menu
+ * zap-to-char interactive:: A three part interactive expression.
+ * zap-to-char body:: A short overview.
+ * search-forward:: How to search for a string.
+ * progn:: The @code{progn} special form.
+ * Summing up zap-to-char:: Using @code{point} and @code{search-forward}.
+ @end menu
+
@node zap-to-char interactive, zap-to-char body, Complete zap-to-char, zap-to-char
@comment node-name, next, previous, up
@subsection The @code{interactive} Expression
***************
*** 7325,7356 ****
remove text, and you will receive a message that says ``Buffer is
read-only''; your terminal may beep at you as well.
! The version 21 implementation does not have the asterisk, @samp{*}. The
! function works the same as in version 19: in both cases, it cannot
! remove text from a read-only buffer but the function does copy the
! text that would have been removed to the kill ring. Also, in both
! cases, you see an error message.
!
! However, the version 19 implementation copies text from a read-only
! buffer only because of a mistake in the implementation of
! @code{interactive}. According to the documentation for
! @code{interactive}, the asterisk, @samp{*}, should prevent the
! @code{zap-to-char} function from doing anything at all when the buffer
! is read only. In version 19, the function should not copy the text to
! the kill ring. It is a bug that it does.
!
! In version 21, the function is designed to copy the text to the kill
! ring; moreover, @code{interactive} is implemented correctly. So the
! asterisk, @samp{*}, had to be removed from the interactive
! specification. However, if you insert an @samp{*} yourself and
! evaluate the function definition, then the next time you run the
! @code{zap-to-char} function on a read-only buffer, you will not copy
! any text.
!
! That change aside, and a change to the documentation, the two versions
! of the @code{zap-to-char} function are identical.
!
! Let us continue with the interactive specification.
The second part of @code{"*p\ncZap to char:@: "} is the @samp{p}.
This part is separated from the next part by a newline, @samp{\n}.
--- 7231,7239 ----
remove text, and you will receive a message that says ``Buffer is
read-only''; your terminal may beep at you as well.
! (More recent implementations do not have the asterisk to allow copying
! text from a read-only buffer; the text is not deleted since it is
! read-only, but it is still put on the kill ring.)
The second part of @code{"*p\ncZap to char:@: "} is the @samp{p}.
This part is separated from the next part by a newline, @samp{\n}.
***************
*** 7422,7434 ****
string, such as @samp{"z"}.
As it happens, the argument passed to @code{zap-to-char} is a single
! character. Because of the way computers are built, the Lisp
! interpreter may treat a single character as being different from a
! string of characters. Inside the computer, a single character has a
! different electronic format than a string of one character. (A single
! character can often be recorded in the computer using exactly one
! byte; but a string may be longer, and the computer needs to be ready
! for this.) Since the @code{search-forward} function searches for a
string, the character that the @code{zap-to-char} function receives as
its argument must be converted inside the computer from one format to
the other; otherwise the @code{search-forward} function will fail.
--- 7305,7314 ----
string, such as @samp{"z"}.
As it happens, the argument passed to @code{zap-to-char} is a single
! character. The Lisp interpreter treats single characters as being
! different from strings of characters, since the former are always one
! character but the latter can each have different numbers of
! characters. Since the @code{search-forward} function searches for a
string, the character that the @code{zap-to-char} function receives as
its argument must be converted inside the computer from one format to
the other; otherwise the @code{search-forward} function will fail.
***************
*** 7533,7544 ****
@findex kill-region
The @code{zap-to-char} function uses the @code{kill-region} function.
! This function clips text from a region and copies that text to
! the kill ring, from which it may be retrieved.
!
! The Emacs 21 version of that function uses @code{condition-case} and
! @code{copy-region-as-kill}, both of which we will explain.
! @code{condition-case} is an important special form.
In essence, the @code{kill-region} function calls
@code{condition-case}, which takes three arguments. In this function,
--- 7413,7422 ----
@findex kill-region
The @code{zap-to-char} function uses the @code{kill-region} function.
! This function clips text from a region and copies that text to the
! kill ring, from which it may be retrieved. It also uses
! @code{condition-case} and @code{copy-region-as-kill}, both of which we
! will explain. @code{condition-case} is an important special form.
In essence, the @code{kill-region} function calls
@code{condition-case}, which takes three arguments. In this function,
***************
*** 10636,10642 ****
@group
(defun @var{name-of-recursive-function} (@var{argument-list})
"@var{documentation}@dots{}"
! (if @var{do-again-test}
@var{body}@dots{}
(@var{name-of-recursive-function}
@var{next-step-expression})))
--- 10514,10520 ----
@group
(defun @var{name-of-recursive-function} (@var{argument-list})
"@var{documentation}@dots{}"
! (when @var{do-again-test}
@var{body}@dots{}
(@var{name-of-recursive-function}
@var{next-step-expression})))
***************
*** 10668,10687 ****
of numbers can be written recursively. Here is the code, including
an expression to set the value of the variable @code{animals} to a list.
! If you are using Emacs 20 or before, this example must be copied to
! the @file{*scratch*} buffer and each expression must be evaluated
! there. Use @kbd{C-u C-x C-e} to evaluate the
! @code{(print-elements-recursively animals)} expression so that the
! results are printed in the buffer; otherwise the Lisp interpreter will
! try to squeeze the results into the one line of the echo area.
Also, place your cursor immediately after the last closing parenthesis
of the @code{print-elements-recursively} function, before the comment.
Otherwise, the Lisp interpreter will try to evaluate the comment.
- If you are using Emacs 21 or later, you can evaluate this expression
- directly in Info.
-
@findex print-elements-recursively
@smallexample
@group
--- 10546,10561 ----
of numbers can be written recursively. Here is the code, including
an expression to set the value of the variable @code{animals} to a list.
! In Emacs, you can evaluate these expressions directly in Info. Use
! @kbd{C-u C-x C-e} to evaluate the @code{(print-elements-recursively
! animals)} expression so that the results are printed in the buffer;
! otherwise the Lisp interpreter will try to squeeze the results into
! the one line of the echo area.
Also, place your cursor immediately after the last closing parenthesis
of the @code{print-elements-recursively} function, before the comment.
Otherwise, the Lisp interpreter will try to evaluate the comment.
@findex print-elements-recursively
@smallexample
@group
***************
*** 10690,10700 ****
(defun print-elements-recursively (list)
"Print each element of LIST on a line of its own.
Uses recursion."
! (if list ; @r{do-again-test}
! (progn
! (print (car list)) ; @r{body}
! (print-elements-recursively ; @r{recursive call}
! (cdr list))))) ; @r{next-step-expression}
(print-elements-recursively animals)
@end group
--- 10564,10573 ----
(defun print-elements-recursively (list)
"Print each element of LIST on a line of its own.
Uses recursion."
! (when list ; @r{do-again-test}
! (print (car list)) ; @r{body}
! (print-elements-recursively ; @r{recursive call}
! (cdr list))))) ; @r{next-step-expression}
(print-elements-recursively animals)
@end group
***************
*** 10716,10722 ****
assemblies a second robot and tells it what to do; the second robot is
a different individual from the first, but is the same model.
! When the second evaluation occurs, the @code{if} expression is
evaluated and if true, prints the first element of the list it
receives as its argument (which is the second element of the original
list). Then the function `calls itself' with the @sc{cdr} of the list
--- 10589,10595 ----
assemblies a second robot and tells it what to do; the second robot is
a different individual from the first, but is the same model.
! When the second evaluation occurs, the @code{when} expression is
evaluated and if true, prints the first element of the list it
receives as its argument (which is the second element of the original
list). Then the function `calls itself' with the @sc{cdr} of the list
***************
*** 10733,10742 ****
works on a shorter list.
Eventually, the function invokes itself on an empty list. It creates
! a new instance whose argument is @code{nil}. The conditional expression
! tests the value of @code{list}. Since the value of @code{list} is
! @code{nil}, the @code{if} expression tests false so the then-part is
! not evaluated. The function as a whole then returns @code{nil}.
@need 1200
When you evaluate @code{(print-elements-recursively animals)} in the
--- 10606,10616 ----
works on a shorter list.
Eventually, the function invokes itself on an empty list. It creates
! a new instance whose argument is @code{nil}. The conditional
! expression tests the value of @code{list}. Since the value of
! @code{list} is @code{nil}, the @code{when} expression tests false so
! the then-part is not evaluated. The function as a whole then returns
! @code{nil}.
@need 1200
When you evaluate @code{(print-elements-recursively animals)} in the
***************
*** 11114,11124 ****
(defun print-elements-recursively (list)
"Print each element of LIST on a line of its own.
Uses recursion."
! (if list ; @r{do-again-test}
! (progn
! (print (car list)) ; @r{body}
! (print-elements-recursively ; @r{recursive call}
! (cdr list))))) ; @r{next-step-expression}
(print-elements-recursively animals)
@end group
--- 10988,10997 ----
(defun print-elements-recursively (list)
"Print each element of LIST on a line of its own.
Uses recursion."
! (when list ; @r{do-again-test}
! (print (car list)) ; @r{body}
! (print-elements-recursively ; @r{recursive call}
! (cdr list)))) ; @r{next-step-expression}
(print-elements-recursively animals)
@end group
***************
*** 12631,12643 ****
your sources! Without them, you are like a person who tries to drive
a car with his eyes shut!)
! @c !!! again, 21.0.100 tags table location in this paragraph
Or -- a good habit to get into -- you can type @kbd{M-.}
(@code{find-tag}) and the name of the function when prompted for it.
This will take you directly to the source. If the @code{find-tag}
function first asks you for the name of a @file{TAGS} table, give it
the name of the @file{TAGS} file such as
! @file{/usr/local/share/emacs/21.0.100/lisp/TAGS}. (The exact path to your
@file{TAGS} file depends on how your copy of Emacs was installed.)
You can also create your own @file{TAGS} file for directories that
--- 12504,12516 ----
your sources! Without them, you are like a person who tries to drive
a car with his eyes shut!)
! @c !!! again, 22.1 tags table location in this paragraph
Or -- a good habit to get into -- you can type @kbd{M-.}
(@code{find-tag}) and the name of the function when prompted for it.
This will take you directly to the source. If the @code{find-tag}
function first asks you for the name of a @file{TAGS} table, give it
the name of the @file{TAGS} file such as
! @file{/usr/local/share/emacs/22.1/lisp/TAGS}. (The exact path to your
@file{TAGS} file depends on how your copy of Emacs was installed.)
You can also create your own @file{TAGS} file for directories that
***************
*** 14345,14352 ****
definition and constructs a lengths' list containing the information.
Emacs kills the buffer after working through it. This is to save
! space inside of Emacs. My version of Emacs 19 contained over 300
! source files of interest; Emacs 21 contains over 800 source files.
Another function will apply @code{lengths-list-file} to each of the
files.
--- 14218,14224 ----
definition and constructs a lengths' list containing the information.
Emacs kills the buffer after working through it. This is to save
! space inside of Emacs; Emacs 21 contained over 800 source files.
Another function will apply @code{lengths-list-file} to each of the
files.
***************
*** 14358,14378 ****
place your cursor after the following expression and type @kbd{C-x
C-e} (@code{eval-last-sexp}).
! @c !!! 21.0.100 lisp sources location here
@smallexample
(lengths-list-file
! "/usr/local/share/emacs/21.0.100/lisp/emacs-lisp/debug.el")
@end smallexample
- @c was: (lengths-list-file "../lisp/debug.el")
- @c !!! as of 21, Info file is in
- @c /usr/share/info/emacs-lisp-intro.info.gz
- @c but debug.el is in /usr/local/share/emacs/21.0.100/lisp/emacs-lisp/debug.el
-
@noindent
(You may need to change the pathname of the file; the one here worked
! with GNU Emacs version 21.0.100. To change the expression, copy it to
! the @file{*scratch*} buffer and edit it.
@need 1200
@noindent
--- 14230,14245 ----
place your cursor after the following expression and type @kbd{C-x
C-e} (@code{eval-last-sexp}).
! @c !!! 22.1 lisp sources location here
@smallexample
(lengths-list-file
! "/usr/local/share/emacs/22.1/lisp/emacs-lisp/debug.el")
@end smallexample
@noindent
(You may need to change the pathname of the file; the one here worked
! with GNU Emacs version 22.1. To change the expression, copy it to
! the @file{*scratch*} buffer and edit it.)
@need 1200
@noindent
***************
*** 14395,14411 ****
(77 95 85 87 131 89 50 25 44 44 68 35 64 45 17 34 167 457)
@end smallexample
- @need 1500
- (Using my old machine, the version 19 lengths' list for @file{debug.el}
- took seven seconds to produce and looked like this:
-
- @smallexample
- (75 41 80 62 20 45 44 68 45 12 34 235)
- @end smallexample
-
- (The newer version of @file{debug.el} contains more defuns than the
- earlier one; and my new machine is much faster than the old one.)
-
Note that the length of the last definition in the file is first in
the list.
--- 14262,14267 ----
***************
*** 14499,14509 ****
name to the absolute, long, path name form of the directory in which
the function is called.
! @c !!! 21.0.100 lisp sources location here
@need 1500
Thus, if @code{expand-file-name} is called on @code{debug.el} when
Emacs is visiting the
! @file{/usr/local/share/emacs/21.0.100/lisp/emacs-lisp/} directory,
@smallexample
debug.el
--- 14355,14365 ----
name to the absolute, long, path name form of the directory in which
the function is called.
! @c !!! 22.1 lisp sources location here
@need 1500
Thus, if @code{expand-file-name} is called on @code{debug.el} when
Emacs is visiting the
! @file{/usr/local/share/emacs/22.1/lisp/emacs-lisp/} directory,
@smallexample
debug.el
***************
*** 14513,14521 ****
@noindent
becomes
! @c !!! 21.0.100 lisp sources location here
@smallexample
! /usr/local/share/emacs/21.0.100/lisp/emacs-lisp/debug.el
@end smallexample
The only other new element of this function definition is the as yet
--- 14369,14377 ----
@noindent
becomes
! @c !!! 22.1 lisp sources location here
@smallexample
! /usr/local/share/emacs/22.1/lisp/emacs-lisp/debug.el
@end smallexample
The only other new element of this function definition is the as yet
***************
*** 14779,14787 ****
@smallexample
@group
! ("../lisp/macros.el"
! "../lisp/mail/rmail.el"
! "../lisp/makesum.el")
@end group
@end smallexample
--- 14635,14643 ----
@smallexample
@group
! ("@dots{}/lisp/macros.el"
! "@dots{}/lisp/mail/rmail.el"
! "@dots{}/lisp/makesum.el")
@end group
@end smallexample
***************
*** 14909,14915 ****
;; Although the function will be used non-interactively,
;; it will be easier to test if we make it interactive.
;; The directory will have a name such as
! ;; "/usr/local/share/emacs/21.0.100/lisp/"
(interactive "DDirectory name: ")
@end group
@group
--- 14765,14771 ----
;; Although the function will be used non-interactively,
;; it will be easier to test if we make it interactive.
;; The directory will have a name such as
! ;; "/usr/local/share/emacs/22.1/lisp/"
(interactive "DDirectory name: ")
@end group
@group
***************
*** 15892,15898 ****
The recursive function is a little more difficult. It has four parts:
the `do-again-test', the printing code, the recursive call, and the
! `next-step-expression'. The `do-again-test' is an @code{if}
expression that determines whether the @code{numbers-list} contains
any remaining elements; if it does, the function prints one column of
the graph using the printing code and calls itself again. The
--- 15748,15754 ----
The recursive function is a little more difficult. It has four parts:
the `do-again-test', the printing code, the recursive call, and the
! `next-step-expression'. The `do-again-test' is an @code{when}
expression that determines whether the @code{numbers-list} contains
any remaining elements; if it does, the function prints one column of
the graph using the printing code and calls itself again. The
***************
*** 15909,15926 ****
@end group
@group
! (if numbers-list
! (progn
! (setq from-position (point))
! (insert-rectangle
! (column-of-graph height (car numbers-list)))
@end group
@group
! (goto-char from-position)
! (forward-char symbol-width)
! (sit-for 0) ; @r{Draw graph column by column.}
! (recursive-graph-body-print-internal
! (cdr numbers-list) height symbol-width))))
@end group
@end smallexample
--- 15765,15781 ----
@end group
@group
! (when numbers-list
! (setq from-position (point))
! (insert-rectangle
! (column-of-graph height (car numbers-list)))
@end group
@group
! (goto-char from-position)
! (forward-char symbol-width)
! (sit-for 0) ; @r{Draw graph column by column.}
! (recursive-graph-body-print-internal
! (cdr numbers-list) height symbol-width)))
@end group
@end smallexample
***************
*** 15994,16000 ****
* Loading Files:: Load (i.e., evaluate) files automatically.
* Autoload:: Make functions available.
* Simple Extension:: Define a function; bind it to a key.
! * X11 Colors:: Colors in version 19 in X.
* Miscellaneous::
* Mode Line:: How to customize your mode line.
@end menu
--- 15849,15855 ----
* Loading Files:: Load (i.e., evaluate) files automatically.
* Autoload:: Make functions available.
* Simple Extension:: Define a function; bind it to a key.
! * X11 Colors:: Setting colors to use in X.
* Miscellaneous::
* Mode Line:: How to customize your mode line.
@end menu
***************
*** 16916,16991 ****
@cindex Conditional 'twixt two versions of Emacs
@cindex Version of Emacs, choosing
@cindex Emacs version, choosing
! If you run two versions of GNU Emacs, such as versions 20 and 21, and
use one @file{.emacs} file, you can select which code to evaluate with
! the following conditional:
@smallexample
@group
! (cond
! ((string-equal (number-to-string 20) (substring (emacs-version) 10 12))
! ;; evaluate version 20 code
( @dots{} ))
- ((string-equal (number-to-string 21) (substring (emacs-version) 10 12))
- ;; evaluate version 21 code
- ( @dots{} )))
@end group
@end smallexample
! For example, in contrast to version 20, version 21 blinks its cursor
! by default. I hate such blinking, as well as some other features in
! version 21, so I placed the following in my @file{.emacs}
! file@footnote{When I start instances of Emacs that do not load my
! @file{.emacs} file or any site file, I also turn off blinking:
!
! @smallexample
! emacs -q --no-site-file -eval '(blink-cursor-mode nil)'
! @end smallexample
! }:
@smallexample
@group
! (if (string-equal "21" (substring (emacs-version) 10 12))
! (progn
! (blink-cursor-mode 0)
! ;; Insert newline when you press `C-n' (next-line)
! ;; at the end of the buffer
! (setq next-line-add-newlines t)
@end group
@group
! ;; Turn on image viewing
! (auto-image-file-mode t)
@end group
@group
! ;; Turn on menu bar (this bar has text)
! ;; (Use numeric argument to turn on)
! (menu-bar-mode 1)
@end group
@group
! ;; Turn off tool bar (this bar has icons)
! ;; (Use numeric argument to turn on)
! (tool-bar-mode nil)
@end group
@group
! ;; Turn off tooltip mode for tool bar
! ;; (This mode causes icon explanations to pop up)
! ;; (Use numeric argument to turn on)
! (tooltip-mode nil)
! ;; If tooltips turned on, make tips appear promptly
! (setq tooltip-delay 0.1) ; default is one second
! ))
@end group
@end smallexample
- @noindent
- (You will note that instead of typing @code{(number-to-string 21)}, I
- decided to save typing and wrote `21' as a string, @code{"21"}, rather
- than convert it from an integer to a string. In this instance, this
- expression is better than the longer, but more general
- @code{(number-to-string 21)}. However, if you do not know ahead of
- time what type of information will be returned, then the
- @code{number-to-string} function will be needed.)
-
@node X11 Colors, Miscellaneous, Simple Extension, Emacs Initialization
@section X11 Colors
--- 16771,16825 ----
@cindex Conditional 'twixt two versions of Emacs
@cindex Version of Emacs, choosing
@cindex Emacs version, choosing
! If you run multiple versions of GNU Emacs, such as versions 20 and 21, and
use one @file{.emacs} file, you can select which code to evaluate with
! a conditional like the following:
@smallexample
@group
! (if (< emacs-major-version 21)
! ;; code for versions 20 and before
! ( @dots{} )
! ;; code for versions 21 and newer
( @dots{} ))
@end group
@end smallexample
! For example, starting in version 21, the cursor blinks by default. I
! don't like that feature, but I do like viewing image files as images,
! which is also new in 21 but disabled by default. To obtain just the
! features I like, I placed the following in my @file{.emacs} file:
@smallexample
@group
! (when (>= emacs-major-version 21)
! (blink-cursor-mode 0)
! ;; Insert newline when you press `C-n' (next-line)
! ;; at the end of the buffer
! (setq next-line-add-newlines t)
@end group
@group
! ;; Turn on image viewing
! (auto-image-file-mode 1)
@end group
@group
! ;; Turn on menu bar (this bar has text)
! (menu-bar-mode 1)
@end group
@group
! ;; Turn off tool bar (this bar has icons)
! (tool-bar-mode 0)
@end group
@group
! ;; Turn off tooltip mode for tool bar
! ;; (This mode causes icon explanations to pop up)
! (tooltip-mode 0)
! ;; If tooltips turned on, make tips appear promptly
! (setq tooltip-delay 0.1) ; default is one second
! ))
@end group
@end smallexample
@node X11 Colors, Miscellaneous, Simple Extension, Emacs Initialization
@section X11 Colors
***************
*** 17344,17356 ****
characters; this length works well in a typical 80 column wide
window.)
! @code{:eval} is a new feature in GNU Emacs version 21. It says to
! evaluate the following form and use the result as a string to display.
! In this case, the expression displays the first component of the full
! system name. The end of the first component is a @samp{.} (`period'),
! so I use the @code{string-match} function to tell me the length of the
! first component. The substring from the zeroth character to that
! length is the name of the machine.
@need 1250
This is the expression:
--- 17178,17189 ----
characters; this length works well in a typical 80 column wide
window.)
! @code{:eval} says to evaluate the following form and use the result as
! a string to display. In this case, the expression displays the first
! component of the full system name. The end of the first component is
! a @samp{.} (`period'), so I use the @code{string-match} function to
! tell me the length of the first component. The substring from the
! zeroth character to that length is the name of the machine.
@need 1250
This is the expression:
***************
*** 17479,17502 ****
tell you what you need to know to correct the definition. The
function @code{1=} is `void'.
- @need 800
- In GNU Emacs 20 and before, you will see:
-
- @smallexample
- Symbol's function definition is void:@: 1=
- @end smallexample
-
- @noindent
- which has the same meaning as the @file{*Backtrace*} buffer line in
- version 21.
-
However, suppose you are not quite certain what is going on?
You can read the complete backtrace.
- In this case, you need to run GNU Emacs 21, which automatically starts
- the debugger that puts you in the @file{*Backtrace*} buffer; or else,
- you need to start the debugger manually as described below.
-
Read the @file{*Backtrace*} buffer from the bottom up; it tells you
what Emacs did that led to the error. Emacs made an interactive call
to @kbd{C-x C-e} (@code{eval-last-sexp}), which led to the evaluation
--- 17312,17320 ----
***************
*** 17535,17551 ****
@section @code{debug-on-entry}
@findex debug-on-entry
! GNU Emacs 21 starts the debugger automatically when your function has
! an error. GNU Emacs version 20 and before did not; it simply
! presented you with an error message. You had to start the debugger
! manually.
!
! You can start the debugger manually for all versions of Emacs; the
! advantage is that the debugger runs even if you do not have a bug in
! your code. Sometimes your code will be free of bugs!
! You can enter the debugger when you call the function by calling
! @code{debug-on-entry}.
@need 1250
@noindent
--- 17353,17365 ----
@section @code{debug-on-entry}
@findex debug-on-entry
! Emacs starts the debugger automatically when your function encounters
! an error. You can ask for Emacs to start the debugger at other times;
! this can help you understand the behavior of your code whether it
! fails or not.
! You can arrange to enter the debugger when you call the function by
! calling @code{debug-on-entry}.
@need 1250
@noindent
***************
*** 17564,17572 ****
@end smallexample
@noindent
! All versions of Emacs will create a @file{*Backtrace*} buffer and tell
! you that it is beginning to evaluate the @code{triangle-bugged}
! function:
@smallexample
@group
--- 17378,17385 ----
@end smallexample
@noindent
! Emacs will create a @file{*Backtrace*} buffer and tell you that it is
! beginning to evaluate the @code{triangle-bugged} function:
@smallexample
@group
[-- Attachment #3: Type: text/plain, Size: 142 bytes --]
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: "Emacs 21"
2006-10-27 22:15 ` Stuart D. Herring
@ 2006-11-04 0:54 ` Kim F. Storm
2006-11-04 3:17 ` Robert J. Chassell
2006-11-05 7:07 ` Richard Stallman
0 siblings, 2 replies; 30+ messages in thread
From: Kim F. Storm @ 2006-11-04 0:54 UTC (permalink / raw)
Cc: Richard Stallman, emacs-devel
These changes look good to me. Shouldn't they be installed _now_ ?
"Stuart D. Herring" <herring@lanl.gov> writes:
>> For a beginner learning Lisp on Emacs 22, talking about old Emacs
>> versions is a digression. Digressions interfere with communication.
>> Unless there is some special important reason I can't envision,
>> it is better to eliminate everything about old versions.
>> [snip]
>> Each of these examples serves an educational purpose.
>> So each should be updated so as to serve its purpose well
>> in a world where Emacs 22 is being used.
>
> OK, here's the (long) patch for the Lisp Introduction to do all that. In
> lieu of a description, here's a ChangeLog entry for it:
>
> 2006-10-27 Stuart D. Herring <herring@lanl.gov>
>
> * emacs-lisp-intro.texi (Top): remove menu entry for "Complete
> zap-to-char".
> (Top, Emacs Initialization): remove version reference for X
> colors.
> (Making Errors, Void Function, Void Variable)
> (Wrong Type of Argument, debug, debug-on-entry): remove discussion
> of Emacs 20 error reporting.
> (else): make impossible outcome obvious.
> (Review): use `emacs-major-version' instead of `emacs-version'.
> Document `='.
> (Finding More): remove discussion of old `describe-function'
> behavior.
> (Finding More, fwd-para summary, lengths-list-file)
> (lengths-list-many-files, Files List): use 22.1 instead of
> 21.0.100 as a dummy version number.
> (mark-whole-buffer overview): use version 22 `mark-whole-buffer'.
> (Body of mark-whole-buffer): update call to `push-mark'. Merge
> paragraphs describing `push-mark' call to include 21 information.
> (zap-to-char): remove discussion of version 19 function, and the
> description of error-handling in `kill-region'. Include function
> source in node. Remove "Complete zap-to-char" menu item.
> (Complete zap-to-char): delete node.
> (zap-to-char interactive): simplify discussion of "*" in the
> interactive spec, omitting version 19 bug.
> (search-forward): simplify discussion of character/string
> distinction.
> (kill-region): merge version 21 information.
> (Recursive Definition Parts): use `when' in recursive template.
> (Recursion with list): remove Emacs 20 instructions.
> (Recursion with list, Every, recursive-graph-body-print): use
> `when' instead of `if'+`progn'.
> (lengths-list-file): remove Emacs 19 commentary, old path Texinfo
> comment.
> (Files List): use @dots instead of ".." directory in example list.
> (Simple Extension): clean up testing of Emacs version and minor
> mode calls, and rewrite motivation for version-specific
> customization
> (Mode Line): don't mention that :eval was new in 21.
> (debug-on-entry): rewrite motivation for deliberate debugging.
>
> Davis
>
> --
> This product is sold by volume, not by mass. If it appears too dense or
> too sparse, it is because mass-energy conversion has occurred during
> shipping.
>
> *** emacs-lisp-intro.texi.~1.42.~ 2006-08-21 12:53:59.000000000 -0600
> --- emacs-lisp-intro.texi 2006-10-27 14:02:30.000000000 -0600
> ***************
> *** 527,533 ****
>
> @code{zap-to-char}
>
> - * Complete zap-to-char:: The complete implementation.
> * zap-to-char interactive:: A three part interactive expression.
> * zap-to-char body:: A short overview.
> * search-forward:: How to search for a string.
> --- 527,532 ----
> ***************
> *** 707,713 ****
> * Loading Files:: Load (i.e., evaluate) files automatically.
> * Autoload:: Make functions available.
> * Simple Extension:: Define a function; bind it to a key.
> ! * X11 Colors:: Colors in version 19 in X.
> * Miscellaneous::
> * Mode Line:: How to customize your mode line.
>
> --- 706,712 ----
> * Loading Files:: Load (i.e., evaluate) files automatically.
> * Autoload:: Make functions available.
> * Simple Extension:: Define a function; bind it to a key.
> ! * X11 Colors:: Setting colors to use in X.
> * Miscellaneous::
> * Mode Line:: How to customize your mode line.
>
> ***************
> *** 1376,1391 ****
> (this is an unquoted list)
> @end smallexample
>
> - @noindent
> - What you see depends on which version of Emacs you are running. GNU
> - Emacs version 21 provides more information than version 20 and before.
> - First, the more recent result of generating an error; then the
> - earlier, version 20 result.
> -
> @need 1250
> @noindent
> ! In GNU Emacs version 21, a @file{*Backtrace*} window will open up and
> ! you will see the following in it:
>
> @smallexample
> @group
> --- 1375,1384 ----
> (this is an unquoted list)
> @end smallexample
>
> @need 1250
> @noindent
> ! A @file{*Backtrace*} window will open up and you will see the
> ! following in it:
>
> @smallexample
> @group
> ***************
> *** 1464,1494 ****
> have a set of instructions for the computer to obey and those
> instructions must be to add the numbers that follow the @code{+}.
>
> - @need 1250
> - In GNU Emacs version 20, and in earlier versions, you will see only
> - one line of error message; it will appear in the echo area and look
> - like this:
> -
> - @smallexample
> - Symbol's function definition is void:@: this
> - @end smallexample
> -
> - @noindent
> - (Also, your terminal may beep at you---some do, some don't; and others
> - blink. This is just a device to get your attention.) The message goes
> - away as soon as you type another key, even just to move the cursor.
> -
> - We know the meaning of the word @samp{Symbol}. It refers to the first
> - atom of the list, the word @samp{this}. The word @samp{function}
> - refers to the instructions that tell the computer what to do.
> - (Technically, the symbol tells the computer where to find the
> - instructions, but this is a complication we can ignore for the
> - moment.)
> -
> - The error message can be understood: @samp{Symbol's function
> - definition is void:@: this}. The symbol (that is, the word
> - @samp{this}) lacks instructions for the computer to carry out.
> -
> @node Names & Definitions, Lisp Interpreter, Making Errors, List Processing
> @comment node-name, next, previous, up
> @section Symbol Names and Function Definitions
> --- 1457,1462 ----
> ***************
> *** 1805,1812 ****
>
> @need 1250
> @noindent
> ! In GNU Emacs version 21, you will create a @file{*Backtrace*} buffer
> ! that says:
>
> @smallexample
> @group
> --- 1773,1779 ----
>
> @need 1250
> @noindent
> ! You will create a @file{*Backtrace*} buffer that says
>
> @smallexample
> @group
> ***************
> *** 1825,1841 ****
> (Remember, to quit the debugger and make the debugger window go away,
> type @kbd{q} in the @file{*Backtrace*} buffer.)
>
> - @need 800
> - In GNU Emacs 20 and before, you will produce an error message that says:
> -
> - @smallexample
> - Symbol's function definition is void:@: fill-column
> - @end smallexample
> -
> - @noindent
> - (The message will go away away as soon as you move the cursor or type
> - another key.)
> -
> @node Void Variable, , Void Function, Variables
> @comment node-name, next, previous, up
> @subsection Error Message for a Symbol Without a Value
> --- 1792,1797 ----
> ***************
> *** 1854,1861 ****
>
> @need 1500
> @noindent
> ! In GNU Emacs 21, you will create a @file{*Backtrace*} buffer that
> ! says:
>
> @smallexample
> @group
> --- 1810,1816 ----
>
> @need 1500
> @noindent
> ! You will create a @file{*Backtrace*} buffer that says
>
> @smallexample
> @group
> ***************
> *** 1891,1906 ****
> definition, the error message reported that the symbol's value as a
> variable was void.
>
> - @need 800
> - In GNU Emacs version 20 and before, your error message will say:
> -
> - @example
> - Symbol's value as variable is void:@: +
> - @end example
> -
> - @noindent
> - The meaning is the same as in GNU Emacs 21.
> -
> @node Arguments, set & setq, Variables, List Processing
> @comment node-name, next, previous, up
> @section Arguments
> --- 1846,1851 ----
> ***************
> *** 2180,2196 ****
> would have been a number, such as 37, rather than a symbol like
> @code{hello}. But then you would not have got the error message.
>
> - @need 1250
> - In GNU Emacs version 20 and before, the echo area displays an error
> - message that says:
> -
> - @smallexample
> - Wrong type argument:@: number-or-marker-p, hello
> - @end smallexample
> -
> - This says, in different words, the same as the top line of the
> - @file{*Backtrace*} buffer.
> -
> @node message, , Wrong Type of Argument, Arguments
> @comment node-name, next, previous, up
> @subsection The @code{message} Function
> --- 2125,2130 ----
> ***************
> *** 4032,4038 ****
> @smallexample
> @group
> (if (> 4 5) ; @r{if-part}
> ! (message "5 is greater than 4!") ; @r{then-part}
> (message "4 is not greater than 5!")) ; @r{else-part}
> @end group
> @end smallexample
> --- 3966,3972 ----
> @smallexample
> @group
> (if (> 4 5) ; @r{if-part}
> ! (message "4 is greater than 5?!") ; @r{then-part}
> (message "4 is not greater than 5!")) ; @r{else-part}
> @end group
> @end smallexample
> ***************
> *** 4429,4437 ****
>
> @smallexample
> @group
> ! (if (string-equal
> ! (number-to-string 21)
> ! (substring (emacs-version) 10 12))
> (message "This is version 21 Emacs")
> (message "This is not version 21 Emacs"))
> @end group
> --- 4363,4369 ----
>
> @smallexample
> @group
> ! (if (= emacs-major-version 21)
> (message "This is version 21 Emacs")
> (message "This is not version 21 Emacs"))
> @end group
> ***************
> *** 4452,4464 ****
> @itemx >
> @itemx <=
> @itemx >=
> The @code{<} function tests whether its first argument is smaller than
> ! its second argument. A corresponding function, @code{>}, tests whether
> ! the first argument is greater than the second. Likewise, @code{<=}
> ! tests whether the first argument is less than or equal to the second and
> ! @code{>=} tests whether the first argument is greater than or equal to
> ! the second. In all cases, both arguments must be numbers or markers
> ! (markers indicate positions in buffers).
>
> @item string<
> @itemx string-lessp
> --- 4384,4398 ----
> @itemx >
> @itemx <=
> @itemx >=
> + @itemx =
> The @code{<} function tests whether its first argument is smaller than
> ! its second argument. A corresponding function, @code{>}, tests
> ! whether the first argument is greater than the second. Likewise,
> ! @code{<=} tests whether the first argument is less than or equal to
> ! the second and @code{>=} tests whether the first argument is greater
> ! than or equal to the second. Finally, @code{=} tests whether the
> ! arguments are numerically equal. In all cases, both arguments must be
> ! numbers or markers (markers indicate positions in buffers).
>
> @item string<
> @itemx string-lessp
> ***************
> *** 4591,4602 ****
> then @key{RET}).
>
> @cindex Find source of function
> ! In versions 20 and higher, when a function is written in Emacs Lisp,
> ! @code{describe-function} will also tell you the location of the
> ! function definition. If you move point over the file name and press
> ! the @key{RET} key, which in this case means @code{help-follow} rather
> ! than `return' or `enter', Emacs will take you directly to the function
> ! definition.
>
> More generally, if you want to see a function in its original source
> file, you can use the @code{find-tags} function to jump to it.
> --- 4525,4535 ----
> then @key{RET}).
>
> @cindex Find source of function
> ! When a function is written in Emacs Lisp, @code{describe-function}
> ! will also tell you the location of the function definition. If you
> ! move point over the file name and press the @key{RET} key, which in
> ! this case means @code{help-follow} rather than `return' or `enter',
> ! Emacs will take you directly to the function definition.
>
> More generally, if you want to see a function in its original source
> file, you can use the @code{find-tags} function to jump to it.
> ***************
> *** 4619,4625 ****
> @key{RET}}. (On some keyboards, the @key{META} key is labelled
> @key{ALT}.)
>
> ! @c !!! 21.0.100 tags table location in this paragraph
> @cindex TAGS table, specifying
> @findex find-tags
> Depending on how the initial default values of your copy of Emacs are
> --- 4552,4558 ----
> @key{RET}}. (On some keyboards, the @key{META} key is labelled
> @key{ALT}.)
>
> ! @c !!! 22.1 tags table location in this paragraph
> @cindex TAGS table, specifying
> @findex find-tags
> Depending on how the initial default values of your copy of Emacs are
> ***************
> *** 4629,4635 ****
> if it has already been created for you, will be in a subdirectory of
> the @file{/usr/local/share/emacs/} directory; thus you would use the
> @code{M-x visit-tags-table} command and specify a pathname such as
> ! @file{/usr/local/share/emacs/21.0.100/lisp/TAGS} or
> @file{/usr/local/src/emacs/src/TAGS}. If the tags table has
> not already been created, you will have to create it yourself.
>
> --- 4562,4568 ----
> if it has already been created for you, will be in a subdirectory of
> the @file{/usr/local/share/emacs/} directory; thus you would use the
> @code{M-x visit-tags-table} command and specify a pathname such as
> ! @file{/usr/local/share/emacs/22.1/lisp/TAGS} or
> @file{/usr/local/src/emacs/src/TAGS}. If the tags table has
> not already been created, you will have to create it yourself.
>
> ***************
> *** 4818,4832 ****
> @end ifnottex
>
> @need 1250
> ! In GNU Emacs 20, the code for the complete function looks like this:
>
> @smallexample
> @group
> (defun mark-whole-buffer ()
> ! "Put point at beginning and mark at end of buffer."
> (interactive)
> (push-mark (point))
> ! (push-mark (point-max))
> (goto-char (point-min)))
> @end group
> @end smallexample
> --- 4751,4768 ----
> @end ifnottex
>
> @need 1250
> ! In GNU Emacs 22, the code for the complete function looks like this:
>
> @smallexample
> @group
> (defun mark-whole-buffer ()
> ! "Put point at beginning and mark at end of buffer.
> ! You probably should not use this function in Lisp programs;
> ! it is usually a mistake for a Lisp function to use any subroutine
> ! that uses or sets the mark."
> (interactive)
> (push-mark (point))
> ! (push-mark (point-max) nil t)
> (goto-char (point-min)))
> @end group
> @end smallexample
> ***************
> *** 4866,4872 ****
> @smallexample
> @group
> (push-mark (point))
> ! (push-mark (point-max))
> (goto-char (point-min))
> @end group
> @end smallexample
> --- 4802,4808 ----
> @smallexample
> @group
> (push-mark (point))
> ! (push-mark (point-max) nil t)
> (goto-char (point-min))
> @end group
> @end smallexample
> ***************
> *** 4889,4922 ****
> line causes Emacs to determine the position of point and set a mark
> there.
>
> ! The next line of @code{mark-whole-buffer} is @code{(push-mark (point-max)}.
> ! This expression sets a mark at the point in the buffer
> ! that has the highest number. This will be the end of the buffer (or,
> ! if the buffer is narrowed, the end of the accessible portion of the
> ! buffer. @xref{Narrowing & Widening, , Narrowing and Widening}, for
> ! more about narrowing.) After this mark has been set, the previous
> ! mark, the one set at point, is no longer set, but Emacs remembers its
> ! position, just as all other recent marks are always remembered. This
> ! means that you can, if you wish, go back to that position by typing
> ! @kbd{C-u C-@key{SPC}} twice.
> !
> ! (In GNU Emacs 21, the @code{(push-mark (point-max)} is slightly more
> ! complicated than shown here. The line reads
> !
> ! @smallexample
> ! (push-mark (point-max) nil t)
> ! @end smallexample
> !
> ! @noindent
> ! (The expression works nearly the same as before. It sets a mark at
> ! the highest numbered place in the buffer that it can. However, in
> ! this version, @code{push-mark} has two additional arguments. The
> ! second argument to @code{push-mark} is @code{nil}. This tells the
> ! function it @emph{should} display a message that says `Mark set' when
> ! it pushes the mark. The third argument is @code{t}. This tells
> @code{push-mark} to activate the mark when Transient Mark mode is
> turned on. Transient Mark mode highlights the currently active
> ! region. It is usually turned off.)
>
> Finally, the last line of the function is @code{(goto-char
> (point-min)))}. This is written exactly the same way as it is written
> --- 4825,4847 ----
> line causes Emacs to determine the position of point and set a mark
> there.
>
> ! The next line of @code{mark-whole-buffer} is @code{(push-mark
> ! (point-max) nil t)}. This expression sets a mark at the point in the
> ! buffer that has the highest number. This will be the end of the
> ! buffer (or, if the buffer is narrowed, the end of the accessible
> ! portion of the buffer. @xref{Narrowing & Widening, , Narrowing and
> ! Widening}, for more about narrowing.) After this mark has been set,
> ! the previous mark, the one set at point, is no longer set, but Emacs
> ! remembers its position, just as all other recent marks are always
> ! remembered. This means that you can, if you wish, go back to that
> ! position by typing @kbd{C-u C-@key{SPC}} twice. We also see here that
> ! @code{push-mark} has two additional, optional arguments. The second
> ! argument to @code{push-mark} is @code{nil}. This tells the function
> ! it, as is the default, @emph{should} display the message `Mark set' to
> ! the user. The third argument is @code{t}. This tells
> @code{push-mark} to activate the mark when Transient Mark mode is
> turned on. Transient Mark mode highlights the currently active
> ! region. It is usually turned off.
>
> Finally, the last line of the function is @code{(goto-char
> (point-min)))}. This is written exactly the same way as it is written
> ***************
> *** 7238,7283 ****
> @section @code{zap-to-char}
> @findex zap-to-char
>
> ! The @code{zap-to-char} function barely changed between GNU Emacs
> ! version 19 and GNU Emacs version 21. However, @code{zap-to-char}
> ! calls another function, @code{kill-region}, which enjoyed a major rewrite
> ! on the way to version 21.
> !
> ! The @code{kill-region} function in Emacs 19 is complex, but does not
> ! use code that is important at this time. We will skip it.
> !
> ! The @code{kill-region} function in Emacs 21 is easier to read than the
> ! same function in Emacs 19 and introduces a very important concept,
> ! that of error handling. We will walk through the function.
> !
> ! But first, let us look at the interactive @code{zap-to-char} function.
> !
> ! @menu
> ! * Complete zap-to-char:: The complete implementation.
> ! * zap-to-char interactive:: A three part interactive expression.
> ! * zap-to-char body:: A short overview.
> ! * search-forward:: How to search for a string.
> ! * progn:: The @code{progn} special form.
> ! * Summing up zap-to-char:: Using @code{point} and @code{search-forward}.
> ! @end menu
> !
> ! @node Complete zap-to-char, zap-to-char interactive, zap-to-char, zap-to-char
> ! @ifnottex
> ! @unnumberedsubsec The Complete @code{zap-to-char} Implementation
> ! @end ifnottex
> !
> ! The GNU Emacs version 19 and version 21 implementations of the
> ! @code{zap-to-char} function are nearly identical in form, and they
> ! work alike. The function removes the text in the region between the
> ! location of the cursor (i.e., of point) up to and including the next
> ! occurrence of a specified character. The text that @code{zap-to-char}
> ! removes is put in the kill ring; and it can be retrieved from the kill
> ! ring by typing @kbd{C-y} (@code{yank}). If the command is given an
> ! argument, it removes text through that number of occurrences. Thus,
> ! if the cursor were at the beginning of this sentence and the character
> ! were @samp{s}, @samp{Thus} would be removed. If the argument were
> ! two, @samp{Thus, if the curs} would be removed, up to and including
> ! the @samp{s} in @samp{cursor}.
>
> If the specified character is not found, @code{zap-to-char} will say
> ``Search failed'', tell you the character you typed, and not remove
> --- 7163,7178 ----
> @section @code{zap-to-char}
> @findex zap-to-char
>
> ! The @code{zap-to-char} function removes the text in the region between
> ! the location of the cursor (i.e., of point) up to and including the
> ! next occurrence of a specified character. The text that
> ! @code{zap-to-char} removes is put in the kill ring; and it can be
> ! retrieved from the kill ring by typing @kbd{C-y} (@code{yank}). If
> ! the command is given an argument, it removes text through that number
> ! of occurrences. Thus, if the cursor were at the beginning of this
> ! sentence and the character were @samp{s}, @samp{Thus} would be
> ! removed. If the argument were two, @samp{Thus, if the curs} would be
> ! removed, up to and including the @samp{s} in @samp{cursor}.
>
> If the specified character is not found, @code{zap-to-char} will say
> ``Search failed'', tell you the character you typed, and not remove
> ***************
> *** 7289,7295 ****
> deletion command.
>
> @need 800
> ! Here is the complete text of the version 19 implementation of the function:
>
> @c v 19
> @smallexample
> --- 7184,7193 ----
> deletion command.
>
> @need 800
> ! Here is the complete text of the version 19 implementation of the
> ! function, which is somewhat simpler than more recent versions but
> ! contains all essential behavior. Following sections will discuss
> ! portions of the function definition in detail.
>
> @c v 19
> @smallexample
> ***************
> *** 7306,7311 ****
> --- 7204,7217 ----
> @end group
> @end smallexample
>
> + @menu
> + * zap-to-char interactive:: A three part interactive expression.
> + * zap-to-char body:: A short overview.
> + * search-forward:: How to search for a string.
> + * progn:: The @code{progn} special form.
> + * Summing up zap-to-char:: Using @code{point} and @code{search-forward}.
> + @end menu
> +
> @node zap-to-char interactive, zap-to-char body, Complete zap-to-char, zap-to-char
> @comment node-name, next, previous, up
> @subsection The @code{interactive} Expression
> ***************
> *** 7325,7356 ****
> remove text, and you will receive a message that says ``Buffer is
> read-only''; your terminal may beep at you as well.
>
> ! The version 21 implementation does not have the asterisk, @samp{*}. The
> ! function works the same as in version 19: in both cases, it cannot
> ! remove text from a read-only buffer but the function does copy the
> ! text that would have been removed to the kill ring. Also, in both
> ! cases, you see an error message.
> !
> ! However, the version 19 implementation copies text from a read-only
> ! buffer only because of a mistake in the implementation of
> ! @code{interactive}. According to the documentation for
> ! @code{interactive}, the asterisk, @samp{*}, should prevent the
> ! @code{zap-to-char} function from doing anything at all when the buffer
> ! is read only. In version 19, the function should not copy the text to
> ! the kill ring. It is a bug that it does.
> !
> ! In version 21, the function is designed to copy the text to the kill
> ! ring; moreover, @code{interactive} is implemented correctly. So the
> ! asterisk, @samp{*}, had to be removed from the interactive
> ! specification. However, if you insert an @samp{*} yourself and
> ! evaluate the function definition, then the next time you run the
> ! @code{zap-to-char} function on a read-only buffer, you will not copy
> ! any text.
> !
> ! That change aside, and a change to the documentation, the two versions
> ! of the @code{zap-to-char} function are identical.
> !
> ! Let us continue with the interactive specification.
>
> The second part of @code{"*p\ncZap to char:@: "} is the @samp{p}.
> This part is separated from the next part by a newline, @samp{\n}.
> --- 7231,7239 ----
> remove text, and you will receive a message that says ``Buffer is
> read-only''; your terminal may beep at you as well.
>
> ! (More recent implementations do not have the asterisk to allow copying
> ! text from a read-only buffer; the text is not deleted since it is
> ! read-only, but it is still put on the kill ring.)
>
> The second part of @code{"*p\ncZap to char:@: "} is the @samp{p}.
> This part is separated from the next part by a newline, @samp{\n}.
> ***************
> *** 7422,7434 ****
> string, such as @samp{"z"}.
>
> As it happens, the argument passed to @code{zap-to-char} is a single
> ! character. Because of the way computers are built, the Lisp
> ! interpreter may treat a single character as being different from a
> ! string of characters. Inside the computer, a single character has a
> ! different electronic format than a string of one character. (A single
> ! character can often be recorded in the computer using exactly one
> ! byte; but a string may be longer, and the computer needs to be ready
> ! for this.) Since the @code{search-forward} function searches for a
> string, the character that the @code{zap-to-char} function receives as
> its argument must be converted inside the computer from one format to
> the other; otherwise the @code{search-forward} function will fail.
> --- 7305,7314 ----
> string, such as @samp{"z"}.
>
> As it happens, the argument passed to @code{zap-to-char} is a single
> ! character. The Lisp interpreter treats single characters as being
> ! different from strings of characters, since the former are always one
> ! character but the latter can each have different numbers of
> ! characters. Since the @code{search-forward} function searches for a
> string, the character that the @code{zap-to-char} function receives as
> its argument must be converted inside the computer from one format to
> the other; otherwise the @code{search-forward} function will fail.
> ***************
> *** 7533,7544 ****
> @findex kill-region
>
> The @code{zap-to-char} function uses the @code{kill-region} function.
> ! This function clips text from a region and copies that text to
> ! the kill ring, from which it may be retrieved.
> !
> ! The Emacs 21 version of that function uses @code{condition-case} and
> ! @code{copy-region-as-kill}, both of which we will explain.
> ! @code{condition-case} is an important special form.
>
> In essence, the @code{kill-region} function calls
> @code{condition-case}, which takes three arguments. In this function,
> --- 7413,7422 ----
> @findex kill-region
>
> The @code{zap-to-char} function uses the @code{kill-region} function.
> ! This function clips text from a region and copies that text to the
> ! kill ring, from which it may be retrieved. It also uses
> ! @code{condition-case} and @code{copy-region-as-kill}, both of which we
> ! will explain. @code{condition-case} is an important special form.
>
> In essence, the @code{kill-region} function calls
> @code{condition-case}, which takes three arguments. In this function,
> ***************
> *** 10636,10642 ****
> @group
> (defun @var{name-of-recursive-function} (@var{argument-list})
> "@var{documentation}@dots{}"
> ! (if @var{do-again-test}
> @var{body}@dots{}
> (@var{name-of-recursive-function}
> @var{next-step-expression})))
> --- 10514,10520 ----
> @group
> (defun @var{name-of-recursive-function} (@var{argument-list})
> "@var{documentation}@dots{}"
> ! (when @var{do-again-test}
> @var{body}@dots{}
> (@var{name-of-recursive-function}
> @var{next-step-expression})))
> ***************
> *** 10668,10687 ****
> of numbers can be written recursively. Here is the code, including
> an expression to set the value of the variable @code{animals} to a list.
>
> ! If you are using Emacs 20 or before, this example must be copied to
> ! the @file{*scratch*} buffer and each expression must be evaluated
> ! there. Use @kbd{C-u C-x C-e} to evaluate the
> ! @code{(print-elements-recursively animals)} expression so that the
> ! results are printed in the buffer; otherwise the Lisp interpreter will
> ! try to squeeze the results into the one line of the echo area.
>
> Also, place your cursor immediately after the last closing parenthesis
> of the @code{print-elements-recursively} function, before the comment.
> Otherwise, the Lisp interpreter will try to evaluate the comment.
>
> - If you are using Emacs 21 or later, you can evaluate this expression
> - directly in Info.
> -
> @findex print-elements-recursively
> @smallexample
> @group
> --- 10546,10561 ----
> of numbers can be written recursively. Here is the code, including
> an expression to set the value of the variable @code{animals} to a list.
>
> ! In Emacs, you can evaluate these expressions directly in Info. Use
> ! @kbd{C-u C-x C-e} to evaluate the @code{(print-elements-recursively
> ! animals)} expression so that the results are printed in the buffer;
> ! otherwise the Lisp interpreter will try to squeeze the results into
> ! the one line of the echo area.
>
> Also, place your cursor immediately after the last closing parenthesis
> of the @code{print-elements-recursively} function, before the comment.
> Otherwise, the Lisp interpreter will try to evaluate the comment.
>
> @findex print-elements-recursively
> @smallexample
> @group
> ***************
> *** 10690,10700 ****
> (defun print-elements-recursively (list)
> "Print each element of LIST on a line of its own.
> Uses recursion."
> ! (if list ; @r{do-again-test}
> ! (progn
> ! (print (car list)) ; @r{body}
> ! (print-elements-recursively ; @r{recursive call}
> ! (cdr list))))) ; @r{next-step-expression}
>
> (print-elements-recursively animals)
> @end group
> --- 10564,10573 ----
> (defun print-elements-recursively (list)
> "Print each element of LIST on a line of its own.
> Uses recursion."
> ! (when list ; @r{do-again-test}
> ! (print (car list)) ; @r{body}
> ! (print-elements-recursively ; @r{recursive call}
> ! (cdr list))))) ; @r{next-step-expression}
>
> (print-elements-recursively animals)
> @end group
> ***************
> *** 10716,10722 ****
> assemblies a second robot and tells it what to do; the second robot is
> a different individual from the first, but is the same model.
>
> ! When the second evaluation occurs, the @code{if} expression is
> evaluated and if true, prints the first element of the list it
> receives as its argument (which is the second element of the original
> list). Then the function `calls itself' with the @sc{cdr} of the list
> --- 10589,10595 ----
> assemblies a second robot and tells it what to do; the second robot is
> a different individual from the first, but is the same model.
>
> ! When the second evaluation occurs, the @code{when} expression is
> evaluated and if true, prints the first element of the list it
> receives as its argument (which is the second element of the original
> list). Then the function `calls itself' with the @sc{cdr} of the list
> ***************
> *** 10733,10742 ****
> works on a shorter list.
>
> Eventually, the function invokes itself on an empty list. It creates
> ! a new instance whose argument is @code{nil}. The conditional expression
> ! tests the value of @code{list}. Since the value of @code{list} is
> ! @code{nil}, the @code{if} expression tests false so the then-part is
> ! not evaluated. The function as a whole then returns @code{nil}.
>
> @need 1200
> When you evaluate @code{(print-elements-recursively animals)} in the
> --- 10606,10616 ----
> works on a shorter list.
>
> Eventually, the function invokes itself on an empty list. It creates
> ! a new instance whose argument is @code{nil}. The conditional
> ! expression tests the value of @code{list}. Since the value of
> ! @code{list} is @code{nil}, the @code{when} expression tests false so
> ! the then-part is not evaluated. The function as a whole then returns
> ! @code{nil}.
>
> @need 1200
> When you evaluate @code{(print-elements-recursively animals)} in the
> ***************
> *** 11114,11124 ****
> (defun print-elements-recursively (list)
> "Print each element of LIST on a line of its own.
> Uses recursion."
> ! (if list ; @r{do-again-test}
> ! (progn
> ! (print (car list)) ; @r{body}
> ! (print-elements-recursively ; @r{recursive call}
> ! (cdr list))))) ; @r{next-step-expression}
>
> (print-elements-recursively animals)
> @end group
> --- 10988,10997 ----
> (defun print-elements-recursively (list)
> "Print each element of LIST on a line of its own.
> Uses recursion."
> ! (when list ; @r{do-again-test}
> ! (print (car list)) ; @r{body}
> ! (print-elements-recursively ; @r{recursive call}
> ! (cdr list)))) ; @r{next-step-expression}
>
> (print-elements-recursively animals)
> @end group
> ***************
> *** 12631,12643 ****
> your sources! Without them, you are like a person who tries to drive
> a car with his eyes shut!)
>
> ! @c !!! again, 21.0.100 tags table location in this paragraph
> Or -- a good habit to get into -- you can type @kbd{M-.}
> (@code{find-tag}) and the name of the function when prompted for it.
> This will take you directly to the source. If the @code{find-tag}
> function first asks you for the name of a @file{TAGS} table, give it
> the name of the @file{TAGS} file such as
> ! @file{/usr/local/share/emacs/21.0.100/lisp/TAGS}. (The exact path to your
> @file{TAGS} file depends on how your copy of Emacs was installed.)
>
> You can also create your own @file{TAGS} file for directories that
> --- 12504,12516 ----
> your sources! Without them, you are like a person who tries to drive
> a car with his eyes shut!)
>
> ! @c !!! again, 22.1 tags table location in this paragraph
> Or -- a good habit to get into -- you can type @kbd{M-.}
> (@code{find-tag}) and the name of the function when prompted for it.
> This will take you directly to the source. If the @code{find-tag}
> function first asks you for the name of a @file{TAGS} table, give it
> the name of the @file{TAGS} file such as
> ! @file{/usr/local/share/emacs/22.1/lisp/TAGS}. (The exact path to your
> @file{TAGS} file depends on how your copy of Emacs was installed.)
>
> You can also create your own @file{TAGS} file for directories that
> ***************
> *** 14345,14352 ****
> definition and constructs a lengths' list containing the information.
>
> Emacs kills the buffer after working through it. This is to save
> ! space inside of Emacs. My version of Emacs 19 contained over 300
> ! source files of interest; Emacs 21 contains over 800 source files.
> Another function will apply @code{lengths-list-file} to each of the
> files.
>
> --- 14218,14224 ----
> definition and constructs a lengths' list containing the information.
>
> Emacs kills the buffer after working through it. This is to save
> ! space inside of Emacs; Emacs 21 contained over 800 source files.
> Another function will apply @code{lengths-list-file} to each of the
> files.
>
> ***************
> *** 14358,14378 ****
> place your cursor after the following expression and type @kbd{C-x
> C-e} (@code{eval-last-sexp}).
>
> ! @c !!! 21.0.100 lisp sources location here
> @smallexample
> (lengths-list-file
> ! "/usr/local/share/emacs/21.0.100/lisp/emacs-lisp/debug.el")
> @end smallexample
>
> - @c was: (lengths-list-file "../lisp/debug.el")
> - @c !!! as of 21, Info file is in
> - @c /usr/share/info/emacs-lisp-intro.info.gz
> - @c but debug.el is in /usr/local/share/emacs/21.0.100/lisp/emacs-lisp/debug.el
> -
> @noindent
> (You may need to change the pathname of the file; the one here worked
> ! with GNU Emacs version 21.0.100. To change the expression, copy it to
> ! the @file{*scratch*} buffer and edit it.
>
> @need 1200
> @noindent
> --- 14230,14245 ----
> place your cursor after the following expression and type @kbd{C-x
> C-e} (@code{eval-last-sexp}).
>
> ! @c !!! 22.1 lisp sources location here
> @smallexample
> (lengths-list-file
> ! "/usr/local/share/emacs/22.1/lisp/emacs-lisp/debug.el")
> @end smallexample
>
> @noindent
> (You may need to change the pathname of the file; the one here worked
> ! with GNU Emacs version 22.1. To change the expression, copy it to
> ! the @file{*scratch*} buffer and edit it.)
>
> @need 1200
> @noindent
> ***************
> *** 14395,14411 ****
> (77 95 85 87 131 89 50 25 44 44 68 35 64 45 17 34 167 457)
> @end smallexample
>
> - @need 1500
> - (Using my old machine, the version 19 lengths' list for @file{debug.el}
> - took seven seconds to produce and looked like this:
> -
> - @smallexample
> - (75 41 80 62 20 45 44 68 45 12 34 235)
> - @end smallexample
> -
> - (The newer version of @file{debug.el} contains more defuns than the
> - earlier one; and my new machine is much faster than the old one.)
> -
> Note that the length of the last definition in the file is first in
> the list.
>
> --- 14262,14267 ----
> ***************
> *** 14499,14509 ****
> name to the absolute, long, path name form of the directory in which
> the function is called.
>
> ! @c !!! 21.0.100 lisp sources location here
> @need 1500
> Thus, if @code{expand-file-name} is called on @code{debug.el} when
> Emacs is visiting the
> ! @file{/usr/local/share/emacs/21.0.100/lisp/emacs-lisp/} directory,
>
> @smallexample
> debug.el
> --- 14355,14365 ----
> name to the absolute, long, path name form of the directory in which
> the function is called.
>
> ! @c !!! 22.1 lisp sources location here
> @need 1500
> Thus, if @code{expand-file-name} is called on @code{debug.el} when
> Emacs is visiting the
> ! @file{/usr/local/share/emacs/22.1/lisp/emacs-lisp/} directory,
>
> @smallexample
> debug.el
> ***************
> *** 14513,14521 ****
> @noindent
> becomes
>
> ! @c !!! 21.0.100 lisp sources location here
> @smallexample
> ! /usr/local/share/emacs/21.0.100/lisp/emacs-lisp/debug.el
> @end smallexample
>
> The only other new element of this function definition is the as yet
> --- 14369,14377 ----
> @noindent
> becomes
>
> ! @c !!! 22.1 lisp sources location here
> @smallexample
> ! /usr/local/share/emacs/22.1/lisp/emacs-lisp/debug.el
> @end smallexample
>
> The only other new element of this function definition is the as yet
> ***************
> *** 14779,14787 ****
>
> @smallexample
> @group
> ! ("../lisp/macros.el"
> ! "../lisp/mail/rmail.el"
> ! "../lisp/makesum.el")
> @end group
> @end smallexample
>
> --- 14635,14643 ----
>
> @smallexample
> @group
> ! ("@dots{}/lisp/macros.el"
> ! "@dots{}/lisp/mail/rmail.el"
> ! "@dots{}/lisp/makesum.el")
> @end group
> @end smallexample
>
> ***************
> *** 14909,14915 ****
> ;; Although the function will be used non-interactively,
> ;; it will be easier to test if we make it interactive.
> ;; The directory will have a name such as
> ! ;; "/usr/local/share/emacs/21.0.100/lisp/"
> (interactive "DDirectory name: ")
> @end group
> @group
> --- 14765,14771 ----
> ;; Although the function will be used non-interactively,
> ;; it will be easier to test if we make it interactive.
> ;; The directory will have a name such as
> ! ;; "/usr/local/share/emacs/22.1/lisp/"
> (interactive "DDirectory name: ")
> @end group
> @group
> ***************
> *** 15892,15898 ****
>
> The recursive function is a little more difficult. It has four parts:
> the `do-again-test', the printing code, the recursive call, and the
> ! `next-step-expression'. The `do-again-test' is an @code{if}
> expression that determines whether the @code{numbers-list} contains
> any remaining elements; if it does, the function prints one column of
> the graph using the printing code and calls itself again. The
> --- 15748,15754 ----
>
> The recursive function is a little more difficult. It has four parts:
> the `do-again-test', the printing code, the recursive call, and the
> ! `next-step-expression'. The `do-again-test' is an @code{when}
> expression that determines whether the @code{numbers-list} contains
> any remaining elements; if it does, the function prints one column of
> the graph using the printing code and calls itself again. The
> ***************
> *** 15909,15926 ****
> @end group
>
> @group
> ! (if numbers-list
> ! (progn
> ! (setq from-position (point))
> ! (insert-rectangle
> ! (column-of-graph height (car numbers-list)))
> @end group
> @group
> ! (goto-char from-position)
> ! (forward-char symbol-width)
> ! (sit-for 0) ; @r{Draw graph column by column.}
> ! (recursive-graph-body-print-internal
> ! (cdr numbers-list) height symbol-width))))
> @end group
> @end smallexample
>
> --- 15765,15781 ----
> @end group
>
> @group
> ! (when numbers-list
> ! (setq from-position (point))
> ! (insert-rectangle
> ! (column-of-graph height (car numbers-list)))
> @end group
> @group
> ! (goto-char from-position)
> ! (forward-char symbol-width)
> ! (sit-for 0) ; @r{Draw graph column by column.}
> ! (recursive-graph-body-print-internal
> ! (cdr numbers-list) height symbol-width)))
> @end group
> @end smallexample
>
> ***************
> *** 15994,16000 ****
> * Loading Files:: Load (i.e., evaluate) files automatically.
> * Autoload:: Make functions available.
> * Simple Extension:: Define a function; bind it to a key.
> ! * X11 Colors:: Colors in version 19 in X.
> * Miscellaneous::
> * Mode Line:: How to customize your mode line.
> @end menu
> --- 15849,15855 ----
> * Loading Files:: Load (i.e., evaluate) files automatically.
> * Autoload:: Make functions available.
> * Simple Extension:: Define a function; bind it to a key.
> ! * X11 Colors:: Setting colors to use in X.
> * Miscellaneous::
> * Mode Line:: How to customize your mode line.
> @end menu
> ***************
> *** 16916,16991 ****
> @cindex Conditional 'twixt two versions of Emacs
> @cindex Version of Emacs, choosing
> @cindex Emacs version, choosing
> ! If you run two versions of GNU Emacs, such as versions 20 and 21, and
> use one @file{.emacs} file, you can select which code to evaluate with
> ! the following conditional:
>
> @smallexample
> @group
> ! (cond
> ! ((string-equal (number-to-string 20) (substring (emacs-version) 10 12))
> ! ;; evaluate version 20 code
> ( @dots{} ))
> - ((string-equal (number-to-string 21) (substring (emacs-version) 10 12))
> - ;; evaluate version 21 code
> - ( @dots{} )))
> @end group
> @end smallexample
>
> ! For example, in contrast to version 20, version 21 blinks its cursor
> ! by default. I hate such blinking, as well as some other features in
> ! version 21, so I placed the following in my @file{.emacs}
> ! file@footnote{When I start instances of Emacs that do not load my
> ! @file{.emacs} file or any site file, I also turn off blinking:
> !
> ! @smallexample
> ! emacs -q --no-site-file -eval '(blink-cursor-mode nil)'
> ! @end smallexample
> ! }:
>
> @smallexample
> @group
> ! (if (string-equal "21" (substring (emacs-version) 10 12))
> ! (progn
> ! (blink-cursor-mode 0)
> ! ;; Insert newline when you press `C-n' (next-line)
> ! ;; at the end of the buffer
> ! (setq next-line-add-newlines t)
> @end group
> @group
> ! ;; Turn on image viewing
> ! (auto-image-file-mode t)
> @end group
> @group
> ! ;; Turn on menu bar (this bar has text)
> ! ;; (Use numeric argument to turn on)
> ! (menu-bar-mode 1)
> @end group
> @group
> ! ;; Turn off tool bar (this bar has icons)
> ! ;; (Use numeric argument to turn on)
> ! (tool-bar-mode nil)
> @end group
> @group
> ! ;; Turn off tooltip mode for tool bar
> ! ;; (This mode causes icon explanations to pop up)
> ! ;; (Use numeric argument to turn on)
> ! (tooltip-mode nil)
> ! ;; If tooltips turned on, make tips appear promptly
> ! (setq tooltip-delay 0.1) ; default is one second
> ! ))
> @end group
> @end smallexample
>
> - @noindent
> - (You will note that instead of typing @code{(number-to-string 21)}, I
> - decided to save typing and wrote `21' as a string, @code{"21"}, rather
> - than convert it from an integer to a string. In this instance, this
> - expression is better than the longer, but more general
> - @code{(number-to-string 21)}. However, if you do not know ahead of
> - time what type of information will be returned, then the
> - @code{number-to-string} function will be needed.)
> -
> @node X11 Colors, Miscellaneous, Simple Extension, Emacs Initialization
> @section X11 Colors
>
> --- 16771,16825 ----
> @cindex Conditional 'twixt two versions of Emacs
> @cindex Version of Emacs, choosing
> @cindex Emacs version, choosing
> ! If you run multiple versions of GNU Emacs, such as versions 20 and 21, and
> use one @file{.emacs} file, you can select which code to evaluate with
> ! a conditional like the following:
>
> @smallexample
> @group
> ! (if (< emacs-major-version 21)
> ! ;; code for versions 20 and before
> ! ( @dots{} )
> ! ;; code for versions 21 and newer
> ( @dots{} ))
> @end group
> @end smallexample
>
> ! For example, starting in version 21, the cursor blinks by default. I
> ! don't like that feature, but I do like viewing image files as images,
> ! which is also new in 21 but disabled by default. To obtain just the
> ! features I like, I placed the following in my @file{.emacs} file:
>
> @smallexample
> @group
> ! (when (>= emacs-major-version 21)
> ! (blink-cursor-mode 0)
> ! ;; Insert newline when you press `C-n' (next-line)
> ! ;; at the end of the buffer
> ! (setq next-line-add-newlines t)
> @end group
> @group
> ! ;; Turn on image viewing
> ! (auto-image-file-mode 1)
> @end group
> @group
> ! ;; Turn on menu bar (this bar has text)
> ! (menu-bar-mode 1)
> @end group
> @group
> ! ;; Turn off tool bar (this bar has icons)
> ! (tool-bar-mode 0)
> @end group
> @group
> ! ;; Turn off tooltip mode for tool bar
> ! ;; (This mode causes icon explanations to pop up)
> ! (tooltip-mode 0)
> ! ;; If tooltips turned on, make tips appear promptly
> ! (setq tooltip-delay 0.1) ; default is one second
> ! ))
> @end group
> @end smallexample
>
> @node X11 Colors, Miscellaneous, Simple Extension, Emacs Initialization
> @section X11 Colors
>
> ***************
> *** 17344,17356 ****
> characters; this length works well in a typical 80 column wide
> window.)
>
> ! @code{:eval} is a new feature in GNU Emacs version 21. It says to
> ! evaluate the following form and use the result as a string to display.
> ! In this case, the expression displays the first component of the full
> ! system name. The end of the first component is a @samp{.} (`period'),
> ! so I use the @code{string-match} function to tell me the length of the
> ! first component. The substring from the zeroth character to that
> ! length is the name of the machine.
>
> @need 1250
> This is the expression:
> --- 17178,17189 ----
> characters; this length works well in a typical 80 column wide
> window.)
>
> ! @code{:eval} says to evaluate the following form and use the result as
> ! a string to display. In this case, the expression displays the first
> ! component of the full system name. The end of the first component is
> ! a @samp{.} (`period'), so I use the @code{string-match} function to
> ! tell me the length of the first component. The substring from the
> ! zeroth character to that length is the name of the machine.
>
> @need 1250
> This is the expression:
> ***************
> *** 17479,17502 ****
> tell you what you need to know to correct the definition. The
> function @code{1=} is `void'.
>
> - @need 800
> - In GNU Emacs 20 and before, you will see:
> -
> - @smallexample
> - Symbol's function definition is void:@: 1=
> - @end smallexample
> -
> - @noindent
> - which has the same meaning as the @file{*Backtrace*} buffer line in
> - version 21.
> -
> However, suppose you are not quite certain what is going on?
> You can read the complete backtrace.
>
> - In this case, you need to run GNU Emacs 21, which automatically starts
> - the debugger that puts you in the @file{*Backtrace*} buffer; or else,
> - you need to start the debugger manually as described below.
> -
> Read the @file{*Backtrace*} buffer from the bottom up; it tells you
> what Emacs did that led to the error. Emacs made an interactive call
> to @kbd{C-x C-e} (@code{eval-last-sexp}), which led to the evaluation
> --- 17312,17320 ----
> ***************
> *** 17535,17551 ****
> @section @code{debug-on-entry}
> @findex debug-on-entry
>
> ! GNU Emacs 21 starts the debugger automatically when your function has
> ! an error. GNU Emacs version 20 and before did not; it simply
> ! presented you with an error message. You had to start the debugger
> ! manually.
> !
> ! You can start the debugger manually for all versions of Emacs; the
> ! advantage is that the debugger runs even if you do not have a bug in
> ! your code. Sometimes your code will be free of bugs!
>
> ! You can enter the debugger when you call the function by calling
> ! @code{debug-on-entry}.
>
> @need 1250
> @noindent
> --- 17353,17365 ----
> @section @code{debug-on-entry}
> @findex debug-on-entry
>
> ! Emacs starts the debugger automatically when your function encounters
> ! an error. You can ask for Emacs to start the debugger at other times;
> ! this can help you understand the behavior of your code whether it
> ! fails or not.
>
> ! You can arrange to enter the debugger when you call the function by
> ! calling @code{debug-on-entry}.
>
> @need 1250
> @noindent
> ***************
> *** 17564,17572 ****
> @end smallexample
>
> @noindent
> ! All versions of Emacs will create a @file{*Backtrace*} buffer and tell
> ! you that it is beginning to evaluate the @code{triangle-bugged}
> ! function:
>
> @smallexample
> @group
> --- 17378,17385 ----
> @end smallexample
>
> @noindent
> ! Emacs will create a @file{*Backtrace*} buffer and tell you that it is
> ! beginning to evaluate the @code{triangle-bugged} function:
>
> @smallexample
> @group
> _______________________________________________
> Emacs-devel mailing list
> Emacs-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-devel
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: "Emacs 21"
2006-11-04 0:54 ` Kim F. Storm
@ 2006-11-04 3:17 ` Robert J. Chassell
2006-11-08 21:24 ` Stuart D. Herring
2006-11-05 7:07 ` Richard Stallman
1 sibling, 1 reply; 30+ messages in thread
From: Robert J. Chassell @ 2006-11-04 3:17 UTC (permalink / raw)
Cc: rms, emacs-devel
These changes look good to me. Shouldn't they be installed _now_ ?
The text has been updated to GNU Emacs 22; this has taken care of
issues that I have recognized -- but I am sure I missed many.
> * emacs-lisp-intro.texi (Top): remove menu entry for "Complete
> zap-to-char".
updated
> (Top, Emacs Initialization): remove version reference for X
> colors.
Removed
> (Making Errors, Void Function, Void Variable)
> (Wrong Type of Argument, debug, debug-on-entry): remove discussion
> of Emacs 20 error reporting.
updated to 22
> (else): make impossible outcome obvious.
Don't know about this; I think the discussion of else is obvious but
maybe it is not.
> (Review): use `emacs-major-version' instead of `emacs-version'.
emacs-major-version did not work as of a few days ago, but
emacs-version did, so kept emacs-version
> Document `='.
done
> (Finding More): remove discussion of old `describe-function'
> behavior.
As far as I remember, done
> (Finding More, fwd-para summary, lengths-list-file)
> (lengths-list-many-files, Files List): use 22.1 instead of
> 21.0.100 as a dummy version number.
I used 22.0.100 as the dummy version number. That fits my experience
better than anything. Maybe it should be 22.1.100.
> (mark-whole-buffer overview): use version 22 `mark-whole-buffer'.
done, i.e., rewritten
> (Body of mark-whole-buffer): update call to `push-mark'. Merge
done, i.e., rewritten
> paragraphs describing `push-mark' call to include 21 information.
done, i.e., rewritten, I am pretty sure. (I have forgot all that I did.)
> (zap-to-char): remove discussion of version 19 function, and the
> description of error-handling in `kill-region'. Include function
> source in node. Remove "Complete zap-to-char" menu item.
done, i.e., rewritten, I am pretty sure.
> (zap-to-char interactive): simplify discussion of "*" in the
> interactive spec, omitting version 19 bug.
done
> (search-forward): simplify discussion of character/string
rewrote for 22
> (kill-region): merge version 21 information.
rewrote for 22
> (Recursive Definition Parts): use `when' in recursive template.
Not done, but probably a good idea; `when' is discussed elsewhere,
maybe even earlier in the text, so the addition of yet another idea is
not too bad, especially since we do not want to encourage recursion
with Emacs Lisp!
> (Recursion with list): remove Emacs 20 instructions.
I am pretty sure this was done
> (Recursion with list, Every, recursive-graph-body-print): use
> `when' instead of `if'+`progn'.
Same comment as above regarding `when'
> (lengths-list-file): remove Emacs 19 commentary, old path Texinfo
> comment.
I rewrote this for 22; I am not sure about the old comment; I presume
it is gone
> (Files List): use @dots instead of ".." directory in example list.
I remember looking at this and either put in the multiple dots or
discovered that going up a directory was right. I cannot remember which
> (Simple Extension): clean up testing of Emacs version and minor
> mode calls, and rewrite motivation for version-specific
> customization
Cannot remember what I did.
> (Mode Line): don't mention that :eval was new in 21.
Done
> (debug-on-entry): rewrite motivation for deliberate debugging.
I don't remember seeing a need for this.
Please make suggestions based on what has been done since October 31.
The differences between then and any earlier version are very large,
much, much larger than any posted -- too large to post.
Please read the text and see what can be improved. I am having a hard
time being enough of a novice. I do not want to present too many
complications but fear I have added them. The experience is a bit
surprising, since I don't think of myself as knowing much. Maybe I am
getting old. Perhaps you who know much more or who are better than I
or younger will find it easier to figure out what to say to those who
know nothing as yet; that is my hope! Thanks!
--
Robert J. Chassell GnuPG Key ID: 004B4AC8
bob@rattlesnake.com bob@gnu.org
http://www.rattlesnake.com http://www.teak.cc
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: "Emacs 21"
2006-11-04 0:54 ` Kim F. Storm
2006-11-04 3:17 ` Robert J. Chassell
@ 2006-11-05 7:07 ` Richard Stallman
1 sibling, 0 replies; 30+ messages in thread
From: Richard Stallman @ 2006-11-05 7:07 UTC (permalink / raw)
Cc: bob, emacs-devel
Bob Chassell is in charge of the intro.
He should decide whether to install these changes.
Since they can't break anything else, I have nothing against it.
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: "Emacs 21"
2006-11-04 3:17 ` Robert J. Chassell
@ 2006-11-08 21:24 ` Stuart D. Herring
2006-11-09 17:13 ` Robert J. Chassell
0 siblings, 1 reply; 30+ messages in thread
From: Stuart D. Herring @ 2006-11-08 21:24 UTC (permalink / raw)
Cc: emacs-devel, rms, Kim F. Storm
> [storm@cua.dk wrote this one line:]
> These changes look good to me. Shouldn't they be installed _now_ ?
> [bob@rattlesnake.com wrote, later in the message:]
> Please make suggestions based on what has been done since October 31.
> The differences between then and any earlier version are very large, much,
> much larger than any posted -- too large to post.
Due to those massive revisions made (in one commit) to the Lisp
Introduction, my changes became the world's worst edit/merge conflict.
Many of them (or changes equivalent to them) have been made, but I'll
provide "finishing off" commentary to help merge other parts of my patch:
> [rest of singly-quoted text is from bob@rattlesnake.com; doubly-quoted is
> from my ChangeLog]
> > * emacs-lisp-intro.texi (Top): remove menu entry for "Complete
zap-to-char".
>
> updated
My patch kills that node because it merges it with the "zap-to-char" node
because it nearly blanks that node. It blanks it because the version
update verbiage was deemed irrelevant and the discussion of `kill-region'
was duplicated at its proper discussion later.
> > (Making Errors, Void Function, Void Variable)
> > (Wrong Type of Argument, debug, debug-on-entry): remove discussion
of Emacs 20 error reporting.
>
> updated to 22
Updated, but not all of the Emacs 20 discussion was not removed as RMS
directed (me to do). Note how many nodes this ChangeLog entry of mine
described: for example, lines 18468-70 of version 1.55 should be just
removed (as I did) or perhaps pared down to a mere cross-reference to
manually starting the debugger.
> > (else): make impossible outcome obvious.
>
> Don't know about this; I think the discussion of else is obvious but
maybe it is not.
The Lisp reads
(if (> 4 5)
(message "5 is greater than 4!")
(message "4 is not greater than 5!"))
surely the else-branch shall always be taken, but if the then branch is
taken it makes no sense to print a message counter to it. My patch
recommends "4 is greater than 5?!", with the ? to indicate its
unexpectedness.
> > (Review): use `emacs-major-version' instead of `emacs-version'.
>
> emacs-major-version did not work as of a few days ago, but
> emacs-version did, so kept emacs-version
Sorry, but (number-to-string 22) is nonsense, and using `substring' on
`emacs-version' is backward and fragile. Why didn't `emacs-major-version'
work for you? It claims to have existed since 19.23. It's a variable,
not a function, if that helps.
> > (Finding More): remove discussion of old `describe-function'
behavior.
>
> As far as I remember, done
Done differently from what I did, but looks fine.
> > (Finding More, fwd-para summary, lengths-list-file)
> > (lengths-list-many-files, Files List): use 22.1 instead of
21.0.100 as a dummy version number.
>
> I used 22.0.100 as the dummy version number. That fits my experience
better than anything. Maybe it should be 22.1.100.
Otherwise discussed in thread.
> > paragraphs describing `push-mark' call to include 21 information.
>
> done, i.e., rewritten, I am pretty sure. (I have forgot all that I
did.)
Your changes there were actually minor; I combined the discussion of the
new arguments into the principal discussion of the line and suppressed the
mention of earlier versions. I'd recommend using my text there.
> > (zap-to-char): remove discussion of version 19 function, and the
description of error-handling in `kill-region'. Include function
source in node. Remove "Complete zap-to-char" menu item.
>
> done, i.e., rewritten, I am pretty sure.
This has been changed somewhat, but still mentions version 19, and
`kill-region' out of place (see my first change).
> > (zap-to-char interactive): simplify discussion of "*" in the
interactive spec, omitting version 19 bug.
> done
Actually, you just wrote to the new interactive spec; fine.
> > (search-forward): simplify discussion of character/string
>
> rewrote for 22
You haven't modified what I modified (which was unrelated to versions);
that hunk of mine should apply without problem.
> > (kill-region): merge version 21 information.
>
> rewrote for 22
You changed "21" to "22", but I actually merged two paragraphs to get rid
of the version reference altogether, since other references were being
removed.
> > (Recursive Definition Parts): use `when' in recursive template.
>
> Not done, but probably a good idea; `when' is discussed elsewhere, maybe
even earlier in the text, so the addition of yet another idea is not too
bad, especially since we do not want to encourage recursion with Emacs
Lisp!
`when' is discussed earlier in the `kill-region' section. I switched to
`when' to simplify all the one-branch `if'-`progn's in the example code.
> > (Recursion with list): remove Emacs 20 instructions.
>
> I am pretty sure this was done
It wasn't.
> > (Recursion with list, Every, recursive-graph-body-print): use
`when' instead of `if'+`progn'.
>
> Same comment as above regarding `when'
(This was my point in introducing it, as I said.)
> > (lengths-list-file): remove Emacs 19 commentary, old path Texinfo
comment.
>
> I rewrote this for 22; I am not sure about the old comment; I presume it
is gone
The 19 commentary is still there. The Texinfo comment is gone.
> > (Files List): use @dots instead of ".." directory in example list.
>
> I remember looking at this and either put in the multiple dots or
discovered that going up a directory was right. I cannot remember which
They have single dots now, although I don't know why. I thought they were
supposed to be generic filename-endings.
> > (Simple Extension): clean up testing of Emacs version and minor
mode calls, and rewrite motivation for version-specific
> > customization
> Cannot remember what I did.
You made some minor adjustments, including using version 22 in the example
conditionals and changing a comment's stated value of the default value of
`tooltip-delay'. I did more, though: I changed the tests to be ">=21" vs.
"<21" (since that's the distinction relevant to the code), fixed the
conventions for arguments to minor-mode functions, and rewrote the
introduction to the .emacs to describe turning features off and on.
> > (debug-on-entry): rewrite motivation for deliberate debugging.
>
> I don't remember seeing a need for this.
The discussion was based on different versions of Emacs and when the
debugger was automatically entered; I changed it simply to discuss how to
do it manually, since that was the focus of that section.
> Please read the text and see what can be improved. I am having a hard
> time being enough of a novice. I do not want to present too many
> complications but fear I have added them. The experience is a bit
> surprising, since I don't think of myself as knowing much. Maybe I am
> getting old. Perhaps you who know much more or who are better than I
> or younger will find it easier to figure out what to say to those who
> know nothing as yet; that is my hope! Thanks!
I may do that too in a separate message.
Please apply my remaining changes unless there's something wrong with
them; the conflicts I'll let others pick between, but I've noted where I
thought my work was particularly worthwhile. For convenience, the
original message/patch is at
http://lists.gnu.org/archive/html/emacs-devel/2006-10/msg00906.html.
Thanks,
Davis
--
This product is sold by volume, not by mass. If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during
shipping.
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: "Emacs 21"
2006-11-08 21:24 ` Stuart D. Herring
@ 2006-11-09 17:13 ` Robert J. Chassell
0 siblings, 0 replies; 30+ messages in thread
From: Robert J. Chassell @ 2006-11-09 17:13 UTC (permalink / raw)
Cc: bob, storm, rms, emacs-devel
... My patch kills [the "Complete zap-to-char"] node because it
merges it with the "zap-to-char" node because it nearly blanks that
node. ...
I do not understand. The "Complete zap-to-char" node adds 34 lines to
the previous node which contains a menu. That is too many lines to
add. As
(texinfo)Menus says
As a practical matter, it is best to locate a menu within 20 or so
lines of the beginning of the node.
Moreover, the section title is within a @ifnottex ... @end ifnottex
environment, so it does not appear in the printed output.
(Actually, I relaxed the restriction a bit, to 30 lines. The nodes
for `A Loop with an Incrementing Counter' and `Evaluation' were too
long. I fixed them. Gack! I found others, too. I think I have
found and fixed them all. Please check!
(The reason for 20 lines is that some people view help on windows with
only 24 lines and the beginning of the menu should be visible. My
relaxation presumes that the smallest window is now 30 lines or so; I
am not sure whether that is true or whether 24 lines still is a good
number. I would hate to have to go over the document and make sure
every segment followed by a menu was 20 lines or fewer long.
(Obviously, most readers will use windows with many more lines, so
they are not the issue or they will listen and not care about the
number of visible lines at all. So far I have not heard any
complaints.)
It blanks it because the version update verbiage was deemed
irrelevant and the discussion of `kill-region' was duplicated at
its proper discussion later.
That makes more sense, except as far as I can see, the goal is to
mention `kill-region' twice (as well as `search-forward'). As the
node says,
(eintr)Who You Are
If you are a programmer, you may not be satisfied with this
primer. The reason is ...
[the programmer says]
When I get to the end of a paragraph, I assume that that
subject is done, finished ...
Also, people do use earlier versions. This is a side effect of having
code that was well written twenty years ago ... it does not die as
rapidly as badly written code.
More significantly, novices often find it easier to understand early
code. Over the years, Emacs has become more complex. This is to be
expected -- for one, we have introduced text properties -- but that
makes it is harder for the intended audience,
(eintr)Who You Are
people who are not programmers.
Indeed, increasingly, some Emacs programmers act as if you should not
study or modify Emacs when you are a regular user who is not a
programmer.
As I see it, this is seen as a practical not legal matter. People who
are not programmers should use the `customize' functions. Certainly,
I use them sometimes, especially for fonts. They are convenient. But
the notion goes beyond that. I am gaining the impression that regular
users are not expected to use `setq'. In any case, it is becoming
harder and harder for a novice to browse
through source code
a habit the node `On Reading this Text' recommends for `people who are
not programmers'.
Perhaps you can suggest a library, other than `simple.el', that I have
not gone into. That would be good. The criteria are two: that
everyone, especially novices, use the code every day; and that the
library be as simple as `simple.el' was in the early days. I don't
know of such a library and would find it wonderful.
The Lisp reads
(if (> 4 5)
(message "5 is greater than 4!")
(message "4 is not greater than 5!"))
surely the else-branch shall always be taken, but if the then branch is
taken it makes no sense to print a message counter to it.
Yes, the else-branch is always be taken, exactly as said.
My patch recommends "4 is greater than 5?!", with the ? to
indicate its unexpectedness.
But the result is not unexpected. 4 is never greater than 5. The
`if' expression does not ever claim it is. Indeed, we could consider
it a major bug for an `if' to reverse the results of a test or for a
test of `>' to give the opposite results.
> (Review): use `emacs-major-version' instead of `emacs-version'.
> emacs-major-version did not work as of a few days ago, but
> emacs-version did, so kept emacs-version
Yes, now I have `emacs-major-version' working. Several days ago I
committed revisions with both `emacs-major-version' and `when'. I do
not know why `emacs-major-version' did not work. I think it was
glitch caused by my .emacs file.
`push-mark'
Your changes there were actually minor; I combined the discussion
of the new arguments into the principal discussion of the line and
suppressed the mention of earlier versions. I'd recommend using my
text there.
I see your point, except that `push-mark' is an example of a function
that has grown more complex over the years. It is easier to consider
it when it just required one argument. The additional arguments make
sense -- the second whether the function should display a message and
the third regarding Transient Mark mode. Unfortunately, they also
mean that a novice has to be led very carefully into the notion.
> (search-forward): simplify discussion of character/string
> rewrote for 22
You haven't modified what I modified (which was unrelated to versions);
that hunk of mine should apply without problem.
Please again show me your change. The relevant part I see has to do
with the way computers are built, and as far as I know, that has more
or less stayed the same.
(eintr)search-forward says
Because of the way computers are built, the Lisp interpreter may
treat a single character as being different from a string of
characters.
Maybe that is no longer true. But if it is true, then it provides
people who never intend to become programmers with an image of a
machine. Otherwise, they may not make enough of the connection
between the symbols of the computer language and the concrete solidity
of the machine which the code directs as if it were a human cook
operating a stove. They may think of code as a magical incantation.
> rewrote for 22
You changed "21" to "22", but I actually merged two paragraphs to get rid
of the version reference altogether, since other references were being
removed.
I have tried to remove references to version 22 altogether and replace
them with the phrase `more recent versions' but could not remove all
of them.
And, I just see, I missed at least one change that should have been
made and did not get rid of a reference to version 21 Emacs ...
Thanks, I will make the changes.
> (Recursive Definition Parts): use `when' in recursive template.
> Not done, but probably a good idea
It is a good idea and I switched to `when'.
> (lengths-list-file)
The 19 commentary is still there.
Yes, it is worth showing how much Emacs as grown -- a factor of three
in the number of source files. That is why I kept the old
information. It really is dramatic.
> (Simple Extension): clean up testing of Emacs version and minor
> mode calls, and rewrite motivation for version-specific
... I changed the tests to be ">= 21"
I added that as an alternative, so readers can see what to do both for
specific versions and for multiple versions.
Please apply my remaining changes ...
Yes, I have applied quite a few. Thank you! Please do read the
latest revision, which I just committed. I think it is pretty good,
but then, as I said, I am close to it!
--
Robert J. Chassell GnuPG Key ID: 004B4AC8
bob@rattlesnake.com bob@gnu.org
http://www.rattlesnake.com http://www.teak.cc
^ permalink raw reply [flat|nested] 30+ messages in thread
end of thread, other threads:[~2006-11-09 17:13 UTC | newest]
Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-06 6:02 "Emacs 21" Richard Stallman
2006-10-06 7:12 ` CHENG Gao
2006-10-06 7:30 ` Romain Francoise
2006-10-06 9:54 ` CHENG Gao
2006-10-06 16:58 ` Romain Francoise
2006-10-06 13:04 ` Andrew M. Scott
2006-10-07 1:07 ` Richard Stallman
2006-10-06 13:17 ` Piet van Oostrum
2006-10-06 16:54 ` Stuart D. Herring
2006-10-06 19:10 ` Reiner Steib
2006-10-07 1:07 ` Richard Stallman
2006-10-06 17:21 ` Stuart D. Herring
2006-10-06 18:26 ` CHENG Gao
2006-10-06 18:46 ` Romain Francoise
2006-10-06 18:50 ` CHENG Gao
2006-10-06 18:48 ` David Kastrup
2006-10-06 22:16 ` Kim F. Storm
2006-10-07 1:07 ` Richard Stallman
2006-10-07 1:07 ` Richard Stallman
2006-10-07 1:07 ` Richard Stallman
2006-10-10 22:13 ` Stuart D. Herring
2006-10-10 22:34 ` David Kastrup
2006-10-11 18:50 ` Richard Stallman
2006-10-27 22:15 ` Stuart D. Herring
2006-11-04 0:54 ` Kim F. Storm
2006-11-04 3:17 ` Robert J. Chassell
2006-11-08 21:24 ` Stuart D. Herring
2006-11-09 17:13 ` Robert J. Chassell
2006-11-05 7:07 ` Richard Stallman
2006-10-06 19:48 ` Stuart D. Herring
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.