Commit f9212ffe authored by nasciiboy's avatar nasciiboy

-------------------------------------------------------

   po hero (REBOOT II½) < How Lists are Implemented
-------------------------------------------------------
   modified:   emacs-lisp-intro.morg
   modified:   emacs-lisp-intro.html
   modified:   emacs-lisp-intro_es.porg
   modified:   emacs-lisp-intro_es.morg
   modified:   emacs-lisp-intro_es.html
-------------------------------------------------------
Sonic-Boom
-------------------------------------------------------
   Cowboy Bebop CD-BOX   : Disc 3
   Cowboy Bebop          : Knockin' on heaven's door
   Darling in the FranXX : ORIGINAL SOUNDTRACK vol.1
   Quicksilver MS        : Just For Love
   QotSA                 ! Eva Vulgaris
   Radiohead             : I Might Be Wrong
   Sound of Ceres        ! Nostalgia for Infinity
-------------------------------------------------------
parent 1af809b1
This diff is collapsed.
......@@ -4399,8 +4399,7 @@ promoting software freedom.”
the buffer. Searches will only work within a narrowed region, not outside
of one, so if you are fixing a part of a document, you can keep yourself
from accidentally finding parts you do not need to fix by narrowing just to
the region you want. (The key binding for @c{narrow-to-region} is @k{C-x n
n}.)
the region you want. (The key binding for @c{narrow-to-region} is @k{C-x n n}.)
However, narrowing does make the rest of the buffer invisible, which can
scare people who inadvertently invoke narrowing and think they have deleted
......@@ -4540,9 +4539,9 @@ promoting software freedom.”
The @c{message} function prints a one-line message at the bottom of the
Emacs screen. The first argument is inside of quotation marks and is
printed as a string of characters. However, it may contain a @'{%d}
expression to print a following argument. @'{%d} prints the argument as a
decimal, so the message will say something such as @'{Line 243}.
printed as a string of characters. However, it may contain a @'c{%d}
expression to print a following argument. @'c{%d} prints the argument as a
decimal, so the message will say something such as @'c{Line 243}.
The number that is printed in place of the @'{%d} is computed by the last
line of the function:
......@@ -4594,9 +4593,9 @@ promoting software freedom.”
The name of the @c{cons} function is not unreasonable: it is an
abbreviation of the word ‘construct’. The origins of the names for @c{car}
and @c{cdr}, on the other hand, are esoteric: @c{car} is an acronym from
the phrase ‘Contents of the Address part of the Register’; and @c{cdr}
(pronounced ‘could-er’) is an acronym from the phrase Contents of the
Decrement part of the Register. These phrases refer to specific pieces of
the phrase @'b(Contents of the Address part of the Register); and @c{cdr}
(pronounced ‘could-er’) is an acronym from the phrase @'b(Contents of the
Decrement part of the Register). These phrases refer to specific pieces of
hardware on the very early computer on which the original Lisp was
developed. Besides being obsolete, the phrases have been completely
irrelevant for more than 25 years to anyone thinking about Lisp.
......@@ -4672,7 +4671,6 @@ promoting software freedom.”
(cdr '(pine fir oak maple))
< src..
On the other hand, in a list of lists, the first element is itself a list.
@c{car} returns this first element as a list. For example, the following
list contains three sub-lists, a list of carnivores, a list of herbivores
......@@ -4744,19 +4742,16 @@ promoting software freedom.”
way; the value is printed in this text after @'{⇒}, which you may read as
‘evaluates to’.
..src > elisp
(cons 'buttercup ())
⇒ (buttercup)
(cons 'daisy '(buttercup))
⇒ (daisy buttercup)
(cons 'violet '(daisy buttercup))
⇒ (violet daisy buttercup)
(cons 'rose '(violet daisy buttercup))
⇒ (rose violet daisy buttercup)
< src..
..srci > elisp
> (cons 'buttercup ())
(buttercup)
> (cons 'daisy '(buttercup))
(daisy buttercup)
> (cons 'violet '(daisy buttercup))
(violet daisy buttercup)
> (cons 'rose '(violet daisy buttercup))
(rose violet daisy buttercup)
< srci..
In the first example, the empty list is shown as @c{()} and a list made up
of @c{buttercup} followed by the empty list is constructed. As you can
......@@ -4932,7 +4927,6 @@ promoting software freedom.”
..srci > elisp
> (nth 0 '("one" "two" "three"))
"one"
> (nth 1 '("one" "two" "three"))
"two"
< srci..
......@@ -5181,17 +5175,17 @@ promoting software freedom.”
< src..
The part within quotation marks, @c{"p\ncZap to char: "}, specifies two
different things. First, and most simply, is the @'{p}. This part is
separated from the next part by a newline, @'{\n}. The @'{p} means that
different things. First, and most simply, is the @'c{p}. This part is
separated from the next part by a newline, @'c{\n}. The @'c{p} means that
the first argument to the function will be passed the value of a
‘processed prefix’. The prefix argument is passed by typing @k{C-u} and
a number, or @k{M-} and a number. If the function is called
interactively without a prefix, 1 is passed to this argument.
The second part of @c{"p\ncZap to char: "} is @'{cZap to char: }. In
this part, the lower case @'{c} indicates that @c{interactive} expects a
The second part of @c{"p\ncZap to char: "} is @'c{cZap to char: }. In
this part, the lower case @'c{c} indicates that @c{interactive} expects a
prompt and that the argument will be a character. The prompt follows the
@'{c} and is the string @'{Zap to char: } (with a space after the colon
@'c{c} and is the string @'c{Zap to char: } (with a space after the colon
to make it look good).
What all this does is prepare the arguments to @c{zap-to-char} so they
......@@ -5257,7 +5251,7 @@ promoting software freedom.”
The @c{search-forward} function takes four arguments:
1. The first argument is the target, what is searched for. This must be
a string, such as @'{"z"}.
a string, such as @c{"z"}.
As it happens, the argument passed to @c{zap-to-char} is a single
character. Because of the way computers are built, the Lisp
......@@ -5779,11 +5773,9 @@ promoting software freedom.”
..srci > elisp
> (concat "abc" "def")
"abcdef"
> (concat "new "
^ (car '("first element" "second element")))
"new first element"
> (concat (car
^ '("first element" "second element")) " modified")
"first element modified"
......@@ -5983,10 +5975,8 @@ promoting software freedom.”
..srci > elisp
> (setq trees '(maple oak pine birch))
(maple oak pine birch)
> (setcdr (nthcdr 2 trees) nil)
nil
> trees
(maple oak pine)
< srci..
......@@ -6150,7 +6140,6 @@ promoting software freedom.”
these comments and uses them to make the “real” documentation.)
In a C macro, the formal parameters come next, with a statement of what
kind of object they are, followed by what might be called the ‘body’ of
the macro. For @c{delete-and-extract-region} the ‘body’ consists of the
......@@ -6182,7 +6171,7 @@ promoting software freedom.”
of the available bits are used to specify the type of information; the
remaining bits are used as ‘content’.
@'{XINT} is a C macro that extracts the relevant number from the longer
@c{XINT} is a C macro that extracts the relevant number from the longer
collection of bits; the three other bits are discarded.
The command in @c{delete-and-extract-region} looks like this:
......@@ -6295,7 +6284,7 @@ promoting software freedom.”
more than 700 such variables, far too many to remember readily.
Fortunately, you can press @k{TAB} after calling the @c{M-x set-variable}
command to see the list of variables. (See Section
@l{https://www.gnu.org/software/emacs/manual/html_mono/emacs.html#Examining and Setting Variables<>Examining and Setting Variables} in @e(The GNU
@l{https://www.gnu.org/software/emacs/manual/html_mono/emacs.html#Examining<>Examining and Setting Variables} in @e(The GNU
Emacs Manual).)
** Review
......@@ -6335,7 +6324,7 @@ promoting software freedom.”
- @c(nthcdr) ::
Return the result of taking @c{cdr} ‘n’ times on a list. The @m(n^th)
Return the result of taking @c{cdr} ‘n’ times on a list. The @m(nᵗʰ)
@c{cdr}. The ‘rest of the rest’, as it were.
For example:
......@@ -6354,14 +6343,10 @@ promoting software freedom.”
..srci > elisp
> (setq triple '(1 2 3))
> (setcar triple '37)
> triple
(37 2 3)
> (setcdr triple '("foo" "bar"))
> triple
(37 "foo" "bar")
< srci..
......@@ -6412,9 +6397,9 @@ promoting software freedom.”
cut or remove the text from the buffer.
@c{delete-and-extract-region} removes the text between point and mark from
the buffer and throws it away. You cannot get it back. (This is not an
interactive command.)
@c{delete-and-extract-region} removes the text between point and mark from
the buffer and throws it away. You cannot get it back. (This is not an
interactive command.)
** Searching Exercises
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment