[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 42496e6470: Move generalized variable `substring' doc to elisp ma
From: |
Stefan Kangas |
Subject: |
master 42496e6470: Move generalized variable `substring' doc to elisp manual |
Date: |
Tue, 23 Aug 2022 14:28:49 -0400 (EDT) |
branch: master
commit 42496e64707905531c88dfdbab4c65c6a3c53707
Author: Stefan Kangas <stefankangas@gmail.com>
Commit: Stefan Kangas <stefankangas@gmail.com>
Move generalized variable `substring' doc to elisp manual
* doc/misc/cl.texi (Setf Extensions): Move documentation on
'substring' generalized variable from here...
* doc/lispref/variables.texi (Setting Generalized Variables):
...to here.
---
doc/lispref/variables.texi | 24 ++++++++++++++++++++++++
doc/misc/cl.texi | 24 ------------------------
2 files changed, 24 insertions(+), 24 deletions(-)
diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi
index b7b4f56212..aa30834805 100644
--- a/doc/lispref/variables.texi
+++ b/doc/lispref/variables.texi
@@ -2695,6 +2695,30 @@ terminal-parameter window-point
keymap-parent window-start
match-data default-value
@end smallexample
+
+@item
+A call of the form @code{(substring @var{subplace} @var{n} [@var{m}])},
+where @var{subplace} is itself a valid generalized variable whose
+current value is a string, and where the value stored is also a
+string. The new string is spliced into the specified part of the
+destination string. For example:
+
+@example
+(setq a (list "hello" "world"))
+ @result{} ("hello" "world")
+(cadr a)
+ @result{} "world"
+(substring (cadr a) 2 4)
+ @result{} "rl"
+(setf (substring (cadr a) 2 4) "o")
+ @result{} "o"
+(cadr a)
+ @result{} "wood"
+a
+ @result{} ("hello" "wood")
+@end example
+
+@c FIXME? Also 'eq'? (see gv.el)
@end itemize
@noindent
diff --git a/doc/misc/cl.texi b/doc/misc/cl.texi
index be286bbabc..a6747b1096 100644
--- a/doc/misc/cl.texi
+++ b/doc/misc/cl.texi
@@ -920,30 +920,6 @@ cl-caaar@dots{}cl-cddddr cl-first@dots{}cl-tenth
Note that for @code{cl-getf} (as for @code{nthcdr}), the list argument
of the function must itself be a valid @var{place} form.
-@item
-A call of the form @code{(substring @var{subplace} @var{n} [@var{m}])},
-where @var{subplace} is itself a valid generalized variable whose
-current value is a string, and where the value stored is also a
-string. The new string is spliced into the specified part of the
-destination string. For example:
-
-@example
-(setq a (list "hello" "world"))
- @result{} ("hello" "world")
-(cadr a)
- @result{} "world"
-(substring (cadr a) 2 4)
- @result{} "rl"
-(setf (substring (cadr a) 2 4) "o")
- @result{} "o"
-(cadr a)
- @result{} "wood"
-a
- @result{} ("hello" "wood")
-@end example
-
-@c FIXME? Also 'eq'? (see cl-lib.el)
-
@c Currently commented out in cl.el.
@ignore
@item
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 42496e6470: Move generalized variable `substring' doc to elisp manual,
Stefan Kangas <=