summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Kangas <stefankangas@gmail.com>2022-08-23 20:27:56 +0200
committerStefan Kangas <stefankangas@gmail.com>2022-08-23 20:28:25 +0200
commit42496e64707905531c88dfdbab4c65c6a3c53707 (patch)
tree339c04af30ab189a6289cda2cba9c53e9768fee6
parent83b6da31f3cc0ea5bdcd8332596f5f42e4a6296b (diff)
downloademacs-42496e64707905531c88dfdbab4c65c6a3c53707.tar.gz
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.
-rw-r--r--doc/lispref/variables.texi24
-rw-r--r--doc/misc/cl.texi24
2 files changed, 24 insertions, 24 deletions
diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi
index b7b4f56212f..aa308348051 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 be286bbabcd..a6747b1096a 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