diff options
-rw-r--r-- | doc/lispref/variables.texi | 24 | ||||
-rw-r--r-- | 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 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 |