diff options
Diffstat (limited to 'lispref')
| -rw-r--r-- | lispref/ChangeLog | 50 | ||||
| -rw-r--r-- | lispref/commands.texi | 10 | ||||
| -rw-r--r-- | lispref/customize.texi | 73 | ||||
| -rw-r--r-- | lispref/display.texi | 7 | ||||
| -rw-r--r-- | lispref/eval.texi | 58 | ||||
| -rw-r--r-- | lispref/help.texi | 1 | ||||
| -rw-r--r-- | lispref/internals.texi | 30 | ||||
| -rw-r--r-- | lispref/loading.texi | 3 | ||||
| -rw-r--r-- | lispref/nonascii.texi | 228 | ||||
| -rw-r--r-- | lispref/objects.texi | 4 | ||||
| -rw-r--r-- | lispref/processes.texi | 1 | ||||
| -rw-r--r-- | lispref/tips.texi | 1 | ||||
| -rw-r--r-- | lispref/variables.texi | 47 |
13 files changed, 386 insertions, 127 deletions
diff --git a/lispref/ChangeLog b/lispref/ChangeLog index 85a5f506739..1b9aabffe46 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog | |||
| @@ -1,3 +1,51 @@ | |||
| 1 | 2003-12-25 Markus Rost <rost@mathematik.uni-bielefeld.de> | ||
| 2 | |||
| 3 | * display.texi (Fringes): Fix typo "set-buffer-window". | ||
| 4 | |||
| 5 | 2003-12-24 Luc Teirlinck <teirllm@auburn.edu> | ||
| 6 | |||
| 7 | * display.texi, eval.texi, help.texi, internals.texi, loading.texi: | ||
| 8 | * nonascii.texi, processes.texi, tips.texi, variables.texi: | ||
| 9 | Add or change various xrefs and anchors. | ||
| 10 | |||
| 11 | * commands.texi: Replace all occurrences of @acronym{CAR} with | ||
| 12 | @sc{car}, for consistency with the rest of the Elisp manual. | ||
| 13 | `car' and `cdr' are historically acronyms, but are no longer | ||
| 14 | widely thought of as such. | ||
| 15 | |||
| 16 | * internals.texi (Pure Storage): Mention that `purecopy' does not | ||
| 17 | copy text properties. | ||
| 18 | (Object Internals): Now 29 bits are used (in most implementations) | ||
| 19 | to address Lisp objects. | ||
| 20 | |||
| 21 | * variables.texi (Variables with Restricted Values): New node. | ||
| 22 | |||
| 23 | * objects.texi (Lisp Data Types): Mention that certain variables | ||
| 24 | can only take on a restricted set of values and add an xref to | ||
| 25 | the new node "Variables with Restricted Values". | ||
| 26 | |||
| 27 | * eval.texi (Function Indirection): Describe the errors that | ||
| 28 | `indirect-function' can signal. | ||
| 29 | (Eval): Clarify the descriptions of `eval-region' and `values'. | ||
| 30 | Describe `eval-buffer' instead of `eval-current-buffer' and | ||
| 31 | mention `eval-current-buffer' as an alias for `current-buffer'. | ||
| 32 | Correct the description and mention all optional arguments. | ||
| 33 | |||
| 34 | * nonascii.texi : Various small changes in addition to the | ||
| 35 | following. | ||
| 36 | (Converting Representations): Clarify behavior of | ||
| 37 | `string-make-multibyte' and `string-to-multibyte' for unibyte all | ||
| 38 | ASCII arguments. | ||
| 39 | (Character Sets): Document the variable `charset-list' and adapt | ||
| 40 | the definition of the function `charset-list' accordingly. | ||
| 41 | (Translation of Characters): Clarify use of generic characters in | ||
| 42 | `make-translation-table'. Clarify and correct the description of | ||
| 43 | the use of translation tables in encoding and decoding. | ||
| 44 | (User-Chosen Coding Systems): Correct and clarify the description | ||
| 45 | of `select-safe-coding-system'. | ||
| 46 | (Default Coding Systems): Clarify description of | ||
| 47 | `file-coding-system-alist'. | ||
| 48 | |||
| 1 | 2003-11-30 Luc Teirlinck <teirllm@auburn.edu> | 49 | 2003-11-30 Luc Teirlinck <teirllm@auburn.edu> |
| 2 | 50 | ||
| 3 | * strings.texi (Text Comparison): Correctly describe when two | 51 | * strings.texi (Text Comparison): Correctly describe when two |
| @@ -42,7 +90,7 @@ | |||
| 42 | 90 | ||
| 43 | 2003-11-20 Luc Teirlinck <teirllm@auburn.edu> | 91 | 2003-11-20 Luc Teirlinck <teirllm@auburn.edu> |
| 44 | 92 | ||
| 45 | * positions.texi (Positions): Mention that, if a marker is used a | 93 | * positions.texi (Positions): Mention that, if a marker is used as |
| 46 | a position, its buffer is ignored. | 94 | a position, its buffer is ignored. |
| 47 | 95 | ||
| 48 | * markers.texi (Overview of Markers): Mention it here too. | 96 | * markers.texi (Overview of Markers): Mention it here too. |
diff --git a/lispref/commands.texi b/lispref/commands.texi index a2838c68bb9..a8350b88d82 100644 --- a/lispref/commands.texi +++ b/lispref/commands.texi | |||
| @@ -1096,7 +1096,7 @@ arguments to the key-binding lookup and modification functions. | |||
| 1096 | 1096 | ||
| 1097 | Emacs supports four kinds of mouse events: click events, drag events, | 1097 | Emacs supports four kinds of mouse events: click events, drag events, |
| 1098 | button-down events, and motion events. All mouse events are represented | 1098 | button-down events, and motion events. All mouse events are represented |
| 1099 | as lists. The @acronym{CAR} of the list is the event type; this says which | 1099 | as lists. The @sc{car} of the list is the event type; this says which |
| 1100 | mouse button was involved, and which modifier keys were used with it. | 1100 | mouse button was involved, and which modifier keys were used with it. |
| 1101 | The event type can also distinguish double or triple button presses | 1101 | The event type can also distinguish double or triple button presses |
| 1102 | (@pxref{Repeat Events}). The rest of the list elements give position | 1102 | (@pxref{Repeat Events}). The rest of the list elements give position |
| @@ -1172,7 +1172,7 @@ which the click occurred. It is one of the symbols @code{mode-line}, | |||
| 1172 | 1172 | ||
| 1173 | @item @var{x}, @var{y} | 1173 | @item @var{x}, @var{y} |
| 1174 | These are the pixel-denominated coordinates of the click, relative to | 1174 | These are the pixel-denominated coordinates of the click, relative to |
| 1175 | the top left corner of @var{window}, which is @code{(0 . 0)}. | 1175 | the top left corner of @var{window}, which is @code{(0 . 0)}. |
| 1176 | For the mode or header line, @var{y} does not have meaningful data. | 1176 | For the mode or header line, @var{y} does not have meaningful data. |
| 1177 | For the vertical line, @var{x} does not have meaningful data. | 1177 | For the vertical line, @var{x} does not have meaningful data. |
| 1178 | 1178 | ||
| @@ -1188,7 +1188,7 @@ an image object as returned by @code{find-image} if click was in an image. | |||
| 1188 | 1188 | ||
| 1189 | @item @var{string} | 1189 | @item @var{string} |
| 1190 | This is the string on which the click occurred, including any | 1190 | This is the string on which the click occurred, including any |
| 1191 | properties. | 1191 | properties. |
| 1192 | 1192 | ||
| 1193 | @item @var{string-pos} | 1193 | @item @var{string-pos} |
| 1194 | This is the position in the string on which the click occurred, | 1194 | This is the position in the string on which the click occurred, |
| @@ -1560,7 +1560,7 @@ into another window. That produces a pair of events like these: | |||
| 1560 | key binding purposes. For a keyboard event, the event type equals the | 1560 | key binding purposes. For a keyboard event, the event type equals the |
| 1561 | event value; thus, the event type for a character is the character, and | 1561 | event value; thus, the event type for a character is the character, and |
| 1562 | the event type for a function key symbol is the symbol itself. For | 1562 | the event type for a function key symbol is the symbol itself. For |
| 1563 | events that are lists, the event type is the symbol in the @acronym{CAR} of | 1563 | events that are lists, the event type is the symbol in the @sc{car} of |
| 1564 | the list. Thus, the event type is always a symbol or a character. | 1564 | the list. Thus, the event type is always a symbol or a character. |
| 1565 | 1565 | ||
| 1566 | Two events of the same type are equivalent where key bindings are | 1566 | Two events of the same type are equivalent where key bindings are |
| @@ -2583,7 +2583,7 @@ This function returns the numeric meaning of a valid raw prefix argument | |||
| 2583 | value, @var{arg}. The argument may be a symbol, a number, or a list. | 2583 | value, @var{arg}. The argument may be a symbol, a number, or a list. |
| 2584 | If it is @code{nil}, the value 1 is returned; if it is @code{-}, the | 2584 | If it is @code{nil}, the value 1 is returned; if it is @code{-}, the |
| 2585 | value @minus{}1 is returned; if it is a number, that number is returned; | 2585 | value @minus{}1 is returned; if it is a number, that number is returned; |
| 2586 | if it is a list, the @acronym{CAR} of that list (which should be a number) is | 2586 | if it is a list, the @sc{car} of that list (which should be a number) is |
| 2587 | returned. | 2587 | returned. |
| 2588 | @end defun | 2588 | @end defun |
| 2589 | 2589 | ||
diff --git a/lispref/customize.texi b/lispref/customize.texi index 8621cb65662..90600f410b7 100644 --- a/lispref/customize.texi +++ b/lispref/customize.texi | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | @c -*-texinfo-*- | 1 | @c -*-texinfo-*- |
| 2 | @c This is part of the GNU Emacs Lisp Reference Manual. | 2 | @c This is part of the GNU Emacs Lisp Reference Manual. |
| 3 | @c Copyright (C) 1997, 1998, 1999, 2000, 2002 Free Software Foundation, Inc. | 3 | @c Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003 Free Software Foundation, Inc. |
| 4 | @c See the file elisp.texi for copying conditions. | 4 | @c See the file elisp.texi for copying conditions. |
| 5 | @setfilename ../info/customize | 5 | @setfilename ../info/customize |
| 6 | @node Customization, Loading, Macros, Top | 6 | @node Customization, Loading, Macros, Top |
| @@ -373,6 +373,7 @@ equivalent to @code{(string)}. | |||
| 373 | * Composite Types:: | 373 | * Composite Types:: |
| 374 | * Splicing into Lists:: | 374 | * Splicing into Lists:: |
| 375 | * Type Keywords:: | 375 | * Type Keywords:: |
| 376 | * Defining New Types:: | ||
| 376 | @end menu | 377 | @end menu |
| 377 | 378 | ||
| 378 | All customization types are implemented as widgets; see @ref{Top, , | 379 | All customization types are implemented as widgets; see @ref{Top, , |
| @@ -1056,6 +1057,76 @@ arguments, which will be used when creating the @code{radio-button} or | |||
| 1056 | @end ignore | 1057 | @end ignore |
| 1057 | @end table | 1058 | @end table |
| 1058 | 1059 | ||
| 1060 | @node Defining New Types | ||
| 1061 | @subsection Defining New Types | ||
| 1062 | |||
| 1063 | In the previous sections we have described how to construct elaborate | ||
| 1064 | type specifications for @code{defcustom}. In some cases you may want to | ||
| 1065 | give such a type specification a name. The obvious case is when you are | ||
| 1066 | using the same type for many user options, rather than repeat the | ||
| 1067 | specification for each option, you can give the type specification a | ||
| 1068 | name once, and use that name each @code{defcustom}. The other case is | ||
| 1069 | when a user option accept a recursive datastructure. To make it | ||
| 1070 | possible for a datatype to refer to itself, it needs to have a name. | ||
| 1071 | |||
| 1072 | Since custom types are implemented as widgets, the way to define a new | ||
| 1073 | customize type is to define a new widget. We are not going to describe | ||
| 1074 | the widget interface here in details, see @ref{Top, , Introduction, | ||
| 1075 | widget, The Emacs Widget Library}, for that. Instead we are going to | ||
| 1076 | demonstrate the minimal functionality needed for defining new customize | ||
| 1077 | types by a simple example. | ||
| 1078 | |||
| 1079 | @example | ||
| 1080 | (define-widget 'binary-tree-of-string 'lazy | ||
| 1081 | "A binary tree made of cons-cells and strings." | ||
| 1082 | :offset 4 | ||
| 1083 | :tag "Node" | ||
| 1084 | :type '(choice (string :tag "Leaf" :value "") | ||
| 1085 | (cons :tag "Interior" | ||
| 1086 | :value ("" . "") | ||
| 1087 | binary-tree-of-string | ||
| 1088 | binary-tree-of-string))) | ||
| 1089 | |||
| 1090 | (defcustom foo-bar "" | ||
| 1091 | "Sample variable holding a binary tree of strings." | ||
| 1092 | :type 'binary-tree-of-string) | ||
| 1093 | @end example | ||
| 1094 | |||
| 1095 | The function to define a new widget is name @code{define-widget}. The | ||
| 1096 | first argument is the symbol we want to make a new widget type. The | ||
| 1097 | second argument is a symbol representing an existing widget, the new | ||
| 1098 | widget is going to be defined in terms of difference from the existing | ||
| 1099 | widget. For the purpose of defining new customization types, the | ||
| 1100 | @code{lazy} widget is perfect, because it accept a @code{:type} keyword | ||
| 1101 | argument with the same syntax as the keyword argument to | ||
| 1102 | @code{defcustom} with the same name. The third argument is a | ||
| 1103 | documentation string for the new widget. You will be able to see that | ||
| 1104 | string with the @kbd{M-x widget-browse @key{ret} binary-tree-of-string | ||
| 1105 | @key{ret}} command. | ||
| 1106 | |||
| 1107 | After these mandatory arguments follows the keyword arguments. The most | ||
| 1108 | important is @code{:type}, which describes the datatype we want to match | ||
| 1109 | with this widget. Here a @code{binary-tree-of-string} is described as | ||
| 1110 | being either a string, or a cons-cell whose car and cdr are themselves | ||
| 1111 | both @code{binary-tree-of-string}. Note the reference to the widget | ||
| 1112 | type we are currently in the process of defining. The @code{:tag} | ||
| 1113 | attribute is a string to name the widget in the user interface, and the | ||
| 1114 | @code{:offset} argument are there to ensure that child nodes are | ||
| 1115 | indented four spaces relatively to the parent node, making the tree | ||
| 1116 | structure apparent in the customization buffer. | ||
| 1117 | |||
| 1118 | The @code{defcustom} shows how the new widget can be used as an ordinary | ||
| 1119 | customization type. | ||
| 1120 | |||
| 1121 | If you wonder about the name @code{lazy}, know that the other composite | ||
| 1122 | widgets convert their inferior widgets to internal form when the widget | ||
| 1123 | is instantiated in a buffer. This conversion is recursive, so the | ||
| 1124 | inferior widgets will convert @emph{their} inferior widgets. If the | ||
| 1125 | datastructure is itself recursive, this conversion will go on forever, | ||
| 1126 | or at least until Emacs run out of stack space. The @code{lazy} widget | ||
| 1127 | stop this recursion, it will only convert its @code{:type} argument when | ||
| 1128 | needed. | ||
| 1129 | |||
| 1059 | @ignore | 1130 | @ignore |
| 1060 | arch-tag: d1b8fad3-f48c-4ce4-a402-f73b5ef19bd2 | 1131 | arch-tag: d1b8fad3-f48c-4ce4-a402-f73b5ef19bd2 |
| 1061 | @end ignore | 1132 | @end ignore |
diff --git a/lispref/display.texi b/lispref/display.texi index 186703b13b0..abbbab0ce79 100644 --- a/lispref/display.texi +++ b/lispref/display.texi | |||
| @@ -805,8 +805,9 @@ If the @var{forms} do not change the major mode in the output buffer, | |||
| 805 | so that it is still Help mode at the end of their execution, then | 805 | so that it is still Help mode at the end of their execution, then |
| 806 | @code{with-output-to-temp-buffer} makes this buffer read-only at the | 806 | @code{with-output-to-temp-buffer} makes this buffer read-only at the |
| 807 | end, and also scans it for function and variable names to make them | 807 | end, and also scans it for function and variable names to make them |
| 808 | into clickable cross-references. @xref{Documentation Tips, , Tips for | 808 | into clickable cross-references. @xref{Docstring hyperlinks, , Tips |
| 809 | Documentation Strings}. | 809 | for Documentation Strings}, in particular the item on hyperlinks in |
| 810 | documentation strings, for more details. | ||
| 810 | 811 | ||
| 811 | The string @var{buffer-name} specifies the temporary buffer, which | 812 | The string @var{buffer-name} specifies the temporary buffer, which |
| 812 | need not already exist. The argument must be a string, not a buffer. | 813 | need not already exist. The argument must be a string, not a buffer. |
| @@ -2527,7 +2528,7 @@ fringe in pixels. | |||
| 2527 | 2528 | ||
| 2528 | The values of these variables take effect when you display the | 2529 | The values of these variables take effect when you display the |
| 2529 | buffer in a window. If you change them while the buffer is visible, | 2530 | buffer in a window. If you change them while the buffer is visible, |
| 2530 | you can call @code{set-buffer-window} to display it in a window again. | 2531 | you can call @code{set-window-buffer} to display it in a window again. |
| 2531 | 2532 | ||
| 2532 | @defun set-window-fringes window left &optional right outside-margins | 2533 | @defun set-window-fringes window left &optional right outside-margins |
| 2533 | This function sets the fringe widthes of window @var{window}. | 2534 | This function sets the fringe widthes of window @var{window}. |
diff --git a/lispref/eval.texi b/lispref/eval.texi index 165889e75ed..fcfde5849dd 100644 --- a/lispref/eval.texi +++ b/lispref/eval.texi | |||
| @@ -319,6 +319,10 @@ This function returns the meaning of @var{function} as a function. If | |||
| 319 | definition and starts over with that value. If @var{function} is not a | 319 | definition and starts over with that value. If @var{function} is not a |
| 320 | symbol, then it returns @var{function} itself. | 320 | symbol, then it returns @var{function} itself. |
| 321 | 321 | ||
| 322 | This function signals a @code{void-function} error if the final | ||
| 323 | symbol is unbound and a @code{cyclic-function-indirection} error if | ||
| 324 | there is a loop in the chain of symbols. | ||
| 325 | |||
| 322 | Here is how you could define @code{indirect-function} in Lisp: | 326 | Here is how you could define @code{indirect-function} in Lisp: |
| 323 | 327 | ||
| 324 | @smallexample | 328 | @smallexample |
| @@ -625,32 +629,51 @@ The number of currently active calls to @code{eval} is limited to | |||
| 625 | @code{max-lisp-eval-depth} (see below). | 629 | @code{max-lisp-eval-depth} (see below). |
| 626 | @end defun | 630 | @end defun |
| 627 | 631 | ||
| 632 | @anchor{Definition of eval-region} | ||
| 628 | @deffn Command eval-region start end &optional stream read-function | 633 | @deffn Command eval-region start end &optional stream read-function |
| 629 | This function evaluates the forms in the current buffer in the region | 634 | This function evaluates the forms in the current buffer in the region |
| 630 | defined by the positions @var{start} and @var{end}. It reads forms from | 635 | defined by the positions @var{start} and @var{end}. It reads forms from |
| 631 | the region and calls @code{eval} on them until the end of the region is | 636 | the region and calls @code{eval} on them until the end of the region is |
| 632 | reached, or until an error is signaled and not handled. | 637 | reached, or until an error is signaled and not handled. |
| 633 | 638 | ||
| 634 | If @var{stream} is non-@code{nil}, the values that result from | 639 | By default, @code{eval-region} does not produce any output. However, |
| 635 | evaluating the expressions in the region are printed using @var{stream}. | 640 | if @var{stream} is non-@code{nil}, any output produced by output |
| 636 | @xref{Output Streams}. | 641 | functions (@pxref{Output Functions}), as well as the values that |
| 637 | 642 | result from evaluating the expressions in the region are printed using | |
| 638 | If @var{read-function} is non-@code{nil}, it should be a function, which | 643 | @var{stream}. @xref{Output Streams}. |
| 639 | is used instead of @code{read} to read expressions one by one. This | 644 | |
| 640 | function is called with one argument, the stream for reading input. You | 645 | If @var{read-function} is non-@code{nil}, it should be a function, |
| 641 | can also use the variable @code{load-read-function} (@pxref{How Programs | 646 | which is used instead of @code{read} to read expressions one by one. |
| 642 | Do Loading}) to specify this function, but it is more robust to use the | 647 | This function is called with one argument, the stream for reading |
| 648 | input. You can also use the variable @code{load-read-function} | ||
| 649 | (@pxref{Definition of load-read-function,, How Programs Do Loading}) | ||
| 650 | to specify this function, but it is more robust to use the | ||
| 643 | @var{read-function} argument. | 651 | @var{read-function} argument. |
| 644 | 652 | ||
| 645 | @code{eval-region} always returns @code{nil}. | 653 | @code{eval-region} does not move point. It always returns @code{nil}. |
| 646 | @end deffn | 654 | @end deffn |
| 647 | 655 | ||
| 648 | @cindex evaluation of buffer contents | 656 | @cindex evaluation of buffer contents |
| 649 | @deffn Command eval-current-buffer &optional stream | 657 | @deffn Command eval-buffer &optional buffer-or-name stream filename unibyte print |
| 650 | This is like @code{eval-region} except that it operates on the whole | 658 | This is similar to @code{eval-region}, but the arguments provide |
| 651 | buffer. | 659 | different optional features. @code{eval-buffer} operates on the |
| 660 | entire accessible portion of buffer @var{buffer-or-name}. | ||
| 661 | @var{buffer-or-name} can be a buffer, a buffer name (a string), or | ||
| 662 | @code{nil} (or omitted), which means to use the current buffer. | ||
| 663 | @var{stream} is used as in @code{eval-region}, unless @var{stream} is | ||
| 664 | @code{nil} and @var{print} non-@code{nil}. In that case, values that | ||
| 665 | result from evaluating the expressions are still discarded, but the | ||
| 666 | output of the output functions is printed in the echo area. | ||
| 667 | @var{filename} is the file name to use for @code{load-history} | ||
| 668 | (@pxref{Unloading}), and defaults to @code{buffer-file-name} | ||
| 669 | (@pxref{Buffer File Name}). If @var{unibyte} is non-@code{nil}, | ||
| 670 | @code{read} converts strings to unibyte whenever possible. | ||
| 671 | |||
| 672 | @findex eval-current-buffer | ||
| 673 | @code{eval-current-buffer} is an alias for this command. | ||
| 652 | @end deffn | 674 | @end deffn |
| 653 | 675 | ||
| 676 | @anchor{Definition of max-lisp-eval-depth} | ||
| 654 | @defvar max-lisp-eval-depth | 677 | @defvar max-lisp-eval-depth |
| 655 | This variable defines the maximum depth allowed in calls to @code{eval}, | 678 | This variable defines the maximum depth allowed in calls to @code{eval}, |
| 656 | @code{apply}, and @code{funcall} before an error is signaled (with error | 679 | @code{apply}, and @code{funcall} before an error is signaled (with error |
| @@ -670,14 +693,17 @@ Entry to the Lisp debugger increases the value, if there is little room | |||
| 670 | left, to make sure the debugger itself has room to execute. | 693 | left, to make sure the debugger itself has room to execute. |
| 671 | 694 | ||
| 672 | @code{max-specpdl-size} provides another limit on nesting. | 695 | @code{max-specpdl-size} provides another limit on nesting. |
| 673 | @xref{Local Variables}. | 696 | @xref{Definition of max-specpdl-size,, Local Variables}. |
| 674 | @end defvar | 697 | @end defvar |
| 675 | 698 | ||
| 676 | @defvar values | 699 | @defvar values |
| 677 | The value of this variable is a list of the values returned by all the | 700 | The value of this variable is a list of the values returned by all the |
| 678 | expressions that were read, evaluated, and printed from buffers | 701 | expressions that were read, evaluated, and printed from buffers |
| 679 | (including the minibuffer) by the standard Emacs commands which do this. | 702 | (including the minibuffer) by the standard Emacs commands which do |
| 680 | The elements are ordered most recent first. | 703 | this. (Note that this does @emph{not} include evaluation in |
| 704 | @samp{*ielm*} buffers, nor evaluation using @kbd{C-j} in | ||
| 705 | @code{lisp-interaction-mode}.) The elements are ordered most recent | ||
| 706 | first. | ||
| 681 | 707 | ||
| 682 | @example | 708 | @example |
| 683 | @group | 709 | @group |
diff --git a/lispref/help.texi b/lispref/help.texi index 7675e38e81e..343ffb66078 100644 --- a/lispref/help.texi +++ b/lispref/help.texi | |||
| @@ -259,6 +259,7 @@ as shown above for the @code{goal-column} variable, means that it is a | |||
| 259 | user option; see the description of @code{defvar} in @ref{Defining | 259 | user option; see the description of @code{defvar} in @ref{Defining |
| 260 | Variables}. | 260 | Variables}. |
| 261 | 261 | ||
| 262 | @anchor{Definition of Snarf-documentation} | ||
| 262 | @defun Snarf-documentation filename | 263 | @defun Snarf-documentation filename |
| 263 | This function is used only during Emacs initialization, just before | 264 | This function is used only during Emacs initialization, just before |
| 264 | the runnable Emacs is dumped. It finds the file offsets of the | 265 | the runnable Emacs is dumped. It finds the file offsets of the |
diff --git a/lispref/internals.texi b/lispref/internals.texi index c8cf5ed0f7c..2a4572560a7 100644 --- a/lispref/internals.texi +++ b/lispref/internals.texi | |||
| @@ -81,8 +81,9 @@ faster. On modern machines, it is usually not advisable. | |||
| 81 | 81 | ||
| 82 | After @file{loadup.el} reads @file{site-load.el}, it finds the | 82 | After @file{loadup.el} reads @file{site-load.el}, it finds the |
| 83 | documentation strings for primitive and preloaded functions (and | 83 | documentation strings for primitive and preloaded functions (and |
| 84 | variables) in the file @file{etc/DOC} where they are stored, by calling | 84 | variables) in the file @file{etc/DOC} where they are stored, by |
| 85 | @code{Snarf-documentation} (@pxref{Accessing Documentation}). | 85 | calling @code{Snarf-documentation} (@pxref{Definition of |
| 86 | Snarf-documentation,, Accessing Documentation}). | ||
| 86 | 87 | ||
| 87 | @cindex @file{site-init.el} | 88 | @cindex @file{site-init.el} |
| 88 | You can specify other Lisp expressions to execute just before dumping | 89 | You can specify other Lisp expressions to execute just before dumping |
| @@ -151,10 +152,10 @@ preload additional libraries or add features to the standard ones. | |||
| 151 | @defun purecopy object | 152 | @defun purecopy object |
| 152 | This function makes a copy in pure storage of @var{object}, and returns | 153 | This function makes a copy in pure storage of @var{object}, and returns |
| 153 | it. It copies a string by simply making a new string with the same | 154 | it. It copies a string by simply making a new string with the same |
| 154 | characters in pure storage. It recursively copies the contents of | 155 | characters, but without text properties, in pure storage. It |
| 155 | vectors and cons cells. It does not make copies of other objects such | 156 | recursively copies the contents of vectors and cons cells. It does |
| 156 | as symbols, but just returns them unchanged. It signals an error if | 157 | not make copies of other objects such as symbols, but just returns |
| 157 | asked to copy markers. | 158 | them unchanged. It signals an error if asked to copy markers. |
| 158 | 159 | ||
| 159 | This function is a no-op except while Emacs is being built and dumped; | 160 | This function is a no-op except while Emacs is being built and dumped; |
| 160 | it is usually called only in the file @file{emacs/lisp/loaddefs.el}, but | 161 | it is usually called only in the file @file{emacs/lisp/loaddefs.el}, but |
| @@ -367,7 +368,7 @@ until the subsequent garbage collection, at which time | |||
| 367 | @code{garbage-collect} will set the threshold back to 10,000. | 368 | @code{garbage-collect} will set the threshold back to 10,000. |
| 368 | @end defopt | 369 | @end defopt |
| 369 | 370 | ||
| 370 | The value return by @code{garbage-collect} describes the amount of | 371 | The value returned by @code{garbage-collect} describes the amount of |
| 371 | memory used by Lisp data, broken down by data type. By contrast, the | 372 | memory used by Lisp data, broken down by data type. By contrast, the |
| 372 | function @code{memory-limit} provides information on the total amount of | 373 | function @code{memory-limit} provides information on the total amount of |
| 373 | memory Emacs is currently using. | 374 | memory Emacs is currently using. |
| @@ -595,9 +596,9 @@ protected in the current function. It is necessary to do this explicitly. | |||
| 595 | GC-protected; as long as the object is not recycled, all pointers to | 596 | GC-protected; as long as the object is not recycled, all pointers to |
| 596 | it remain valid. So if you are sure that a local variable points to | 597 | it remain valid. So if you are sure that a local variable points to |
| 597 | an object that will be preserved by some other pointer, that local | 598 | an object that will be preserved by some other pointer, that local |
| 598 | variable does not need a GCPRO. (Formerly, strings were an exception | 599 | variable does not need a @code{GCPRO}. (Formerly, strings were an |
| 599 | to this rule; in older Emacs versions, every pointer to a string | 600 | exception to this rule; in older Emacs versions, every pointer to a |
| 600 | needed to be marked by GC.) | 601 | string needed to be marked by GC.) |
| 601 | 602 | ||
| 602 | The macro @code{GCPRO1} protects just one local variable. If you | 603 | The macro @code{GCPRO1} protects just one local variable. If you |
| 603 | want to protect two, use @code{GCPRO2} instead; repeating | 604 | want to protect two, use @code{GCPRO2} instead; repeating |
| @@ -612,7 +613,7 @@ Alas, we can't explain all the tricky details here. | |||
| 612 | accept two arguments at the C level: the number of Lisp arguments, and | 613 | accept two arguments at the C level: the number of Lisp arguments, and |
| 613 | a @code{Lisp_Object *} pointer to a C vector containing those Lisp | 614 | a @code{Lisp_Object *} pointer to a C vector containing those Lisp |
| 614 | arguments. This C vector may be part of a Lisp vector, but it need | 615 | arguments. This C vector may be part of a Lisp vector, but it need |
| 615 | not be. The responsibility for using GCPRO to protecting the Lisp | 616 | not be. The responsibility for using @code{GCPRO} to protect the Lisp |
| 616 | arguments from GC if necessary rests with the caller in this case, | 617 | arguments from GC if necessary rests with the caller in this case, |
| 617 | since the caller allocated or found the storage for them. | 618 | since the caller allocated or found the storage for them. |
| 618 | 619 | ||
| @@ -651,6 +652,7 @@ file, add to it a @code{syms_of_@var{filename}} (e.g., | |||
| 651 | of these functions are called, and add a call to | 652 | of these functions are called, and add a call to |
| 652 | @code{syms_of_@var{filename}} there. | 653 | @code{syms_of_@var{filename}} there. |
| 653 | 654 | ||
| 655 | @anchor{Defining Lisp variables in C} | ||
| 654 | @vindex byte-boolean-vars | 656 | @vindex byte-boolean-vars |
| 655 | The function @code{syms_of_@var{filename}} is also the place to define | 657 | The function @code{syms_of_@var{filename}} is also the place to define |
| 656 | any C variables that are to be visible as Lisp variables. | 658 | any C variables that are to be visible as Lisp variables. |
| @@ -761,9 +763,9 @@ knows about it. | |||
| 761 | data are stored in a heap and the only access that programs have to it | 763 | data are stored in a heap and the only access that programs have to it |
| 762 | is through pointers. Pointers are thirty-two bits wide in most | 764 | is through pointers. Pointers are thirty-two bits wide in most |
| 763 | implementations. Depending on the operating system and type of machine | 765 | implementations. Depending on the operating system and type of machine |
| 764 | for which you compile Emacs, twenty-eight bits are used to address the | 766 | for which you compile Emacs, twenty-nine bits are used to address the |
| 765 | object, and the remaining four bits are used for a GC mark bit and the | 767 | object, and the remaining three bits are used for the tag that |
| 766 | tag that identifies the object's type. | 768 | identifies the object's type. |
| 767 | 769 | ||
| 768 | Because Lisp objects are represented as tagged pointers, it is always | 770 | Because Lisp objects are represented as tagged pointers, it is always |
| 769 | possible to determine the Lisp data type of any object. The C data type | 771 | possible to determine the Lisp data type of any object. The C data type |
diff --git a/lispref/loading.texi b/lispref/loading.texi index 0865914c45d..e171fc70fdf 100644 --- a/lispref/loading.texi +++ b/lispref/loading.texi | |||
| @@ -140,6 +140,7 @@ This variable is non-@code{nil} if Emacs is in the process of loading a | |||
| 140 | file, and it is @code{nil} otherwise. | 140 | file, and it is @code{nil} otherwise. |
| 141 | @end defvar | 141 | @end defvar |
| 142 | 142 | ||
| 143 | @anchor{Definition of load-read-function} | ||
| 143 | @defvar load-read-function | 144 | @defvar load-read-function |
| 144 | This variable specifies an alternate expression-reading function for | 145 | This variable specifies an alternate expression-reading function for |
| 145 | @code{load} and @code{eval-region} to use instead of @code{read}. | 146 | @code{load} and @code{eval-region} to use instead of @code{read}. |
| @@ -150,7 +151,7 @@ functions should use @code{read}. | |||
| 150 | 151 | ||
| 151 | Instead of using this variable, it is cleaner to use another, newer | 152 | Instead of using this variable, it is cleaner to use another, newer |
| 152 | feature: to pass the function as the @var{read-function} argument to | 153 | feature: to pass the function as the @var{read-function} argument to |
| 153 | @code{eval-region}. @xref{Eval}. | 154 | @code{eval-region}. @xref{Definition of eval-region,, Eval}. |
| 154 | @end defvar | 155 | @end defvar |
| 155 | 156 | ||
| 156 | For information about how @code{load} is used in building Emacs, see | 157 | For information about how @code{load} is used in building Emacs, see |
diff --git a/lispref/nonascii.texi b/lispref/nonascii.texi index 72dd46d19eb..e66c7d15757 100644 --- a/lispref/nonascii.texi +++ b/lispref/nonascii.texi | |||
| @@ -96,13 +96,15 @@ default value to @code{nil} early in startup. | |||
| 96 | @defun position-bytes position | 96 | @defun position-bytes position |
| 97 | @tindex position-bytes | 97 | @tindex position-bytes |
| 98 | Return the byte-position corresponding to buffer position @var{position} | 98 | Return the byte-position corresponding to buffer position @var{position} |
| 99 | in the current buffer. | 99 | in the current buffer. If @var{position} is out of range, the value |
| 100 | is @code{nil}. | ||
| 100 | @end defun | 101 | @end defun |
| 101 | 102 | ||
| 102 | @defun byte-to-position byte-position | 103 | @defun byte-to-position byte-position |
| 103 | @tindex byte-to-position | 104 | @tindex byte-to-position |
| 104 | Return the buffer position corresponding to byte-position | 105 | Return the buffer position corresponding to byte-position |
| 105 | @var{byte-position} in the current buffer. | 106 | @var{byte-position} in the current buffer. If @var{byte-position} is |
| 107 | out of range, the value is @code{nil}. | ||
| 106 | @end defun | 108 | @end defun |
| 107 | 109 | ||
| 108 | @defun multibyte-string-p string | 110 | @defun multibyte-string-p string |
| @@ -173,6 +175,9 @@ multibyte character. The value should be a char-table, or @code{nil}. | |||
| 173 | If this is non-@code{nil}, it overrides @code{nonascii-insert-offset}. | 175 | If this is non-@code{nil}, it overrides @code{nonascii-insert-offset}. |
| 174 | @end defvar | 176 | @end defvar |
| 175 | 177 | ||
| 178 | The next three functions either return the argument @var{string}, or a | ||
| 179 | newly created string with no text properties. | ||
| 180 | |||
| 176 | @defun string-make-unibyte string | 181 | @defun string-make-unibyte string |
| 177 | This function converts the text of @var{string} to unibyte | 182 | This function converts the text of @var{string} to unibyte |
| 178 | representation, if it isn't already, and returns the result. If | 183 | representation, if it isn't already, and returns the result. If |
| @@ -186,15 +191,23 @@ fails, this function takes just the low 8 bits of each character. | |||
| 186 | @defun string-make-multibyte string | 191 | @defun string-make-multibyte string |
| 187 | This function converts the text of @var{string} to multibyte | 192 | This function converts the text of @var{string} to multibyte |
| 188 | representation, if it isn't already, and returns the result. If | 193 | representation, if it isn't already, and returns the result. If |
| 189 | @var{string} is a multibyte string, it is returned unchanged. | 194 | @var{string} is a multibyte string or consists entirely of |
| 190 | The function @code{unibyte-char-to-multibyte} is used to convert | 195 | @acronym{ASCII} characters, it is returned unchanged. In particular, |
| 191 | each unibyte character to a multibyte character. | 196 | if @var{string} is unibyte and entirely @acronym{ASCII}, the returned |
| 197 | string is unibyte. (When the characters are all @acronym{ASCII}, | ||
| 198 | Emacs primitives will treat the string the same way whether it is | ||
| 199 | unibyte or multibyte.) If @var{string} is unibyte and contains | ||
| 200 | non-@acronym{ASCII} characters, the function | ||
| 201 | @code{unibyte-char-to-multibyte} is used to convert each unibyte | ||
| 202 | character to a multibyte character. | ||
| 192 | @end defun | 203 | @end defun |
| 193 | 204 | ||
| 194 | @defun string-to-multibyte string | 205 | @defun string-to-multibyte string |
| 195 | This function returns a multibyte string containing the same sequence | 206 | This function returns a multibyte string containing the same sequence |
| 196 | of character codes as @var{string}. If @var{string} is a multibyte | 207 | of character codes as @var{string}. Unlike |
| 197 | string, the value is the equal to @var{string}. | 208 | @code{string-make-multibyte}, this function unconditionally returns a |
| 209 | multibyte string. If @var{string} is a multibyte string, it is | ||
| 210 | returned unchanged. | ||
| 198 | @end defun | 211 | @end defun |
| 199 | 212 | ||
| 200 | @node Selecting a Representation | 213 | @node Selecting a Representation |
| @@ -280,8 +293,8 @@ text representations. | |||
| 280 | @end example | 293 | @end example |
| 281 | 294 | ||
| 282 | If the optional argument @var{genericp} is non-@code{nil}, this | 295 | If the optional argument @var{genericp} is non-@code{nil}, this |
| 283 | function returns @code{t} if @var{charcode} is a generic character | 296 | function also returns @code{t} if @var{charcode} is a generic |
| 284 | (@pxref{Splitting Characters}). | 297 | character (@pxref{Splitting Characters}). |
| 285 | @end defun | 298 | @end defun |
| 286 | 299 | ||
| 287 | @node Character Sets | 300 | @node Character Sets |
| @@ -311,13 +324,19 @@ Returns @code{t} if @var{object} is a symbol that names a character set, | |||
| 311 | @code{nil} otherwise. | 324 | @code{nil} otherwise. |
| 312 | @end defun | 325 | @end defun |
| 313 | 326 | ||
| 327 | @defvar charset-list | ||
| 328 | The value is a list of all defined character set names. | ||
| 329 | @end defvar | ||
| 330 | |||
| 314 | @defun charset-list | 331 | @defun charset-list |
| 315 | This function returns a list of all defined character set names. | 332 | This function returns the value of @code{charset-list}. It is only |
| 333 | provided for backward compatibility. | ||
| 316 | @end defun | 334 | @end defun |
| 317 | 335 | ||
| 318 | @defun char-charset character | 336 | @defun char-charset character |
| 319 | This function returns the name of the character set that @var{character} | 337 | This function returns the name of the character set that @var{character} |
| 320 | belongs to. | 338 | belongs to, or the symbol @code{unknown} if @var{character} is not a |
| 339 | valid character. | ||
| 321 | @end defun | 340 | @end defun |
| 322 | 341 | ||
| 323 | @defun charset-plist charset | 342 | @defun charset-plist charset |
| @@ -378,6 +397,9 @@ Return a list containing the name of the character set of | |||
| 378 | identify @var{character} within that character set. The number of byte | 397 | identify @var{character} within that character set. The number of byte |
| 379 | values is the character set's dimension. | 398 | values is the character set's dimension. |
| 380 | 399 | ||
| 400 | If @var{character} is invalid as a character code, @code{split-char} | ||
| 401 | returns a list consisting of the symbol @code{unknown} and @var{character}. | ||
| 402 | |||
| 381 | @example | 403 | @example |
| 382 | (split-char 2248) | 404 | (split-char 2248) |
| 383 | @result{} (latin-iso8859-1 72) | 405 | @result{} (latin-iso8859-1 72) |
| @@ -463,11 +485,11 @@ current buffer. | |||
| 463 | @cindex character translation tables | 485 | @cindex character translation tables |
| 464 | @cindex translation tables | 486 | @cindex translation tables |
| 465 | 487 | ||
| 466 | A @dfn{translation table} specifies a mapping of characters | 488 | A @dfn{translation table} is a char-table that specifies a mapping |
| 467 | into characters. These tables are used in encoding and decoding, and | 489 | of characters into characters. These tables are used in encoding and |
| 468 | for other purposes. Some coding systems specify their own particular | 490 | decoding, and for other purposes. Some coding systems specify their |
| 469 | translation tables; there are also default translation tables which | 491 | own particular translation tables; there are also default translation |
| 470 | apply to all other coding systems. | 492 | tables which apply to all other coding systems. |
| 471 | 493 | ||
| 472 | @defun make-translation-table &rest translations | 494 | @defun make-translation-table &rest translations |
| 473 | This function returns a translation table based on the argument | 495 | This function returns a translation table based on the argument |
| @@ -483,24 +505,30 @@ character, say @var{to-alt}, @var{from} is also translated to | |||
| 483 | You can also map one whole character set into another character set with | 505 | You can also map one whole character set into another character set with |
| 484 | the same dimension. To do this, you specify a generic character (which | 506 | the same dimension. To do this, you specify a generic character (which |
| 485 | designates a character set) for @var{from} (@pxref{Splitting Characters}). | 507 | designates a character set) for @var{from} (@pxref{Splitting Characters}). |
| 486 | In this case, @var{to} should also be a generic character, for another | 508 | In this case, if @var{to} is also a generic character, its character |
| 487 | character set of the same dimension. Then the translation table | 509 | set should have the same dimension as @var{from}'s. Then the |
| 488 | translates each character of @var{from}'s character set into the | 510 | translation table translates each character of @var{from}'s character |
| 489 | corresponding character of @var{to}'s character set. | 511 | set into the corresponding character of @var{to}'s character set. If |
| 512 | @var{from} is a generic character and @var{to} is an ordinary | ||
| 513 | character, then the translation table translates every character of | ||
| 514 | @var{from}'s character set into @var{to}. | ||
| 490 | @end defun | 515 | @end defun |
| 491 | 516 | ||
| 492 | In decoding, the translation table's translations are applied to the | 517 | In decoding, the translation table's translations are applied to the |
| 493 | characters that result from ordinary decoding. If a coding system has | 518 | characters that result from ordinary decoding. If a coding system has |
| 494 | property @code{character-translation-table-for-decode}, that specifies | 519 | property @code{translation-table-for-decode}, that specifies the |
| 495 | the translation table to use. Otherwise, if | 520 | translation table to use. (This is a property of the coding system, |
| 496 | @code{standard-translation-table-for-decode} is non-@code{nil}, decoding | 521 | as returned by @code{coding-system-get}, not a property of the symbol |
| 497 | uses that table. | 522 | that is the coding system's name. @xref{Coding System Basics,, Basic |
| 523 | Concepts of Coding Systems}.) Otherwise, if | ||
| 524 | @code{standard-translation-table-for-decode} is non-@code{nil}, | ||
| 525 | decoding uses that table. | ||
| 498 | 526 | ||
| 499 | In encoding, the translation table's translations are applied to the | 527 | In encoding, the translation table's translations are applied to the |
| 500 | characters in the buffer, and the result of translation is actually | 528 | characters in the buffer, and the result of translation is actually |
| 501 | encoded. If a coding system has property | 529 | encoded. If a coding system has property |
| 502 | @code{character-translation-table-for-encode}, that specifies the | 530 | @code{translation-table-for-encode}, that specifies the translation |
| 503 | translation table to use. Otherwise the variable | 531 | table to use. Otherwise the variable |
| 504 | @code{standard-translation-table-for-encode} specifies the translation | 532 | @code{standard-translation-table-for-encode} specifies the translation |
| 505 | table. | 533 | table. |
| 506 | 534 | ||
| @@ -516,7 +544,8 @@ coding systems that don't specify any other translation table. | |||
| 516 | 544 | ||
| 517 | @defvar translation-table-for-input | 545 | @defvar translation-table-for-input |
| 518 | Self-inserting characters are translated through this translation | 546 | Self-inserting characters are translated through this translation |
| 519 | table before they are inserted. | 547 | table before they are inserted. This variable automatically becomes |
| 548 | buffer-local when set. | ||
| 520 | @end defvar | 549 | @end defvar |
| 521 | 550 | ||
| 522 | @node Coding Systems | 551 | @node Coding Systems |
| @@ -686,7 +715,7 @@ systems as well. | |||
| 686 | 715 | ||
| 687 | @defun coding-system-p object | 716 | @defun coding-system-p object |
| 688 | This function returns @code{t} if @var{object} is a coding system | 717 | This function returns @code{t} if @var{object} is a coding system |
| 689 | name. | 718 | name or @code{nil}. |
| 690 | @end defun | 719 | @end defun |
| 691 | 720 | ||
| 692 | @defun check-coding-system coding-system | 721 | @defun check-coding-system coding-system |
| @@ -701,6 +730,9 @@ except for its eol conversion, which is specified by @code{eol-type}. | |||
| 701 | @var{eol-type} should be @code{unix}, @code{dos}, @code{mac}, or | 730 | @var{eol-type} should be @code{unix}, @code{dos}, @code{mac}, or |
| 702 | @code{nil}. If it is @code{nil}, the returned coding system determines | 731 | @code{nil}. If it is @code{nil}, the returned coding system determines |
| 703 | the end-of-line conversion from the data. | 732 | the end-of-line conversion from the data. |
| 733 | |||
| 734 | @var{eol-type} may also be 0, 1 or 2, standing for @code{unix}, | ||
| 735 | @code{dos} and @code{mac}, respectively. | ||
| 704 | @end defun | 736 | @end defun |
| 705 | 737 | ||
| 706 | @defun coding-system-change-text-conversion eol-coding text-coding | 738 | @defun coding-system-change-text-conversion eol-coding text-coding |
| @@ -745,55 +777,79 @@ return value is just one coding system, the one that is highest in | |||
| 745 | priority. | 777 | priority. |
| 746 | 778 | ||
| 747 | If the region contains only @acronym{ASCII} characters, the value | 779 | If the region contains only @acronym{ASCII} characters, the value |
| 748 | is @code{undecided} or @code{(undecided)}. | 780 | is @code{undecided} or @code{(undecided)}, or a variant specifying |
| 781 | end-of-line conversion, if that can be deduced from the text. | ||
| 749 | @end defun | 782 | @end defun |
| 750 | 783 | ||
| 751 | @defun detect-coding-string string highest | 784 | @defun detect-coding-string string &optional highest |
| 752 | This function is like @code{detect-coding-region} except that it | 785 | This function is like @code{detect-coding-region} except that it |
| 753 | operates on the contents of @var{string} instead of bytes in the buffer. | 786 | operates on the contents of @var{string} instead of bytes in the buffer. |
| 754 | @end defun | 787 | @end defun |
| 755 | 788 | ||
| 756 | @xref{Process Information}, for how to examine or set the coding | 789 | @xref{Coding systems for a subprocess,, Process Information}, in |
| 757 | systems used for I/O to a subprocess. | 790 | particular the description of the functions |
| 791 | @code{process-coding-system} and @code{set-process-coding-system}, for | ||
| 792 | how to examine or set the coding systems used for I/O to a subprocess. | ||
| 758 | 793 | ||
| 759 | @node User-Chosen Coding Systems | 794 | @node User-Chosen Coding Systems |
| 760 | @subsection User-Chosen Coding Systems | 795 | @subsection User-Chosen Coding Systems |
| 761 | 796 | ||
| 762 | @cindex select safe coding system | 797 | @cindex select safe coding system |
| 763 | @defun select-safe-coding-system from to &optional default-coding-system accept-default-p | 798 | @defun select-safe-coding-system from to &optional default-coding-system accept-default-p file |
| 764 | This function selects a coding system for encoding specified text, | 799 | This function selects a coding system for encoding specified text, |
| 765 | asking the user to choose if necessary. Normally the specified text | 800 | asking the user to choose if necessary. Normally the specified text |
| 766 | is the text in the current buffer between @var{from} and @var{to}, | 801 | is the text in the current buffer between @var{from} and @var{to}. If |
| 767 | defaulting to the whole buffer if they are @code{nil}. If @var{from} | 802 | @var{from} is a string, the string specifies the text to encode, and |
| 768 | is a string, the string specifies the text to encode, and @var{to} is | 803 | @var{to} is ignored. |
| 769 | ignored. | ||
| 770 | 804 | ||
| 771 | If @var{default-coding-system} is non-@code{nil}, that is the first | 805 | If @var{default-coding-system} is non-@code{nil}, that is the first |
| 772 | coding system to try; if that can handle the text, | 806 | coding system to try; if that can handle the text, |
| 773 | @code{select-safe-coding-system} returns that coding system. It can | 807 | @code{select-safe-coding-system} returns that coding system. It can |
| 774 | also be a list of coding systems; then the function tries each of them | 808 | also be a list of coding systems; then the function tries each of them |
| 775 | one by one. After trying all of them, it next tries the user's most | 809 | one by one. After trying all of them, it next tries the current |
| 776 | preferred coding system (@pxref{Recognize Coding, | 810 | buffer's value of @code{buffer-file-coding-system} (if it is not |
| 777 | prefer-coding-system, the description of @code{prefer-coding-system}, | 811 | @code{undecided}), then the value of |
| 778 | emacs, GNU Emacs Manual}), and after that the current buffer's value | 812 | @code{default-buffer-file-coding-system} and finally the user's most |
| 779 | of @code{buffer-file-coding-system} (if it is not @code{undecided}). | 813 | preferred coding system, which the user can set using the command |
| 814 | @code{prefer-coding-system} (@pxref{Recognize Coding,, Recognizing | ||
| 815 | Coding Systems, emacs, The GNU Emacs Manual}). | ||
| 780 | 816 | ||
| 781 | If one of those coding systems can safely encode all the specified | 817 | If one of those coding systems can safely encode all the specified |
| 782 | text, @code{select-safe-coding-system} chooses it and returns it. | 818 | text, @code{select-safe-coding-system} chooses it and returns it. |
| 783 | Otherwise, it asks the user to choose from a list of coding systems | 819 | Otherwise, it asks the user to choose from a list of coding systems |
| 784 | which can encode all the text, and returns the user's choice. | 820 | which can encode all the text, and returns the user's choice. |
| 785 | 821 | ||
| 822 | @var{default-coding-system} can also be a list whose first element is | ||
| 823 | t and whose other elements are coding systems. Then, if no coding | ||
| 824 | system in the list can handle the text, @code{select-safe-coding-system} | ||
| 825 | queries the user immediately, without trying any of the three | ||
| 826 | alternatives described above. | ||
| 827 | |||
| 786 | The optional argument @var{accept-default-p}, if non-@code{nil}, | 828 | The optional argument @var{accept-default-p}, if non-@code{nil}, |
| 787 | should be a function to determine whether the coding system selected | 829 | should be a function to determine whether a coding system selected |
| 788 | without user interaction is acceptable. If this function returns | 830 | without user interaction is acceptable. @code{select-safe-coding-system} |
| 789 | @code{nil}, the silently selected coding system is rejected, and the | 831 | calls this function with one argument, the base coding system of the |
| 790 | user is asked to select a coding system from a list of possible | 832 | selected coding system. If @var{accept-default-p} returns @code{nil}, |
| 791 | candidates. | 833 | @code{select-safe-coding-system} rejects the silently selected coding |
| 834 | system, and asks the user to select a coding system from a list of | ||
| 835 | possible candidates. | ||
| 792 | 836 | ||
| 793 | @vindex select-safe-coding-system-accept-default-p | 837 | @vindex select-safe-coding-system-accept-default-p |
| 794 | If the variable @code{select-safe-coding-system-accept-default-p} is | 838 | If the variable @code{select-safe-coding-system-accept-default-p} is |
| 795 | non-@code{nil}, its value overrides the value of | 839 | non-@code{nil}, its value overrides the value of |
| 796 | @var{accept-default-p}. | 840 | @var{accept-default-p}. |
| 841 | |||
| 842 | As a final step, before returning the chosen coding system, | ||
| 843 | @code{select-safe-coding-system} checks whether that coding system is | ||
| 844 | consistent with what would be selected if the contents of the region | ||
| 845 | were read from a file. (If not, this could lead to data corruption in | ||
| 846 | a file subsequently re-visited and edited.) Normally, | ||
| 847 | @code{select-safe-coding-system} uses @code{buffer-file-name} as the | ||
| 848 | file for this purpose, but if @var{file} is non-@code{nil}, it uses | ||
| 849 | that file instead (this can be relevant for @code{write-region} and | ||
| 850 | similar functions). If it detects an apparent inconsistency, | ||
| 851 | @code{select-safe-coding-system} queries the user before selecting the | ||
| 852 | coding system. | ||
| 797 | @end defun | 853 | @end defun |
| 798 | 854 | ||
| 799 | Here are two functions you can use to let the user specify a coding | 855 | Here are two functions you can use to let the user specify a coding |
| @@ -846,17 +902,19 @@ reading and writing particular files. Each element has the form | |||
| 846 | expression that matches certain file names. The element applies to file | 902 | expression that matches certain file names. The element applies to file |
| 847 | names that match @var{pattern}. | 903 | names that match @var{pattern}. |
| 848 | 904 | ||
| 849 | The @acronym{CDR} of the element, @var{coding}, should be either a coding | 905 | The @sc{cdr} of the element, @var{coding}, should be either a coding |
| 850 | system, a cons cell containing two coding systems, or a function name (a | 906 | system, a cons cell containing two coding systems, or a function name (a |
| 851 | symbol with a function definition). If @var{coding} is a coding system, | 907 | symbol with a function definition). If @var{coding} is a coding system, |
| 852 | that coding system is used for both reading the file and writing it. If | 908 | that coding system is used for both reading the file and writing it. If |
| 853 | @var{coding} is a cons cell containing two coding systems, its @acronym{CAR} | 909 | @var{coding} is a cons cell containing two coding systems, its @sc{car} |
| 854 | specifies the coding system for decoding, and its @acronym{cdr} specifies the | 910 | specifies the coding system for decoding, and its @sc{cdr} specifies the |
| 855 | coding system for encoding. | 911 | coding system for encoding. |
| 856 | 912 | ||
| 857 | If @var{coding} is a function name, the function must return a coding | 913 | If @var{coding} is a function name, the function should take one |
| 858 | system or a cons cell containing two coding systems. This value is used | 914 | argument, a list of all arguments passed to |
| 859 | as described above. | 915 | @code{find-operation-coding-system}. It must return a coding system |
| 916 | or a cons cell containing two coding systems. This value has the same | ||
| 917 | meaning as described above. | ||
| 860 | @end defvar | 918 | @end defvar |
| 861 | 919 | ||
| 862 | @defvar process-coding-system-alist | 920 | @defvar process-coding-system-alist |
| @@ -923,7 +981,7 @@ performing @var{operation} with @var{arguments}. The value has this | |||
| 923 | form: | 981 | form: |
| 924 | 982 | ||
| 925 | @example | 983 | @example |
| 926 | (@var{decoding-system} @var{encoding-system}) | 984 | (@var{decoding-system} . @var{encoding-system}) |
| 927 | @end example | 985 | @end example |
| 928 | 986 | ||
| 929 | The first element, @var{decoding-system}, is the coding system to use | 987 | The first element, @var{decoding-system}, is the coding system to use |
| @@ -948,7 +1006,6 @@ or port number. | |||
| 948 | This function looks up the target in @code{file-coding-system-alist}, | 1006 | This function looks up the target in @code{file-coding-system-alist}, |
| 949 | @code{process-coding-system-alist}, or | 1007 | @code{process-coding-system-alist}, or |
| 950 | @code{network-coding-system-alist}, depending on @var{operation}. | 1008 | @code{network-coding-system-alist}, depending on @var{operation}. |
| 951 | @xref{Default Coding Systems}. | ||
| 952 | @end defun | 1009 | @end defun |
| 953 | 1010 | ||
| 954 | @node Specifying Coding Systems | 1011 | @node Specifying Coding Systems |
| @@ -1040,33 +1097,41 @@ decoding functions produce sequences of bytes; the encoding functions | |||
| 1040 | are meant to operate on sequences of bytes. All of these functions | 1097 | are meant to operate on sequences of bytes. All of these functions |
| 1041 | discard text properties. | 1098 | discard text properties. |
| 1042 | 1099 | ||
| 1043 | @defun encode-coding-region start end coding-system | 1100 | @deffn Command encode-coding-region start end coding-system |
| 1044 | This function encodes the text from @var{start} to @var{end} according | 1101 | This command encodes the text from @var{start} to @var{end} according |
| 1045 | to coding system @var{coding-system}. The encoded text replaces the | 1102 | to coding system @var{coding-system}. The encoded text replaces the |
| 1046 | original text in the buffer. The result of encoding is logically a | 1103 | original text in the buffer. The result of encoding is logically a |
| 1047 | sequence of bytes, but the buffer remains multibyte if it was multibyte | 1104 | sequence of bytes, but the buffer remains multibyte if it was multibyte |
| 1048 | before. | 1105 | before. |
| 1049 | @end defun | ||
| 1050 | 1106 | ||
| 1051 | @defun encode-coding-string string coding-system | 1107 | This command returns the length of the encoded text. |
| 1108 | @end deffn | ||
| 1109 | |||
| 1110 | @defun encode-coding-string string coding-system &optional nocopy | ||
| 1052 | This function encodes the text in @var{string} according to coding | 1111 | This function encodes the text in @var{string} according to coding |
| 1053 | system @var{coding-system}. It returns a new string containing the | 1112 | system @var{coding-system}. It returns a new string containing the |
| 1054 | encoded text. The result of encoding is a unibyte string. | 1113 | encoded text, except when @var{nocopy} is non-@code{nil}, in which |
| 1114 | case the function may return @var{string} itself if the encoding | ||
| 1115 | operation is trivial. The result of encoding is a unibyte string. | ||
| 1055 | @end defun | 1116 | @end defun |
| 1056 | 1117 | ||
| 1057 | @defun decode-coding-region start end coding-system | 1118 | @deffn Command decode-coding-region start end coding-system |
| 1058 | This function decodes the text from @var{start} to @var{end} according | 1119 | This command decodes the text from @var{start} to @var{end} according |
| 1059 | to coding system @var{coding-system}. The decoded text replaces the | 1120 | to coding system @var{coding-system}. The decoded text replaces the |
| 1060 | original text in the buffer. To make explicit decoding useful, the text | 1121 | original text in the buffer. To make explicit decoding useful, the text |
| 1061 | before decoding ought to be a sequence of byte values, but both | 1122 | before decoding ought to be a sequence of byte values, but both |
| 1062 | multibyte and unibyte buffers are acceptable. | 1123 | multibyte and unibyte buffers are acceptable. |
| 1063 | @end defun | ||
| 1064 | 1124 | ||
| 1065 | @defun decode-coding-string string coding-system | 1125 | This command returns the length of the decoded text. |
| 1126 | @end deffn | ||
| 1127 | |||
| 1128 | @defun decode-coding-string string coding-system &optional nocopy | ||
| 1066 | This function decodes the text in @var{string} according to coding | 1129 | This function decodes the text in @var{string} according to coding |
| 1067 | system @var{coding-system}. It returns a new string containing the | 1130 | system @var{coding-system}. It returns a new string containing the |
| 1068 | decoded text. To make explicit decoding useful, the contents of | 1131 | decoded text, except when @var{nocopy} is non-@code{nil}, in which |
| 1069 | @var{string} ought to be a sequence of byte values, but a multibyte | 1132 | case the function may return @var{string} itself if the decoding |
| 1133 | operation is trivial. To make explicit decoding useful, the contents | ||
| 1134 | of @var{string} ought to be a sequence of byte values, but a multibyte | ||
| 1070 | string is acceptable. | 1135 | string is acceptable. |
| 1071 | @end defun | 1136 | @end defun |
| 1072 | 1137 | ||
| @@ -1095,22 +1160,22 @@ This function returns the coding system that is in use for decoding | |||
| 1095 | keyboard input---or @code{nil} if no coding system is to be used. | 1160 | keyboard input---or @code{nil} if no coding system is to be used. |
| 1096 | @end defun | 1161 | @end defun |
| 1097 | 1162 | ||
| 1098 | @defun set-keyboard-coding-system coding-system | 1163 | @deffn Command set-keyboard-coding-system coding-system |
| 1099 | This function specifies @var{coding-system} as the coding system to | 1164 | This command specifies @var{coding-system} as the coding system to |
| 1100 | use for decoding keyboard input. If @var{coding-system} is @code{nil}, | 1165 | use for decoding keyboard input. If @var{coding-system} is @code{nil}, |
| 1101 | that means do not decode keyboard input. | 1166 | that means do not decode keyboard input. |
| 1102 | @end defun | 1167 | @end deffn |
| 1103 | 1168 | ||
| 1104 | @defun terminal-coding-system | 1169 | @defun terminal-coding-system |
| 1105 | This function returns the coding system that is in use for encoding | 1170 | This function returns the coding system that is in use for encoding |
| 1106 | terminal output---or @code{nil} for no encoding. | 1171 | terminal output---or @code{nil} for no encoding. |
| 1107 | @end defun | 1172 | @end defun |
| 1108 | 1173 | ||
| 1109 | @defun set-terminal-coding-system coding-system | 1174 | @deffn Command set-terminal-coding-system coding-system |
| 1110 | This function specifies @var{coding-system} as the coding system to use | 1175 | This command specifies @var{coding-system} as the coding system to use |
| 1111 | for encoding terminal output. If @var{coding-system} is @code{nil}, | 1176 | for encoding terminal output. If @var{coding-system} is @code{nil}, |
| 1112 | that means do not encode terminal output. | 1177 | that means do not encode terminal output. |
| 1113 | @end defun | 1178 | @end deffn |
| 1114 | 1179 | ||
| 1115 | @node MS-DOS File Types | 1180 | @node MS-DOS File Types |
| 1116 | @subsection MS-DOS File Types | 1181 | @subsection MS-DOS File Types |
| @@ -1193,18 +1258,18 @@ in any fashion.) It is @code{nil} if no input method is active in the | |||
| 1193 | buffer now. | 1258 | buffer now. |
| 1194 | @end defvar | 1259 | @end defvar |
| 1195 | 1260 | ||
| 1196 | @defvar default-input-method | 1261 | @defopt default-input-method |
| 1197 | This variable holds the default input method for commands that choose an | 1262 | This variable holds the default input method for commands that choose an |
| 1198 | input method. Unlike @code{current-input-method}, this variable is | 1263 | input method. Unlike @code{current-input-method}, this variable is |
| 1199 | normally global. | 1264 | normally global. |
| 1200 | @end defvar | 1265 | @end defopt |
| 1201 | 1266 | ||
| 1202 | @defun set-input-method input-method | 1267 | @deffn Command set-input-method input-method |
| 1203 | This function activates input method @var{input-method} for the current | 1268 | This command activates input method @var{input-method} for the current |
| 1204 | buffer. It also sets @code{default-input-method} to @var{input-method}. | 1269 | buffer. It also sets @code{default-input-method} to @var{input-method}. |
| 1205 | If @var{input-method} is @code{nil}, this function deactivates any input | 1270 | If @var{input-method} is @code{nil}, this command deactivates any input |
| 1206 | method for the current buffer. | 1271 | method for the current buffer. |
| 1207 | @end defun | 1272 | @end deffn |
| 1208 | 1273 | ||
| 1209 | @defun read-input-method-name prompt &optional default inhibit-null | 1274 | @defun read-input-method-name prompt &optional default inhibit-null |
| 1210 | This function reads an input method name with the minibuffer, prompting | 1275 | This function reads an input method name with the minibuffer, prompting |
| @@ -1240,7 +1305,8 @@ it is good for. | |||
| 1240 | @end defvar | 1305 | @end defvar |
| 1241 | 1306 | ||
| 1242 | The fundamental interface to input methods is through the | 1307 | The fundamental interface to input methods is through the |
| 1243 | variable @code{input-method-function}. @xref{Reading One Event}. | 1308 | variable @code{input-method-function}. @xref{Reading One Event}, |
| 1309 | and @ref{Invoking the Input Method}. | ||
| 1244 | 1310 | ||
| 1245 | @node Locales | 1311 | @node Locales |
| 1246 | @section Locales | 1312 | @section Locales |
| @@ -1294,14 +1360,14 @@ through @code{MON_12}). | |||
| 1294 | 1360 | ||
| 1295 | @item paper | 1361 | @item paper |
| 1296 | Return a list @code{(@var{width} @var{height})} for the default paper | 1362 | Return a list @code{(@var{width} @var{height})} for the default paper |
| 1297 | size measured in milimeters (locale items @code{PAPER_WIDTH} and | 1363 | size measured in millimeters (locale items @code{PAPER_WIDTH} and |
| 1298 | @code{PAPER_HEIGHT}). | 1364 | @code{PAPER_HEIGHT}). |
| 1299 | @end table | 1365 | @end table |
| 1300 | 1366 | ||
| 1301 | If the system can't provide the requested information, or if | 1367 | If the system can't provide the requested information, or if |
| 1302 | @var{item} is not one of those symbols, the value is @code{nil}. All | 1368 | @var{item} is not one of those symbols, the value is @code{nil}. All |
| 1303 | strings in the return value are decoded using | 1369 | strings in the return value are decoded using |
| 1304 | @code{locale-coding-system}. @xref{Locales,,, libc, GNU Libc Manual}, | 1370 | @code{locale-coding-system}. @xref{Locales,,, libc, The GNU Libc Manual}, |
| 1305 | for more information about locales and locale items. | 1371 | for more information about locales and locale items. |
| 1306 | @end defun | 1372 | @end defun |
| 1307 | 1373 | ||
diff --git a/lispref/objects.texi b/lispref/objects.texi index 4c905cb969e..6cb5adb72b8 100644 --- a/lispref/objects.texi +++ b/lispref/objects.texi | |||
| @@ -42,7 +42,9 @@ it as a number; Lisp knows it is a vector, not a number. | |||
| 42 | variable, and the type is known by the compiler but not represented in | 42 | variable, and the type is known by the compiler but not represented in |
| 43 | the data. Such type declarations do not exist in Emacs Lisp. A Lisp | 43 | the data. Such type declarations do not exist in Emacs Lisp. A Lisp |
| 44 | variable can have any type of value, and it remembers whatever value | 44 | variable can have any type of value, and it remembers whatever value |
| 45 | you store in it, type and all. | 45 | you store in it, type and all. (Actually, a small number of Emacs |
| 46 | Lisp variables can only take on values of a certain type. | ||
| 47 | @xref{Variables with Restricted Values}.) | ||
| 46 | 48 | ||
| 47 | This chapter describes the purpose, printed representation, and read | 49 | This chapter describes the purpose, printed representation, and read |
| 48 | syntax of each of the standard types in GNU Emacs Lisp. Details on how | 50 | syntax of each of the standard types in GNU Emacs Lisp. Details on how |
diff --git a/lispref/processes.texi b/lispref/processes.texi index c991cf300e3..8e32962de67 100644 --- a/lispref/processes.texi +++ b/lispref/processes.texi | |||
| @@ -676,6 +676,7 @@ instead of a terminal (see @code{process-connection-type} in | |||
| 676 | @ref{Asynchronous Processes}). | 676 | @ref{Asynchronous Processes}). |
| 677 | @end defun | 677 | @end defun |
| 678 | 678 | ||
| 679 | @anchor{Coding systems for a subprocess} | ||
| 679 | @defun process-coding-system process | 680 | @defun process-coding-system process |
| 680 | This function returns a cons cell describing the coding systems in use | 681 | This function returns a cons cell describing the coding systems in use |
| 681 | for decoding output from @var{process} and for encoding input to | 682 | for decoding output from @var{process} and for encoding input to |
diff --git a/lispref/tips.texi b/lispref/tips.texi index 1b40685ba5d..ec53dc420dd 100644 --- a/lispref/tips.texi +++ b/lispref/tips.texi | |||
| @@ -647,6 +647,7 @@ The argument FOO can be either a number | |||
| 647 | This prevents the open-parenthesis from being treated as the start of a | 647 | This prevents the open-parenthesis from being treated as the start of a |
| 648 | defun (@pxref{Defuns,, Defuns, emacs, The GNU Emacs Manual}). | 648 | defun (@pxref{Defuns,, Defuns, emacs, The GNU Emacs Manual}). |
| 649 | 649 | ||
| 650 | @anchor{Docstring hyperlinks} | ||
| 650 | @item | 651 | @item |
| 651 | @iftex | 652 | @iftex |
| 652 | When a documentation string refers to a Lisp symbol, write it as it | 653 | When a documentation string refers to a Lisp symbol, write it as it |
diff --git a/lispref/variables.texi b/lispref/variables.texi index 36cc2e47fe4..bbe7358b5d7 100644 --- a/lispref/variables.texi +++ b/lispref/variables.texi | |||
| @@ -43,6 +43,8 @@ variable. | |||
| 43 | * Future Local Variables:: New kinds of local values we might add some day. | 43 | * Future Local Variables:: New kinds of local values we might add some day. |
| 44 | * Variable Aliases:: Variables that are aliases for other variables. | 44 | * Variable Aliases:: Variables that are aliases for other variables. |
| 45 | * File Local Variables:: Handling local variable lists in files. | 45 | * File Local Variables:: Handling local variable lists in files. |
| 46 | * Variables with Restricted Values:: Non-constant variables whose value can | ||
| 47 | @emph{not} be an arbitrary Lisp object. | ||
| 46 | @end menu | 48 | @end menu |
| 47 | 49 | ||
| 48 | @node Global Variables | 50 | @node Global Variables |
| @@ -258,19 +260,21 @@ These kinds of bindings work somewhat like ordinary local bindings, but | |||
| 258 | they are localized depending on ``where'' you are in Emacs, rather than | 260 | they are localized depending on ``where'' you are in Emacs, rather than |
| 259 | localized in time. | 261 | localized in time. |
| 260 | 262 | ||
| 263 | @anchor{Definition of max-specpdl-size} | ||
| 261 | @defvar max-specpdl-size | 264 | @defvar max-specpdl-size |
| 262 | @cindex variable limit error | 265 | @cindex variable limit error |
| 263 | @cindex evaluation error | 266 | @cindex evaluation error |
| 264 | @cindex infinite recursion | 267 | @cindex infinite recursion |
| 265 | This variable defines the limit on the total number of local variable | 268 | This variable defines the limit on the total number of local variable |
| 266 | bindings and @code{unwind-protect} cleanups (@pxref{Nonlocal Exits}) | 269 | bindings and @code{unwind-protect} cleanups (@pxref{Cleanups,, |
| 267 | that are allowed before signaling an error (with data @code{"Variable | 270 | Cleaning Up from Nonlocal Exits}) that are allowed before signaling an |
| 268 | binding depth exceeds max-specpdl-size"}). | 271 | error (with data @code{"Variable binding depth exceeds |
| 272 | max-specpdl-size"}). | ||
| 269 | 273 | ||
| 270 | This limit, with the associated error when it is exceeded, is one way | 274 | This limit, with the associated error when it is exceeded, is one way |
| 271 | that Lisp avoids infinite recursion on an ill-defined function. | 275 | that Lisp avoids infinite recursion on an ill-defined function. |
| 272 | @code{max-lisp-eval-depth} provides another limit on depth of nesting. | 276 | @code{max-lisp-eval-depth} provides another limit on depth of nesting. |
| 273 | @xref{Eval}. | 277 | @xref{Definition of max-lisp-eval-depth,, Eval}. |
| 274 | 278 | ||
| 275 | The default value is 600. Entry to the Lisp debugger increases the | 279 | The default value is 600. Entry to the Lisp debugger increases the |
| 276 | value, if there is little room left, to make sure the debugger itself | 280 | value, if there is little room left, to make sure the debugger itself |
| @@ -1813,6 +1817,41 @@ could include functions to call. So Emacs discards all text | |||
| 1813 | properties from string values specified in a file's local variables | 1817 | properties from string values specified in a file's local variables |
| 1814 | list. | 1818 | list. |
| 1815 | 1819 | ||
| 1820 | @node Variables with Restricted Values | ||
| 1821 | @section Variables with Restricted Values | ||
| 1822 | |||
| 1823 | Ordinary Lisp variables can be assigned any value that is a valid | ||
| 1824 | Lisp object. However, certain Lisp variables are not defined in Lisp, | ||
| 1825 | but in C. Most of these variables are defined in the C code using | ||
| 1826 | @code{DEFVAR_LISP}. Like variables defined in Lisp, these can take on | ||
| 1827 | any value. However, some variables are defined using | ||
| 1828 | @code{DEFVAR_INT} or @code{DEFVAR_BOOL}. @xref{Defining Lisp | ||
| 1829 | variables in C,, Writing Emacs Primitives}, in particular the | ||
| 1830 | description of functions of the type @code{syms_of_@var{filename}}, | ||
| 1831 | for a brief discussion of the C implementation. | ||
| 1832 | |||
| 1833 | Variables of type @code{DEFVAR_BOOL} can only take on the values | ||
| 1834 | @code{nil} or @code{t}. Attempting to assign them any other value | ||
| 1835 | will set them to @code{t}: | ||
| 1836 | |||
| 1837 | @example | ||
| 1838 | (let ((display-hourglass 5)) | ||
| 1839 | display-hourglass) | ||
| 1840 | @result{} t | ||
| 1841 | @end example | ||
| 1842 | |||
| 1843 | @defvar byte-boolean-vars | ||
| 1844 | This variable holds a list of all variables of type @code{DEFVAR_BOOL}. | ||
| 1845 | @end defvar | ||
| 1846 | |||
| 1847 | Variables of type @code{DEFVAR_INT} can only take on integer values. | ||
| 1848 | Attempting to assign them any other value will result in an error: | ||
| 1849 | |||
| 1850 | @example | ||
| 1851 | (setq window-min-height 5.0) | ||
| 1852 | @error{} Wrong type argument: integerp, 5.0 | ||
| 1853 | @end example | ||
| 1854 | |||
| 1816 | @ignore | 1855 | @ignore |
| 1817 | arch-tag: 5ff62c44-2b51-47bb-99d4-fea5aeec5d3e | 1856 | arch-tag: 5ff62c44-2b51-47bb-99d4-fea5aeec5d3e |
| 1818 | @end ignore | 1857 | @end ignore |