]> git.eshelyaron.com Git - emacs.git/commitdiff
(Using Interactive): Explain problem of markers, etc., in command-history.
authorRichard M. Stallman <rms@gnu.org>
Fri, 16 Jun 2006 15:18:03 +0000 (15:18 +0000)
committerRichard M. Stallman <rms@gnu.org>
Fri, 16 Jun 2006 15:18:03 +0000 (15:18 +0000)
lispref/commands.texi

index a75c0c89fecb41785228387732852ecf5a1d96bf..e494d0dfc5a182922f93050963dcb885671a67ec 100644 (file)
@@ -233,6 +233,20 @@ reading the keyboard input:
  (let ((string (read-string "Foo: " nil 'my-history)))
    (list (region-beginning) (region-end) string)))
 @end smallexample
+
+@strong{Warning:} the argument values should not include any data
+types that can't be printed and then read.  Some facilities save
+@code{command-history} in a file to be read in the subsequent
+sessions; if a command's arguments contain a data type that prints
+using @samp{#<@dots{}>} syntax, those facilities won't work.
+
+There are, however, a few exceptions: it is ok to use a limited set of
+expressions such as @code{(point)}, @code{(mark)},
+@code{(region-beginning)}, and @code{(region-end)}, because Emacs
+recognizes them specially and puts the expression (rather than its
+value) into the command history.  To see whether the expression you
+wrote is one of these exceptions, run the command, then examine
+@code{(car command-history)}.
 @end itemize
 
 @cindex examining the @code{interactive} form