diff options
| author | Richard M. Stallman | 1998-05-26 18:56:56 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1998-05-26 18:56:56 +0000 |
| commit | 1911e6e52c846c4a5bf744d850ec7061ff90c412 (patch) | |
| tree | 3f4540f345ab889ce4cd820b52d8962518039687 | |
| parent | e197b151dfa8c6c2eae48c4dc2bed2a7d677c9f3 (diff) | |
| download | emacs-1911e6e52c846c4a5bf744d850ec7061ff90c412.tar.gz emacs-1911e6e52c846c4a5bf744d850ec7061ff90c412.zip | |
*** empty log message ***
33 files changed, 773 insertions, 463 deletions
diff --git a/lispref/advice.texi b/lispref/advice.texi index 3d61ae41c38..24ddb628941 100644 --- a/lispref/advice.texi +++ b/lispref/advice.texi | |||
| @@ -12,10 +12,12 @@ function, by @dfn{advising the function}. This is a clean method for a | |||
| 12 | library to customize functions defined by other parts of Emacs---cleaner | 12 | library to customize functions defined by other parts of Emacs---cleaner |
| 13 | than redefining the whole function. | 13 | than redefining the whole function. |
| 14 | 14 | ||
| 15 | Each piece of advice can be enabled or disabled explicitly. The | 15 | @cindex piece of advice |
| 16 | enabled pieces of advice for any given function actually take effect | 16 | Each function can have multiple @dfn{pieces of advice}, separately |
| 17 | when you activate advice for that function, or when that function is | 17 | defined. Each defined piece of advice can be enabled or disabled |
| 18 | subsequently defined or redefined. | 18 | explicitly. The enabled pieces of advice for any given function |
| 19 | actually take effect when you @dfn{activate} advice for that function, or when | ||
| 20 | that function is subsequently defined or redefined. | ||
| 19 | 21 | ||
| 20 | @strong{Usage Note:} Advice is useful for altering the behavior of | 22 | @strong{Usage Note:} Advice is useful for altering the behavior of |
| 21 | existing calls to an existing function. If you want the new behavior | 23 | existing calls to an existing function. If you want the new behavior |
| @@ -25,12 +27,13 @@ function (or a new command) which uses the existing function. | |||
| 25 | @menu | 27 | @menu |
| 26 | * Simple Advice:: A simple example to explain the basics of advice. | 28 | * Simple Advice:: A simple example to explain the basics of advice. |
| 27 | * Defining Advice:: Detailed description of @code{defadvice}. | 29 | * Defining Advice:: Detailed description of @code{defadvice}. |
| 30 | * Around-Advice:: Wrapping advice around a function's definition. | ||
| 28 | * Computed Advice:: ...is to @code{defadvice} as @code{fset} is to @code{defun}. | 31 | * Computed Advice:: ...is to @code{defadvice} as @code{fset} is to @code{defun}. |
| 29 | * Activation of Advice:: Advice doesn't do anything until you activate it. | 32 | * Activation of Advice:: Advice doesn't do anything until you activate it. |
| 30 | * Enabling Advice:: You can enable or disable each piece of advice. | 33 | * Enabling Advice:: You can enable or disable each piece of advice. |
| 31 | * Preactivation:: Preactivation is a way of speeding up the | 34 | * Preactivation:: Preactivation is a way of speeding up the |
| 32 | loading of compiled advice. | 35 | loading of compiled advice. |
| 33 | * Argument Access:: How advice can access the function's arguments. | 36 | * Argument Access in Advice:: How advice can access the function's arguments. |
| 34 | * Subr Arguments:: Accessing arguments when advising a primitive. | 37 | * Subr Arguments:: Accessing arguments when advising a primitive. |
| 35 | * Combined Definition:: How advice is implemented. | 38 | * Combined Definition:: How advice is implemented. |
| 36 | @end menu | 39 | @end menu |
| @@ -63,7 +66,6 @@ this: | |||
| 63 | (newline)))) | 66 | (newline)))) |
| 64 | @end example | 67 | @end example |
| 65 | 68 | ||
| 66 | @cindex piece of advice | ||
| 67 | This expression defines a @dfn{piece of advice} for the function | 69 | This expression defines a @dfn{piece of advice} for the function |
| 68 | @code{previous-line}. This piece of advice is named | 70 | @code{previous-line}. This piece of advice is named |
| 69 | @code{next-line-at-end}, and the symbol @code{before} says that it is | 71 | @code{next-line-at-end}, and the symbol @code{before} says that it is |
| @@ -100,10 +102,12 @@ expression to wrap around the invocation of the base definition. | |||
| 100 | 102 | ||
| 101 | @node Defining Advice | 103 | @node Defining Advice |
| 102 | @section Defining Advice | 104 | @section Defining Advice |
| 105 | @cindex defining advice | ||
| 106 | @cindex advice, defining | ||
| 103 | 107 | ||
| 104 | To define a piece of advice, use the macro @code{defadvice}. A call | 108 | To define a piece of advice, use the macro @code{defadvice}. A call |
| 105 | to @code{defadvice} has the following syntax, which is based on the | 109 | to @code{defadvice} has the following syntax, which is based on the |
| 106 | syntax of @code{defun}/@code{defmacro} but adds more: | 110 | syntax of @code{defun} and @code{defmacro}, but adds more: |
| 107 | 111 | ||
| 108 | @findex defadvice | 112 | @findex defadvice |
| 109 | @example | 113 | @example |
| @@ -132,14 +136,13 @@ wrapped around the execution of the function itself. After-advice and | |||
| 132 | around-advice can override the return value by setting | 136 | around-advice can override the return value by setting |
| 133 | @code{ad-return-value}. | 137 | @code{ad-return-value}. |
| 134 | 138 | ||
| 135 | Around-advice specifies where the ``original'' function definition | 139 | @defvar ad-return-value |
| 136 | should go by means of the special symbol @code{ad-do-it}. Where this | 140 | While advice is executing, after the function's original definition has |
| 137 | symbol occurs inside the around-advice body, it is replaced with a | 141 | been executed, this variable holds its return value, which will |
| 138 | @code{progn} containing the forms of the surrounded code. If the | 142 | ultimately be returned to the caller after finishing all the advice. |
| 139 | around-advice does not use @code{ad-do-it}, then the original function | 143 | After-advice and around-advice can arrange to return some other value |
| 140 | definition is never run. This provides a way to override the original | 144 | by storing it in this variable. |
| 141 | definition completely. (It also overrides lower-positioned pieces of | 145 | @end defvar |
| 142 | around-advice). | ||
| 143 | 146 | ||
| 144 | The argument @var{name} is the name of the advice, a non-@code{nil} | 147 | The argument @var{name} is the name of the advice, a non-@code{nil} |
| 145 | symbol. The advice name uniquely identifies one piece of advice, within all | 148 | symbol. The advice name uniquely identifies one piece of advice, within all |
| @@ -152,11 +155,12 @@ definition calls for several different pieces of information. | |||
| 152 | 155 | ||
| 153 | The optional @var{position} specifies where, in the current list of | 156 | The optional @var{position} specifies where, in the current list of |
| 154 | advice of the specified @var{class}, this new advice should be placed. | 157 | advice of the specified @var{class}, this new advice should be placed. |
| 155 | It should be either @code{first}, @code{last} or a number that | 158 | It should be either @code{first}, @code{last} or a number that specifies |
| 156 | specifies a zero-based position (@code{first} is equivalent to 0). If | 159 | a zero-based position (@code{first} is equivalent to 0). If no position |
| 157 | no position is specified, the default is @code{first}. The | 160 | is specified, the default is @code{first}. Position values outside the |
| 158 | @var{position} value is ignored when redefining an existing piece of | 161 | range of existing positions in this class are mapped to the beginning or |
| 159 | advice. | 162 | the end of the range, whichever is closer. The @var{position} value is |
| 163 | ignored when redefining an existing piece of advice. | ||
| 160 | 164 | ||
| 161 | The optional @var{arglist} can be used to define the argument list for | 165 | The optional @var{arglist} can be used to define the argument list for |
| 162 | the sake of advice. This becomes the argument list of the combined | 166 | the sake of advice. This becomes the argument list of the combined |
| @@ -168,12 +172,11 @@ This argument list must be compatible with the argument list of the | |||
| 168 | original function, so that it can handle the ways the function is | 172 | original function, so that it can handle the ways the function is |
| 169 | actually called. If more than one piece of advice specifies an argument | 173 | actually called. If more than one piece of advice specifies an argument |
| 170 | list, then the first one (the one with the smallest position) found in | 174 | list, then the first one (the one with the smallest position) found in |
| 171 | the list of all classes of advice is used. Numbers outside the range | 175 | the list of all classes of advice is used. |
| 172 | are mapped to the beginning or the end, whichever is closer. | ||
| 173 | 176 | ||
| 174 | The remaining elements, @var{flags}, is a list of symbols that specify | 177 | The remaining elements, @var{flags}, are symbols that specify further |
| 175 | further information about how to use this piece of advice. Here are the | 178 | information about how to use this piece of advice. Here are the valid |
| 176 | valid symbols and their meanings: | 179 | symbols and their meanings: |
| 177 | 180 | ||
| 178 | @table @code | 181 | @table @code |
| 179 | @item activate | 182 | @item activate |
| @@ -190,8 +193,8 @@ activate an undefined function's advice. However, defining | |||
| 190 | 193 | ||
| 191 | @item protect | 194 | @item protect |
| 192 | Protect this piece of advice against non-local exits and errors in | 195 | Protect this piece of advice against non-local exits and errors in |
| 193 | preceding code and advice. Protecting advice makes it a cleanup in an | 196 | preceding code and advice. Protecting advice places it as a cleanup in |
| 194 | @code{unwind-protect} form, so that it will execute even if the | 197 | an @code{unwind-protect} form, so that it will execute even if the |
| 195 | previous code gets an error or uses @code{throw}. @xref{Cleanups}. | 198 | previous code gets an error or uses @code{throw}. @xref{Cleanups}. |
| 196 | 199 | ||
| 197 | @item compile | 200 | @item compile |
| @@ -233,6 +236,38 @@ expanded when a program is compiled, not when a compiled program is run. | |||
| 233 | All subroutines used by the advice need to be available when the byte | 236 | All subroutines used by the advice need to be available when the byte |
| 234 | compiler expands the macro. | 237 | compiler expands the macro. |
| 235 | 238 | ||
| 239 | @node Around-Advice | ||
| 240 | @section Around-Advice | ||
| 241 | |||
| 242 | Around-advice lets you ``wrap'' a Lisp expression ``around'' the | ||
| 243 | original function definition. You specify where the original function | ||
| 244 | definition should go by means of the special symbol @code{ad-do-it}. | ||
| 245 | Where this symbol occurs inside the around-advice body, it is replaced | ||
| 246 | with a @code{progn} containing the forms of the surrounded code. Here | ||
| 247 | is an example: | ||
| 248 | |||
| 249 | @example | ||
| 250 | (defadvice foo (around foo-around) | ||
| 251 | "Ignore case in `foo'." | ||
| 252 | (let ((case-fold-search t)) | ||
| 253 | ad-do-it)) | ||
| 254 | @end example | ||
| 255 | |||
| 256 | @noindent | ||
| 257 | Its effect is to make sure that case is ignored in | ||
| 258 | searches when the original definition of @code{foo} is run. | ||
| 259 | |||
| 260 | @defvar ad-do-it | ||
| 261 | This is not really a variable, but it is somewhat used like one | ||
| 262 | in around-advice. It specifies the place to run the function's | ||
| 263 | original definition and other ``earlier'' around-advice. | ||
| 264 | @end defvar | ||
| 265 | |||
| 266 | If the around-advice does not use @code{ad-do-it}, then it does not run | ||
| 267 | the original function definition. This provides a way to override the | ||
| 268 | original definition completely. (It also overrides lower-positioned | ||
| 269 | pieces of around-advice). | ||
| 270 | |||
| 236 | @node Computed Advice | 271 | @node Computed Advice |
| 237 | @section Computed Advice | 272 | @section Computed Advice |
| 238 | 273 | ||
| @@ -270,6 +305,7 @@ replaced with the new one. | |||
| 270 | @node Activation of Advice | 305 | @node Activation of Advice |
| 271 | @section Activation of Advice | 306 | @section Activation of Advice |
| 272 | @cindex activating advice | 307 | @cindex activating advice |
| 308 | @cindex advice, activating | ||
| 273 | 309 | ||
| 274 | By default, advice does not take effect when you define it---only when | 310 | By default, advice does not take effect when you define it---only when |
| 275 | you @dfn{activate} advice for the function that was advised. You can | 311 | you @dfn{activate} advice for the function that was advised. You can |
| @@ -302,10 +338,13 @@ This command activates the advice for @var{function}. | |||
| 302 | 338 | ||
| 303 | To activate advice for a function whose advice is already active is not | 339 | To activate advice for a function whose advice is already active is not |
| 304 | a no-op. It is a useful operation which puts into effect any changes in | 340 | a no-op. It is a useful operation which puts into effect any changes in |
| 305 | advice since the previous activation of that function's advice. | 341 | that function's advice since the previous activation of advice for that |
| 342 | function. | ||
| 306 | 343 | ||
| 307 | @deffn Command ad-deactivate function | 344 | @deffn Command ad-deactivate function |
| 308 | This command deactivates the advice for @var{function}. | 345 | This command deactivates the advice for @var{function}. |
| 346 | @cindex deactivating advice | ||
| 347 | @cindex advice, deactivating | ||
| 309 | @end deffn | 348 | @end deffn |
| 310 | 349 | ||
| 311 | @deffn Command ad-activate-all &optional compile | 350 | @deffn Command ad-activate-all &optional compile |
| @@ -323,7 +362,7 @@ which has at least one piece of advice that matches @var{regexp}. | |||
| 323 | @end deffn | 362 | @end deffn |
| 324 | 363 | ||
| 325 | @deffn Command ad-deactivate-regexp regexp | 364 | @deffn Command ad-deactivate-regexp regexp |
| 326 | This command deactivates the advice for all functions whose names match | 365 | This command deactivates all pieces of advice whose names match |
| 327 | @var{regexp}. More precisely, it deactivates all advice for any | 366 | @var{regexp}. More precisely, it deactivates all advice for any |
| 328 | function which has at least one piece of advice that matches | 367 | function which has at least one piece of advice that matches |
| 329 | @var{regexp}. | 368 | @var{regexp}. |
| @@ -332,6 +371,7 @@ function which has at least one piece of advice that matches | |||
| 332 | @deffn Command ad-update-regexp regexp &optional compile | 371 | @deffn Command ad-update-regexp regexp &optional compile |
| 333 | This command activates pieces of advice whose names match @var{regexp}, | 372 | This command activates pieces of advice whose names match @var{regexp}, |
| 334 | but only those for functions whose advice is already activated. | 373 | but only those for functions whose advice is already activated. |
| 374 | @cindex reactivating advice | ||
| 335 | 375 | ||
| 336 | Reactivating a function's advice is useful for putting into effect all | 376 | Reactivating a function's advice is useful for putting into effect all |
| 337 | the changes that have been made in its advice (including enabling and | 377 | the changes that have been made in its advice (including enabling and |
| @@ -355,17 +395,20 @@ This variable controls whether to compile the combined definition | |||
| 355 | that results from activating advice for a function. | 395 | that results from activating advice for a function. |
| 356 | @end defopt | 396 | @end defopt |
| 357 | 397 | ||
| 358 | If the advised definition was constructed during ``preactivation'' (see | 398 | If the advised definition was constructed during ``preactivation'' |
| 359 | below), then that definition must already be compiled, because it was | 399 | (@pxref{Preactivation}), then that definition must already be compiled, |
| 360 | constructed during byte-compilation of the file that contained the | 400 | because it was constructed during byte-compilation of the file that |
| 361 | @code{defadvice} with the @code{preactivate} flag. | 401 | contained the @code{defadvice} with the @code{preactivate} flag. |
| 362 | 402 | ||
| 363 | @node Enabling Advice | 403 | @node Enabling Advice |
| 364 | @section Enabling and Disabling Advice | 404 | @section Enabling and Disabling Advice |
| 405 | @cindex enabling advice | ||
| 406 | @cindex advice, enabling and disabling | ||
| 407 | @cindex disabling advice | ||
| 365 | 408 | ||
| 366 | Each piece of advice has a flag that says whether it is enabled or | 409 | Each piece of advice has a flag that says whether it is enabled or |
| 367 | not. By enabling or disabling a piece of advice, you can turn it off | 410 | not. By enabling or disabling a piece of advice, you can turn it on |
| 368 | and on without having to undefine and redefine it. For example, here is | 411 | and off without having to undefine and redefine it. For example, here is |
| 369 | how to disable a particular piece of advice named @code{my-advice} for | 412 | how to disable a particular piece of advice named @code{my-advice} for |
| 370 | the function @code{foo}: | 413 | the function @code{foo}: |
| 371 | 414 | ||
| @@ -373,7 +416,7 @@ the function @code{foo}: | |||
| 373 | (ad-disable-advice 'foo 'before 'my-advice) | 416 | (ad-disable-advice 'foo 'before 'my-advice) |
| 374 | @end example | 417 | @end example |
| 375 | 418 | ||
| 376 | This function by itself only changes the enable flag for a piece of | 419 | This function by itself only changes the enable flag for a piece of |
| 377 | advice. To make the change take effect in the advised definition, you | 420 | advice. To make the change take effect in the advised definition, you |
| 378 | must activate the advice for @code{foo} again: | 421 | must activate the advice for @code{foo} again: |
| 379 | 422 | ||
| @@ -408,6 +451,8 @@ This command enables all pieces of advice whose names match | |||
| 408 | 451 | ||
| 409 | @node Preactivation | 452 | @node Preactivation |
| 410 | @section Preactivation | 453 | @section Preactivation |
| 454 | @cindex preactivating advice | ||
| 455 | @cindex advice, preactivating | ||
| 411 | 456 | ||
| 412 | Constructing a combined definition to execute advice is moderately | 457 | Constructing a combined definition to execute advice is moderately |
| 413 | expensive. When a library advises many functions, this can make loading | 458 | expensive. When a library advises many functions, this can make loading |
| @@ -486,7 +531,7 @@ for that function. | |||
| 486 | A more robust method is to use macros that are translated into the | 531 | A more robust method is to use macros that are translated into the |
| 487 | proper access forms at activation time, i.e., when constructing the | 532 | proper access forms at activation time, i.e., when constructing the |
| 488 | advised definition. Access macros access actual arguments by position | 533 | advised definition. Access macros access actual arguments by position |
| 489 | regardless of how these actual argument get distributed onto the | 534 | regardless of how these actual arguments get distributed onto the |
| 490 | argument variables of a function. This is robust because in Emacs Lisp | 535 | argument variables of a function. This is robust because in Emacs Lisp |
| 491 | the meaning of an argument is strictly determined by its position in the | 536 | the meaning of an argument is strictly determined by its position in the |
| 492 | argument list. | 537 | argument list. |
diff --git a/lispref/anti.texi b/lispref/anti.texi index d93e99cf962..d9873088f17 100644 --- a/lispref/anti.texi +++ b/lispref/anti.texi | |||
| @@ -73,7 +73,7 @@ or the strings are not equal. | |||
| 73 | or specified padding. | 73 | or specified padding. |
| 74 | 74 | ||
| 75 | @item | 75 | @item |
| 76 | The functions @code{split-string} and @code{concat-chars} no longer exist. | 76 | The functions @code{split-string} and @code{string} no longer exist. |
| 77 | Neither does @code{store-substring} or @code{sref}. | 77 | Neither does @code{store-substring} or @code{sref}. |
| 78 | 78 | ||
| 79 | @item | 79 | @item |
diff --git a/lispref/backups.texi b/lispref/backups.texi index 3cdd88d5c08..e18c2ba7826 100644 --- a/lispref/backups.texi +++ b/lispref/backups.texi | |||
| @@ -588,17 +588,17 @@ about them, you can get rid of them by reading in the previous version | |||
| 588 | of the file with the @code{revert-buffer} command. @xref{Reverting, , | 588 | of the file with the @code{revert-buffer} command. @xref{Reverting, , |
| 589 | Reverting a Buffer, emacs, The GNU Emacs Manual}. | 589 | Reverting a Buffer, emacs, The GNU Emacs Manual}. |
| 590 | 590 | ||
| 591 | @deffn Command revert-buffer &optional check-auto-save noconfirm | 591 | @deffn Command revert-buffer &optional ignore-auto noconfirm |
| 592 | This command replaces the buffer text with the text of the visited | 592 | This command replaces the buffer text with the text of the visited |
| 593 | file on disk. This action undoes all changes since the file was visited | 593 | file on disk. This action undoes all changes since the file was visited |
| 594 | or saved. | 594 | or saved. |
| 595 | 595 | ||
| 596 | If the argument @var{check-auto-save} is non-@code{nil}, and the | 596 | By default, if the latest auto-save file is more recent than the visited |
| 597 | latest auto-save file is more recent than the visited file, | 597 | file, @code{revert-buffer} asks the user whether to use that instead. |
| 598 | @code{revert-buffer} asks the user whether to use that instead. | 598 | But if the argument @var{ignore-auto} is non-@code{nil}, then only the |
| 599 | Otherwise, it always uses the text of the visited file itself. | 599 | the visited file itself is used. Interactively, @var{ignore-auto} is |
| 600 | Interactively, @var{check-auto-save} is set if there is a numeric prefix | 600 | @code{t} unless there is a numeric prefix argument; thus, the |
| 601 | argument. | 601 | interactive default is to check the auto-save file. |
| 602 | 602 | ||
| 603 | Normally, @code{revert-buffer} asks for confirmation before it changes | 603 | Normally, @code{revert-buffer} asks for confirmation before it changes |
| 604 | the buffer; but if the argument @var{noconfirm} is non-@code{nil}, | 604 | the buffer; but if the argument @var{noconfirm} is non-@code{nil}, |
| @@ -616,6 +616,14 @@ buffer. Preserving any additional markers would be problematical. | |||
| 616 | You can customize how @code{revert-buffer} does its work by setting | 616 | You can customize how @code{revert-buffer} does its work by setting |
| 617 | these variables---typically, as buffer-local variables. | 617 | these variables---typically, as buffer-local variables. |
| 618 | 618 | ||
| 619 | @defvar revert-without-query | ||
| 620 | This variable holds a list of files that should be reverted without | ||
| 621 | query. The value is a list of regular expressions. If a file name | ||
| 622 | matches one of these regular expressions, then @code{revert-buffer} | ||
| 623 | reverts the file without asking the user for confirmation, if the file | ||
| 624 | has changed on disk and the buffer is not modified. | ||
| 625 | @end defvar | ||
| 626 | |||
| 619 | @defvar revert-buffer-function | 627 | @defvar revert-buffer-function |
| 620 | The value of this variable is the function to use to revert this buffer. | 628 | The value of this variable is the function to use to revert this buffer. |
| 621 | If non-@code{nil}, it is called as a function with no arguments to do | 629 | If non-@code{nil}, it is called as a function with no arguments to do |
diff --git a/lispref/buffers.texi b/lispref/buffers.texi index c54f1e6b9b0..f1227d60705 100644 --- a/lispref/buffers.texi +++ b/lispref/buffers.texi | |||
| @@ -213,7 +213,7 @@ If the buffer that used to be current has been killed by the time of | |||
| 213 | exit from @code{save-current-buffer}, then it is not made current again, | 213 | exit from @code{save-current-buffer}, then it is not made current again, |
| 214 | of course. Instead, whichever buffer was current just before exit | 214 | of course. Instead, whichever buffer was current just before exit |
| 215 | remains current. | 215 | remains current. |
| 216 | @end defmac | 216 | @end defspec |
| 217 | 217 | ||
| 218 | @defmac with-current-buffer buffer body... | 218 | @defmac with-current-buffer buffer body... |
| 219 | @tindex with-current-buffer | 219 | @tindex with-current-buffer |
| @@ -427,7 +427,7 @@ the same file name. In such cases, this function returns the first | |||
| 427 | such buffer in the buffer list. | 427 | such buffer in the buffer list. |
| 428 | @end defun | 428 | @end defun |
| 429 | 429 | ||
| 430 | @deffn Command set-visited-file-name filename | 430 | @deffn Command set-visited-file-name filename &optional no-query along-with-file |
| 431 | If @var{filename} is a non-empty string, this function changes the | 431 | If @var{filename} is a non-empty string, this function changes the |
| 432 | name of the file visited in current buffer to @var{filename}. (If the | 432 | name of the file visited in current buffer to @var{filename}. (If the |
| 433 | buffer had no visited file, this gives it one.) The @emph{next time} | 433 | buffer had no visited file, this gives it one.) The @emph{next time} |
| @@ -440,6 +440,13 @@ If @var{filename} is @code{nil} or the empty string, that stands for | |||
| 440 | ``no visited file''. In this case, @code{set-visited-file-name} marks | 440 | ``no visited file''. In this case, @code{set-visited-file-name} marks |
| 441 | the buffer as having no visited file. | 441 | the buffer as having no visited file. |
| 442 | 442 | ||
| 443 | Normally, this function asks the user for confirmation if the specified | ||
| 444 | file already exists. If @var{no-query} is non-@code{nil}, that prevents | ||
| 445 | asking this question. | ||
| 446 | |||
| 447 | If @var{along-with-file} is non-@code{nil}, that means to assume that the | ||
| 448 | former visited file has been renamed to @var{filename}. | ||
| 449 | |||
| 443 | @c Wordy to avoid overfull hbox. --rjc 16mar92 | 450 | @c Wordy to avoid overfull hbox. --rjc 16mar92 |
| 444 | When the function @code{set-visited-file-name} is called interactively, it | 451 | When the function @code{set-visited-file-name} is called interactively, it |
| 445 | prompts for @var{filename} in the minibuffer. | 452 | prompts for @var{filename} in the minibuffer. |
| @@ -723,21 +730,21 @@ live buffer. | |||
| 723 | @code{buffer-list} frame parameter with @code{modify-frame-parameters} | 730 | @code{buffer-list} frame parameter with @code{modify-frame-parameters} |
| 724 | (@pxref{Parameter Access}). | 731 | (@pxref{Parameter Access}). |
| 725 | 732 | ||
| 726 | @defun other-buffer &optional buffer visible-ok | 733 | @defun other-buffer &optional buffer visible-ok frame |
| 727 | This function returns the first buffer in the buffer list other than | 734 | This function returns the first buffer in the buffer list other than |
| 728 | @var{buffer}. Usually this is the buffer selected most recently (in the | 735 | @var{buffer}. Usually this is the buffer selected most recently (in |
| 729 | currently selected frame), aside from @var{buffer}. Buffers whose names | 736 | frame @var{frame} or else the currently selected frame), aside from |
| 730 | start with a space are not considered at all. | 737 | @var{buffer}. Buffers whose names start with a space are not considered |
| 738 | at all. | ||
| 731 | 739 | ||
| 732 | If @var{buffer} is not supplied (or if it is not a buffer), then | 740 | If @var{buffer} is not supplied (or if it is not a buffer), then |
| 733 | @code{other-buffer} returns the first buffer in the selected frame's | 741 | @code{other-buffer} returns the first buffer in the selected frame's |
| 734 | buffer list that is not now visible in any window in a visible frame. | 742 | buffer list that is not now visible in any window in a visible frame. |
| 735 | 743 | ||
| 736 | If the selected frame has a non-@code{nil} @code{buffer-predicate} | 744 | If @var{frame} has a non-@code{nil} @code{buffer-predicate} parameter, |
| 737 | parameter, then @code{other-buffer} uses that predicate to decide which | 745 | then @code{other-buffer} uses that predicate to decide which buffers to |
| 738 | buffers to consider. It calls the predicate once for each buffer, and | 746 | consider. It calls the predicate once for each buffer, and if the value |
| 739 | if the value is @code{nil}, that buffer is ignored. @xref{Window Frame | 747 | is @code{nil}, that buffer is ignored. @xref{Window Frame Parameters}. |
| 740 | Parameters}. | ||
| 741 | 748 | ||
| 742 | @c Emacs 19 feature | 749 | @c Emacs 19 feature |
| 743 | If @var{visible-ok} is @code{nil}, @code{other-buffer} avoids returning | 750 | If @var{visible-ok} is @code{nil}, @code{other-buffer} avoids returning |
diff --git a/lispref/calendar.texi b/lispref/calendar.texi index ff1fec3cffc..171f6a2263a 100644 --- a/lispref/calendar.texi +++ b/lispref/calendar.texi | |||
| @@ -577,7 +577,7 @@ HHeshvan 25 Happy Hebrew birthday! | |||
| 577 | 577 | ||
| 578 | @noindent | 578 | @noindent |
| 579 | and would appear in the diary for any date that corresponds to Heshvan 25 | 579 | and would appear in the diary for any date that corresponds to Heshvan 25 |
| 580 | on the Hebrew calendar. And here is Islamic-date diary entry that matches | 580 | on the Hebrew calendar. And here is an Islamic-date diary entry that matches |
| 581 | Dhu al-Qada 25: | 581 | Dhu al-Qada 25: |
| 582 | 582 | ||
| 583 | @smallexample | 583 | @smallexample |
| @@ -668,7 +668,7 @@ shown in the fancy diary buffer, set the variable | |||
| 668 | @cindex sorting diary entries | 668 | @cindex sorting diary entries |
| 669 | If you use the fancy diary display, you can use the normal hook | 669 | If you use the fancy diary display, you can use the normal hook |
| 670 | @code{list-diary-entries-hook} to sort each day's diary entries by their | 670 | @code{list-diary-entries-hook} to sort each day's diary entries by their |
| 671 | time of day. Here's how | 671 | time of day. Here's how: |
| 672 | 672 | ||
| 673 | @findex sort-diary-entries | 673 | @findex sort-diary-entries |
| 674 | @example | 674 | @example |
diff --git a/lispref/commands.texi b/lispref/commands.texi index 49c9d3c16e3..7690b4e1497 100644 --- a/lispref/commands.texi +++ b/lispref/commands.texi | |||
| @@ -1589,7 +1589,7 @@ buffer position. Here's how to do that: | |||
| 1589 | (- (point-max) (point-min)))) | 1589 | (- (point-max) (point-min)))) |
| 1590 | @end example | 1590 | @end example |
| 1591 | 1591 | ||
| 1592 | Recall that scroll bar events have two integers forming ratio in place | 1592 | Recall that scroll bar events have two integers forming a ratio, in place |
| 1593 | of a pair of x and y coordinates. | 1593 | of a pair of x and y coordinates. |
| 1594 | @end defun | 1594 | @end defun |
| 1595 | 1595 | ||
| @@ -1652,7 +1652,8 @@ and such numbers cannot be included in a string. | |||
| 1652 | 1652 | ||
| 1653 | To support programs with @samp{\M-} in string constants, there are | 1653 | To support programs with @samp{\M-} in string constants, there are |
| 1654 | special rules for including certain meta characters in a string. | 1654 | special rules for including certain meta characters in a string. |
| 1655 | Here are the rules for interpreting keyboard | 1655 | Here are the rules for interpreting a string as a sequence of input |
| 1656 | characters: | ||
| 1656 | 1657 | ||
| 1657 | @itemize @bullet | 1658 | @itemize @bullet |
| 1658 | @item | 1659 | @item |
| @@ -1854,7 +1855,7 @@ If @code{cursor-in-echo-area} is non-@code{nil}, then @code{read-event} | |||
| 1854 | moves the cursor temporarily to the echo area, to the end of any message | 1855 | moves the cursor temporarily to the echo area, to the end of any message |
| 1855 | displayed there. Otherwise @code{read-event} does not move the cursor. | 1856 | displayed there. Otherwise @code{read-event} does not move the cursor. |
| 1856 | 1857 | ||
| 1857 | If @code{read-event} gets an event is defined as a help character, in | 1858 | If @code{read-event} gets an event that is defined as a help character, in |
| 1858 | some cases @code{read-event} processes the event directly without | 1859 | some cases @code{read-event} processes the event directly without |
| 1859 | returning. @xref{Help Functions}. Certain other events, called | 1860 | returning. @xref{Help Functions}. Certain other events, called |
| 1860 | @dfn{special events}, are also processed directly within | 1861 | @dfn{special events}, are also processed directly within |
| @@ -1948,7 +1949,8 @@ What character-@kbd{177} | |||
| 1948 | 1949 | ||
| 1949 | This section describes how to ``peek ahead'' at events without using | 1950 | This section describes how to ``peek ahead'' at events without using |
| 1950 | them up, how to check for pending input, and how to discard pending | 1951 | them up, how to check for pending input, and how to discard pending |
| 1951 | input. | 1952 | input. See also the function @code{read-passwd} (@pxref{Reading a |
| 1953 | Password}). | ||
| 1952 | 1954 | ||
| 1953 | @defvar unread-command-events | 1955 | @defvar unread-command-events |
| 1954 | @cindex next input | 1956 | @cindex next input |
diff --git a/lispref/customize.texi b/lispref/customize.texi index dffd3de49a3..f581fc42345 100644 --- a/lispref/customize.texi +++ b/lispref/customize.texi | |||
| @@ -372,9 +372,9 @@ The value must be a directory name, and you can do completion with | |||
| 372 | @item hook | 372 | @item hook |
| 373 | The value must be a list of functions (or a single function, but that is | 373 | The value must be a list of functions (or a single function, but that is |
| 374 | obsolete usage). This customization type is used for hook variables. | 374 | obsolete usage). This customization type is used for hook variables. |
| 375 | You can use the @code{:option} in the @code{defcustom} for a hook | 375 | You can use the @code{:options} keyword in a hook variable's |
| 376 | variable to specify functions recommended for use in the hook; | 376 | @code{defcustom} to specify a list of functions recommended for use in |
| 377 | see @ref{Variable Definitions}. | 377 | the hook; see @ref{Variable Definitions}. |
| 378 | 378 | ||
| 379 | @item symbol | 379 | @item symbol |
| 380 | The value must be a symbol. It appears in the customization buffer as | 380 | The value must be a symbol. It appears in the customization buffer as |
diff --git a/lispref/debugging.texi b/lispref/debugging.texi index 8e5ed2834a5..6f46c37c21f 100644 --- a/lispref/debugging.texi +++ b/lispref/debugging.texi | |||
| @@ -124,7 +124,7 @@ the debugger gets a chance. | |||
| 124 | If you set @code{debug-on-signal} to a non-@code{nil} value, then the | 124 | If you set @code{debug-on-signal} to a non-@code{nil} value, then the |
| 125 | debugger gets the first chance at every error; an error will invoke the | 125 | debugger gets the first chance at every error; an error will invoke the |
| 126 | debugger regardless of any @code{condition-case}, if it fits the | 126 | debugger regardless of any @code{condition-case}, if it fits the |
| 127 | criterion specified by the values of @code{debug-on-error} and | 127 | criteria specified by the values of @code{debug-on-error} and |
| 128 | @code{debug-ignored-errors}. | 128 | @code{debug-ignored-errors}. |
| 129 | 129 | ||
| 130 | @strong{Warning:} This variable is strong medicine! Various parts of | 130 | @strong{Warning:} This variable is strong medicine! Various parts of |
| @@ -139,9 +139,9 @@ enter the debugger. | |||
| 139 | 139 | ||
| 140 | To debug an error that happens during loading of the @file{.emacs} | 140 | To debug an error that happens during loading of the @file{.emacs} |
| 141 | file, use the option @samp{--debug-init}, which binds | 141 | file, use the option @samp{--debug-init}, which binds |
| 142 | @code{debug-on-error} to @code{t} while @file{.emacs} is loaded, and | 142 | @code{debug-on-error} to @code{t} while loading @file{.emacs}, and |
| 143 | bypasses the @code{condition-case} which normally catches errors in the | 143 | bypasses the @code{condition-case} which normally catches errors in the |
| 144 | init-file. | 144 | init file. |
| 145 | 145 | ||
| 146 | If your @file{.emacs} file sets @code{debug-on-error}, the effect may | 146 | If your @file{.emacs} file sets @code{debug-on-error}, the effect may |
| 147 | not last past the end of loading @file{.emacs}. (This is an undesirable | 147 | not last past the end of loading @file{.emacs}. (This is an undesirable |
| @@ -737,7 +737,7 @@ the old indentation actually fit the intended nesting of parentheses, | |||
| 737 | and you have put back those parentheses, @kbd{C-M-q} should not change | 737 | and you have put back those parentheses, @kbd{C-M-q} should not change |
| 738 | anything. | 738 | anything. |
| 739 | 739 | ||
| 740 | @node Compilation Errors, Edebug, Syntax Errors, Debugging | 740 | @node Compilation Errors |
| 741 | @section Debugging Problems in Compilation | 741 | @section Debugging Problems in Compilation |
| 742 | 742 | ||
| 743 | When an error happens during byte compilation, it is normally due to | 743 | When an error happens during byte compilation, it is normally due to |
diff --git a/lispref/display.texi b/lispref/display.texi index 4b09a8b3372..e3680f95815 100644 --- a/lispref/display.texi +++ b/lispref/display.texi | |||
| @@ -11,7 +11,6 @@ that Emacs presents to the user. | |||
| 11 | 11 | ||
| 12 | @menu | 12 | @menu |
| 13 | * Refresh Screen:: Clearing the screen and redrawing everything on it. | 13 | * Refresh Screen:: Clearing the screen and redrawing everything on it. |
| 14 | * Screen Size:: How big is the Emacs screen. | ||
| 15 | * Truncation:: Folding or wrapping long text lines. | 14 | * Truncation:: Folding or wrapping long text lines. |
| 16 | * The Echo Area:: Where messages are displayed. | 15 | * The Echo Area:: Where messages are displayed. |
| 17 | * Invisible Text:: Hiding part of the buffer text. | 16 | * Invisible Text:: Hiding part of the buffer text. |
| @@ -33,7 +32,7 @@ that Emacs presents to the user. | |||
| 33 | @section Refreshing the Screen | 32 | @section Refreshing the Screen |
| 34 | 33 | ||
| 35 | The function @code{redraw-frame} redisplays the entire contents of a | 34 | The function @code{redraw-frame} redisplays the entire contents of a |
| 36 | given frame. @xref{Frames}. | 35 | given frame (@pxref{Frames}). |
| 37 | 36 | ||
| 38 | @c Emacs 19 feature | 37 | @c Emacs 19 feature |
| 39 | @defun redraw-frame frame | 38 | @defun redraw-frame frame |
| @@ -65,65 +64,6 @@ has been suspended and resumed. Non-@code{nil} means there is no need | |||
| 65 | to redraw, @code{nil} means redrawing is needed. The default is @code{nil}. | 64 | to redraw, @code{nil} means redrawing is needed. The default is @code{nil}. |
| 66 | @end defvar | 65 | @end defvar |
| 67 | 66 | ||
| 68 | @node Screen Size | ||
| 69 | @section Screen Size | ||
| 70 | @cindex size of screen | ||
| 71 | @cindex screen size | ||
| 72 | @cindex display lines | ||
| 73 | @cindex display columns | ||
| 74 | @cindex resize redisplay | ||
| 75 | |||
| 76 | The screen size functions access or specify the height or width of | ||
| 77 | the terminal. When you are using multiple frames, they apply to the | ||
| 78 | selected frame (@pxref{Frames}). | ||
| 79 | |||
| 80 | @defun screen-height | ||
| 81 | This function returns the number of lines on the screen that are | ||
| 82 | available for display. | ||
| 83 | |||
| 84 | @example | ||
| 85 | @group | ||
| 86 | (screen-height) | ||
| 87 | @result{} 50 | ||
| 88 | @end group | ||
| 89 | @end example | ||
| 90 | @end defun | ||
| 91 | |||
| 92 | @defun screen-width | ||
| 93 | This function returns the number of columns on the screen that are | ||
| 94 | available for display. | ||
| 95 | |||
| 96 | @example | ||
| 97 | @group | ||
| 98 | (screen-width) | ||
| 99 | @result{} 80 | ||
| 100 | @end group | ||
| 101 | @end example | ||
| 102 | @end defun | ||
| 103 | |||
| 104 | @defun set-screen-height lines &optional not-actual-size | ||
| 105 | This function declares that the terminal can display @var{lines} lines. | ||
| 106 | The sizes of existing windows are altered proportionally to fit. | ||
| 107 | |||
| 108 | If @var{not-actual-size} is non-@code{nil}, then Emacs displays | ||
| 109 | @var{lines} lines of output, but does not change its value for the | ||
| 110 | actual height of the screen. (Knowing the correct actual size may be | ||
| 111 | necessary for correct cursor positioning.) Using a smaller height than | ||
| 112 | the terminal actually implements may be useful to reproduce behavior | ||
| 113 | observed on a smaller screen, or if the terminal malfunctions when using | ||
| 114 | its whole screen. | ||
| 115 | |||
| 116 | If @var{lines} is different from what it was previously, then the | ||
| 117 | entire screen is cleared and redisplayed using the new size. | ||
| 118 | |||
| 119 | This function returns @code{nil}. | ||
| 120 | @end defun | ||
| 121 | |||
| 122 | @defun set-screen-width columns &optional not-actual-size | ||
| 123 | This function declares that the terminal can display @var{columns} | ||
| 124 | columns. The details are as in @code{set-screen-height}. | ||
| 125 | @end defun | ||
| 126 | |||
| 127 | @node Truncation | 67 | @node Truncation |
| 128 | @section Truncation | 68 | @section Truncation |
| 129 | @cindex line wrapping | 69 | @cindex line wrapping |
| @@ -173,7 +113,7 @@ a window, that forces truncation. | |||
| 173 | You can override the glyphs that indicate continuation or truncation | 113 | You can override the glyphs that indicate continuation or truncation |
| 174 | using the display table; see @ref{Display Tables}. | 114 | using the display table; see @ref{Display Tables}. |
| 175 | 115 | ||
| 176 | If your buffer contains @strong{very} long lines, and you use | 116 | If your buffer contains @emph{very} long lines, and you use |
| 177 | continuation to display them, just thinking about them can make Emacs | 117 | continuation to display them, just thinking about them can make Emacs |
| 178 | redisplay slow. The column computation and indentation functions also | 118 | redisplay slow. The column computation and indentation functions also |
| 179 | become slow. Then you might find it advisable to set | 119 | become slow. Then you might find it advisable to set |
| @@ -395,7 +335,7 @@ overlaps the overlay on exit from the search. | |||
| 395 | 335 | ||
| 396 | During the search, such overlays are made temporarily visible by | 336 | During the search, such overlays are made temporarily visible by |
| 397 | temporarily modifying their invisible and intangible properties. If you | 337 | temporarily modifying their invisible and intangible properties. If you |
| 398 | want this to be done differently for a certain overlays, give it a | 338 | want this to be done differently for a certain overlay, give it a |
| 399 | @code{isearch-open-invisible-temporary} property which is a function. | 339 | @code{isearch-open-invisible-temporary} property which is a function. |
| 400 | The function is called with two arguments: the first is the overlay, and | 340 | The function is called with two arguments: the first is the overlay, and |
| 401 | the second is @code{t} to make the overlay visible, or @code{nil} to | 341 | the second is @code{t} to make the overlay visible, or @code{nil} to |
| @@ -1093,7 +1033,7 @@ subsequent elements of @var{spec} are never used. Normally | |||
| 1093 | @code{t} is used in the last (or only) element of @var{spec}. | 1033 | @code{t} is used in the last (or only) element of @var{spec}. |
| 1094 | 1034 | ||
| 1095 | @item a list | 1035 | @item a list |
| 1096 | If @var{display} is alist, each elements should have the form | 1036 | If @var{display} is a list, each element should have the form |
| 1097 | @code{(@var{characteristic} @var{value}@dots{})}. Here | 1037 | @code{(@var{characteristic} @var{value}@dots{})}. Here |
| 1098 | @var{characteristic} specifies a way of classifying frames, and the | 1038 | @var{characteristic} specifies a way of classifying frames, and the |
| 1099 | @var{value}s are possible classifications which @var{display} should | 1039 | @var{value}s are possible classifications which @var{display} should |
| @@ -1110,7 +1050,7 @@ What kinds of colors the frame supports---either @code{color}, | |||
| 1110 | @code{grayscale}, or @code{mono}. | 1050 | @code{grayscale}, or @code{mono}. |
| 1111 | 1051 | ||
| 1112 | @item background | 1052 | @item background |
| 1113 | The kind of background--- either @code{light} or @code{dark}. | 1053 | The kind of background---either @code{light} or @code{dark}. |
| 1114 | @end table | 1054 | @end table |
| 1115 | 1055 | ||
| 1116 | If an element of @var{display} specifies more than one @var{value} for a | 1056 | If an element of @var{display} specifies more than one @var{value} for a |
| @@ -1139,6 +1079,15 @@ with @code{defface}: | |||
| 1139 | with the customization buffer, and @code{face-documentation} for the | 1079 | with the customization buffer, and @code{face-documentation} for the |
| 1140 | documentation string. | 1080 | documentation string. |
| 1141 | 1081 | ||
| 1082 | @tindex frame-background-mode | ||
| 1083 | @defopt frame-background-mode | ||
| 1084 | This option, if non-@code{nil}, specifies the background type to use for | ||
| 1085 | interpreting face definitions. If it is @code{dark}, then Emacs treats | ||
| 1086 | all frames as if they had a dark background, regardless of their actual | ||
| 1087 | background colors. If it is @code{light}, then Emacs treats all frames | ||
| 1088 | as if they had a light background. | ||
| 1089 | @end defopt | ||
| 1090 | |||
| 1142 | @node Merging Faces | 1091 | @node Merging Faces |
| 1143 | @subsection Merging Faces for Display | 1092 | @subsection Merging Faces for Display |
| 1144 | 1093 | ||
| @@ -1339,6 +1288,12 @@ for more information about Transient Mark mode. | |||
| 1339 | Normally, the value is the face number of the face named @code{region}. | 1288 | Normally, the value is the face number of the face named @code{region}. |
| 1340 | @end defvar | 1289 | @end defvar |
| 1341 | 1290 | ||
| 1291 | @tindex frame-update-face-colors | ||
| 1292 | @defun frame-update-face-colors frame | ||
| 1293 | This function updates the way faces display on @var{frame}, for a change | ||
| 1294 | in @var{frame}'s foreground or background color. | ||
| 1295 | @end defun | ||
| 1296 | |||
| 1342 | @node Blinking | 1297 | @node Blinking |
| 1343 | @section Blinking Parentheses | 1298 | @section Blinking Parentheses |
| 1344 | @cindex parenthesis matching | 1299 | @cindex parenthesis matching |
| @@ -1356,23 +1311,23 @@ The value of @code{blink-paren-function} may be @code{nil}, in which | |||
| 1356 | case nothing is done. | 1311 | case nothing is done. |
| 1357 | @end defvar | 1312 | @end defvar |
| 1358 | 1313 | ||
| 1359 | @defvar blink-matching-paren | 1314 | @defopt blink-matching-paren |
| 1360 | If this variable is @code{nil}, then @code{blink-matching-open} does | 1315 | If this variable is @code{nil}, then @code{blink-matching-open} does |
| 1361 | nothing. | 1316 | nothing. |
| 1362 | @end defvar | 1317 | @end defopt |
| 1363 | 1318 | ||
| 1364 | @defvar blink-matching-paren-distance | 1319 | @defopt blink-matching-paren-distance |
| 1365 | This variable specifies the maximum distance to scan for a matching | 1320 | This variable specifies the maximum distance to scan for a matching |
| 1366 | parenthesis before giving up. | 1321 | parenthesis before giving up. |
| 1367 | @end defvar | 1322 | @end defopt |
| 1368 | 1323 | ||
| 1369 | @defvar blink-matching-paren-delay | 1324 | @defopt blink-matching-delay |
| 1370 | This variable specifies the number of seconds for the cursor to remain | 1325 | This variable specifies the number of seconds for the cursor to remain |
| 1371 | at the matching parenthesis. A fraction of a second often gives | 1326 | at the matching parenthesis. A fraction of a second often gives |
| 1372 | good results, but the default is 1, which works on all systems. | 1327 | good results, but the default is 1, which works on all systems. |
| 1373 | @end defvar | 1328 | @end defopt |
| 1374 | 1329 | ||
| 1375 | @defun blink-matching-open | 1330 | @deffn Command blink-matching-open |
| 1376 | This function is the default value of @code{blink-paren-function}. It | 1331 | This function is the default value of @code{blink-paren-function}. It |
| 1377 | assumes that point follows a character with close parenthesis syntax and | 1332 | assumes that point follows a character with close parenthesis syntax and |
| 1378 | moves the cursor momentarily to the matching opening character. If that | 1333 | moves the cursor momentarily to the matching opening character. If that |
| @@ -1398,7 +1353,7 @@ Here is an example of calling this function explicitly. | |||
| 1398 | (blink-matching-open))) | 1353 | (blink-matching-open))) |
| 1399 | @end group | 1354 | @end group |
| 1400 | @end smallexample | 1355 | @end smallexample |
| 1401 | @end defun | 1356 | @end deffn |
| 1402 | 1357 | ||
| 1403 | @node Inverse Video | 1358 | @node Inverse Video |
| 1404 | @section Inverse Video | 1359 | @section Inverse Video |
| @@ -1655,13 +1610,13 @@ below). | |||
| 1655 | 1610 | ||
| 1656 | Here are the possible types of elements in the glyph table: | 1611 | Here are the possible types of elements in the glyph table: |
| 1657 | 1612 | ||
| 1658 | @table @var | 1613 | @table @asis |
| 1659 | @item string | 1614 | @item @var{string} |
| 1660 | Send the characters in @var{string} to the terminal to output | 1615 | Send the characters in @var{string} to the terminal to output |
| 1661 | this glyph. This alternative is available on character terminals, | 1616 | this glyph. This alternative is available on character terminals, |
| 1662 | but not under a window system. | 1617 | but not under a window system. |
| 1663 | 1618 | ||
| 1664 | @item integer | 1619 | @item @var{integer} |
| 1665 | Define this glyph code as an alias for glyph code @var{integer}. You | 1620 | Define this glyph code as an alias for glyph code @var{integer}. You |
| 1666 | can use an alias to specify a face code for the glyph; see below. | 1621 | can use an alias to specify a face code for the glyph; see below. |
| 1667 | 1622 | ||
| @@ -1705,13 +1660,13 @@ It also terminates any keyboard macro currently executing unless | |||
| 1705 | This is a synonym for @code{ding}. | 1660 | This is a synonym for @code{ding}. |
| 1706 | @end defun | 1661 | @end defun |
| 1707 | 1662 | ||
| 1708 | @defvar visible-bell | 1663 | @defopt visible-bell |
| 1709 | This variable determines whether Emacs should flash the screen to | 1664 | This variable determines whether Emacs should flash the screen to |
| 1710 | represent a bell. Non-@code{nil} means yes, @code{nil} means no. This | 1665 | represent a bell. Non-@code{nil} means yes, @code{nil} means no. This |
| 1711 | is effective on a window system, and on a character-only terminal | 1666 | is effective on a window system, and on a character-only terminal |
| 1712 | provided the terminal's Termcap entry defines the visible bell | 1667 | provided the terminal's Termcap entry defines the visible bell |
| 1713 | capability (@samp{vb}). | 1668 | capability (@samp{vb}). |
| 1714 | @end defvar | 1669 | @end defopt |
| 1715 | 1670 | ||
| 1716 | @defvar ring-bell-function | 1671 | @defvar ring-bell-function |
| 1717 | @tindex ring-bell-function | 1672 | @tindex ring-bell-function |
| @@ -1728,11 +1683,20 @@ differently. An Emacs frame is a single window as far as X is | |||
| 1728 | concerned; the individual Emacs windows are not known to X at all. | 1683 | concerned; the individual Emacs windows are not known to X at all. |
| 1729 | 1684 | ||
| 1730 | @defvar window-system | 1685 | @defvar window-system |
| 1731 | @cindex X Window System | ||
| 1732 | This variable tells Lisp programs what window system Emacs is running | 1686 | This variable tells Lisp programs what window system Emacs is running |
| 1733 | under. Its value should be a symbol such as @code{x} (if Emacs is | 1687 | under. The possible values are |
| 1734 | running under X) or @code{nil} (if Emacs is running on an ordinary | 1688 | |
| 1735 | terminal). | 1689 | @table @code |
| 1690 | @item x | ||
| 1691 | @cindex X Window System | ||
| 1692 | Emacs is displaying using X. | ||
| 1693 | @item pc | ||
| 1694 | Emacs is displaying using MSDOS. | ||
| 1695 | @item w32 | ||
| 1696 | Emacs is displaying using Windows NT or Windows 95. | ||
| 1697 | @item nil | ||
| 1698 | Emacs is using a character-based terminal. | ||
| 1699 | @end table | ||
| 1736 | @end defvar | 1700 | @end defvar |
| 1737 | 1701 | ||
| 1738 | @defvar window-setup-hook | 1702 | @defvar window-setup-hook |
diff --git a/lispref/edebug.texi b/lispref/edebug.texi index c93330e38ae..03a8a6940f6 100644 --- a/lispref/edebug.texi +++ b/lispref/edebug.texi | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | 9 | ||
| 10 | @c , Bugs and Todo List, Top, Top | 10 | @c , Bugs and Todo List, Top, Top |
| 11 | 11 | ||
| 12 | @node Edebug,, Compilation Errors, Debugging | 12 | @node Edebug, Syntax Errors, Debugger, Debugging |
| 13 | @section Edebug | 13 | @section Edebug |
| 14 | @cindex Edebug mode | 14 | @cindex Edebug mode |
| 15 | 15 | ||
| @@ -583,10 +583,12 @@ position (@code{edebug-bounce-point}). With a prefix argument @var{n}, | |||
| 583 | pause for @var{n} seconds instead. | 583 | pause for @var{n} seconds instead. |
| 584 | 584 | ||
| 585 | @item w | 585 | @item w |
| 586 | Move point back to the current stop point (@code{edebug-where}) in the | 586 | Move point back to the current stop point in the source code buffer |
| 587 | source code buffer. Also, if you use this command in a different window | 587 | (@code{edebug-where}). |
| 588 | displaying the same buffer, that window will be used instead to display | 588 | |
| 589 | the current definition in the future. | 589 | If you use this command in a different window displaying the same |
| 590 | buffer, that window will be used instead to display the current | ||
| 591 | definition in the future. | ||
| 590 | 592 | ||
| 591 | @item W | 593 | @item W |
| 592 | @c Its function is not simply to forget the saved configuration -- dan | 594 | @c Its function is not simply to forget the saved configuration -- dan |
| @@ -842,11 +844,10 @@ with @code{(apply 'format @var{format-string} @var{format-args})}. | |||
| 842 | It also appends a newline to separate entries. | 844 | It also appends a newline to separate entries. |
| 843 | @end defun | 845 | @end defun |
| 844 | 846 | ||
| 845 | @code{edebug-tracing} and @code{edebug-trace} insert lines in the trace | 847 | @code{edebug-tracing} and @code{edebug-trace} insert lines in the |
| 846 | buffer even if Edebug is not active. | 848 | trace buffer whenever they are called, even if Edebug is not active. |
| 847 | 849 | Adding text to the trace buffer also scrolls its window to show the last | |
| 848 | Adding text to the trace buffer also scrolls its window to show the | 850 | lines inserted. |
| 849 | last lines inserted. | ||
| 850 | 851 | ||
| 851 | @node Coverage Testing | 852 | @node Coverage Testing |
| 852 | @subsection Coverage Testing | 853 | @subsection Coverage Testing |
| @@ -855,18 +856,22 @@ last lines inserted. | |||
| 855 | @cindex frequency counts | 856 | @cindex frequency counts |
| 856 | @cindex performance analysis | 857 | @cindex performance analysis |
| 857 | Edebug provides rudimentary coverage testing and display of execution | 858 | Edebug provides rudimentary coverage testing and display of execution |
| 858 | frequency. Coverage testing works by comparing the result of each | 859 | frequency. |
| 859 | expression with the previous result; coverage is considered OK if two | 860 | |
| 860 | different results are found. Thus, to sufficiently test the coverage of | 861 | Coverage testing works by comparing the result of each expression with |
| 861 | your code, try to execute it under conditions that evaluate all | 862 | the previous result; each form in the program is considered ``covered'' |
| 862 | expressions more than once, and produce different results for each | 863 | if it has returned two different values since you began testing coverage |
| 863 | expression. Coverage testing makes execution slower, so it is only done | 864 | in the current Emacs session. Thus, to do coverage testing on your |
| 864 | if @code{edebug-test-coverage} is non-@code{nil}. Whether or not | 865 | program, execute it under various conditions and note whether it behaves |
| 865 | coverage testing is enabled, frequency counting is performed for all | 866 | correctly; Edebug will tell you when you have tried enough different |
| 866 | execution of an instrumented function, even if the execution mode is | 867 | conditions that each form has returned two different values. |
| 867 | Go-nonstop. | 868 | |
| 868 | 869 | Coverage testing makes execution slower, so it is only done if | |
| 869 | Use @kbd{M-x edebug-display-freq-count} to display both the | 870 | @code{edebug-test-coverage} is non-@code{nil}. Whether or not coverage |
| 871 | testing is enabled, frequency counting is performed for all execution of | ||
| 872 | an instrumented function, even if the execution mode is Go-nonstop. | ||
| 873 | |||
| 874 | Use @kbd{M-x edebug-display-freq-count} to display both the | ||
| 870 | coverage information and the frequency counts for a definition. | 875 | coverage information and the frequency counts for a definition. |
| 871 | 876 | ||
| 872 | @deffn Command edebug-display-freq-count | 877 | @deffn Command edebug-display-freq-count |
| @@ -882,7 +887,7 @@ count of an earlier expression on the same line. | |||
| 882 | 887 | ||
| 883 | The character @samp{=} following the count for an expression says that | 888 | The character @samp{=} following the count for an expression says that |
| 884 | the expression has returned the same value each time it was evaluated. | 889 | the expression has returned the same value each time it was evaluated. |
| 885 | This is the only coverage information that Edebug records. | 890 | In other words, it is not yet ``covered'' for coverage testing purposes. |
| 886 | 891 | ||
| 887 | To clear the frequency count and coverage data for a definition, | 892 | To clear the frequency count and coverage data for a definition, |
| 888 | simply reinstrument it with @code{eval-defun}. | 893 | simply reinstrument it with @code{eval-defun}. |
| @@ -1073,7 +1078,7 @@ name. | |||
| 1073 | @end deffn | 1078 | @end deffn |
| 1074 | 1079 | ||
| 1075 | Here is a simple example that defines the specification for the | 1080 | Here is a simple example that defines the specification for the |
| 1076 | @code{for} example macro (@code{Argument Evaluation}), followed by an | 1081 | @code{for} example macro (@pxref{Argument Evaluation}), followed by an |
| 1077 | alternative, equivalent specification. | 1082 | alternative, equivalent specification. |
| 1078 | 1083 | ||
| 1079 | @example | 1084 | @example |
| @@ -1143,7 +1148,7 @@ their meanings: | |||
| 1143 | 1148 | ||
| 1144 | @table @code | 1149 | @table @code |
| 1145 | @item sexp | 1150 | @item sexp |
| 1146 | A single unevaluated expression, which is not instrumented. | 1151 | A single unevaluated Lisp object, which is not instrumented. |
| 1147 | @c an "expression" is not necessarily intended for evaluation. | 1152 | @c an "expression" is not necessarily intended for evaluation. |
| 1148 | 1153 | ||
| 1149 | @item form | 1154 | @item form |
| @@ -1180,8 +1185,8 @@ elements must all match or none, use @code{&optional | |||
| 1180 | @item &rest | 1185 | @item &rest |
| 1181 | @kindex &rest @r{(Edebug)} | 1186 | @kindex &rest @r{(Edebug)} |
| 1182 | All following elements in the specification list are repeated zero or | 1187 | All following elements in the specification list are repeated zero or |
| 1183 | more times. All the elements need not match in the last repetition, | 1188 | more times. In the last repetition, however, it is ok if the expression |
| 1184 | however. | 1189 | runs out before matching all of the elements of the specification list. |
| 1185 | 1190 | ||
| 1186 | To repeat only a few elements, use @code{[&rest @var{specs}@dots{}]}. | 1191 | To repeat only a few elements, use @code{[&rest @var{specs}@dots{}]}. |
| 1187 | To specify several elements that must all match on every repetition, use | 1192 | To specify several elements that must all match on every repetition, use |
diff --git a/lispref/elisp.texi b/lispref/elisp.texi index 7dbc8093346..e1467e97b62 100644 --- a/lispref/elisp.texi +++ b/lispref/elisp.texi | |||
| @@ -66,11 +66,10 @@ instead of in the original English. | |||
| 66 | 66 | ||
| 67 | @titlepage | 67 | @titlepage |
| 68 | @title GNU Emacs Lisp Reference Manual | 68 | @title GNU Emacs Lisp Reference Manual |
| 69 | @subtitle GNU Emacs Version 20 | 69 | @subtitle For Emacs Version 20.3 |
| 70 | @subtitle for Unix Users | ||
| 71 | @c The edition number appears in several places in this file | 70 | @c The edition number appears in several places in this file |
| 72 | @c and also in the file intro.texi. | 71 | @c and also in the file intro.texi. |
| 73 | @subtitle Revision 2.5, February 1998 | 72 | @subtitle Revision 2.5, May 1998 |
| 74 | 73 | ||
| 75 | @author by Bil Lewis, Dan LaLiberte, Richard Stallman | 74 | @author by Bil Lewis, Dan LaLiberte, Richard Stallman |
| 76 | @author and the GNU Manual Group | 75 | @author and the GNU Manual Group |
| @@ -81,9 +80,9 @@ Copyright @copyright{} 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998 Free Softw | |||
| 81 | @sp 2 | 80 | @sp 2 |
| 82 | Edition 2.5 @* | 81 | Edition 2.5 @* |
| 83 | Revised for Emacs Version 20.3,@* | 82 | Revised for Emacs Version 20.3,@* |
| 84 | February 1998.@* | 83 | May 1998.@* |
| 85 | @sp 2 | 84 | @sp 2 |
| 86 | ISBN 1-882114-71-X | 85 | ISBN 1-882114-72-8 |
| 87 | 86 | ||
| 88 | @sp 2 | 87 | @sp 2 |
| 89 | Published by the Free Software Foundation @* | 88 | Published by the Free Software Foundation @* |
| @@ -271,7 +270,7 @@ Editing Types | |||
| 271 | * Process Type:: A process running on the underlying OS. | 270 | * Process Type:: A process running on the underlying OS. |
| 272 | * Stream Type:: Receive or send characters. | 271 | * Stream Type:: Receive or send characters. |
| 273 | * Keymap Type:: What function a keystroke invokes. | 272 | * Keymap Type:: What function a keystroke invokes. |
| 274 | * Overlay Type:: How an overlay is represented. | 273 | * Overlay Type:: How an overlay is represented. |
| 275 | 274 | ||
| 276 | Numbers | 275 | Numbers |
| 277 | 276 | ||
| @@ -292,7 +291,7 @@ Strings and Characters | |||
| 292 | * Creating Strings:: Functions to allocate new strings. | 291 | * Creating Strings:: Functions to allocate new strings. |
| 293 | * Text Comparison:: Comparing characters or strings. | 292 | * Text Comparison:: Comparing characters or strings. |
| 294 | * String Conversion:: Converting characters or strings and vice versa. | 293 | * String Conversion:: Converting characters or strings and vice versa. |
| 295 | * Formatting Strings:: @code{format}: Emacs's analog of @code{printf}. | 294 | * Formatting Strings:: @code{format}: Emacs's analogue of @code{printf}. |
| 296 | * Case Conversion:: Case conversion functions. | 295 | * Case Conversion:: Case conversion functions. |
| 297 | 296 | ||
| 298 | Lists | 297 | Lists |
| @@ -454,7 +453,7 @@ Advising Functions | |||
| 454 | * Enabling Advice:: You can enable or disable each piece of advice. | 453 | * Enabling Advice:: You can enable or disable each piece of advice. |
| 455 | * Preactivation:: Preactivation is a way of speeding up the | 454 | * Preactivation:: Preactivation is a way of speeding up the |
| 456 | loading of compiled advice. | 455 | loading of compiled advice. |
| 457 | * Argument Access:: How advice can access the function's arguments. | 456 | * Argument Access in Advice:: How advice can access the function's arguments. |
| 458 | * Subr Arguments:: Accessing arguments when advising a primitive. | 457 | * Subr Arguments:: Accessing arguments when advising a primitive. |
| 459 | * Combined Definition:: How advice is implemented. | 458 | * Combined Definition:: How advice is implemented. |
| 460 | 459 | ||
| @@ -692,14 +691,14 @@ Frames | |||
| 692 | * Input Focus:: Specifying the selected frame. | 691 | * Input Focus:: Specifying the selected frame. |
| 693 | * Visibility of Frames:: Frames may be visible or invisible, or icons. | 692 | * Visibility of Frames:: Frames may be visible or invisible, or icons. |
| 694 | * Raising and Lowering:: Raising a frame makes it hide other X windows; | 693 | * Raising and Lowering:: Raising a frame makes it hide other X windows; |
| 695 | lowering it makes the others hide them. | 694 | lowering it puts it underneath the others. |
| 696 | * Frame Configurations:: Saving the state of all frames. | 695 | * Frame Configurations:: Saving the state of all frames. |
| 697 | * Mouse Tracking:: Getting events that say when the mouse moves. | 696 | * Mouse Tracking:: Getting events that say when the mouse moves. |
| 698 | * Mouse Position:: Asking where the mouse is, or moving it. | 697 | * Mouse Position:: Asking where the mouse is, or moving it. |
| 699 | * Pop-Up Menus:: Displaying a menu for the user to select from. | 698 | * Pop-Up Menus:: Displaying a menu for the user to select from. |
| 700 | * Dialog Boxes:: Displaying a box to ask yes or no. | 699 | * Dialog Boxes:: Displaying a box to ask yes or no. |
| 701 | * Pointer Shapes:: Specifying the shape of the mouse pointer. | 700 | * Pointer Shapes:: Specifying the shape of the mouse pointer. |
| 702 | * Window System Selections::Transferring text to and from other X clients. | 701 | * Window System Selections::Transferring text to and from other window. |
| 703 | * Color Names:: Getting the definitions of color names. | 702 | * Color Names:: Getting the definitions of color names. |
| 704 | * Resources:: Getting resource values from the server. | 703 | * Resources:: Getting resource values from the server. |
| 705 | * Server Data:: Getting info about the X server. | 704 | * Server Data:: Getting info about the X server. |
diff --git a/lispref/errors.texi b/lispref/errors.texi index 823eadddeac..cee673fd3c8 100644 --- a/lispref/errors.texi +++ b/lispref/errors.texi | |||
| @@ -55,7 +55,7 @@ See @code{/} and @code{%} in @ref{Numbers}. | |||
| 55 | @xref{Read Only Buffers}. | 55 | @xref{Read Only Buffers}. |
| 56 | 56 | ||
| 57 | @item cyclic-function-indirection | 57 | @item cyclic-function-indirection |
| 58 | @code{"Symbol's chain of function indirections contains a loop"}@* | 58 | @code{"Symbol's chain of function indirections@* contains a loop"}@* |
| 59 | @xref{Function Indirection}. | 59 | @xref{Function Indirection}. |
| 60 | 60 | ||
| 61 | @item end-of-buffer | 61 | @item end-of-buffer |
diff --git a/lispref/frames.texi b/lispref/frames.texi index 612a1a3ff64..0044a61ac80 100644 --- a/lispref/frames.texi +++ b/lispref/frames.texi | |||
| @@ -50,12 +50,15 @@ This predicate returns @code{t} if @var{object} is a frame, and | |||
| 50 | * Pointer Shapes:: Specifying the shape of the mouse pointer. | 50 | * Pointer Shapes:: Specifying the shape of the mouse pointer. |
| 51 | * Window System Selections:: Transferring text to and from other X clients. | 51 | * Window System Selections:: Transferring text to and from other X clients. |
| 52 | * Font Names:: Looking up font names. | 52 | * Font Names:: Looking up font names. |
| 53 | * Fontsets:: A fontset is a collection of fonts | ||
| 54 | for displaying various character sets. | ||
| 53 | * Color Names:: Getting the definitions of color names. | 55 | * Color Names:: Getting the definitions of color names. |
| 54 | * Resources:: Getting resource values from the server. | 56 | * Resources:: Getting resource values from the server. |
| 55 | * Server Data:: Getting info about the X server. | 57 | * Server Data:: Getting info about the X server. |
| 56 | @end menu | 58 | @end menu |
| 57 | 59 | ||
| 58 | @xref{Display}, for related information. | 60 | @xref{Display}, for information about the related topic of |
| 61 | controlling Emacs redisplay. | ||
| 59 | 62 | ||
| 60 | @node Creating Frames | 63 | @node Creating Frames |
| 61 | @section Creating Frames | 64 | @section Creating Frames |
| @@ -92,11 +95,10 @@ frame just created. | |||
| 92 | 95 | ||
| 93 | @node Multiple Displays | 96 | @node Multiple Displays |
| 94 | @section Multiple Displays | 97 | @section Multiple Displays |
| 95 | @cindex multiple displays | 98 | @cindex multiple X displays |
| 96 | @cindex multiple X terminals | ||
| 97 | @cindex displays, multiple | 99 | @cindex displays, multiple |
| 98 | 100 | ||
| 99 | A single Emacs can talk to more than one X Window display. | 101 | A single Emacs can talk to more than one X display. |
| 100 | Initially, Emacs uses just one display---the one chosen with the | 102 | Initially, Emacs uses just one display---the one chosen with the |
| 101 | @code{DISPLAY} environment variable or with the @samp{--display} option | 103 | @code{DISPLAY} environment variable or with the @samp{--display} option |
| 102 | (@pxref{Initial Options,,, emacs, The GNU Emacs Manual}). To connect to | 104 | (@pxref{Initial Options,,, emacs, The GNU Emacs Manual}). To connect to |
| @@ -104,16 +106,18 @@ another display, use the command @code{make-frame-on-display} or specify | |||
| 104 | the @code{display} frame parameter when you create the frame. | 106 | the @code{display} frame parameter when you create the frame. |
| 105 | 107 | ||
| 106 | Emacs treats each X server as a separate terminal, giving each one its | 108 | Emacs treats each X server as a separate terminal, giving each one its |
| 107 | own selected frame and its own minibuffer windows. A few Lisp variables | 109 | own selected frame and its own minibuffer windows. |
| 108 | have values local to the current terminal (that is, the terminal | 110 | |
| 109 | corresponding to the currently selected frame): these are | 111 | A few Lisp variables are @dfn{terminal-local}; that is, they have a |
| 110 | @code{default-minibuffer-frame}, @code{defining-kbd-macro}, | 112 | separate binding for each terminal. The binding in effect at any time |
| 111 | @code{last-kbd-macro}, and @code{system-key-alist}. These variables are | 113 | is the one for the terminal that the currently selected frame belongs |
| 112 | always terminal-local and can never be buffer-local or frame-local | 114 | to. These variables include @code{default-minibuffer-frame}, |
| 113 | (@pxref{Buffer-Local Variables}). | 115 | @code{defining-kbd-macro}, @code{last-kbd-macro}, and |
| 116 | @code{system-key-alist}. They are always terminal-local, and can never | ||
| 117 | be buffer-local (@pxref{Buffer-Local Variables}) or frame-local. | ||
| 114 | 118 | ||
| 115 | A single X server can handle more than one screen. A display name | 119 | A single X server can handle more than one screen. A display name |
| 116 | @samp{@var{host}.@var{server}.@var{screen}} has three parts; the last | 120 | @samp{@var{host}:@var{server}.@var{screen}} has three parts; the last |
| 117 | part specifies the screen number for a given server. When you use two | 121 | part specifies the screen number for a given server. When you use two |
| 118 | screens belonging to one server, Emacs knows by the similarity in their | 122 | screens belonging to one server, Emacs knows by the similarity in their |
| 119 | names that they share a single keyboard, and it treats them as a single | 123 | names that they share a single keyboard, and it treats them as a single |
| @@ -164,8 +168,8 @@ Just what parameters a frame has depends on what display mechanism it | |||
| 164 | uses. | 168 | uses. |
| 165 | 169 | ||
| 166 | Frame parameters exist for the sake of window systems. A terminal frame | 170 | Frame parameters exist for the sake of window systems. A terminal frame |
| 167 | has a few parameters, mostly for compatibility's sake; only the height, | 171 | has a few parameters, mostly for compatibility's sake; only the @code{height}, |
| 168 | width, @code{name}, @code{title}, @code{buffer-list} and | 172 | @code{width}, @code{name}, @code{title}, @code{buffer-list} and |
| 169 | @code{buffer-predicate} parameters do something special. | 173 | @code{buffer-predicate} parameters do something special. |
| 170 | 174 | ||
| 171 | @menu | 175 | @menu |
| @@ -418,9 +422,20 @@ appears. If this is @code{nil}, the frame's title is used. | |||
| 418 | The color to use for the image of a character. This is a string; the | 422 | The color to use for the image of a character. This is a string; the |
| 419 | window system defines the meaningful color names. | 423 | window system defines the meaningful color names. |
| 420 | 424 | ||
| 425 | If you set the @code{foreground-color} frame parameter, you should | ||
| 426 | call @code{frame-update-face-colors} to update faces accordingly. | ||
| 427 | |||
| 421 | @item background-color | 428 | @item background-color |
| 422 | The color to use for the background of characters. | 429 | The color to use for the background of characters. |
| 423 | 430 | ||
| 431 | If you set the @code{background-color} frame parameter, you should | ||
| 432 | call @code{frame-update-face-colors} to update faces accordingly. | ||
| 433 | @xref{Face Functions}. | ||
| 434 | |||
| 435 | @item background-mode | ||
| 436 | This parameter is either @code{dark} or @code{light}, according | ||
| 437 | to whether the background color is a light one or a dark one. | ||
| 438 | |||
| 424 | @item mouse-color | 439 | @item mouse-color |
| 425 | The color for the mouse pointer. | 440 | The color for the mouse pointer. |
| 426 | 441 | ||
| @@ -430,6 +445,11 @@ The color for the cursor that shows point. | |||
| 430 | @item border-color | 445 | @item border-color |
| 431 | The color for the border of the frame. | 446 | The color for the border of the frame. |
| 432 | 447 | ||
| 448 | @item display-type | ||
| 449 | This parameter describes the range of possible colors that can be used | ||
| 450 | in this frame. Its value is @code{color}, @code{grayscale} or | ||
| 451 | @code{mono}. | ||
| 452 | |||
| 433 | @item cursor-type | 453 | @item cursor-type |
| 434 | The way to display the cursor. The legitimate values are @code{bar}, | 454 | The way to display the cursor. The legitimate values are @code{bar}, |
| 435 | @code{box}, and @code{(bar . @var{width})}. The symbol @code{box} | 455 | @code{box}, and @code{(bar . @var{width})}. The symbol @code{box} |
| @@ -470,6 +490,10 @@ it and see if it works.) | |||
| 470 | 490 | ||
| 471 | @node Size and Position | 491 | @node Size and Position |
| 472 | @subsection Frame Size And Position | 492 | @subsection Frame Size And Position |
| 493 | @cindex size of frame | ||
| 494 | @cindex screen size | ||
| 495 | @cindex frame size | ||
| 496 | @cindex resize frame | ||
| 473 | 497 | ||
| 474 | You can read or change the size and position of a frame using the | 498 | You can read or change the size and position of a frame using the |
| 475 | frame parameters @code{left}, @code{top}, @code{height}, and | 499 | frame parameters @code{left}, @code{top}, @code{height}, and |
| @@ -481,15 +505,28 @@ by the window manager in its usual fashion. | |||
| 481 | @defun set-frame-position frame left top | 505 | @defun set-frame-position frame left top |
| 482 | This function sets the position of the top left corner of @var{frame} to | 506 | This function sets the position of the top left corner of @var{frame} to |
| 483 | @var{left} and @var{top}. These arguments are measured in pixels, and | 507 | @var{left} and @var{top}. These arguments are measured in pixels, and |
| 484 | count from the top left corner of the screen. Negative parameter values | 508 | normally count from the top left corner of the screen. |
| 485 | count up or rightward from the top left corner of the screen. | 509 | |
| 510 | Negative parameter values position the bottom edge of the window up from | ||
| 511 | the bottom edge of the screen, or the right window edge to the left of | ||
| 512 | the right edge of the screen. It would probably be better if the values | ||
| 513 | were always counted from the left and top, so that negative arguments | ||
| 514 | would position the frame partly off the top or left edge of the screen, | ||
| 515 | but it seems inadvisable to change that now. | ||
| 486 | @end defun | 516 | @end defun |
| 487 | 517 | ||
| 488 | @defun frame-height &optional frame | 518 | @defun frame-height &optional frame |
| 489 | @defunx frame-width &optional frame | 519 | @defunx frame-width &optional frame |
| 490 | These functions return the height and width of @var{frame}, measured in | 520 | These functions return the height and width of @var{frame}, measured in |
| 491 | characters. If you don't supply @var{frame}, they use the selected | 521 | lines and columns. If you don't supply @var{frame}, they use the |
| 492 | frame. | 522 | selected frame. |
| 523 | @end defun | ||
| 524 | |||
| 525 | @defun screen-height | ||
| 526 | @defunx screen-width | ||
| 527 | These functions are old aliases for @code{frame-height} and | ||
| 528 | @code{frame-width}. When you are using a non-window terminal, the size | ||
| 529 | of the frame is normally the same as the size of the terminal screen. | ||
| 493 | @end defun | 530 | @end defun |
| 494 | 531 | ||
| 495 | @defun frame-pixel-height &optional frame | 532 | @defun frame-pixel-height &optional frame |
| @@ -515,15 +552,38 @@ To set the size based on values measured in pixels, use | |||
| 515 | them to units of characters. | 552 | them to units of characters. |
| 516 | @end defun | 553 | @end defun |
| 517 | 554 | ||
| 555 | @defun set-frame-height frame lines &optional pretend | ||
| 556 | This function resizes @var{frame} to a height of @var{lines} lines. The | ||
| 557 | sizes of existing windows in @var{frame} are altered proportionally to | ||
| 558 | fit. | ||
| 559 | |||
| 560 | If @var{pretend} is non-@code{nil}, then Emacs displays @var{lines} | ||
| 561 | lines of output in @var{frame}, but does not change its value for the | ||
| 562 | actual height of the frame. This is only useful for a terminal frame. | ||
| 563 | Using a smaller height than the terminal actually implements may be | ||
| 564 | useful to reproduce behavior observed on a smaller screen, or if the | ||
| 565 | terminal malfunctions when using its whole screen. Setting the frame | ||
| 566 | height ``for real'' does not always work, because knowing the correct | ||
| 567 | actual size may be necessary for correct cursor positioning on a | ||
| 568 | terminal frame. | ||
| 569 | @end defun | ||
| 570 | |||
| 571 | @defun set-frame-width frame width &optional pretend | ||
| 572 | This function sets the width of @var{frame}, measured in characters. | ||
| 573 | The argument @var{pretend} has the same meaning as in | ||
| 574 | @code{set-frame-height}. | ||
| 575 | @end defun | ||
| 576 | |||
| 577 | @findex set-screen-height | ||
| 578 | @findex set-screen-width | ||
| 518 | The old-fashioned functions @code{set-screen-height} and | 579 | The old-fashioned functions @code{set-screen-height} and |
| 519 | @code{set-screen-width}, which were used to specify the height and width | 580 | @code{set-screen-width}, which were used to specify the height and width |
| 520 | of the screen in Emacs versions that did not support multiple frames, | 581 | of the screen in Emacs versions that did not support multiple frames, |
| 521 | are still usable. They apply to the selected frame. @xref{Screen | 582 | are still usable. They apply to the selected frame. |
| 522 | Size}. | ||
| 523 | 583 | ||
| 524 | @defun x-parse-geometry geom | 584 | @defun x-parse-geometry geom |
| 525 | @cindex geometry specification | 585 | @cindex geometry specification |
| 526 | The function @code{x-parse-geometry} converts a standard X Windows | 586 | The function @code{x-parse-geometry} converts a standard X window |
| 527 | geometry string to an alist that you can use as part of the argument to | 587 | geometry string to an alist that you can use as part of the argument to |
| 528 | @code{make-frame}. | 588 | @code{make-frame}. |
| 529 | 589 | ||
| @@ -562,17 +622,11 @@ Here is an example: | |||
| 562 | 622 | ||
| 563 | @example | 623 | @example |
| 564 | (x-parse-geometry "35x70+0-0") | 624 | (x-parse-geometry "35x70+0-0") |
| 565 | @result{} ((width . 35) (height . 70) | 625 | @result{} ((height . 70) (width . 35) |
| 566 | (left . 0) (top - 0)) | 626 | (top - 0) (left . 0)) |
| 567 | @end example | 627 | @end example |
| 568 | @end defun | 628 | @end defun |
| 569 | 629 | ||
| 570 | @ignore | ||
| 571 | New functions @code{set-frame-height} and @code{set-frame-width} set the | ||
| 572 | size of a specified frame. The frame is the first argument; the size is | ||
| 573 | the second. | ||
| 574 | @end ignore | ||
| 575 | |||
| 576 | @node Frame Titles | 630 | @node Frame Titles |
| 577 | @section Frame Titles | 631 | @section Frame Titles |
| 578 | 632 | ||
| @@ -768,8 +822,7 @@ actually displayed on the terminal. @code{switch-frame} is the only way | |||
| 768 | to switch frames, and the change lasts until overridden by a subsequent | 822 | to switch frames, and the change lasts until overridden by a subsequent |
| 769 | call to @code{switch-frame}. Each terminal screen except for the | 823 | call to @code{switch-frame}. Each terminal screen except for the |
| 770 | initial one has a number, and the number of the selected frame appears | 824 | initial one has a number, and the number of the selected frame appears |
| 771 | in the mode line after the word @samp{Emacs} (@pxref{Mode Line | 825 | in the mode line before the buffer name (@pxref{Mode Line Variables}). |
| 772 | Variables}). | ||
| 773 | 826 | ||
| 774 | @c ??? This is not yet implemented properly. | 827 | @c ??? This is not yet implemented properly. |
| 775 | @defun select-frame frame | 828 | @defun select-frame frame |
| @@ -1283,7 +1336,7 @@ just as fonts do, and you can use a fontset name in place of a font name | |||
| 1283 | when you specify the ``font'' for a frame or a face. Here is | 1336 | when you specify the ``font'' for a frame or a face. Here is |
| 1284 | information about defining a fontset under Lisp program control. | 1337 | information about defining a fontset under Lisp program control. |
| 1285 | 1338 | ||
| 1286 | @defun create-fontset-from-fontset-spec fontset-spec &optional style noerror | 1339 | @defun create-fontset-from-fontset-spec fontset-spec &optional style-variant-p noerror |
| 1287 | This function defines a new fontset according to the specification | 1340 | This function defines a new fontset according to the specification |
| 1288 | string @var{fontset-spec}. The string should have this format: | 1341 | string @var{fontset-spec}. The string should have this format: |
| 1289 | 1342 | ||
| @@ -1298,22 +1351,23 @@ The first part of the string, @var{fontpattern}, should have the form of | |||
| 1298 | a standard X font name, except that the last two fields should be | 1351 | a standard X font name, except that the last two fields should be |
| 1299 | @samp{fontset-@var{alias}}. | 1352 | @samp{fontset-@var{alias}}. |
| 1300 | 1353 | ||
| 1301 | Each fontset has two names, one long and one short. The long name is | 1354 | The new fontset has two names, one long and one short. The long name is |
| 1302 | @var{fontpattern} in its entirety. The short name is | 1355 | @var{fontpattern} in its entirety. The short name is |
| 1303 | @samp{fontset-@var{alias}}. You can refer to the fontset by either | 1356 | @samp{fontset-@var{alias}}. You can refer to the fontset by either |
| 1304 | name. If a fontset with the same name already exists, an error is | 1357 | name. If a fontset with the same name already exists, an error is |
| 1305 | signaled, unless @var{noerror} is non-@code{nil}, in which case this | 1358 | signaled, unless @var{noerror} is non-@code{nil}, in which case this |
| 1306 | function does nothing. | 1359 | function does nothing. |
| 1307 | 1360 | ||
| 1361 | If optional argument @var{style-variant-p} is non-@code{nil}, that says | ||
| 1362 | to create bold, italic and bold-italic variants of the fontset as well. | ||
| 1363 | These variant fontsets do not have a short name, only a long one, which | ||
| 1364 | is made by altering @var{fontpattern} to indicate the bold or italic | ||
| 1365 | status. | ||
| 1366 | |||
| 1308 | The specification string also says which fonts to use in the fontset. | 1367 | The specification string also says which fonts to use in the fontset. |
| 1309 | See below for the details. | 1368 | See below for the details. |
| 1310 | @end defun | 1369 | @end defun |
| 1311 | 1370 | ||
| 1312 | If optional argument @var{style} is specified, it specifies a way to | ||
| 1313 | modify the fontset. It should be one of @code{bold}, @code{italic}, and | ||
| 1314 | @code{bold-italic}, and it says to find the bold, italic or bold-italic | ||
| 1315 | version of each font if possible. | ||
| 1316 | |||
| 1317 | The construct @samp{@var{charset}:@var{font}} specifies which font to | 1371 | The construct @samp{@var{charset}:@var{font}} specifies which font to |
| 1318 | use (in this fontset) for one particular character set. Here, | 1372 | use (in this fontset) for one particular character set. Here, |
| 1319 | @var{charset} is the name of a character set, and @var{font} is the font | 1373 | @var{charset} is the name of a character set, and @var{font} is the font |
| @@ -1354,7 +1408,7 @@ and the font specification for Chinese GB2312 characters would be this: | |||
| 1354 | 1408 | ||
| 1355 | You may not have any Chinese font matching the above font | 1409 | You may not have any Chinese font matching the above font |
| 1356 | specification. Most X distributions include only Chinese fonts that | 1410 | specification. Most X distributions include only Chinese fonts that |
| 1357 | have @samp{song ti} or @samp{fangsong ti} in @var{family} field. In | 1411 | have @samp{song ti} or @samp{fangsong ti} in the @var{family} field. In |
| 1358 | such a case, @samp{Fontset-@var{n}} can be specified as below: | 1412 | such a case, @samp{Fontset-@var{n}} can be specified as below: |
| 1359 | 1413 | ||
| 1360 | @smallexample | 1414 | @smallexample |
| @@ -1415,7 +1469,7 @@ defined, the value is @code{nil}. | |||
| 1415 | @end example | 1469 | @end example |
| 1416 | 1470 | ||
| 1417 | The color values are returned for @var{frame}'s display. If @var{frame} | 1471 | The color values are returned for @var{frame}'s display. If @var{frame} |
| 1418 | is omitted or @code{nil}, the information is return for the selected | 1472 | is omitted or @code{nil}, the information is returned for the selected |
| 1419 | frame's display. | 1473 | frame's display. |
| 1420 | @end defun | 1474 | @end defun |
| 1421 | 1475 | ||
diff --git a/lispref/help.texi b/lispref/help.texi index cde0956b5be..9c88c971705 100644 --- a/lispref/help.texi +++ b/lispref/help.texi | |||
| @@ -99,15 +99,15 @@ Help, emacs, The GNU Emacs Manual}. | |||
| 99 | @c Wordy to prevent overfull hbox. --rjc 15mar92 | 99 | @c Wordy to prevent overfull hbox. --rjc 15mar92 |
| 100 | The @file{emacs/lib-src} directory contains two utilities that you can | 100 | The @file{emacs/lib-src} directory contains two utilities that you can |
| 101 | use to print nice-looking hardcopy for the file | 101 | use to print nice-looking hardcopy for the file |
| 102 | @file{emacs/etc/DOC-@var{version}}. These are @file{sorted-doc.c} and | 102 | @file{emacs/etc/DOC-@var{version}}. These are @file{sorted-doc} and |
| 103 | @file{digest-doc.c}. | 103 | @file{digest-doc}. |
| 104 | 104 | ||
| 105 | @node Accessing Documentation | 105 | @node Accessing Documentation |
| 106 | @section Access to Documentation Strings | 106 | @section Access to Documentation Strings |
| 107 | 107 | ||
| 108 | @defun documentation-property symbol property &optional verbatim | 108 | @defun documentation-property symbol property &optional verbatim |
| 109 | This function returns the documentation string that is recorded | 109 | This function returns the documentation string that is recorded |
| 110 | @var{symbol}'s property list under property @var{property}. It | 110 | in @var{symbol}'s property list under property @var{property}. It |
| 111 | retrieves the text from a file if necessary, and runs | 111 | retrieves the text from a file if necessary, and runs |
| 112 | @code{substitute-command-keys} to substitute actual key bindings. (This | 112 | @code{substitute-command-keys} to substitute actual key bindings. (This |
| 113 | substitution is not done if @var{verbatim} is non-@code{nil}.) | 113 | substitution is not done if @var{verbatim} is non-@code{nil}.) |
| @@ -116,7 +116,7 @@ substitution is not done if @var{verbatim} is non-@code{nil}.) | |||
| 116 | @group | 116 | @group |
| 117 | (documentation-property 'command-line-processed | 117 | (documentation-property 'command-line-processed |
| 118 | 'variable-documentation) | 118 | 'variable-documentation) |
| 119 | @result{} "t once command line has been processed" | 119 | @result{} "Non-nil once command line has been processed" |
| 120 | @end group | 120 | @end group |
| 121 | @group | 121 | @group |
| 122 | (symbol-plist 'command-line-processed) | 122 | (symbol-plist 'command-line-processed) |
| @@ -218,7 +218,7 @@ goal-column Option | |||
| 218 | @c That makes them incorrect. | 218 | @c That makes them incorrect. |
| 219 | 219 | ||
| 220 | @group | 220 | @group |
| 221 | set-goal-column Command: C-x C-n | 221 | set-goal-column Keys: C-x C-n |
| 222 | Set the current horizontal position as a goal for C-n and C-p. | 222 | Set the current horizontal position as a goal for C-n and C-p. |
| 223 | @end group | 223 | @end group |
| 224 | @c DO NOT put a blank line here! That is factually inaccurate! | 224 | @c DO NOT put a blank line here! That is factually inaccurate! |
| @@ -496,7 +496,7 @@ stands for @kbd{C-h}. When Emacs reads this character, if | |||
| 496 | @code{help-form} is a non-@code{nil} Lisp expression, it evaluates that | 496 | @code{help-form} is a non-@code{nil} Lisp expression, it evaluates that |
| 497 | expression, and displays the result in a window if it is a string. | 497 | expression, and displays the result in a window if it is a string. |
| 498 | 498 | ||
| 499 | Usually the value of @code{help-form}'s value is @code{nil}. Then the | 499 | Usually the value of @code{help-form} is @code{nil}. Then the |
| 500 | help character has no special meaning at the level of command input, and | 500 | help character has no special meaning at the level of command input, and |
| 501 | it becomes part of a key sequence in the normal way. The standard key | 501 | it becomes part of a key sequence in the normal way. The standard key |
| 502 | binding of @kbd{C-h} is a prefix key for several general-purpose help | 502 | binding of @kbd{C-h} is a prefix key for several general-purpose help |
diff --git a/lispref/intro.texi b/lispref/intro.texi index d6471a4ced1..17a8d903d30 100644 --- a/lispref/intro.texi +++ b/lispref/intro.texi | |||
| @@ -491,10 +491,6 @@ mail @emph{will} be acted on in due time. If you want to contact the | |||
| 491 | Emacs maintainers more quickly, send mail to | 491 | Emacs maintainers more quickly, send mail to |
| 492 | @code{bug-gnu-emacs@@gnu.org}. | 492 | @code{bug-gnu-emacs@@gnu.org}. |
| 493 | 493 | ||
| 494 | @display | ||
| 495 | --Bil Lewis, Dan LaLiberte, Richard Stallman | ||
| 496 | @end display | ||
| 497 | |||
| 498 | @node Lisp History | 494 | @node Lisp History |
| 499 | @section Lisp History | 495 | @section Lisp History |
| 500 | @cindex Lisp history | 496 | @cindex Lisp history |
diff --git a/lispref/keymaps.texi b/lispref/keymaps.texi index d29878d3288..f3b4108c710 100644 --- a/lispref/keymaps.texi +++ b/lispref/keymaps.texi | |||
| @@ -338,7 +338,8 @@ For example, @kbd{C-x} is a prefix key, and it uses a keymap that is | |||
| 338 | also stored in the variable @code{ctl-x-map}. This keymap defines | 338 | also stored in the variable @code{ctl-x-map}. This keymap defines |
| 339 | bindings for key sequences starting with @kbd{C-x}. | 339 | bindings for key sequences starting with @kbd{C-x}. |
| 340 | 340 | ||
| 341 | Here is a list of the standard prefix keys of Emacs and their keymaps: | 341 | Some of the standard Emacs prefix keys use keymaps that are |
| 342 | also found in Lisp variables: | ||
| 342 | 343 | ||
| 343 | @itemize @bullet | 344 | @itemize @bullet |
| 344 | @item | 345 | @item |
| @@ -370,6 +371,12 @@ This map is found via the function cell of the symbol | |||
| 370 | @code{Control-X-prefix}. | 371 | @code{Control-X-prefix}. |
| 371 | 372 | ||
| 372 | @item | 373 | @item |
| 374 | @cindex @kbd{C-x @key{RET}} | ||
| 375 | @vindex mule-keymap | ||
| 376 | @code{mule-keymap} is the global keymap used for the @kbd{C-x @key{RET}} | ||
| 377 | prefix key. | ||
| 378 | |||
| 379 | @item | ||
| 373 | @cindex @kbd{C-x 4} | 380 | @cindex @kbd{C-x 4} |
| 374 | @vindex ctl-x-4-map | 381 | @vindex ctl-x-4-map |
| 375 | @code{ctl-x-4-map} is the global keymap used for the @kbd{C-x 4} prefix | 382 | @code{ctl-x-4-map} is the global keymap used for the @kbd{C-x 4} prefix |
| @@ -384,11 +391,28 @@ key. | |||
| 384 | 391 | ||
| 385 | @c Emacs 19 feature | 392 | @c Emacs 19 feature |
| 386 | @item | 393 | @item |
| 387 | @cindex @kbd{C-x n} | 394 | @cindex @kbd{C-x 6} |
| 388 | @cindex @kbd{C-x r} | 395 | @vindex 2C-mode-map |
| 389 | @cindex @kbd{C-x a} | 396 | @code{2C-mode-map} is the global keymap used for the @kbd{C-x 6} prefix |
| 390 | The prefix keys @kbd{C-x n}, @kbd{C-x r} and @kbd{C-x a} use keymaps | 397 | key. |
| 391 | that have no special names. | 398 | |
| 399 | @item | ||
| 400 | @cindex @kbd{C-x v} | ||
| 401 | @vindex vc-prefix-map | ||
| 402 | @code{vc-prefix-map} is the global keymap used for the @kbd{C-x v} prefix | ||
| 403 | key. | ||
| 404 | |||
| 405 | @item | ||
| 406 | @cindex @kbd{M-g} | ||
| 407 | @vindex facemenu-keymap | ||
| 408 | @code{facemenu-keymap} is the global keymap used for the @kbd{M-g} | ||
| 409 | prefix key. | ||
| 410 | |||
| 411 | @c Emacs 19 feature | ||
| 412 | @item | ||
| 413 | The other Emacs prefix keys are @kbd{C-x @@}, @kbd{C-x a i}, @kbd{C-x | ||
| 414 | @key{ESC}} and @kbd{@key{ESC} @key{ESC}}. They use keymaps that have no | ||
| 415 | special names. | ||
| 392 | @end itemize | 416 | @end itemize |
| 393 | 417 | ||
| 394 | The keymap binding of a prefix key is used for looking up the event | 418 | The keymap binding of a prefix key is used for looking up the event |
| @@ -615,7 +639,7 @@ particular minor modes. The elements of this alist look like the | |||
| 615 | elements of @code{minor-mode-map-alist}: @code{(@var{variable} | 639 | elements of @code{minor-mode-map-alist}: @code{(@var{variable} |
| 616 | . @var{keymap})}. | 640 | . @var{keymap})}. |
| 617 | 641 | ||
| 618 | If a variable appears an element of | 642 | If a variable appears as an element of |
| 619 | @code{minor-mode-overriding-map-alist}, the map specified by that | 643 | @code{minor-mode-overriding-map-alist}, the map specified by that |
| 620 | element totally replaces any map specified for the same variable in | 644 | element totally replaces any map specified for the same variable in |
| 621 | @code{minor-mode-map-alist}. | 645 | @code{minor-mode-map-alist}. |
| @@ -1179,16 +1203,15 @@ Dired mode is set up: | |||
| 1179 | 1203 | ||
| 1180 | @smallexample | 1204 | @smallexample |
| 1181 | @group | 1205 | @group |
| 1182 | @dots{} | 1206 | (setq dired-mode-map (make-keymap)) |
| 1183 | (setq dired-mode-map (make-keymap)) | 1207 | (suppress-keymap dired-mode-map) |
| 1184 | (suppress-keymap dired-mode-map) | 1208 | (define-key dired-mode-map "r" 'dired-rename-file) |
| 1185 | (define-key dired-mode-map "r" 'dired-rename-file) | 1209 | (define-key dired-mode-map "\C-d" 'dired-flag-file-deleted) |
| 1186 | (define-key dired-mode-map "\C-d" 'dired-flag-file-deleted) | 1210 | (define-key dired-mode-map "d" 'dired-flag-file-deleted) |
| 1187 | (define-key dired-mode-map "d" 'dired-flag-file-deleted) | 1211 | (define-key dired-mode-map "v" 'dired-view-file) |
| 1188 | (define-key dired-mode-map "v" 'dired-view-file) | 1212 | (define-key dired-mode-map "e" 'dired-find-file) |
| 1189 | (define-key dired-mode-map "e" 'dired-find-file) | 1213 | (define-key dired-mode-map "f" 'dired-find-file) |
| 1190 | (define-key dired-mode-map "f" 'dired-find-file) | 1214 | @dots{} |
| 1191 | @dots{} | ||
| 1192 | @end group | 1215 | @end group |
| 1193 | @end smallexample | 1216 | @end smallexample |
| 1194 | @end defun | 1217 | @end defun |
diff --git a/lispref/loading.texi b/lispref/loading.texi index 6dda4a437ed..cdea882874a 100644 --- a/lispref/loading.texi +++ b/lispref/loading.texi | |||
| @@ -148,7 +148,8 @@ Normally, the variable's value is @code{nil}, which means those | |||
| 148 | functions should use @code{read}. | 148 | functions should use @code{read}. |
| 149 | @end defvar | 149 | @end defvar |
| 150 | 150 | ||
| 151 | For how @code{load} is used to build Emacs, see @ref{Building Emacs}. | 151 | For information about how @code{load} is used in building Emacs, see |
| 152 | @ref{Building Emacs}. | ||
| 152 | 153 | ||
| 153 | @node Library Search | 154 | @node Library Search |
| 154 | @section Library Search | 155 | @section Library Search |
| @@ -176,16 +177,15 @@ directory names, and @samp{.} is used for the current default directory. | |||
| 176 | Here is an example of how to set your @code{EMACSLOADPATH} variable from | 177 | Here is an example of how to set your @code{EMACSLOADPATH} variable from |
| 177 | a @code{csh} @file{.login} file: | 178 | a @code{csh} @file{.login} file: |
| 178 | 179 | ||
| 179 | @c This overfull hbox is OK. --rjc 16mar92 | ||
| 180 | @smallexample | 180 | @smallexample |
| 181 | setenv EMACSLOADPATH .:/user/bil/emacs:/usr/local/lib/emacs/lisp | 181 | setenv EMACSLOADPATH .:/user/bil/emacs:/usr/local/lib/emacs/20.3/lisp |
| 182 | @end smallexample | 182 | @end smallexample |
| 183 | 183 | ||
| 184 | Here is how to set it using @code{sh}: | 184 | Here is how to set it using @code{sh}: |
| 185 | 185 | ||
| 186 | @smallexample | 186 | @smallexample |
| 187 | export EMACSLOADPATH | 187 | export EMACSLOADPATH |
| 188 | EMACSLOADPATH=.:/user/bil/emacs:/usr/local/lib/emacs/lisp | 188 | EMACSLOADPATH=.:/user/bil/emacs:/usr/local/lib/emacs/20.3/lisp |
| 189 | @end smallexample | 189 | @end smallexample |
| 190 | 190 | ||
| 191 | Here is an example of code you can place in a @file{.emacs} file to add | 191 | Here is an example of code you can place in a @file{.emacs} file to add |
diff --git a/lispref/markers.texi b/lispref/markers.texi index 0fa549bdd16..ee4d2144498 100644 --- a/lispref/markers.texi +++ b/lispref/markers.texi | |||
| @@ -316,9 +316,9 @@ relocating a marker to point after the inserted text. | |||
| 316 | @defun set-marker-insertion-type marker type | 316 | @defun set-marker-insertion-type marker type |
| 317 | @tindex set-marker-insertion-type | 317 | @tindex set-marker-insertion-type |
| 318 | This function sets the insertion type of marker @var{marker} to | 318 | This function sets the insertion type of marker @var{marker} to |
| 319 | @var{type}. If @var{type} is @code{t}, @var{marker} will advances when | 319 | @var{type}. If @var{type} is @code{t}, @var{marker} will advance when |
| 320 | text is inserted at it. If @var{type} is @code{nil}, @var{marker} does | 320 | text is inserted at its position. If @var{type} is @code{nil}, |
| 321 | not advance when text is inserted there. | 321 | @var{marker} does not advance when text is inserted there. |
| 322 | @end defun | 322 | @end defun |
| 323 | 323 | ||
| 324 | @defun marker-insertion-type marker | 324 | @defun marker-insertion-type marker |
diff --git a/lispref/minibuf.texi b/lispref/minibuf.texi index 8ddb5d72350..dd0a7e82cbe 100644 --- a/lispref/minibuf.texi +++ b/lispref/minibuf.texi | |||
| @@ -38,7 +38,7 @@ minibuffer. However, many operations for managing buffers do not apply | |||
| 38 | to minibuffers. The name of a minibuffer always has the form @w{@samp{ | 38 | to minibuffers. The name of a minibuffer always has the form @w{@samp{ |
| 39 | *Minibuf-@var{number}}}, and it cannot be changed. Minibuffers are | 39 | *Minibuf-@var{number}}}, and it cannot be changed. Minibuffers are |
| 40 | displayed only in special windows used only for minibuffers; these | 40 | displayed only in special windows used only for minibuffers; these |
| 41 | windows always appear at the bottom of a frame. (Sometime frames have | 41 | windows always appear at the bottom of a frame. (Sometimes frames have |
| 42 | no minibuffer window, and sometimes a special kind of frame contains | 42 | no minibuffer window, and sometimes a special kind of frame contains |
| 43 | nothing but a minibuffer window; see @ref{Minibuffers and Frames}.) | 43 | nothing but a minibuffer window; see @ref{Minibuffers and Frames}.) |
| 44 | 44 | ||
| @@ -136,10 +136,10 @@ properties were present in the minibuffer. Otherwise all the text | |||
| 136 | properties are stripped when the value is returned. | 136 | properties are stripped when the value is returned. |
| 137 | 137 | ||
| 138 | If the argument @var{inherit-input-method} is non-@code{nil}, then the | 138 | If the argument @var{inherit-input-method} is non-@code{nil}, then the |
| 139 | minibuffer inherits the current buffer's input method (@pxref{Input | 139 | minibuffer inherits the current input method (@pxref{Input Methods}) and |
| 140 | Methods}) and the setting of @code{enable-multibyte-characters} | 140 | the setting of @code{enable-multibyte-characters} (@pxref{Text |
| 141 | (@pxref{Text Representations}) from whichever buffer was current before | 141 | Representations}) from whichever buffer was current before entering the |
| 142 | entering the minibuffer. | 142 | minibuffer. |
| 143 | 143 | ||
| 144 | If @var{initial-contents} is a string, @code{read-from-minibuffer} | 144 | If @var{initial-contents} is a string, @code{read-from-minibuffer} |
| 145 | inserts it into the minibuffer, leaving point at the end, before the | 145 | inserts it into the minibuffer, leaving point at the end, before the |
| @@ -191,10 +191,13 @@ This function is a simplified interface to the | |||
| 191 | @end defun | 191 | @end defun |
| 192 | 192 | ||
| 193 | @defvar minibuffer-allow-text-properties | 193 | @defvar minibuffer-allow-text-properties |
| 194 | If this variable is non-@code{nil}, then @code{read-from-minibuffer} | 194 | If this variable is @code{nil}, then @code{read-from-minibuffer} strips |
| 195 | strips all text properties from the string before returning the string. | 195 | all text properties from the minibuffer input before returning it. |
| 196 | Since all minibuffer input uses @code{read-from-minibuffer}, this | 196 | Since all minibuffer input uses @code{read-from-minibuffer}, this |
| 197 | variable applies to all minibuffer input. | 197 | variable applies to all minibuffer input. |
| 198 | |||
| 199 | Note that the completion functions discard text properties unconditionally, | ||
| 200 | regardless of the value of this variable. | ||
| 198 | @end defvar | 201 | @end defvar |
| 199 | 202 | ||
| 200 | @defvar minibuffer-local-map | 203 | @defvar minibuffer-local-map |
| @@ -679,7 +682,7 @@ edit the input, providing several commands to attempt completion. | |||
| 679 | In most cases, we recommend using @var{default}, and not @var{initial}. | 682 | In most cases, we recommend using @var{default}, and not @var{initial}. |
| 680 | 683 | ||
| 681 | If the argument @var{inherit-input-method} is non-@code{nil}, then the | 684 | If the argument @var{inherit-input-method} is non-@code{nil}, then the |
| 682 | minibuffer inherits the current buffer's input method (@pxref{Input | 685 | minibuffer inherits the current input method (@pxref{Input |
| 683 | Methods}) and the setting of @code{enable-multibyte-characters} | 686 | Methods}) and the setting of @code{enable-multibyte-characters} |
| 684 | (@pxref{Text Representations}) from whichever buffer was current before | 687 | (@pxref{Text Representations}) from whichever buffer was current before |
| 685 | entering the minibuffer. | 688 | entering the minibuffer. |
| @@ -1003,7 +1006,7 @@ predicate @code{user-variable-p} instead of @code{commandp}: | |||
| 1003 | @end defun | 1006 | @end defun |
| 1004 | 1007 | ||
| 1005 | See also the functions @code{read-coding-system} and | 1008 | See also the functions @code{read-coding-system} and |
| 1006 | @code{read-non-nil-coding-system}, in @ref{Lisp and Coding Systems}. | 1009 | @code{read-non-nil-coding-system}, in @ref{User-Chosen Coding Systems}. |
| 1007 | 1010 | ||
| 1008 | @node Reading File Names | 1011 | @node Reading File Names |
| 1009 | @subsection Reading File Names | 1012 | @subsection Reading File Names |
| @@ -1035,7 +1038,7 @@ initial input. It defaults to the current buffer's value of | |||
| 1035 | 1038 | ||
| 1036 | @c Emacs 19 feature | 1039 | @c Emacs 19 feature |
| 1037 | If you specify @var{initial}, that is an initial file name to insert in | 1040 | If you specify @var{initial}, that is an initial file name to insert in |
| 1038 | the buffer (after with @var{directory}, if that is inserted). In this | 1041 | the buffer (after @var{directory}, if that is inserted). In this |
| 1039 | case, point goes at the beginning of @var{initial}. The default for | 1042 | case, point goes at the beginning of @var{initial}. The default for |
| 1040 | @var{initial} is @code{nil}---don't insert any file name. To see what | 1043 | @var{initial} is @code{nil}---don't insert any file name. To see what |
| 1041 | @var{initial} does, try the command @kbd{C-x C-v}. @strong{Note:} we | 1044 | @var{initial} does, try the command @kbd{C-x C-v}. @strong{Note:} we |
diff --git a/lispref/modes.texi b/lispref/modes.texi index dfbdfee00c6..f8a5729ccc3 100644 --- a/lispref/modes.texi +++ b/lispref/modes.texi | |||
| @@ -60,7 +60,7 @@ definition is distinct from that of Text mode, but was derived from it. | |||
| 60 | 60 | ||
| 61 | Rmail Edit mode offers an example of changing the major mode | 61 | Rmail Edit mode offers an example of changing the major mode |
| 62 | temporarily for a buffer, so it can be edited in a different way (with | 62 | temporarily for a buffer, so it can be edited in a different way (with |
| 63 | ordinary Emacs commands rather than Rmail). In such cases, the | 63 | ordinary Emacs commands rather than Rmail commands). In such cases, the |
| 64 | temporary major mode usually has a command to switch back to the | 64 | temporary major mode usually has a command to switch back to the |
| 65 | buffer's usual mode (Rmail mode, in this case). You might be tempted to | 65 | buffer's usual mode (Rmail mode, in this case). You might be tempted to |
| 66 | present the temporary redefinitions inside a recursive edit and restore | 66 | present the temporary redefinitions inside a recursive edit and restore |
| @@ -823,11 +823,11 @@ minor modes. | |||
| 823 | Make a variable whose name ends in @samp{-mode} to control the minor | 823 | Make a variable whose name ends in @samp{-mode} to control the minor |
| 824 | mode. We call this the @dfn{mode variable}. The minor mode command | 824 | mode. We call this the @dfn{mode variable}. The minor mode command |
| 825 | should set this variable (@code{nil} to disable; anything else to | 825 | should set this variable (@code{nil} to disable; anything else to |
| 826 | enable.) | 826 | enable). |
| 827 | 827 | ||
| 828 | If it is possible, implement the mode so that setting the variable | 828 | If it is possible, implement the mode so that setting the variable |
| 829 | automatically enables or disables the mode. Then the minor mode command | 829 | automatically enables or disables the mode. Then the minor mode command |
| 830 | does not need to do anything except the variable. | 830 | does not need to do anything except set the variable. |
| 831 | 831 | ||
| 832 | This variable is used in conjunction with the @code{minor-mode-alist} to | 832 | This variable is used in conjunction with the @code{minor-mode-alist} to |
| 833 | display the minor mode name in the mode line. It can also enable | 833 | display the minor mode name in the mode line. It can also enable |
| @@ -887,6 +887,9 @@ check for an existing element, to avoid duplication. For example: | |||
| 887 | @end smallexample | 887 | @end smallexample |
| 888 | @end itemize | 888 | @end itemize |
| 889 | 889 | ||
| 890 | You can also use @code{add-to-list} to add an element to this list | ||
| 891 | just once (@pxref{Setting Variables}). | ||
| 892 | |||
| 890 | @node Keymaps and Minor Modes | 893 | @node Keymaps and Minor Modes |
| 891 | @subsection Keymaps and Minor Modes | 894 | @subsection Keymaps and Minor Modes |
| 892 | 895 | ||
| @@ -1135,6 +1138,11 @@ directory. | |||
| 1135 | @end group | 1138 | @end group |
| 1136 | @end example | 1139 | @end example |
| 1137 | 1140 | ||
| 1141 | @noindent | ||
| 1142 | (The variables @code{line-number-mode}, @code{column-number-mode} | ||
| 1143 | and @code{which-func-mode} enable particular minor modes; as usual, | ||
| 1144 | these variable names are also the minor mode command names.) | ||
| 1145 | |||
| 1138 | @node Mode Line Variables | 1146 | @node Mode Line Variables |
| 1139 | @subsection Variables Used in the Mode Line | 1147 | @subsection Variables Used in the Mode Line |
| 1140 | 1148 | ||
| @@ -1174,12 +1182,8 @@ frame at a time. | |||
| 1174 | 1182 | ||
| 1175 | @defvar mode-line-buffer-identification | 1183 | @defvar mode-line-buffer-identification |
| 1176 | This variable identifies the buffer being displayed in the window. Its | 1184 | This variable identifies the buffer being displayed in the window. Its |
| 1177 | default value is @code{("%12b")}, which means that it usually | 1185 | default value is @code{("%12b")}, which means that it usually displays |
| 1178 | displays @samp{Emacs:} followed by seventeen characters of the buffer | 1186 | twelve characters of the buffer name. |
| 1179 | name. (In a terminal frame, it displays the frame name instead of | ||
| 1180 | @samp{Emacs}; this has the effect of showing the frame number.) You may | ||
| 1181 | want to change this in modes such as Rmail that do not behave like a | ||
| 1182 | ``normal'' Emacs. | ||
| 1183 | @end defvar | 1187 | @end defvar |
| 1184 | 1188 | ||
| 1185 | @defvar global-mode-string | 1189 | @defvar global-mode-string |
| @@ -1240,7 +1244,7 @@ This buffer-local variable contains the mode line information on process | |||
| 1240 | status in modes used for communicating with subprocesses. It is | 1244 | status in modes used for communicating with subprocesses. It is |
| 1241 | displayed immediately following the major mode name, with no intervening | 1245 | displayed immediately following the major mode name, with no intervening |
| 1242 | space. For example, its value in the @samp{*shell*} buffer is | 1246 | space. For example, its value in the @samp{*shell*} buffer is |
| 1243 | @code{(":@: %s")}, which allows the shell to display its status along | 1247 | @code{(":%s")}, which allows the shell to display its status along |
| 1244 | with the major mode as: @samp{(Shell:@: run)}. Normally this variable | 1248 | with the major mode as: @samp{(Shell:@: run)}. Normally this variable |
| 1245 | is @code{nil}. | 1249 | is @code{nil}. |
| 1246 | @end defvar | 1250 | @end defvar |
| @@ -1456,8 +1460,8 @@ Setting this variable makes it buffer-local in the current buffer. | |||
| 1456 | 1460 | ||
| 1457 | @defvar imenu-syntax-alist | 1461 | @defvar imenu-syntax-alist |
| 1458 | This variable is an alist of syntax table modifiers to use while | 1462 | This variable is an alist of syntax table modifiers to use while |
| 1459 | executing @code{imenu--generic-function} to override the syntax table of | 1463 | processing @code{imenu-generic-expression}, to override the syntax table |
| 1460 | the current buffer. Each element should have this form: | 1464 | of the current buffer. Each element should have this form: |
| 1461 | 1465 | ||
| 1462 | @example | 1466 | @example |
| 1463 | (@var{characters} . @var{syntax-description}) | 1467 | (@var{characters} . @var{syntax-description}) |
| @@ -1478,7 +1482,7 @@ For example, Fortran mode uses it this way: | |||
| 1478 | @end example | 1482 | @end example |
| 1479 | 1483 | ||
| 1480 | The @code{imenu-generic-expression} patterns can then use @samp{\\sw+} | 1484 | The @code{imenu-generic-expression} patterns can then use @samp{\\sw+} |
| 1481 | instead of @samp{\\(\\sw\\|\\s_\\)\\}. Note that this technique may be | 1485 | instead of @samp{\\(\\sw\\|\\s_\\)+}. Note that this technique may be |
| 1482 | inconvenient to use when the mode needs to limit the initial character | 1486 | inconvenient to use when the mode needs to limit the initial character |
| 1483 | of a name to a smaller set of characters | 1487 | of a name to a smaller set of characters |
| 1484 | 1488 | ||
| @@ -2081,7 +2085,9 @@ each of them the arguments @var{args}. | |||
| 2081 | This function is the way to run an abnormal hook which passes arguments | 2085 | This function is the way to run an abnormal hook which passes arguments |
| 2082 | to the hook functions, and stops as soon as any hook function fails. It | 2086 | to the hook functions, and stops as soon as any hook function fails. It |
| 2083 | calls each of the hook functions, passing each of them the arguments | 2087 | calls each of the hook functions, passing each of them the arguments |
| 2084 | @var{args}, until some hook function returns @code{nil}. Then it stops. | 2088 | @var{args}, until some hook function returns @code{nil}. Then it stops, |
| 2089 | and returns @code{nil} if some hook function did, and otherwise | ||
| 2090 | returns a non-@code{nil} value. | ||
| 2085 | @end defun | 2091 | @end defun |
| 2086 | 2092 | ||
| 2087 | @defun run-hook-with-args-until-success hook &rest args | 2093 | @defun run-hook-with-args-until-success hook &rest args |
| @@ -2089,7 +2095,8 @@ This function is the way to run an abnormal hook which passes arguments | |||
| 2089 | to the hook functions, and stops as soon as any hook function succeeds. | 2095 | to the hook functions, and stops as soon as any hook function succeeds. |
| 2090 | It calls each of the hook functions, passing each of them the arguments | 2096 | It calls each of the hook functions, passing each of them the arguments |
| 2091 | @var{args}, until some hook function returns non-@code{nil}. Then it | 2097 | @var{args}, until some hook function returns non-@code{nil}. Then it |
| 2092 | stops. | 2098 | stops, and returns whatever was returned by the last hook function |
| 2099 | that was called. | ||
| 2093 | @end defun | 2100 | @end defun |
| 2094 | 2101 | ||
| 2095 | @defun add-hook hook function &optional append local | 2102 | @defun add-hook hook function &optional append local |
diff --git a/lispref/nonascii.texi b/lispref/nonascii.texi index ac7c9ed9c43..019f1365f72 100644 --- a/lispref/nonascii.texi +++ b/lispref/nonascii.texi | |||
| @@ -46,13 +46,14 @@ character set by setting the variable @code{nonascii-insert-offset}). | |||
| 46 | 46 | ||
| 47 | @cindex leading code | 47 | @cindex leading code |
| 48 | @cindex multibyte text | 48 | @cindex multibyte text |
| 49 | @cindex trailing codes | ||
| 49 | In multibyte representation, a character may occupy more than one | 50 | In multibyte representation, a character may occupy more than one |
| 50 | byte, and as a result, the full range of Emacs character codes can be | 51 | byte, and as a result, the full range of Emacs character codes can be |
| 51 | stored. The first byte of a multibyte character is always in the range | 52 | stored. The first byte of a multibyte character is always in the range |
| 52 | 128 through 159 (octal 0200 through 0237). These values are called | 53 | 128 through 159 (octal 0200 through 0237). These values are called |
| 53 | @dfn{leading codes}. The second and subsequent bytes of a multibyte | 54 | @dfn{leading codes}. The second and subsequent bytes of a multibyte |
| 54 | character are always in the range 160 through 255 (octal 0240 through | 55 | character are always in the range 160 through 255 (octal 0240 through |
| 55 | 0377). | 56 | 0377); these values are @dfn{trailing codes}. |
| 56 | 57 | ||
| 57 | In a buffer, the buffer-local value of the variable | 58 | In a buffer, the buffer-local value of the variable |
| 58 | @code{enable-multibyte-characters} specifies the representation used. | 59 | @code{enable-multibyte-characters} specifies the representation used. |
| @@ -156,14 +157,14 @@ If this is non-@code{nil}, it overrides @code{nonascii-insert-offset}. | |||
| 156 | @defun string-make-unibyte string | 157 | @defun string-make-unibyte string |
| 157 | @tindex string-make-unibyte | 158 | @tindex string-make-unibyte |
| 158 | This function converts the text of @var{string} to unibyte | 159 | This function converts the text of @var{string} to unibyte |
| 159 | representation, if it isn't already, and return the result. If | 160 | representation, if it isn't already, and returns the result. If |
| 160 | @var{string} is a unibyte string, it is returned unchanged. | 161 | @var{string} is a unibyte string, it is returned unchanged. |
| 161 | @end defun | 162 | @end defun |
| 162 | 163 | ||
| 163 | @defun string-make-multibyte string | 164 | @defun string-make-multibyte string |
| 164 | @tindex string-make-multibyte | 165 | @tindex string-make-multibyte |
| 165 | This function converts the text of @var{string} to multibyte | 166 | This function converts the text of @var{string} to multibyte |
| 166 | representation, if it isn't already, and return the result. If | 167 | representation, if it isn't already, and returns the result. If |
| 167 | @var{string} is a multibyte string, it is returned unchanged. | 168 | @var{string} is a multibyte string, it is returned unchanged. |
| 168 | @end defun | 169 | @end defun |
| 169 | 170 | ||
| @@ -280,18 +281,18 @@ set that @var{character} belongs to. | |||
| 280 | @cindex dimension (of character set) | 281 | @cindex dimension (of character set) |
| 281 | In multibyte representation, each character occupies one or more | 282 | In multibyte representation, each character occupies one or more |
| 282 | bytes. Each character set has an @dfn{introduction sequence}, which is | 283 | bytes. Each character set has an @dfn{introduction sequence}, which is |
| 283 | one or two bytes long. The introduction sequence is the beginning of | 284 | normally one or two bytes long. (Exception: the @sc{ASCII} character |
| 284 | the byte sequence for any character in the character set. (The | 285 | set has a zero-length introduction sequence.) The introduction sequence |
| 285 | @sc{ASCII} character set has a zero-length introduction sequence.) The | 286 | is the beginning of the byte sequence for any character in the character |
| 286 | rest of the character's bytes distinguish it from the other characters | 287 | set. The rest of the character's bytes distinguish it from the other |
| 287 | in the same character set. Depending on the character set, there are | 288 | characters in the same character set. Depending on the character set, |
| 288 | either one or two distinguishing bytes; the number of such bytes is | 289 | there are either one or two distinguishing bytes; the number of such |
| 289 | called the @dfn{dimension} of the character set. | 290 | bytes is called the @dfn{dimension} of the character set. |
| 290 | 291 | ||
| 291 | @defun charset-dimension charset | 292 | @defun charset-dimension charset |
| 292 | @tindex charset-dimension | 293 | @tindex charset-dimension |
| 293 | This function returns the dimension of @var{charset}; | 294 | This function returns the dimension of @var{charset}; |
| 294 | At present, the dimension is always 1 or 2. | 295 | at present, the dimension is always 1 or 2. |
| 295 | @end defun | 296 | @end defun |
| 296 | 297 | ||
| 297 | This is the simplest way to determine the byte length of a character | 298 | This is the simplest way to determine the byte length of a character |
| @@ -481,6 +482,7 @@ by a particular @dfn{coding system}. | |||
| 481 | * Coding System Basics:: | 482 | * Coding System Basics:: |
| 482 | * Encoding and I/O:: | 483 | * Encoding and I/O:: |
| 483 | * Lisp and Coding Systems:: | 484 | * Lisp and Coding Systems:: |
| 485 | * User-Chosen Coding Systems:: | ||
| 484 | * Default Coding Systems:: | 486 | * Default Coding Systems:: |
| 485 | * Specifying Coding Systems:: | 487 | * Specifying Coding Systems:: |
| 486 | * Explicit Encoding:: | 488 | * Explicit Encoding:: |
| @@ -559,7 +561,7 @@ as an alias for the coding system. | |||
| 559 | @node Encoding and I/O | 561 | @node Encoding and I/O |
| 560 | @subsection Encoding and I/O | 562 | @subsection Encoding and I/O |
| 561 | 563 | ||
| 562 | The principal purpose coding systems is for use in reading and | 564 | The principal purpose of coding systems is for use in reading and |
| 563 | writing files. The function @code{insert-file-contents} uses | 565 | writing files. The function @code{insert-file-contents} uses |
| 564 | a coding system for decoding the file data, and @code{write-region} | 566 | a coding system for decoding the file data, and @code{write-region} |
| 565 | uses one to encode the buffer contents. | 567 | uses one to encode the buffer contents. |
| @@ -632,7 +634,7 @@ Otherwise it signals an error with condition @code{coding-system-error}. | |||
| 632 | @defun coding-system-change-eol-conversion coding-system eol-type | 634 | @defun coding-system-change-eol-conversion coding-system eol-type |
| 633 | @tindex coding-system-change-eol-conversion | 635 | @tindex coding-system-change-eol-conversion |
| 634 | This function returns a coding system which is like @var{coding-system} | 636 | This function returns a coding system which is like @var{coding-system} |
| 635 | except for its in eol conversion, which is specified by @code{eol-type}. | 637 | except for its eol conversion, which is specified by @code{eol-type}. |
| 636 | @var{eol-type} should be @code{unix}, @code{dos}, @code{mac}, or | 638 | @var{eol-type} should be @code{unix}, @code{dos}, @code{mac}, or |
| 637 | @code{nil}. If it is @code{nil}, the returned coding system determines | 639 | @code{nil}. If it is @code{nil}, the returned coding system determines |
| 638 | the end-of-line conversion from the data. | 640 | the end-of-line conversion from the data. |
| @@ -694,6 +696,31 @@ This function is like @code{detect-coding-region} except that it | |||
| 694 | operates on the contents of @var{string} instead of bytes in the buffer. | 696 | operates on the contents of @var{string} instead of bytes in the buffer. |
| 695 | @end defun | 697 | @end defun |
| 696 | 698 | ||
| 699 | @xref{Process Information}, for how to examine or set the coding | ||
| 700 | systems used for I/O to a subprocess. | ||
| 701 | |||
| 702 | @node User-Chosen Coding Systems | ||
| 703 | @subsection User-Chosen Coding Systems | ||
| 704 | |||
| 705 | @tindex select-safe-coding-system | ||
| 706 | @defun select-safe-coding-system from to &optional preferred-coding-system | ||
| 707 | This function selects a coding system for encoding the between | ||
| 708 | @var{from} and @var{to}, asking the user to choose if necessary. | ||
| 709 | |||
| 710 | The optional argument @var{preferred-coding-system} specifies a coding | ||
| 711 | system try first. If it can handle the text in the specified region, | ||
| 712 | then it is used. If this argument is omitted, the current buffer's | ||
| 713 | value of @code{buffer-file-coding-system} is tried first. | ||
| 714 | |||
| 715 | If the region contains some multibyte characters that the preferred | ||
| 716 | coding system cannot encode, this function asks the user to choose from | ||
| 717 | a list of coding systems which can encode the text, and returns the | ||
| 718 | user's choice. | ||
| 719 | |||
| 720 | One other kludgy feature: if @var{from} is a string, the string is the | ||
| 721 | target text, and @var{to} is ignored. | ||
| 722 | @end defun | ||
| 723 | |||
| 697 | Here are two functions you can use to let the user specify a coding | 724 | Here are two functions you can use to let the user specify a coding |
| 698 | system, with completion. @xref{Completion}. | 725 | system, with completion. @xref{Completion}. |
| 699 | 726 | ||
| @@ -713,15 +740,12 @@ the user tries to enter null input, it asks the user to try again. | |||
| 713 | @xref{Coding Systems}. | 740 | @xref{Coding Systems}. |
| 714 | @end defun | 741 | @end defun |
| 715 | 742 | ||
| 716 | @xref{Process Information}, for how to examine or set the coding | ||
| 717 | systems used for I/O to a subprocess. | ||
| 718 | |||
| 719 | @node Default Coding Systems | 743 | @node Default Coding Systems |
| 720 | @subsection Default Coding Systems | 744 | @subsection Default Coding Systems |
| 721 | 745 | ||
| 722 | This section describes variables that specify the default coding | 746 | This section describes variables that specify the default coding |
| 723 | system for certain files or when running certain subprograms, and the | 747 | system for certain files or when running certain subprograms, and the |
| 724 | function which which I/O operations use to access them. | 748 | function that I/O operations use to access them. |
| 725 | 749 | ||
| 726 | The idea of these variables is that you set them once and for all to the | 750 | The idea of these variables is that you set them once and for all to the |
| 727 | defaults you want, and then do not change them again. To specify a | 751 | defaults you want, and then do not change them again. To specify a |
| @@ -738,7 +762,7 @@ reading and writing particular files. Each element has the form | |||
| 738 | expression that matches certain file names. The element applies to file | 762 | expression that matches certain file names. The element applies to file |
| 739 | names that match @var{pattern}. | 763 | names that match @var{pattern}. |
| 740 | 764 | ||
| 741 | The @sc{cdr} of the element, @var{val}, should be either a coding | 765 | The @sc{cdr} of the element, @var{coding}, should be either a coding |
| 742 | system, a cons cell containing two coding systems, or a function symbol. | 766 | system, a cons cell containing two coding systems, or a function symbol. |
| 743 | If @var{val} is a coding system, that coding system is used for both | 767 | If @var{val} is a coding system, that coding system is used for both |
| 744 | reading the file and writing it. If @var{val} is a cons cell containing | 768 | reading the file and writing it. If @var{val} is a cons cell containing |
| @@ -763,7 +787,7 @@ other coding systems later using @code{set-process-coding-system}. | |||
| 763 | 787 | ||
| 764 | @strong{Warning:} Coding systems such as @code{undecided} which | 788 | @strong{Warning:} Coding systems such as @code{undecided} which |
| 765 | determine the coding system from the data do not work entirely reliably | 789 | determine the coding system from the data do not work entirely reliably |
| 766 | with asynchronous subprocess output. This is because Emacs processes | 790 | with asynchronous subprocess output. This is because Emacs handles |
| 767 | asynchronous subprocess output in batches, as it arrives. If the coding | 791 | asynchronous subprocess output in batches, as it arrives. If the coding |
| 768 | system leaves the character code conversion unspecified, or leaves the | 792 | system leaves the character code conversion unspecified, or leaves the |
| 769 | end-of-line conversion unspecified, Emacs must try to detect the proper | 793 | end-of-line conversion unspecified, Emacs must try to detect the proper |
| @@ -917,6 +941,15 @@ write them with @code{write-region} (@pxref{Writing to Files}), and | |||
| 917 | suppress encoding for that @code{write-region} call by binding | 941 | suppress encoding for that @code{write-region} call by binding |
| 918 | @code{coding-system-for-write} to @code{no-conversion}. | 942 | @code{coding-system-for-write} to @code{no-conversion}. |
| 919 | 943 | ||
| 944 | Raw bytes sometimes contain overlong byte-sequences that look like a | ||
| 945 | proper multibyte character plus extra bytes containing trailing codes. | ||
| 946 | For most purposes, Emacs treats such a sequence in a buffer or string as | ||
| 947 | a single character, and if you look at its character code, you get the | ||
| 948 | value that corresponds to the multibyte character sequence---the extra | ||
| 949 | bytes are disregarded. This behavior is not quite clean, but raw bytes | ||
| 950 | are used only in limited places in Emacs, so as a practical matter | ||
| 951 | problems can be avoided. | ||
| 952 | |||
| 920 | @defun encode-coding-region start end coding-system | 953 | @defun encode-coding-region start end coding-system |
| 921 | @tindex encode-coding-region | 954 | @tindex encode-coding-region |
| 922 | This function encodes the text from @var{start} to @var{end} according | 955 | This function encodes the text from @var{start} to @var{end} according |
| @@ -1092,12 +1125,14 @@ This variable defines all the supported input methods. | |||
| 1092 | Each element defines one input method, and should have the form: | 1125 | Each element defines one input method, and should have the form: |
| 1093 | 1126 | ||
| 1094 | @example | 1127 | @example |
| 1095 | (@var{input-method} @var{language-env} @var{activate-func} @var{title} @var{description} @var{args}...) | 1128 | (@var{input-method} @var{language-env} @var{activate-func} |
| 1129 | @var{title} @var{description} @var{args}...) | ||
| 1096 | @end example | 1130 | @end example |
| 1097 | 1131 | ||
| 1098 | Here @var{input-method} is the input method name, a string; @var{env} is | 1132 | Here @var{input-method} is the input method name, a string; |
| 1099 | another string, the name of the language environment this input method | 1133 | @var{language-env} is another string, the name of the language |
| 1100 | is recommended for. (That serves only for documentation purposes.) | 1134 | environment this input method is recommended for. (That serves only for |
| 1135 | documentation purposes.) | ||
| 1101 | 1136 | ||
| 1102 | @var{title} is a string to display in the mode line while this method is | 1137 | @var{title} is a string to display in the mode line while this method is |
| 1103 | active. @var{description} is a string describing this method and what | 1138 | active. @var{description} is a string describing this method and what |
| @@ -1107,6 +1142,6 @@ it is good for. | |||
| 1107 | @var{args}, if any, are passed as arguments to @var{activate-func}. All | 1142 | @var{args}, if any, are passed as arguments to @var{activate-func}. All |
| 1108 | told, the arguments to @var{activate-func} are @var{input-method} and | 1143 | told, the arguments to @var{activate-func} are @var{input-method} and |
| 1109 | the @var{args}. | 1144 | the @var{args}. |
| 1110 | @end defun | 1145 | @end defvar |
| 1111 | 1146 | ||
| 1112 | 1147 | ||
diff --git a/lispref/os.texi b/lispref/os.texi index b3764422dff..f9b6595f71c 100644 --- a/lispref/os.texi +++ b/lispref/os.texi | |||
| @@ -19,6 +19,7 @@ pertaining to the terminal and the screen. | |||
| 19 | * Getting Out:: How exiting works (permanent or temporary). | 19 | * Getting Out:: How exiting works (permanent or temporary). |
| 20 | * System Environment:: Distinguish the name and kind of system. | 20 | * System Environment:: Distinguish the name and kind of system. |
| 21 | * User Identification:: Finding the name and user id of the user. | 21 | * User Identification:: Finding the name and user id of the user. |
| 22 | * Reading a Password:: Reading a password from the terminal. | ||
| 22 | * Time of Day:: Getting the current time. | 23 | * Time of Day:: Getting the current time. |
| 23 | * Time Conversion:: Converting a time from numeric form to a string, or | 24 | * Time Conversion:: Converting a time from numeric form to a string, or |
| 24 | to calendrical data (or vice versa). | 25 | to calendrical data (or vice versa). |
| @@ -195,6 +196,7 @@ loading of this file with the option @samp{-no-site-file}. | |||
| 195 | @defvar site-run-file | 196 | @defvar site-run-file |
| 196 | This variable specifies the site-customization file to load | 197 | This variable specifies the site-customization file to load |
| 197 | before the user's init file. Its normal value is @code{"site-start"}. | 198 | before the user's init file. Its normal value is @code{"site-start"}. |
| 199 | (The only way to change it with real effect is before dumping Emacs.) | ||
| 198 | @end defvar | 200 | @end defvar |
| 199 | 201 | ||
| 200 | If there is a great deal of code in your @file{.emacs} file, you | 202 | If there is a great deal of code in your @file{.emacs} file, you |
| @@ -214,12 +216,13 @@ then the default library is not loaded. The default value is | |||
| 214 | @end defopt | 216 | @end defopt |
| 215 | 217 | ||
| 216 | @defvar before-init-hook | 218 | @defvar before-init-hook |
| 217 | This normal hook is run, once, just before loading of all the init files | 219 | This normal hook is run, once, just before loading all the init files |
| 218 | (the user's init file, @file{default.el}, and/or @file{site-start.el}). | 220 | (the user's init file, @file{default.el}, and/or @file{site-start.el}). |
| 221 | (The only way to change it with real effect is before dumping Emacs.) | ||
| 219 | @end defvar | 222 | @end defvar |
| 220 | 223 | ||
| 221 | @defvar after-init-hook | 224 | @defvar after-init-hook |
| 222 | This normal hook is run, once, just after loading of all the init files | 225 | This normal hook is run, once, just after loading all the init files |
| 223 | (the user's init file, @file{default.el}, and/or @file{site-start.el}), | 226 | (the user's init file, @file{default.el}, and/or @file{site-start.el}), |
| 224 | before the terminal-specific initialization. | 227 | before the terminal-specific initialization. |
| 225 | @end defvar | 228 | @end defvar |
| @@ -568,6 +571,9 @@ The value of this variable is a symbol indicating the type of operating | |||
| 568 | system Emacs is operating on. Here is a table of the possible values: | 571 | system Emacs is operating on. Here is a table of the possible values: |
| 569 | 572 | ||
| 570 | @table @code | 573 | @table @code |
| 574 | @item alpha-vms | ||
| 575 | VMS on the Alpha. | ||
| 576 | |||
| 571 | @item aix-v3 | 577 | @item aix-v3 |
| 572 | AIX. | 578 | AIX. |
| 573 | 579 | ||
| @@ -727,13 +733,13 @@ containing the Emacs executable. | |||
| 727 | @end defvar | 733 | @end defvar |
| 728 | 734 | ||
| 729 | @defun load-average &optional use-float | 735 | @defun load-average &optional use-float |
| 730 | This function returns the current 1-minute, 5-minute and 15-minute load | 736 | This function returns the current 1-minute, 5-minute, and 15-minute load |
| 731 | averages in a list. | 737 | averages, in a list. |
| 732 | 738 | ||
| 733 | By default, the values are integers that are 100 times the system load | 739 | By default, the values are integers that are 100 times the system load |
| 734 | averages, which indicate the average number of processes trying to run. | 740 | averages, which indicate the average number of processes trying to run. |
| 735 | If @var{use-float} is non-@code{nil}, then they are returned | 741 | If @var{use-float} is non-@code{nil}, then they are returned |
| 736 | as floating point numbers instead. | 742 | as floating point numbers and without multiplying by 100. |
| 737 | 743 | ||
| 738 | @example | 744 | @example |
| 739 | @group | 745 | @group |
| @@ -864,6 +870,29 @@ This function returns the real @sc{uid} of the user. | |||
| 864 | This function returns the effective @sc{uid} of the user. | 870 | This function returns the effective @sc{uid} of the user. |
| 865 | @end defun | 871 | @end defun |
| 866 | 872 | ||
| 873 | @node Reading a Password | ||
| 874 | @section Reading a Password | ||
| 875 | @cindex passwords, reading | ||
| 876 | |||
| 877 | To read a password to pass to another program, you can use the | ||
| 878 | function @code{read-passwd}. | ||
| 879 | |||
| 880 | @tindex read-passwd | ||
| 881 | @defun read-passwd prompt &optional confirm default | ||
| 882 | This function reads a password, prompting with @var{prompt}. It does | ||
| 883 | not echo the password as the user types it; instead, it echoes @samp{.} | ||
| 884 | for each character in the password. | ||
| 885 | |||
| 886 | The optional argument @var{confirm}, if non-@code{nil}, says to read the | ||
| 887 | password twice and insist it must be the same both times. If it isn't | ||
| 888 | the same, the user has to type it over and over until the last two | ||
| 889 | times match. | ||
| 890 | |||
| 891 | The optional argument @var{default} specifies the default password to | ||
| 892 | return if the user enters empty input. If @var{default} is @code{nil}, | ||
| 893 | then @code{read-passwd} returns the null string in that case. | ||
| 894 | @end defun | ||
| 895 | |||
| 867 | @node Time of Day | 896 | @node Time of Day |
| 868 | @section Time of Day | 897 | @section Time of Day |
| 869 | 898 | ||
| @@ -1129,7 +1158,7 @@ after a certain length of idleness. | |||
| 1129 | Emacs cannot run timers at any arbitrary point in a Lisp program; it | 1158 | Emacs cannot run timers at any arbitrary point in a Lisp program; it |
| 1130 | can run them only when Emacs could accept output from a subprocess: | 1159 | can run them only when Emacs could accept output from a subprocess: |
| 1131 | namely, while waiting or inside certain primitive functions such as | 1160 | namely, while waiting or inside certain primitive functions such as |
| 1132 | @code{sit-for} or @code{read-char} which @emph{can} wait. Therefore, a | 1161 | @code{sit-for} or @code{read-event} which @emph{can} wait. Therefore, a |
| 1133 | timer's execution may be delayed if Emacs is busy. However, the time of | 1162 | timer's execution may be delayed if Emacs is busy. However, the time of |
| 1134 | execution is very precise if Emacs is idle. | 1163 | execution is very precise if Emacs is idle. |
| 1135 | 1164 | ||
| @@ -1139,8 +1168,9 @@ at time @var{time}. The argument @var{function} is a function to call | |||
| 1139 | later, and @var{args} are the arguments to give it when it is called. | 1168 | later, and @var{args} are the arguments to give it when it is called. |
| 1140 | The time @var{time} is specified as a string. | 1169 | The time @var{time} is specified as a string. |
| 1141 | 1170 | ||
| 1142 | Absolute times may be specified in a wide variety of formats, and tries | 1171 | Absolute times may be specified in a wide variety of formats; this |
| 1143 | to accept all common date formats. Valid formats include these two, | 1172 | function tries to accept all the commonly used date formats. Valid |
| 1173 | formats include these two, | ||
| 1144 | 1174 | ||
| 1145 | @example | 1175 | @example |
| 1146 | @var{year}-@var{month}-@var{day} @var{hour}:@var{min}:@var{sec} @var{timezone} | 1176 | @var{year}-@var{month}-@var{day} @var{hour}:@var{min}:@var{sec} @var{timezone} |
| @@ -1664,7 +1694,7 @@ It is not crucial to exclude from the alist the keysyms of other X | |||
| 1664 | servers; those do no harm, as long as they don't conflict with the ones | 1694 | servers; those do no harm, as long as they don't conflict with the ones |
| 1665 | used by the X server actually in use. | 1695 | used by the X server actually in use. |
| 1666 | 1696 | ||
| 1667 | The variable is always local to the current X terminal and cannot be | 1697 | The variable is always local to the current terminal, and cannot be |
| 1668 | buffer-local. @xref{Multiple Displays}. | 1698 | buffer-local. @xref{Multiple Displays}. |
| 1669 | @end defvar | 1699 | @end defvar |
| 1670 | 1700 | ||
| @@ -1684,7 +1714,7 @@ entries and DEC terminal concentrators, see @file{emacs/etc/TERMS}. | |||
| 1684 | @code{C-s} and @kbd{C-q} for flow control. Therefore, the choice of | 1714 | @code{C-s} and @kbd{C-q} for flow control. Therefore, the choice of |
| 1685 | @kbd{C-s} and @kbd{C-q} as command characters for searching and quoting | 1715 | @kbd{C-s} and @kbd{C-q} as command characters for searching and quoting |
| 1686 | was natural and uncontroversial. With so many commands needing key | 1716 | was natural and uncontroversial. With so many commands needing key |
| 1687 | assignments. of course we assigned meanings to nearly all @sc{ASCII} | 1717 | assignments, of course we assigned meanings to nearly all @sc{ASCII} |
| 1688 | control characters. | 1718 | control characters. |
| 1689 | 1719 | ||
| 1690 | Later, some terminals were introduced which required these characters | 1720 | Later, some terminals were introduced which required these characters |
diff --git a/lispref/positions.texi b/lispref/positions.texi index e4f9a4cc7b8..02bd42b6669 100644 --- a/lispref/positions.texi +++ b/lispref/positions.texi | |||
| @@ -180,13 +180,15 @@ whether a given character is part of a word. @xref{Syntax Tables}. | |||
| 180 | 180 | ||
| 181 | @deffn Command forward-word count | 181 | @deffn Command forward-word count |
| 182 | This function moves point forward @var{count} words (or backward if | 182 | This function moves point forward @var{count} words (or backward if |
| 183 | @var{count} is negative). More precisely, it keeps moving until it | 183 | @var{count} is negative). ``Moving one word'' means moving until point |
| 184 | moves across a word-constituent character and encounters a | 184 | crosses a word-constituent character and then encounters a |
| 185 | word-separator character, then returns @code{t}. | 185 | word-separator character (or the boundary of the accessible part of the |
| 186 | buffer). | ||
| 186 | 187 | ||
| 187 | If this motion encounters the beginning or end of the buffer, or the | 188 | If it is possible to move @var{count} words, without being stopped by |
| 188 | limits of the accessible portion when narrowing is in effect, point | 189 | the buffer boundary (except perhaps after the last word), the value is |
| 189 | stops there and the value is @code{nil}. | 190 | @code{t}. Otherwise, the return value is @code{nil} and point stops |
| 191 | at the buffer boundary. | ||
| 190 | 192 | ||
| 191 | In an interactive call, @var{count} is set to the numeric prefix | 193 | In an interactive call, @var{count} is set to the numeric prefix |
| 192 | argument. | 194 | argument. |
| @@ -657,7 +659,7 @@ This function moves point in the current buffer forward, skipping over a | |||
| 657 | given set of characters. It examines the character following point, | 659 | given set of characters. It examines the character following point, |
| 658 | then advances point if the character matches @var{character-set}. This | 660 | then advances point if the character matches @var{character-set}. This |
| 659 | continues until it reaches a character that does not match. The | 661 | continues until it reaches a character that does not match. The |
| 660 | function returns @code{nil}. | 662 | function returns the number of characters moved over. |
| 661 | 663 | ||
| 662 | The argument @var{character-set} is like the inside of a | 664 | The argument @var{character-set} is like the inside of a |
| 663 | @samp{[@dots{}]} in a regular expression except that @samp{]} is never | 665 | @samp{[@dots{}]} in a regular expression except that @samp{]} is never |
| @@ -699,6 +701,9 @@ comes back" twice. | |||
| 699 | This function moves point backward, skipping characters that match | 701 | This function moves point backward, skipping characters that match |
| 700 | @var{character-set}, until @var{limit}. It is just like | 702 | @var{character-set}, until @var{limit}. It is just like |
| 701 | @code{skip-chars-forward} except for the direction of motion. | 703 | @code{skip-chars-forward} except for the direction of motion. |
| 704 | |||
| 705 | The return value indicates the distance traveled. It is an integer that | ||
| 706 | is zero or less. | ||
| 702 | @end defun | 707 | @end defun |
| 703 | 708 | ||
| 704 | @node Excursions | 709 | @node Excursions |
| @@ -765,7 +770,7 @@ The value returned by @code{save-excursion} is the result of the last of | |||
| 765 | @strong{Warning:} Ordinary insertion of text adjacent to the saved | 770 | @strong{Warning:} Ordinary insertion of text adjacent to the saved |
| 766 | point value relocates the saved value, just as it relocates all markers. | 771 | point value relocates the saved value, just as it relocates all markers. |
| 767 | Therefore, when the saved point value is restored, it normally comes | 772 | Therefore, when the saved point value is restored, it normally comes |
| 768 | after the inserted text. | 773 | before the inserted text. |
| 769 | 774 | ||
| 770 | Although @code{save-excursion} saves the location of the mark, it does | 775 | Although @code{save-excursion} saves the location of the mark, it does |
| 771 | not prevent functions which modify the buffer from setting | 776 | not prevent functions which modify the buffer from setting |
diff --git a/lispref/processes.texi b/lispref/processes.texi index 8589348b282..400ab2e53a6 100644 --- a/lispref/processes.texi +++ b/lispref/processes.texi | |||
| @@ -79,12 +79,12 @@ Expansion}). | |||
| 79 | 79 | ||
| 80 | Each of the subprocess-creating functions has a @var{buffer-or-name} | 80 | Each of the subprocess-creating functions has a @var{buffer-or-name} |
| 81 | argument which specifies where the standard output from the program will | 81 | argument which specifies where the standard output from the program will |
| 82 | go. It should be a buffer or a buffer name (which will create the | 82 | go. It should be a buffer or a buffer name; if it is a buffer name, |
| 83 | buffer if it does not already exist). It can also be @code{nil}, which | 83 | that will create the buffer if it does not already exist. It can also |
| 84 | says to discard the output unless a filter function handles it. | 84 | be @code{nil}, which says to discard the output unless a filter function |
| 85 | (@xref{Filter Functions}, and @ref{Read and Print}.) Normally, you | 85 | handles it. (@xref{Filter Functions}, and @ref{Read and Print}.) |
| 86 | should avoid having multiple processes send output to the same buffer | 86 | Normally, you should avoid having multiple processes send output to the |
| 87 | because their output would be intermixed randomly. | 87 | same buffer because their output would be intermixed randomly. |
| 88 | 88 | ||
| 89 | @cindex program arguments | 89 | @cindex program arguments |
| 90 | All three of the subprocess-creating functions have a @code{&rest} | 90 | All three of the subprocess-creating functions have a @code{&rest} |
| @@ -102,14 +102,14 @@ must use @var{args} to provide those. | |||
| 102 | @code{default-directory} (@pxref{File Name Expansion}). | 102 | @code{default-directory} (@pxref{File Name Expansion}). |
| 103 | 103 | ||
| 104 | @cindex environment variables, subprocesses | 104 | @cindex environment variables, subprocesses |
| 105 | The subprocess inherits its environment from Emacs; but you can | 105 | The subprocess inherits its environment from Emacs, but you can |
| 106 | specify overrides for it with @code{process-environment}. @xref{System | 106 | specify overrides for it with @code{process-environment}. @xref{System |
| 107 | Environment}. | 107 | Environment}. |
| 108 | 108 | ||
| 109 | @defvar exec-directory | 109 | @defvar exec-directory |
| 110 | @pindex movemail | 110 | @pindex movemail |
| 111 | The value of this variable is the name of a directory (a string) that | 111 | The value of this variable is the name of a directory (a string) that |
| 112 | contains programs that come with GNU Emacs, that are intended for Emacs | 112 | contains programs that come with GNU Emacs, programs intended for Emacs |
| 113 | to invoke. The program @code{movemail} is an example of such a program; | 113 | to invoke. The program @code{movemail} is an example of such a program; |
| 114 | Rmail uses it to fetch new mail from an inbox. | 114 | Rmail uses it to fetch new mail from an inbox. |
| 115 | @end defvar | 115 | @end defvar |
| @@ -224,7 +224,7 @@ parallel with Emacs; but you can think of it as synchronous in that | |||
| 224 | Emacs is essentially finished with the subprocess as soon as this | 224 | Emacs is essentially finished with the subprocess as soon as this |
| 225 | function returns. | 225 | function returns. |
| 226 | 226 | ||
| 227 | @item (@var{real-destination} @var{error-destination}) | 227 | @item @code{(@var{real-destination} @var{error-destination})} |
| 228 | Keep the standard output stream separate from the standard error stream; | 228 | Keep the standard output stream separate from the standard error stream; |
| 229 | deal with the ordinary output as specified by @var{real-destination}, | 229 | deal with the ordinary output as specified by @var{real-destination}, |
| 230 | and dispose of the error output according to @var{error-destination}. | 230 | and dispose of the error output according to @var{error-destination}. |
| @@ -365,8 +365,8 @@ then returns the command's output as a string. | |||
| 365 | @section Creating an Asynchronous Process | 365 | @section Creating an Asynchronous Process |
| 366 | @cindex asynchronous subprocess | 366 | @cindex asynchronous subprocess |
| 367 | 367 | ||
| 368 | After an @dfn{asynchronous process} is created, Emacs and the Lisp | 368 | After an @dfn{asynchronous process} is created, Emacs and the subprocess |
| 369 | program both continue running immediately. The process thereafter runs | 369 | both continue running immediately. The process thereafter runs |
| 370 | in parallel with Emacs, and the two can communicate with each other | 370 | in parallel with Emacs, and the two can communicate with each other |
| 371 | using the functions described in following sections. However, | 371 | using the functions described in following sections. However, |
| 372 | communication is only partially asynchronous: Emacs sends data to the | 372 | communication is only partially asynchronous: Emacs sends data to the |
| @@ -484,13 +484,13 @@ deleted automatically after they terminate, but not necessarily right | |||
| 484 | away. If you delete a terminated process explicitly before it is | 484 | away. If you delete a terminated process explicitly before it is |
| 485 | deleted automatically, no harm results. | 485 | deleted automatically, no harm results. |
| 486 | 486 | ||
| 487 | @defvar delete-exited-processes | 487 | @defopt delete-exited-processes |
| 488 | This variable controls automatic deletion of processes that have | 488 | This variable controls automatic deletion of processes that have |
| 489 | terminated (due to calling @code{exit} or to a signal). If it is | 489 | terminated (due to calling @code{exit} or to a signal). If it is |
| 490 | @code{nil}, then they continue to exist until the user runs | 490 | @code{nil}, then they continue to exist until the user runs |
| 491 | @code{list-processes}. Otherwise, they are deleted immediately after | 491 | @code{list-processes}. Otherwise, they are deleted immediately after |
| 492 | they exit. | 492 | they exit. |
| 493 | @end defvar | 493 | @end defopt |
| 494 | 494 | ||
| 495 | @defun delete-process name | 495 | @defun delete-process name |
| 496 | This function deletes the process associated with @var{name}, killing it | 496 | This function deletes the process associated with @var{name}, killing it |
| @@ -505,10 +505,15 @@ the name of a process, a buffer, or the name of a buffer. | |||
| 505 | @end smallexample | 505 | @end smallexample |
| 506 | @end defun | 506 | @end defun |
| 507 | 507 | ||
| 508 | @defun process-kill-without-query process | 508 | @defun process-kill-without-query process &optional do-query |
| 509 | This function declares that Emacs need not query the user if | 509 | This function specifies whether Emacs should query the user if |
| 510 | @var{process} is still running when Emacs is exited. The process will | 510 | @var{process} is still running when Emacs is exited. If @var{do-query} |
| 511 | be deleted silently. The value is @code{t}. | 511 | is @code{nil}, the process will be deleted silently. |
| 512 | Otherwise, Emacs will query about killing it. | ||
| 513 | |||
| 514 | The value is @code{t} if the process was formerly set up to require | ||
| 515 | query. @code{nil} otherwise. A newly-created process always requires | ||
| 516 | query. | ||
| 512 | 517 | ||
| 513 | @smallexample | 518 | @smallexample |
| 514 | @group | 519 | @group |
| @@ -1145,9 +1150,7 @@ subprocess output. | |||
| 1145 | The argument @var{seconds} need not be an integer. If it is a floating | 1150 | The argument @var{seconds} need not be an integer. If it is a floating |
| 1146 | point number, this function waits for a fractional number of seconds. | 1151 | point number, this function waits for a fractional number of seconds. |
| 1147 | Some systems support only a whole number of seconds; on these systems, | 1152 | Some systems support only a whole number of seconds; on these systems, |
| 1148 | @var{seconds} is rounded down. If the system doesn't support waiting | 1153 | @var{seconds} is rounded down. |
| 1149 | fractions of a second, you get an error if you specify nonzero | ||
| 1150 | @var{millisec}. | ||
| 1151 | 1154 | ||
| 1152 | Not all operating systems support waiting periods other than multiples | 1155 | Not all operating systems support waiting periods other than multiples |
| 1153 | of a second; on those that do not, you get an error if you specify | 1156 | of a second; on those that do not, you get an error if you specify |
diff --git a/lispref/searching.texi b/lispref/searching.texi index 7ba8a9fe666..265bc9aba5b 100644 --- a/lispref/searching.texi +++ b/lispref/searching.texi | |||
| @@ -234,7 +234,7 @@ backtracking loops. For example, it could take hours for the regular | |||
| 234 | expression @samp{\(x+y*\)*a} to try to match the sequence | 234 | expression @samp{\(x+y*\)*a} to try to match the sequence |
| 235 | @samp{xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxz}, before it ultimately fails. | 235 | @samp{xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxz}, before it ultimately fails. |
| 236 | The slowness is because Emacs must try each imaginable way of grouping | 236 | The slowness is because Emacs must try each imaginable way of grouping |
| 237 | the 35 @samp{x}'s before concluding that none of them can work. To make | 237 | the 35 @samp{x}s before concluding that none of them can work. To make |
| 238 | sure your regular expressions run fast, check nested repetitions | 238 | sure your regular expressions run fast, check nested repetitions |
| 239 | carefully. | 239 | carefully. |
| 240 | 240 | ||
| @@ -266,9 +266,9 @@ matches @samp{cr}, @samp{car}, @samp{cdr}, @samp{caddaar}, etc. | |||
| 266 | 266 | ||
| 267 | You can also include character ranges in a character alternative, by | 267 | You can also include character ranges in a character alternative, by |
| 268 | writing the starting and ending characters with a @samp{-} between them. | 268 | writing the starting and ending characters with a @samp{-} between them. |
| 269 | Thus, @samp{[a-z]} matches any lower-case ASCII letter. Ranges may be | 269 | Thus, @samp{[a-z]} matches any lower-case @sc{ASCII} letter. Ranges may be |
| 270 | intermixed freely with individual characters, as in @samp{[a-z$%.]}, | 270 | intermixed freely with individual characters, as in @samp{[a-z$%.]}, |
| 271 | which matches any lower case ASCII letter or @samp{$}, @samp{%} or | 271 | which matches any lower case @sc{ASCII} letter or @samp{$}, @samp{%} or |
| 272 | period. | 272 | period. |
| 273 | 273 | ||
| 274 | You cannot always match all non-@sc{ASCII} characters with the regular | 274 | You cannot always match all non-@sc{ASCII} characters with the regular |
| @@ -280,9 +280,9 @@ does match all non-@sc{ASCII} characters, in both multibyte and unibyte | |||
| 280 | representations, because only the @sc{ASCII} characters are excluded. | 280 | representations, because only the @sc{ASCII} characters are excluded. |
| 281 | 281 | ||
| 282 | The beginning and end of a range must be in the same character set | 282 | The beginning and end of a range must be in the same character set |
| 283 | (@pxref{Character Sets}). Thus, @samp{[a-\x8c0]} is invalid because | 283 | (@pxref{Character Sets}). Thus, @samp{[a-\x8e0]} is invalid because |
| 284 | @samp{a} is in the @sc{ASCII} character set but the character 0x8c0 | 284 | @samp{a} is in the @sc{ASCII} character set but the character 0x8e0 |
| 285 | (@samp{A} with grave accent) is in the Emacs character set for Latin-1. | 285 | (@samp{a} with grave accent) is in the Emacs character set for Latin-1. |
| 286 | 286 | ||
| 287 | Note that the usual regexp special characters are not special inside a | 287 | Note that the usual regexp special characters are not special inside a |
| 288 | character alternative. A completely different set of characters are | 288 | character alternative. A completely different set of characters are |
| @@ -1286,7 +1286,7 @@ that shows the problem that arises if you fail to save the match data: | |||
| 1286 | You can save and restore the match data with @code{save-match-data}: | 1286 | You can save and restore the match data with @code{save-match-data}: |
| 1287 | 1287 | ||
| 1288 | @defmac save-match-data body@dots{} | 1288 | @defmac save-match-data body@dots{} |
| 1289 | This special form executes @var{body}, saving and restoring the match | 1289 | This macro executes @var{body}, saving and restoring the match |
| 1290 | data around it. | 1290 | data around it. |
| 1291 | @end defmac | 1291 | @end defmac |
| 1292 | 1292 | ||
diff --git a/lispref/sequences.texi b/lispref/sequences.texi index 26263831d1c..f812112e243 100644 --- a/lispref/sequences.texi +++ b/lispref/sequences.texi | |||
| @@ -637,7 +637,7 @@ name. @xref{Splitting Characters}, for a description of generic characters. | |||
| 637 | 637 | ||
| 638 | @defun set-char-table-range char-table range value | 638 | @defun set-char-table-range char-table range value |
| 639 | @tindex set-char-table-range | 639 | @tindex set-char-table-range |
| 640 | This function set the value in @var{char-table} for a range of | 640 | This function sets the value in @var{char-table} for a range of |
| 641 | characters @var{range}. Here are the possibilities for @var{range}: | 641 | characters @var{range}. Here are the possibilities for @var{range}: |
| 642 | 642 | ||
| 643 | @table @asis | 643 | @table @asis |
| @@ -678,11 +678,13 @@ The return value is always @code{nil}; to make this function useful, | |||
| 678 | here is how to examine each element of the syntax table: | 678 | here is how to examine each element of the syntax table: |
| 679 | 679 | ||
| 680 | @example | 680 | @example |
| 681 | (map-char-table | 681 | (let (accumulator) |
| 682 | #'(lambda (key value) | 682 | (map-char-table |
| 683 | (setq accumulator | 683 | #'(lambda (key value) |
| 684 | (cons (list key value) accumulator))) | 684 | (setq accumulator |
| 685 | (syntax-table)) | 685 | (cons (list key value) accumulator))) |
| 686 | (syntax-table)) | ||
| 687 | accumulator) | ||
| 686 | @result{} | 688 | @result{} |
| 687 | ((475008 nil) (474880 nil) (474752 nil) (474624 nil) | 689 | ((475008 nil) (474880 nil) (474752 nil) (474624 nil) |
| 688 | ... (5 (3)) (4 (3)) (3 (3)) (2 (3)) (1 (3)) (0 (3))) | 690 | ... (5 (3)) (4 (3)) (3 (3)) (2 (3)) (1 (3)) (0 (3))) |
diff --git a/lispref/streams.texi b/lispref/streams.texi index cf3f14a095f..5521f74d876 100644 --- a/lispref/streams.texi +++ b/lispref/streams.texi | |||
| @@ -390,11 +390,6 @@ initially located as shown immediately before the @samp{h} in | |||
| 390 | @cindex print example | 390 | @cindex print example |
| 391 | @example | 391 | @example |
| 392 | @group | 392 | @group |
| 393 | (setq m (set-marker (make-marker) 10 (get-buffer "foo"))) | ||
| 394 | @result{} #<marker at 10 in foo> | ||
| 395 | @end group | ||
| 396 | |||
| 397 | @group | ||
| 398 | ---------- Buffer: foo ---------- | 393 | ---------- Buffer: foo ---------- |
| 399 | This is t@point{}he contents of foo. | 394 | This is t@point{}he contents of foo. |
| 400 | ---------- Buffer: foo ---------- | 395 | ---------- Buffer: foo ---------- |
| @@ -404,10 +399,6 @@ This is t@point{}he contents of foo. | |||
| 404 | @result{} "This is the output" | 399 | @result{} "This is the output" |
| 405 | 400 | ||
| 406 | @group | 401 | @group |
| 407 | m | ||
| 408 | @result{} #<marker at 32 in foo> | ||
| 409 | @end group | ||
| 410 | @group | ||
| 411 | ---------- Buffer: foo ---------- | 402 | ---------- Buffer: foo ---------- |
| 412 | This is t | 403 | This is t |
| 413 | "This is the output" | 404 | "This is the output" |
| @@ -431,8 +422,8 @@ This is the @point{}output | |||
| 431 | @end group | 422 | @end group |
| 432 | 423 | ||
| 433 | @group | 424 | @group |
| 434 | m | 425 | (setq m (copy-marker 10)) |
| 435 | @result{} #<marker at 11 in foo> | 426 | @result{} #<marker at 10 in foo> |
| 436 | @end group | 427 | @end group |
| 437 | 428 | ||
| 438 | @group | 429 | @group |
| @@ -450,7 +441,7 @@ he @point{}output | |||
| 450 | 441 | ||
| 451 | @group | 442 | @group |
| 452 | m | 443 | m |
| 453 | @result{} #<marker at 35 in foo> | 444 | @result{} #<marker at 34 in foo> |
| 454 | @end group | 445 | @end group |
| 455 | @end example | 446 | @end example |
| 456 | 447 | ||
| @@ -723,6 +714,14 @@ In the second expression, the local binding of | |||
| 723 | @code{prin1}, but not during the printing of the result. | 714 | @code{prin1}, but not during the printing of the result. |
| 724 | @end defvar | 715 | @end defvar |
| 725 | 716 | ||
| 717 | @tindex print-escape-nonascii | ||
| 718 | @defvar print-escape-nonascii | ||
| 719 | If this variable is non-@code{nil}, then unibyte non-@sc{ASCII} | ||
| 720 | characters in strings are unconditionally printed as backslash sequences | ||
| 721 | by the print functions @code{prin1} and @code{print} that print with | ||
| 722 | quoting. | ||
| 723 | @end defvar | ||
| 724 | |||
| 726 | @defvar print-length | 725 | @defvar print-length |
| 727 | @cindex printing limits | 726 | @cindex printing limits |
| 728 | The value of this variable is the maximum number of elements to print in | 727 | The value of this variable is the maximum number of elements to print in |
diff --git a/lispref/strings.texi b/lispref/strings.texi index 5e511a5d331..dc4aaabb18e 100644 --- a/lispref/strings.texi +++ b/lispref/strings.texi | |||
| @@ -439,9 +439,9 @@ the string). The specified part of @var{string2} runs from index | |||
| 439 | @var{start2} up to index @var{end2} (default, the end of the string). | 439 | @var{start2} up to index @var{end2} (default, the end of the string). |
| 440 | 440 | ||
| 441 | The strings are both converted to multibyte for the comparison | 441 | The strings are both converted to multibyte for the comparison |
| 442 | (@pxref{Text Representations}) so that a unibyte string can be usefully | 442 | (@pxref{Text Representations}) so that a unibyte string can be equal to |
| 443 | compared with a multibyte string. If @var{ignore-case} is | 443 | a multibyte string. If @var{ignore-case} is non-@code{nil}, then case |
| 444 | non-@code{nil}, then case is ignored as well. | 444 | is ignored, so that upper case letters can be equal to lower case letters. |
| 445 | 445 | ||
| 446 | If the specified portions of the two strings match, the value is | 446 | If the specified portions of the two strings match, the value is |
| 447 | @code{t}. Otherwise, the value is an integer which indicates how many | 447 | @code{t}. Otherwise, the value is an integer which indicates how many |
diff --git a/lispref/syntax.texi b/lispref/syntax.texi index b6a5ea9a132..35cde861d15 100644 --- a/lispref/syntax.texi +++ b/lispref/syntax.texi | |||
| @@ -362,7 +362,7 @@ character, @samp{/}, does have the @samp{b} flag. | |||
| 362 | 362 | ||
| 363 | @item @samp{*/} | 363 | @item @samp{*/} |
| 364 | This is a comment-end sequence for ``a'' style because the first | 364 | This is a comment-end sequence for ``a'' style because the first |
| 365 | character, @samp{*}, does not have the @samp{b} flag | 365 | character, @samp{*}, does not have the @samp{b} flag. |
| 366 | 366 | ||
| 367 | @item newline | 367 | @item newline |
| 368 | This is a comment-end sequence for ``b'' style, because the newline | 368 | This is a comment-end sequence for ``b'' style, because the newline |
| @@ -542,10 +542,8 @@ This function moves point forward across characters having syntax classes | |||
| 542 | mentioned in @var{syntaxes}. It stops when it encounters the end of | 542 | mentioned in @var{syntaxes}. It stops when it encounters the end of |
| 543 | the buffer, or position @var{limit} (if specified), or a character it is | 543 | the buffer, or position @var{limit} (if specified), or a character it is |
| 544 | not supposed to skip. | 544 | not supposed to skip. |
| 545 | @ignore @c may want to change this. | ||
| 546 | The return value is the distance traveled, which is a nonnegative | 545 | The return value is the distance traveled, which is a nonnegative |
| 547 | integer. | 546 | integer. |
| 548 | @end ignore | ||
| 549 | @end defun | 547 | @end defun |
| 550 | 548 | ||
| 551 | @defun skip-syntax-backward syntaxes &optional limit | 549 | @defun skip-syntax-backward syntaxes &optional limit |
| @@ -553,10 +551,9 @@ This function moves point backward across characters whose syntax | |||
| 553 | classes are mentioned in @var{syntaxes}. It stops when it encounters | 551 | classes are mentioned in @var{syntaxes}. It stops when it encounters |
| 554 | the beginning of the buffer, or position @var{limit} (if specified), or a | 552 | the beginning of the buffer, or position @var{limit} (if specified), or a |
| 555 | character it is not supposed to skip. | 553 | character it is not supposed to skip. |
| 556 | @ignore @c may want to change this. | 554 | |
| 557 | The return value indicates the distance traveled. It is an integer that | 555 | The return value indicates the distance traveled. It is an integer that |
| 558 | is zero or less. | 556 | is zero or less. |
| 559 | @end ignore | ||
| 560 | @end defun | 557 | @end defun |
| 561 | 558 | ||
| 562 | @defun backward-prefix-chars | 559 | @defun backward-prefix-chars |
| @@ -598,7 +595,7 @@ stops when it comes to any character that starts a sexp. If | |||
| 598 | @var{stop-comment} is non-@code{nil}, parsing stops when it comes to the | 595 | @var{stop-comment} is non-@code{nil}, parsing stops when it comes to the |
| 599 | start of a comment. If @var{stop-comment} is the symbol | 596 | start of a comment. If @var{stop-comment} is the symbol |
| 600 | @code{syntax-table}, parsing stops after the start of a comment or a | 597 | @code{syntax-table}, parsing stops after the start of a comment or a |
| 601 | string, or the of a comment or a string, whichever comes first. | 598 | string, or the end of a comment or a string, whichever comes first. |
| 602 | 599 | ||
| 603 | @cindex parse state | 600 | @cindex parse state |
| 604 | The fifth argument @var{state} is a nine-element list of the same form | 601 | The fifth argument @var{state} is a nine-element list of the same form |
| @@ -893,7 +890,7 @@ in category table @var{table}. | |||
| 893 | @defun get-unused-category table | 890 | @defun get-unused-category table |
| 894 | This function returns a category name (a character) which is not | 891 | This function returns a category name (a character) which is not |
| 895 | currently defined in @var{table}. If all possible categories are in use | 892 | currently defined in @var{table}. If all possible categories are in use |
| 896 | in @var{table}, it returns @code{nil}, | 893 | in @var{table}, it returns @code{nil}. |
| 897 | @end defun | 894 | @end defun |
| 898 | 895 | ||
| 899 | @defun category-table | 896 | @defun category-table |
diff --git a/lispref/text.texi b/lispref/text.texi index 69f0c002293..f87b4f9948a 100644 --- a/lispref/text.texi +++ b/lispref/text.texi | |||
| @@ -42,6 +42,7 @@ buffer, together with their properties (when relevant). | |||
| 42 | How to control how much information is kept. | 42 | How to control how much information is kept. |
| 43 | * Filling:: Functions for explicit filling. | 43 | * Filling:: Functions for explicit filling. |
| 44 | * Margins:: How to specify margins for filling commands. | 44 | * Margins:: How to specify margins for filling commands. |
| 45 | * Adaptive Fill: Adaptive Fill mode chooses a fill prefix from context. | ||
| 45 | * Auto Filling:: How auto-fill mode is implemented to break lines. | 46 | * Auto Filling:: How auto-fill mode is implemented to break lines. |
| 46 | * Sorting:: Functions for sorting parts of the buffer. | 47 | * Sorting:: Functions for sorting parts of the buffer. |
| 47 | * Columns:: Computing horizontal positions, and using them. | 48 | * Columns:: Computing horizontal positions, and using them. |
| @@ -62,11 +63,12 @@ buffer, together with their properties (when relevant). | |||
| 62 | Several simple functions are described here. See also @code{looking-at} | 63 | Several simple functions are described here. See also @code{looking-at} |
| 63 | in @ref{Regexp Search}. | 64 | in @ref{Regexp Search}. |
| 64 | 65 | ||
| 65 | @defun char-after position | 66 | @defun char-after &optional position |
| 66 | This function returns the character in the current buffer at (i.e., | 67 | This function returns the character in the current buffer at (i.e., |
| 67 | immediately after) position @var{position}. If @var{position} is out of | 68 | immediately after) position @var{position}. If @var{position} is out of |
| 68 | range for this purpose, either before the beginning of the buffer, or at | 69 | range for this purpose, either before the beginning of the buffer, or at |
| 69 | or beyond the end, then the value is @code{nil}. | 70 | or beyond the end, then the value is @code{nil}. The default for |
| 71 | @var{position} is point. | ||
| 70 | 72 | ||
| 71 | In the following example, assume that the first character in the | 73 | In the following example, assume that the first character in the |
| 72 | buffer is @samp{@@}: | 74 | buffer is @samp{@@}: |
| @@ -79,11 +81,12 @@ buffer is @samp{@@}: | |||
| 79 | @end example | 81 | @end example |
| 80 | @end defun | 82 | @end defun |
| 81 | 83 | ||
| 82 | @defun char-before position | 84 | @defun char-before &optional position |
| 83 | This function returns the character in the current buffer immediately | 85 | This function returns the character in the current buffer immediately |
| 84 | before position @var{position}. If @var{position} is out of range for | 86 | before position @var{position}. If @var{position} is out of range for |
| 85 | this purpose, either before the beginning of the buffer, or at or beyond | 87 | this purpose, either before the beginning of the buffer, or at or beyond |
| 86 | the end, then the value is @code{nil}. | 88 | the end, then the value is @code{nil}. The default for |
| 89 | @var{position} is point. | ||
| 87 | @end defun | 90 | @end defun |
| 88 | 91 | ||
| 89 | @defun following-char | 92 | @defun following-char |
| @@ -449,9 +452,12 @@ Programs hardly ever use this function. | |||
| 449 | @end deffn | 452 | @end deffn |
| 450 | 453 | ||
| 451 | @defvar overwrite-mode | 454 | @defvar overwrite-mode |
| 452 | This variable controls whether overwrite mode is in effect: a | 455 | This variable controls whether overwrite mode is in effect. The value |
| 453 | non-@code{nil} value enables the mode. It is automatically made | 456 | should be @code{overwrite-mode-textual}, @code{overwrite-mode-binary}, |
| 454 | buffer-local when set in any fashion. | 457 | or @code{nil}. @code{overwrite-mode-textual} specifies textual |
| 458 | overwrite mode (treats newlines and tabs specially), and | ||
| 459 | @code{overwrite-mode-binary} specifies binary overwrite mode (treats | ||
| 460 | newlines and tabs like any other characters). | ||
| 455 | @end defvar | 461 | @end defvar |
| 456 | 462 | ||
| 457 | @node Deletion | 463 | @node Deletion |
| @@ -467,7 +473,7 @@ cases. | |||
| 467 | All of the deletion functions operate on the current buffer, and all | 473 | All of the deletion functions operate on the current buffer, and all |
| 468 | return a value of @code{nil}. | 474 | return a value of @code{nil}. |
| 469 | 475 | ||
| 470 | @defun erase-buffer | 476 | @deffn Command erase-buffer |
| 471 | This function deletes the entire text of the current buffer, leaving it | 477 | This function deletes the entire text of the current buffer, leaving it |
| 472 | empty. If the buffer is read-only, it signals a @code{buffer-read-only} | 478 | empty. If the buffer is read-only, it signals a @code{buffer-read-only} |
| 473 | error. Otherwise, it deletes the text without asking for any | 479 | error. Otherwise, it deletes the text without asking for any |
| @@ -478,7 +484,7 @@ auto-saving of that buffer ``because it has shrunk''. However, | |||
| 478 | @code{erase-buffer} does not do this, the idea being that the future | 484 | @code{erase-buffer} does not do this, the idea being that the future |
| 479 | text is not really related to the former text, and its size should not | 485 | text is not really related to the former text, and its size should not |
| 480 | be compared with that of the former text. | 486 | be compared with that of the former text. |
| 481 | @end defun | 487 | @end deffn |
| 482 | 488 | ||
| 483 | @deffn Command delete-region start end | 489 | @deffn Command delete-region start end |
| 484 | This command deletes the text in the current buffer in the region | 490 | This command deletes the text in the current buffer in the region |
| @@ -779,6 +785,12 @@ is convenient because it lets the user use all the kill commands to copy | |||
| 779 | text into the kill ring from a read-only buffer. | 785 | text into the kill ring from a read-only buffer. |
| 780 | @end deffn | 786 | @end deffn |
| 781 | 787 | ||
| 788 | @defopt kill-read-only-ok | ||
| 789 | If this option is non-@code{nil}, @code{kill-region} does not get an | ||
| 790 | error if the buffer is read-only. Instead, it simply returns, updating | ||
| 791 | the kill ring but not changing the buffer. | ||
| 792 | @end defopt | ||
| 793 | |||
| 782 | @deffn Command copy-region-as-kill start end | 794 | @deffn Command copy-region-as-kill start end |
| 783 | This command saves the region defined by @var{start} and @var{end} on | 795 | This command saves the region defined by @var{start} and @var{end} on |
| 784 | the kill ring (including text properties), but does not delete the text | 796 | the kill ring (including text properties), but does not delete the text |
| @@ -1000,10 +1012,11 @@ A value of @code{t} disables the recording of undo information. | |||
| 1000 | Here are the kinds of elements an undo list can have: | 1012 | Here are the kinds of elements an undo list can have: |
| 1001 | 1013 | ||
| 1002 | @table @code | 1014 | @table @code |
| 1003 | @item @var{integer} | 1015 | @item @var{position} |
| 1004 | This kind of element records a previous value of point. Ordinary cursor | 1016 | This kind of element records a previous value of point; undoing this |
| 1005 | motion does not get any sort of undo record, but deletion operations use | 1017 | element moves point to @var{position}. Ordinary cursor motion does not |
| 1006 | these entries to record where point was before the command. | 1018 | make any sort of undo record, but deletion operations use these entries |
| 1019 | to record where point was before the command. | ||
| 1007 | 1020 | ||
| 1008 | @item (@var{beg} . @var{end}) | 1021 | @item (@var{beg} . @var{end}) |
| 1009 | This kind of element indicates how to delete text that was inserted. | 1022 | This kind of element indicates how to delete text that was inserted. |
| @@ -1037,11 +1050,6 @@ relocated due to deletion of surrounding text, and that it moved | |||
| 1037 | @var{adjustment} character positions. Undoing this element moves | 1050 | @var{adjustment} character positions. Undoing this element moves |
| 1038 | @var{marker} @minus{} @var{adjustment} characters. | 1051 | @var{marker} @minus{} @var{adjustment} characters. |
| 1039 | 1052 | ||
| 1040 | @item @var{position} | ||
| 1041 | This element indicates where point was at an earlier time. Undoing this | ||
| 1042 | element sets point to @var{position}. Deletion normally creates an | ||
| 1043 | element of this kind as well as a reinsertion element. | ||
| 1044 | |||
| 1045 | @item nil | 1053 | @item nil |
| 1046 | This element is a boundary. The elements between two boundaries are | 1054 | This element is a boundary. The elements between two boundaries are |
| 1047 | called a @dfn{change group}; normally, each change group corresponds to | 1055 | called a @dfn{change group}; normally, each change group corresponds to |
| @@ -1185,11 +1193,16 @@ It uses the ordinary paragraph motion commands to find paragraph | |||
| 1185 | boundaries. @xref{Paragraphs,,, emacs, The Emacs Manual}. | 1193 | boundaries. @xref{Paragraphs,,, emacs, The Emacs Manual}. |
| 1186 | @end deffn | 1194 | @end deffn |
| 1187 | 1195 | ||
| 1188 | @deffn Command fill-region start end &optional justify | 1196 | @deffn Command fill-region start end &optional justify nosqueeze |
| 1189 | This command fills each of the paragraphs in the region from @var{start} | 1197 | This command fills each of the paragraphs in the region from @var{start} |
| 1190 | to @var{end}. It justifies as well if @var{justify} is | 1198 | to @var{end}. It justifies as well if @var{justify} is |
| 1191 | non-@code{nil}. | 1199 | non-@code{nil}. |
| 1192 | 1200 | ||
| 1201 | If @var{nosqueeze} is non-@code{nil}, that means to leave whitespace | ||
| 1202 | other than line breaks untouched. If @var{to-eop} is non-@code{nil}, | ||
| 1203 | that means to keep filling to the end of the paragraph---or next hard | ||
| 1204 | newline, if @code{use-hard-newlines} is enabled (see below). | ||
| 1205 | |||
| 1193 | The variable @code{paragraph-separate} controls how to distinguish | 1206 | The variable @code{paragraph-separate} controls how to distinguish |
| 1194 | paragraphs. @xref{Standard Regexps}. | 1207 | paragraphs. @xref{Standard Regexps}. |
| 1195 | @end deffn | 1208 | @end deffn |
| @@ -1220,7 +1233,7 @@ This variable alters the action of @code{fill-individual-paragraphs} as | |||
| 1220 | described above. | 1233 | described above. |
| 1221 | @end defopt | 1234 | @end defopt |
| 1222 | 1235 | ||
| 1223 | @deffn Command fill-region-as-paragraph start end &optional justify | 1236 | @deffn Command fill-region-as-paragraph start end &optional justify nosqueeze squeeze-after |
| 1224 | This command considers a region of text as a single paragraph and fills | 1237 | This command considers a region of text as a single paragraph and fills |
| 1225 | it. If the region was made up of many paragraphs, the blank lines | 1238 | it. If the region was made up of many paragraphs, the blank lines |
| 1226 | between paragraphs are removed. This function justifies as well as | 1239 | between paragraphs are removed. This function justifies as well as |
| @@ -1228,11 +1241,13 @@ filling when @var{justify} is non-@code{nil}. | |||
| 1228 | 1241 | ||
| 1229 | In an interactive call, any prefix argument requests justification. | 1242 | In an interactive call, any prefix argument requests justification. |
| 1230 | 1243 | ||
| 1231 | @cindex Adaptive Fill mode | 1244 | If @var{nosqueeze} is non-@code{nil}, that means to leave whitespace |
| 1232 | In Adaptive Fill mode, which is enabled by default, calling the function | 1245 | other than line breaks untouched. If @var{squeeze-after} is |
| 1233 | @code{fill-region-as-paragraph} on an indented paragraph when there is | 1246 | non-@code{nil}, specifies a position in the region, and means don't |
| 1234 | no fill prefix uses the indentation of the second line of the paragraph | 1247 | canonicalize spaces before that position. |
| 1235 | as the fill prefix. | 1248 | |
| 1249 | In Adaptive Fill mode, this command calls @code{fill-context-prefix} to | ||
| 1250 | choose a fill prefix by default. @xref{Adaptive Fill}. | ||
| 1236 | @end deffn | 1251 | @end deffn |
| 1237 | 1252 | ||
| 1238 | @deffn Command justify-current-line how eop nosqueeze | 1253 | @deffn Command justify-current-line how eop nosqueeze |
| @@ -1267,6 +1282,12 @@ This function returns the proper justification style to use for filling | |||
| 1267 | the text around point. | 1282 | the text around point. |
| 1268 | @end defun | 1283 | @end defun |
| 1269 | 1284 | ||
| 1285 | @defopt sentence-end-double-space | ||
| 1286 | If this variable is non-@code{nil}, a period followed by just one space | ||
| 1287 | does not count as the end of a sentence, and the filling functions | ||
| 1288 | avoid breaking the line at such a place. | ||
| 1289 | @end defopt | ||
| 1290 | |||
| 1270 | @defvar fill-paragraph-function | 1291 | @defvar fill-paragraph-function |
| 1271 | This variable provides a way for major modes to override the filling of | 1292 | This variable provides a way for major modes to override the filling of |
| 1272 | paragraphs. If the value is non-@code{nil}, @code{fill-paragraph} calls | 1293 | paragraphs. If the value is non-@code{nil}, @code{fill-paragraph} calls |
| @@ -1306,7 +1327,7 @@ together. The resulting filled lines also start with the fill prefix. | |||
| 1306 | The fill prefix follows the left margin whitespace, if any. | 1327 | The fill prefix follows the left margin whitespace, if any. |
| 1307 | @end defopt | 1328 | @end defopt |
| 1308 | 1329 | ||
| 1309 | @defvar fill-column | 1330 | @defopt fill-column |
| 1310 | This buffer-local variable specifies the maximum width of filled lines. | 1331 | This buffer-local variable specifies the maximum width of filled lines. |
| 1311 | Its value should be an integer, which is a number of columns. All the | 1332 | Its value should be an integer, which is a number of columns. All the |
| 1312 | filling, justification, and centering commands are affected by this | 1333 | filling, justification, and centering commands are affected by this |
| @@ -1316,7 +1337,7 @@ As a practical matter, if you are writing text for other people to | |||
| 1316 | read, you should set @code{fill-column} to no more than 70. Otherwise | 1337 | read, you should set @code{fill-column} to no more than 70. Otherwise |
| 1317 | the line will be too long for people to read comfortably, and this can | 1338 | the line will be too long for people to read comfortably, and this can |
| 1318 | make the text seem clumsy. | 1339 | make the text seem clumsy. |
| 1319 | @end defvar | 1340 | @end defopt |
| 1320 | 1341 | ||
| 1321 | @defvar default-fill-column | 1342 | @defvar default-fill-column |
| 1322 | The value of this variable is the default value for @code{fill-column} in | 1343 | The value of this variable is the default value for @code{fill-column} in |
| @@ -1392,6 +1413,50 @@ place where a break is being considered. If the function returns | |||
| 1392 | non-@code{nil}, then the line won't be broken there. | 1413 | non-@code{nil}, then the line won't be broken there. |
| 1393 | @end defvar | 1414 | @end defvar |
| 1394 | 1415 | ||
| 1416 | @node Adaptive Fill | ||
| 1417 | @section Adaptive Fill Mode | ||
| 1418 | @cindex Adaptive Fill mode | ||
| 1419 | |||
| 1420 | Adaptive Fill mode chooses a fill prefix automatically from the text | ||
| 1421 | in each paragraph being filled. | ||
| 1422 | |||
| 1423 | @defopt adaptive-fill-mode | ||
| 1424 | Adaptive Fill mode is enabled when this variable is non-@code{nil}. | ||
| 1425 | It is @code{t} by default. | ||
| 1426 | @end defopt | ||
| 1427 | |||
| 1428 | @defun fill-context-prefix from to | ||
| 1429 | This function implements the heart of Adaptive Fill mode; it chooses a | ||
| 1430 | fill prefix based on the text between @var{from} and @var{to}. It does | ||
| 1431 | this by looking at the first two lines of the paragraph, based on the | ||
| 1432 | variables described below. | ||
| 1433 | @end defun | ||
| 1434 | |||
| 1435 | @defopt adaptive-fill-regexp | ||
| 1436 | This variable holds a regular expression to control Adaptive Fill mode. | ||
| 1437 | Whichever characters starting after the line's left margin match this | ||
| 1438 | regular expression, those are the candidate for the fill prefix. | ||
| 1439 | @end defopt | ||
| 1440 | |||
| 1441 | @defopt adaptive-fill-first-line-regexp | ||
| 1442 | In a one-line paragraph, if the candidate fill prefix matches | ||
| 1443 | this regular expression, or if it matches @code{comment-start-skip}, | ||
| 1444 | then it is used---otherwise, it is replaced with an equivalent | ||
| 1445 | number of spaces. | ||
| 1446 | |||
| 1447 | However, the fill prefix is never taken from a one-line paragraph | ||
| 1448 | if it would act as a paragraph starter on subsequent lines. | ||
| 1449 | @end defopt | ||
| 1450 | |||
| 1451 | @defopt adaptive-fill-function | ||
| 1452 | You can specify more complex ways of choosing a fill prefix | ||
| 1453 | automatically by setting this variable to a function. The function is | ||
| 1454 | called when @code{adaptive-fill-regexp} does not match, with point after | ||
| 1455 | the left margin of a line, and it should return the appropriate fill | ||
| 1456 | prefix based on that line. If it returns @code{nil}, that means it sees | ||
| 1457 | no fill prefix in that line. | ||
| 1458 | @end defopt | ||
| 1459 | |||
| 1395 | @node Auto Filling | 1460 | @node Auto Filling |
| 1396 | @comment node-name, next, previous, up | 1461 | @comment node-name, next, previous, up |
| 1397 | @section Auto Filling | 1462 | @section Auto Filling |
| @@ -1513,10 +1578,11 @@ the sort order. | |||
| 1513 | @end group | 1578 | @end group |
| 1514 | @group | 1579 | @group |
| 1515 | (interactive "P\nr") | 1580 | (interactive "P\nr") |
| 1516 | (save-restriction | 1581 | (save-excursion |
| 1517 | (narrow-to-region beg end) | 1582 | (save-restriction |
| 1518 | (goto-char (point-min)) | 1583 | (narrow-to-region beg end) |
| 1519 | (sort-subr reverse 'forward-line 'end-of-line))) | 1584 | (goto-char (point-min)) |
| 1585 | (sort-subr reverse 'forward-line 'end-of-line)))) | ||
| 1520 | @end group | 1586 | @end group |
| 1521 | @end example | 1587 | @end example |
| 1522 | 1588 | ||
| @@ -1531,8 +1597,11 @@ its @code{sort-subr} call looks like this: | |||
| 1531 | @example | 1597 | @example |
| 1532 | @group | 1598 | @group |
| 1533 | (sort-subr reverse | 1599 | (sort-subr reverse |
| 1534 | (function | 1600 | (function |
| 1535 | (lambda () (skip-chars-forward "\n \t\f"))) | 1601 | (lambda () |
| 1602 | (while (and (not (eobp)) | ||
| 1603 | (looking-at paragraph-separate)) | ||
| 1604 | (forward-line 1)))) | ||
| 1536 | 'forward-paragraph) | 1605 | 'forward-paragraph) |
| 1537 | @end group | 1606 | @end group |
| 1538 | @end example | 1607 | @end example |
| @@ -1541,6 +1610,11 @@ Markers pointing into any sort records are left with no useful | |||
| 1541 | position after @code{sort-subr} returns. | 1610 | position after @code{sort-subr} returns. |
| 1542 | @end defun | 1611 | @end defun |
| 1543 | 1612 | ||
| 1613 | @defopt sort-fold-case | ||
| 1614 | If this variable is non-@code{nil}, @code{sort-subr} and the other | ||
| 1615 | buffer sorting functions ignore case when comparing strings. | ||
| 1616 | @end defopt | ||
| 1617 | |||
| 1544 | @deffn Command sort-regexp-fields reverse record-regexp key-regexp start end | 1618 | @deffn Command sort-regexp-fields reverse record-regexp key-regexp start end |
| 1545 | This command sorts the region between @var{start} and @var{end} | 1619 | This command sorts the region between @var{start} and @var{end} |
| 1546 | alphabetically as specified by @var{record-regexp} and @var{key-regexp}. | 1620 | alphabetically as specified by @var{record-regexp} and @var{key-regexp}. |
| @@ -1823,7 +1897,7 @@ but in some text modes, where @key{TAB} inserts a tab, | |||
| 1823 | @deffn Command reindent-then-newline-and-indent | 1897 | @deffn Command reindent-then-newline-and-indent |
| 1824 | @comment !!SourceFile simple.el | 1898 | @comment !!SourceFile simple.el |
| 1825 | This command reindents the current line, inserts a newline at point, | 1899 | This command reindents the current line, inserts a newline at point, |
| 1826 | and then reindents the new line (the one following the newline just | 1900 | and then indents the new line (the one following the newline just |
| 1827 | inserted). | 1901 | inserted). |
| 1828 | 1902 | ||
| 1829 | This command does indentation on both lines according to the current | 1903 | This command does indentation on both lines according to the current |
| @@ -3177,7 +3251,7 @@ end of the region just changed, and the length of the text that existed | |||
| 3177 | before the change. All three arguments are integers. The buffer that's | 3251 | before the change. All three arguments are integers. The buffer that's |
| 3178 | about to change is always the current buffer. | 3252 | about to change is always the current buffer. |
| 3179 | 3253 | ||
| 3180 | The length of the old text the difference between the buffer positions | 3254 | The length of the old text is the difference between the buffer positions |
| 3181 | before and after that text as it was before the change. As for the | 3255 | before and after that text as it was before the change. As for the |
| 3182 | changed text, its length is simply the difference between the first two | 3256 | changed text, its length is simply the difference between the first two |
| 3183 | arguments. | 3257 | arguments. |
diff --git a/lispref/tips.texi b/lispref/tips.texi index 264875768b9..5a1b6cc5dcf 100644 --- a/lispref/tips.texi +++ b/lispref/tips.texi | |||
| @@ -354,7 +354,7 @@ compiled specially (@pxref{Array Functions}): | |||
| 354 | @end example | 354 | @end example |
| 355 | 355 | ||
| 356 | @item | 356 | @item |
| 357 | If calling a small function accounts for a substantial part of your | 357 | If calling a small function accounts for a substantial part of your |
| 358 | program's running time, make the function inline. This eliminates | 358 | program's running time, make the function inline. This eliminates |
| 359 | the function call overhead. Since making a function inline reduces | 359 | the function call overhead. Since making a function inline reduces |
| 360 | the flexibility of changing the program, don't do it unless it gives | 360 | the flexibility of changing the program, don't do it unless it gives |
| @@ -396,7 +396,7 @@ that looks good. | |||
| 396 | 396 | ||
| 397 | @item | 397 | @item |
| 398 | For consistency, phrase the verb in the first sentence of a | 398 | For consistency, phrase the verb in the first sentence of a |
| 399 | documentation string as an infinitive with ``to'' omitted. For | 399 | function's documentation string as an infinitive with ``to'' omitted. For |
| 400 | instance, use ``Return the cons of A and B.'' in preference to ``Returns | 400 | instance, use ``Return the cons of A and B.'' in preference to ``Returns |
| 401 | the cons of A and B@.'' Usually it looks good to do likewise for the | 401 | the cons of A and B@.'' Usually it looks good to do likewise for the |
| 402 | rest of the first paragraph. Subsequent paragraphs usually look better | 402 | rest of the first paragraph. Subsequent paragraphs usually look better |
| @@ -478,8 +478,8 @@ t and nil without single-quotes. (In this manual, we use a different | |||
| 478 | convention, with single-quotes for all symbols.) | 478 | convention, with single-quotes for all symbols.) |
| 479 | @end ifinfo | 479 | @end ifinfo |
| 480 | 480 | ||
| 481 | Help mode automatically creates hyperlinks when documentation strings | 481 | Help mode automatically creates a hyperlink when a documentation string |
| 482 | use symbol names inside single quotes, when the symbol has either a | 482 | uses a symbol name inside single quotes, if the symbol has either a |
| 483 | function or a variable definition. You do not need to do anything | 483 | function or a variable definition. You do not need to do anything |
| 484 | special to make use of this feature. However, when a symbol has both a | 484 | special to make use of this feature. However, when a symbol has both a |
| 485 | function definition and a variable definition, and you want to refer to | 485 | function definition and a variable definition, and you want to refer to |
diff --git a/lispref/variables.texi b/lispref/variables.texi index 1451db07d06..4d46e19d0dc 100644 --- a/lispref/variables.texi +++ b/lispref/variables.texi | |||
| @@ -1073,7 +1073,7 @@ and/or frames is an important customization method. | |||
| 1073 | 1073 | ||
| 1074 | This section describes buffer-local bindings; for frame-local | 1074 | This section describes buffer-local bindings; for frame-local |
| 1075 | bindings, see the following section, @ref{Frame-Local Variables}. (A few | 1075 | bindings, see the following section, @ref{Frame-Local Variables}. (A few |
| 1076 | variables have bindings that are local to each X terminal; see | 1076 | variables have bindings that are local to each terminal; see |
| 1077 | @ref{Multiple Displays}.) | 1077 | @ref{Multiple Displays}.) |
| 1078 | 1078 | ||
| 1079 | @menu | 1079 | @menu |
diff --git a/lispref/windows.texi b/lispref/windows.texi index bd4bad02137..31151040e58 100644 --- a/lispref/windows.texi +++ b/lispref/windows.texi | |||
| @@ -252,10 +252,13 @@ characters; see @ref{Display Tables}. | |||
| 252 | @end deffn | 252 | @end deffn |
| 253 | 253 | ||
| 254 | @deffn Command split-window-vertically size | 254 | @deffn Command split-window-vertically size |
| 255 | This function splits the selected window into two windows, one above | 255 | This function splits the selected window into two windows, one above the |
| 256 | the other, leaving the selected window with @var{size} lines. | 256 | other, leaving the upper of the two window selected, with @var{size} |
| 257 | lines. (If @var{size} is negative, then the lower of the two windows | ||
| 258 | gets @minus{} @var{size} lines and the upper window gets the rest, but | ||
| 259 | the upper window is still the one selected.) | ||
| 257 | 260 | ||
| 258 | This function is simply an interface to @code{split-windows}. | 261 | This function is simply an interface to @code{split-window}. |
| 259 | Here is the complete function definition for it: | 262 | Here is the complete function definition for it: |
| 260 | 263 | ||
| 261 | @smallexample | 264 | @smallexample |
| @@ -272,7 +275,7 @@ Here is the complete function definition for it: | |||
| 272 | This function splits the selected window into two windows | 275 | This function splits the selected window into two windows |
| 273 | side-by-side, leaving the selected window with @var{size} columns. | 276 | side-by-side, leaving the selected window with @var{size} columns. |
| 274 | 277 | ||
| 275 | This function is simply an interface to @code{split-windows}. Here is | 278 | This function is simply an interface to @code{split-window}. Here is |
| 276 | the complete definition for @code{split-window-horizontally} (except for | 279 | the complete definition for @code{split-window-horizontally} (except for |
| 277 | part of the documentation string): | 280 | part of the documentation string): |
| 278 | 281 | ||
| @@ -366,16 +369,20 @@ where there is only one window), then the frame reverts to having a | |||
| 366 | single window showing another buffer chosen with @code{other-buffer}. | 369 | single window showing another buffer chosen with @code{other-buffer}. |
| 367 | @xref{The Buffer List}. | 370 | @xref{The Buffer List}. |
| 368 | 371 | ||
| 369 | The argument @var{frame} controls which frames to operate on: | 372 | The argument @var{frame} controls which frames to operate on. This |
| 373 | function does not use it in quite the same way as the other functions | ||
| 374 | which scan all windows; specifically, the values @code{t} and @code{nil} | ||
| 375 | have the opposite of their meanings in other functions. Here are the | ||
| 376 | full details: | ||
| 370 | 377 | ||
| 371 | @itemize @bullet | 378 | @itemize @bullet |
| 372 | @item | 379 | @item |
| 373 | If it is @code{nil}, operate on the selected frame. | 380 | If it is @code{nil}, operate on all frames. |
| 374 | @item | 381 | @item |
| 375 | If it is @code{t}, operate on all frames. | 382 | If it is @code{t}, operate on the selected frame. |
| 376 | @item | 383 | @item |
| 377 | If it is @code{visible}, operate on all visible frames. | 384 | If it is @code{visible}, operate on all visible frames. |
| 378 | @item 0 | 385 | @item |
| 379 | If it is 0, operate on all visible or iconified frames. | 386 | If it is 0, operate on all visible or iconified frames. |
| 380 | @item | 387 | @item |
| 381 | If it is a frame, operate on that frame. | 388 | If it is a frame, operate on that frame. |
| @@ -463,8 +470,8 @@ If there are two windows of the same size, then the function returns | |||
| 463 | the window that is first in the cyclic ordering of windows (see | 470 | the window that is first in the cyclic ordering of windows (see |
| 464 | following section), starting from the selected window. | 471 | following section), starting from the selected window. |
| 465 | 472 | ||
| 466 | The argument @var{frame} controls which set of windows are | 473 | The argument @var{frame} controls which set of windows to |
| 467 | considered. See @code{get-lru-window}, above. | 474 | consider. See @code{get-lru-window}, above. |
| 468 | @end defun | 475 | @end defun |
| 469 | 476 | ||
| 470 | @node Cyclic Window Ordering | 477 | @node Cyclic Window Ordering |
| @@ -677,7 +684,7 @@ This variable records the time at which a buffer was last made visible | |||
| 677 | in a window. It is always local in each buffer; each time | 684 | in a window. It is always local in each buffer; each time |
| 678 | @code{set-window-buffer} is called, it sets this variable to | 685 | @code{set-window-buffer} is called, it sets this variable to |
| 679 | @code{(current-time)} in the specified buffer (@pxref{Time of Day}). | 686 | @code{(current-time)} in the specified buffer (@pxref{Time of Day}). |
| 680 | When a buffer is first created, @code{buffer-display-count} starts out | 687 | When a buffer is first created, @code{buffer-display-time} starts out |
| 681 | with the value @code{nil}. | 688 | with the value @code{nil}. |
| 682 | @end defvar | 689 | @end defvar |
| 683 | 690 | ||
| @@ -704,9 +711,9 @@ functions work by calling @code{set-window-buffer}. | |||
| 704 | current so that a Lisp program can access or modify it; they are too | 711 | current so that a Lisp program can access or modify it; they are too |
| 705 | drastic for that purpose, since they change the display of buffers in | 712 | drastic for that purpose, since they change the display of buffers in |
| 706 | windows, which would be gratuitous and surprise the user. Instead, use | 713 | windows, which would be gratuitous and surprise the user. Instead, use |
| 707 | @code{set-buffer} (@pxref{Current Buffer}) and @code{save-excursion} | 714 | @code{set-buffer} and @code{save-current-buffer} (@pxref{Current |
| 708 | (@pxref{Excursions}), which designate buffers as current for programmed | 715 | Buffer}), which designate buffers as current for programmed access |
| 709 | access without affecting the display of buffers in windows. | 716 | without affecting the display of buffers in windows. |
| 710 | 717 | ||
| 711 | @deffn Command switch-to-buffer buffer-or-name &optional norecord | 718 | @deffn Command switch-to-buffer buffer-or-name &optional norecord |
| 712 | This function makes @var{buffer-or-name} the current buffer, and also | 719 | This function makes @var{buffer-or-name} the current buffer, and also |
| @@ -824,11 +831,23 @@ function does nothing. | |||
| 824 | @var{buffer-or-name}. | 831 | @var{buffer-or-name}. |
| 825 | 832 | ||
| 826 | If the argument @var{frame} is non-@code{nil}, it specifies which frames | 833 | If the argument @var{frame} is non-@code{nil}, it specifies which frames |
| 827 | to check when deciding whether the buffer is already displayed. Its | 834 | to check when deciding whether the buffer is already displayed. If the |
| 828 | value means the same thing as in functions @code{get-buffer-window} | 835 | buffer is already displayed in some window on one of these frames, |
| 829 | (@pxref{Buffers and Windows}). If the buffer is already displayed | 836 | @code{display-buffer} simply returns that window. Here are the possible |
| 830 | in some window on one of these frames, @code{display-buffer} simply | 837 | values of @var{frame}: |
| 831 | returns that window. | 838 | |
| 839 | @itemize @bullet | ||
| 840 | @item | ||
| 841 | If it is @code{nil}, consider windows on the selected frame. | ||
| 842 | @item | ||
| 843 | If it is @code{t}, consider windows on all frames. | ||
| 844 | @item | ||
| 845 | If it is @code{visible}, consider windows on all visible frames. | ||
| 846 | @item | ||
| 847 | If it is 0, consider windows on all visible or iconified frames. | ||
| 848 | @item | ||
| 849 | If it is a frame, consider windows on that frame. | ||
| 850 | @end itemize | ||
| 832 | 851 | ||
| 833 | Precisely how @code{display-buffer} finds or creates a window depends on | 852 | Precisely how @code{display-buffer} finds or creates a window depends on |
| 834 | the variables described below. | 853 | the variables described below. |
| @@ -882,7 +901,7 @@ This variable holds an alist specifying frame parameters used when | |||
| 882 | more information about frame parameters. | 901 | more information about frame parameters. |
| 883 | @end defvar | 902 | @end defvar |
| 884 | 903 | ||
| 885 | @defvar special-display-buffer-names | 904 | @defopt special-display-buffer-names |
| 886 | A list of buffer names for buffers that should be displayed specially. | 905 | A list of buffer names for buffers that should be displayed specially. |
| 887 | If the buffer's name is in this list, @code{display-buffer} handles the | 906 | If the buffer's name is in this list, @code{display-buffer} handles the |
| 888 | buffer specially. | 907 | buffer specially. |
| @@ -895,9 +914,9 @@ frame. There are two possibilities for the rest of the list. It can be | |||
| 895 | an alist, specifying frame parameters, or it can contain a function and | 914 | an alist, specifying frame parameters, or it can contain a function and |
| 896 | arguments to give to it. (The function's first argument is always the | 915 | arguments to give to it. (The function's first argument is always the |
| 897 | buffer to be displayed; the arguments from the list come after that.) | 916 | buffer to be displayed; the arguments from the list come after that.) |
| 898 | @end defvar | 917 | @end defopt |
| 899 | 918 | ||
| 900 | @defvar special-display-regexps | 919 | @defopt special-display-regexps |
| 901 | A list of regular expressions that specify buffers that should be | 920 | A list of regular expressions that specify buffers that should be |
| 902 | displayed specially. If the buffer's name matches any of the regular | 921 | displayed specially. If the buffer's name matches any of the regular |
| 903 | expressions in this list, @code{display-buffer} handles the buffer | 922 | expressions in this list, @code{display-buffer} handles the buffer |
| @@ -908,7 +927,7 @@ By default, special display means to give the buffer a dedicated frame. | |||
| 908 | If an element is a list, instead of a string, then the @sc{car} of the | 927 | If an element is a list, instead of a string, then the @sc{car} of the |
| 909 | list is the regular expression, and the rest of the list says how to | 928 | list is the regular expression, and the rest of the list says how to |
| 910 | create the frame. See above, under @code{special-display-buffer-names}. | 929 | create the frame. See above, under @code{special-display-buffer-names}. |
| 911 | @end defvar | 930 | @end defopt |
| 912 | 931 | ||
| 913 | @defvar special-display-function | 932 | @defvar special-display-function |
| 914 | This variable holds the function to call to display a buffer specially. | 933 | This variable holds the function to call to display a buffer specially. |
| @@ -1084,7 +1103,7 @@ If the last redisplay of @var{window} was preempted, and did not finish, | |||
| 1084 | Emacs does not know the position of the end of display in that window. | 1103 | Emacs does not know the position of the end of display in that window. |
| 1085 | In that case, this function returns @code{nil}. | 1104 | In that case, this function returns @code{nil}. |
| 1086 | 1105 | ||
| 1087 | If you @var{update} is non-@code{nil}, @code{window-end} always returns | 1106 | If @var{update} is non-@code{nil}, @code{window-end} always returns |
| 1088 | an up-to-date value for where the window ends. If the saved value is | 1107 | an up-to-date value for where the window ends. If the saved value is |
| 1089 | valid, @code{window-end} returns that; otherwise it computes the correct | 1108 | valid, @code{window-end} returns that; otherwise it computes the correct |
| 1090 | value by scanning the buffer text. | 1109 | value by scanning the buffer text. |
| @@ -1253,13 +1272,38 @@ If this variable is non-@code{nil}, it tells @code{scroll-other-window} | |||
| 1253 | which buffer to scroll. | 1272 | which buffer to scroll. |
| 1254 | @end defvar | 1273 | @end defvar |
| 1255 | 1274 | ||
| 1256 | @defopt scroll-step | 1275 | @tindex scroll-margin |
| 1276 | @defopt scroll-margin | ||
| 1277 | This option specifies the size of the scroll margin---a minimum number | ||
| 1278 | of lines between point and the top or bottom of a window. Whenever | ||
| 1279 | point gets within this many lines of the top or bottom of the window, | ||
| 1280 | the window scrolls automatically (if possible) to move point out of the | ||
| 1281 | margin, closer to the center of the window. | ||
| 1282 | @end defopt | ||
| 1283 | |||
| 1284 | @tindex scroll-conservatively | ||
| 1285 | @defopt scroll-conservatively | ||
| 1257 | This variable controls how scrolling is done automatically when point | 1286 | This variable controls how scrolling is done automatically when point |
| 1258 | moves off the screen. If the value is zero, then redisplay scrolls the | 1287 | moves off the screen (or into the scroll margin). If the value is zero, |
| 1259 | text to center point vertically in the window. If the value is a | 1288 | then redisplay scrolls the text to center point vertically in the |
| 1260 | positive integer @var{n}, then redisplay brings point back on screen by | 1289 | window. If the value is a positive integer @var{n}, then redisplay |
| 1261 | scrolling @var{n} lines in either direction, if possible; otherwise, it | 1290 | scrolls the window up to @var{n} lines in either direction, if that will |
| 1262 | centers point. The default value is zero. | 1291 | bring point back into view. Otherwise, it centers point. The default |
| 1292 | value is zero. | ||
| 1293 | @end defopt | ||
| 1294 | |||
| 1295 | @defopt scroll-step | ||
| 1296 | This variable is an older variant of @code{scroll-conservatively}. The | ||
| 1297 | difference is that it if its value is @var{n}, that permits scrolling | ||
| 1298 | only by precisely @var{n} lines, not a smaller number. This feature | ||
| 1299 | does not work with @code{scroll-margin}. The default value is zero. | ||
| 1300 | @end defopt | ||
| 1301 | |||
| 1302 | @tindex scroll-preserve-screen-position | ||
| 1303 | @defopt scroll-preserve-screen-position | ||
| 1304 | If this option is non-@code{nil}, the scroll functions move point so | ||
| 1305 | that the vertical position of the cursor is unchanged, when that is | ||
| 1306 | possible. | ||
| 1263 | @end defopt | 1307 | @end defopt |
| 1264 | 1308 | ||
| 1265 | @defopt next-screen-context-lines | 1309 | @defopt next-screen-context-lines |
| @@ -1608,6 +1652,17 @@ It could be defined as follows: | |||
| 1608 | @end example | 1652 | @end example |
| 1609 | @end deffn | 1653 | @end deffn |
| 1610 | 1654 | ||
| 1655 | @deffn Command shrink-window-if-larger-than-buffer window | ||
| 1656 | This command shrinks @var{window} to be as small as possible while still | ||
| 1657 | showing the full contents of its buffer---but not less than | ||
| 1658 | @code{window-min-height} lines. | ||
| 1659 | |||
| 1660 | However, the command does nothing if the window is already too small to | ||
| 1661 | display the whole text of the buffer, or if part of the contents are | ||
| 1662 | currently scrolled off screen, or if the window is not the full width of | ||
| 1663 | its frame, or if the window is the only window in its frame. | ||
| 1664 | @end deffn | ||
| 1665 | |||
| 1611 | @cindex minimum window size | 1666 | @cindex minimum window size |
| 1612 | The following two variables constrain the window-size-changing | 1667 | The following two variables constrain the window-size-changing |
| 1613 | functions to a minimum height and width. | 1668 | functions to a minimum height and width. |
| @@ -1624,7 +1679,7 @@ less than two. The default value is 4. | |||
| 1624 | 1679 | ||
| 1625 | @defopt window-min-width | 1680 | @defopt window-min-width |
| 1626 | The value of this variable determines how narrow a window may become | 1681 | The value of this variable determines how narrow a window may become |
| 1627 | before it automatically deleted. Making a window smaller than | 1682 | before it is automatically deleted. Making a window smaller than |
| 1628 | @code{window-min-width} automatically deletes it, and no window may be | 1683 | @code{window-min-width} automatically deletes it, and no window may be |
| 1629 | created narrower than this. The absolute minimum width is one; any | 1684 | created narrower than this. The absolute minimum width is one; any |
| 1630 | value below that is ignored. The default value is 10. | 1685 | value below that is ignored. The default value is 10. |
| @@ -1813,12 +1868,9 @@ display-start position. | |||
| 1813 | 1868 | ||
| 1814 | Displaying a different buffer in the window also runs these functions. | 1869 | Displaying a different buffer in the window also runs these functions. |
| 1815 | 1870 | ||
| 1816 | These functions cannot expect @code{window-end} (@pxref{Window Start}) | 1871 | These functions must be careful in using @code{window-end} |
| 1817 | to return a meaningful value, because that value is updated only by | 1872 | (@pxref{Window Start}); if you need an up-to-date value, you must use |
| 1818 | redisplaying the buffer. So if one of these functions needs to know the | 1873 | the @var{update} argument to ensure you get it. |
| 1819 | last character that will fit in the window with its current | ||
| 1820 | display-start position, it has to find that character using | ||
| 1821 | @code{vertical-motion} (@pxref{Screen Lines}). | ||
| 1822 | @end defvar | 1874 | @end defvar |
| 1823 | 1875 | ||
| 1824 | @defvar window-size-change-functions | 1876 | @defvar window-size-change-functions |
| @@ -1846,7 +1898,7 @@ Windows}) is what you need here. | |||
| 1846 | 1898 | ||
| 1847 | @defvar redisplay-end-trigger-functions | 1899 | @defvar redisplay-end-trigger-functions |
| 1848 | @tindex redisplay-end-trigger-functions | 1900 | @tindex redisplay-end-trigger-functions |
| 1849 | This abnormal hook is run whenever redisplay in window uses text that | 1901 | This abnormal hook is run whenever redisplay in a window uses text that |
| 1850 | extends past a specified end trigger position. You set the end trigger | 1902 | extends past a specified end trigger position. You set the end trigger |
| 1851 | position with the function @code{set-window-redisplay-end-trigger}. The | 1903 | position with the function @code{set-window-redisplay-end-trigger}. The |
| 1852 | functions are called with two arguments: the window, and the end trigger | 1904 | functions are called with two arguments: the window, and the end trigger |