diff options
| author | Richard M. Stallman | 1999-10-09 18:07:32 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1999-10-09 18:07:32 +0000 |
| commit | 29b677db48bdfe1177d3b460a764f9b237ff2c19 (patch) | |
| tree | 510fea68034e7dae11fc2f49cca4d9e5778d5248 | |
| parent | d177c5835233dd811adad081cfc86e2f2f29d7bb (diff) | |
| download | emacs-29b677db48bdfe1177d3b460a764f9b237ff2c19.tar.gz emacs-29b677db48bdfe1177d3b460a764f9b237ff2c19.zip | |
*** empty log message ***
| -rw-r--r-- | lispref/backups.texi | 60 | ||||
| -rw-r--r-- | lispref/buffers.texi | 7 | ||||
| -rw-r--r-- | lispref/customize.texi | 2 | ||||
| -rw-r--r-- | lispref/modes.texi | 4 |
4 files changed, 49 insertions, 24 deletions
diff --git a/lispref/backups.texi b/lispref/backups.texi index 463ed5eb278..30c081c792a 100644 --- a/lispref/backups.texi +++ b/lispref/backups.texi | |||
| @@ -61,7 +61,7 @@ saving the buffer the first time. | |||
| 61 | been backed up on account of this buffer. If it is non-@code{nil}, then | 61 | been backed up on account of this buffer. If it is non-@code{nil}, then |
| 62 | the backup file has been written. Otherwise, the file should be backed | 62 | the backup file has been written. Otherwise, the file should be backed |
| 63 | up when it is next saved (if backups are enabled). This is a | 63 | up when it is next saved (if backups are enabled). This is a |
| 64 | permanent local; @code{kill-local-variables} does not alter it. | 64 | permanent local; @code{kill-all-local-variables} does not alter it. |
| 65 | @end defvar | 65 | @end defvar |
| 66 | 66 | ||
| 67 | @defopt make-backup-files | 67 | @defopt make-backup-files |
| @@ -241,9 +241,10 @@ versions to delete, but does not delete them itself. | |||
| 241 | 241 | ||
| 242 | @tindex delete-old-versions | 242 | @tindex delete-old-versions |
| 243 | @defopt delete-old-versions | 243 | @defopt delete-old-versions |
| 244 | If this variable is non-@code{nil}, then saving a file deletes excess | 244 | If this variable is @code{t}, then saving a file deletes excess |
| 245 | backup versions silently. Otherwise, it asks the user whether to delete | 245 | backup versions silently. If it is @code{nil}, that means |
| 246 | them. | 246 | to ask for confirmation before deleting excess backups. |
| 247 | Otherwise, they are not deleted at all. | ||
| 247 | @end defopt | 248 | @end defopt |
| 248 | 249 | ||
| 249 | @defopt dired-kept-versions | 250 | @defopt dired-kept-versions |
| @@ -283,7 +284,7 @@ The standard definition of this function is as follows: | |||
| 283 | (defun backup-file-name-p (file) | 284 | (defun backup-file-name-p (file) |
| 284 | "Return non-nil if FILE is a backup file \ | 285 | "Return non-nil if FILE is a backup file \ |
| 285 | name (numeric or not)..." | 286 | name (numeric or not)..." |
| 286 | (string-match "~$" file)) | 287 | (string-match "~\\'" file)) |
| 287 | @end group | 288 | @end group |
| 288 | @end smallexample | 289 | @end smallexample |
| 289 | 290 | ||
| @@ -308,7 +309,7 @@ as follows: | |||
| 308 | @smallexample | 309 | @smallexample |
| 309 | @group | 310 | @group |
| 310 | (defun make-backup-file-name (file) | 311 | (defun make-backup-file-name (file) |
| 311 | "Create the non-numeric backup file name for FILE@enddots{}" | 312 | "Create the non-numeric backup file name for FILE..." |
| 312 | (concat file "~")) | 313 | (concat file "~")) |
| 313 | @end group | 314 | @end group |
| 314 | @end smallexample | 315 | @end smallexample |
| @@ -391,7 +392,7 @@ should not be auto-saved. | |||
| 391 | @example | 392 | @example |
| 392 | @group | 393 | @group |
| 393 | buffer-auto-save-file-name | 394 | buffer-auto-save-file-name |
| 394 | => "/xcssun/users/rms/lewis/#files.texi#" | 395 | @result{} "/xcssun/users/rms/lewis/#backups.texi#" |
| 395 | @end group | 396 | @end group |
| 396 | @end example | 397 | @end example |
| 397 | @end defvar | 398 | @end defvar |
| @@ -399,7 +400,7 @@ buffer-auto-save-file-name | |||
| 399 | @deffn Command auto-save-mode arg | 400 | @deffn Command auto-save-mode arg |
| 400 | When used interactively without an argument, this command is a toggle | 401 | When used interactively without an argument, this command is a toggle |
| 401 | switch: it turns on auto-saving of the current buffer if it is off, and | 402 | switch: it turns on auto-saving of the current buffer if it is off, and |
| 402 | vice-versa. With an argument @var{arg}, the command turns auto-saving | 403 | vice versa. With an argument @var{arg}, the command turns auto-saving |
| 403 | on if the value of @var{arg} is @code{t}, a nonempty list, or a positive | 404 | on if the value of @var{arg} is @code{t}, a nonempty list, or a positive |
| 404 | integer. Otherwise, it turns auto-saving off. | 405 | integer. Otherwise, it turns auto-saving off. |
| 405 | @end deffn | 406 | @end deffn |
| @@ -414,14 +415,14 @@ name. The argument @var{filename} should not contain a directory part. | |||
| 414 | @example | 415 | @example |
| 415 | @group | 416 | @group |
| 416 | (make-auto-save-file-name) | 417 | (make-auto-save-file-name) |
| 417 | @result{} "/xcssun/users/rms/lewis/#files.texi#" | 418 | @result{} "/xcssun/users/rms/lewis/#backups.texi#" |
| 418 | @end group | 419 | @end group |
| 419 | @group | 420 | @group |
| 420 | (auto-save-file-name-p "#files.texi#") | 421 | (auto-save-file-name-p "#backups.texi#") |
| 421 | @result{} 0 | 422 | @result{} 0 |
| 422 | @end group | 423 | @end group |
| 423 | @group | 424 | @group |
| 424 | (auto-save-file-name-p "files.texi") | 425 | (auto-save-file-name-p "backups.texi") |
| 425 | @result{} nil | 426 | @result{} nil |
| 426 | @end group | 427 | @end group |
| 427 | @end example | 428 | @end example |
| @@ -452,7 +453,7 @@ function should check that variable first. | |||
| 452 | @example | 453 | @example |
| 453 | @group | 454 | @group |
| 454 | (make-auto-save-file-name) | 455 | (make-auto-save-file-name) |
| 455 | @result{} "/xcssun/users/rms/lewis/#backup.texi#" | 456 | @result{} "/xcssun/users/rms/lewis/#backups.texi#" |
| 456 | @end group | 457 | @end group |
| 457 | @end example | 458 | @end example |
| 458 | 459 | ||
| @@ -462,7 +463,7 @@ The standard definition of this function is as follows: | |||
| 462 | @group | 463 | @group |
| 463 | (defun make-auto-save-file-name () | 464 | (defun make-auto-save-file-name () |
| 464 | "Return file name to use for auto-saves \ | 465 | "Return file name to use for auto-saves \ |
| 465 | of current buffer@enddots{}" | 466 | of current buffer.." |
| 466 | (if buffer-file-name | 467 | (if buffer-file-name |
| 467 | @end group | 468 | @end group |
| 468 | @group | 469 | @group |
| @@ -516,9 +517,14 @@ enabled. | |||
| 516 | @defopt auto-save-timeout | 517 | @defopt auto-save-timeout |
| 517 | The value of this variable is the number of seconds of idle time that | 518 | The value of this variable is the number of seconds of idle time that |
| 518 | should cause auto-saving. Each time the user pauses for this long, | 519 | should cause auto-saving. Each time the user pauses for this long, |
| 519 | Emacs does auto-saving for all buffers in which that is enabled. | 520 | Emacs does auto-saving for all buffers in which that is enabled. (If |
| 520 | (Actually, the specified timeout is multiplied by a factor depending on | 521 | the current buffer is large, the specified timeout is multiplied by a |
| 521 | the size of the current buffer.) | 522 | factor that depends increases as the size increases; for a million-byte |
| 523 | buffer, the factor is almost 4.) | ||
| 524 | |||
| 525 | If the value is zero or nil, then auto-saving is not done as a result | ||
| 526 | of idleness, only after a certain number of input events | ||
| 527 | as specified by @code{auto-save-interval}. | ||
| 522 | @end defopt | 528 | @end defopt |
| 523 | 529 | ||
| 524 | @defvar auto-save-hook | 530 | @defvar auto-save-hook |
| @@ -595,6 +601,15 @@ with @samp{.saves-}. It also contains the Emacs process @sc{id} and the | |||
| 595 | host name. | 601 | host name. |
| 596 | @end defvar | 602 | @end defvar |
| 597 | 603 | ||
| 604 | @defvar auto-save-list-file-prefix | ||
| 605 | @tindex auto-save-list-file-prefix | ||
| 606 | After Emacs reads your init file, it initializes | ||
| 607 | @code{auto-save-list-file-name} (if you have not already set it | ||
| 608 | non-@code{nil}) based on this prefix, adding the host name and process | ||
| 609 | ID. If you set this to @code{nil} in your init file, then Emacs does | ||
| 610 | not initialize @code{auto-save-list-file-name}. | ||
| 611 | @end defvar | ||
| 612 | |||
| 598 | @node Reverting | 613 | @node Reverting |
| 599 | @section Reverting | 614 | @section Reverting |
| 600 | 615 | ||
| @@ -629,7 +644,7 @@ the buffer. Preserving any additional markers would be problematical. | |||
| 629 | @end deffn | 644 | @end deffn |
| 630 | 645 | ||
| 631 | You can customize how @code{revert-buffer} does its work by setting | 646 | You can customize how @code{revert-buffer} does its work by setting |
| 632 | these variables---typically, as buffer-local variables. | 647 | the variables described in the rest of this section. |
| 633 | 648 | ||
| 634 | @defvar revert-without-query | 649 | @defvar revert-without-query |
| 635 | This variable holds a list of files that should be reverted without | 650 | This variable holds a list of files that should be reverted without |
| @@ -639,6 +654,9 @@ on disk but the buffer is not modified, then @code{revert-buffer} | |||
| 639 | reverts the file without asking the user for confirmation. | 654 | reverts the file without asking the user for confirmation. |
| 640 | @end defvar | 655 | @end defvar |
| 641 | 656 | ||
| 657 | Some major modes customize @code{revert-buffer} by making | ||
| 658 | buffer-local bindings for these variables: | ||
| 659 | |||
| 642 | @defvar revert-buffer-function | 660 | @defvar revert-buffer-function |
| 643 | The value of this variable is the function to use to revert this buffer. | 661 | The value of this variable is the function to use to revert this buffer. |
| 644 | If non-@code{nil}, it is called as a function with no arguments to do | 662 | If non-@code{nil}, it is called as a function with no arguments to do |
| @@ -647,7 +665,7 @@ usual way. | |||
| 647 | 665 | ||
| 648 | Modes such as Dired mode, in which the text being edited does not | 666 | Modes such as Dired mode, in which the text being edited does not |
| 649 | consist of a file's contents but can be regenerated in some other | 667 | consist of a file's contents but can be regenerated in some other |
| 650 | fashion, give this variable a buffer-local value that is a function to | 668 | fashion, can give this variable a buffer-local value that is a function to |
| 651 | regenerate the contents. | 669 | regenerate the contents. |
| 652 | @end defvar | 670 | @end defvar |
| 653 | 671 | ||
| @@ -656,6 +674,12 @@ The value of this variable, if non-@code{nil}, specifies the function to use to | |||
| 656 | insert the updated contents when reverting this buffer. The function | 674 | insert the updated contents when reverting this buffer. The function |
| 657 | receives two arguments: first the file name to use; second, @code{t} if | 675 | receives two arguments: first the file name to use; second, @code{t} if |
| 658 | the user has asked to read the auto-save file. | 676 | the user has asked to read the auto-save file. |
| 677 | |||
| 678 | The reason for a mode to set this variable instead of | ||
| 679 | @code{revert-buffer-function} is to avoid duplicating or replacing the | ||
| 680 | rest of what @code{revert-buffer} does: asking for confirmation, | ||
| 681 | clearing the undo list, deciding the proper major mode, and running the | ||
| 682 | hooks listed below. | ||
| 659 | @end defvar | 683 | @end defvar |
| 660 | 684 | ||
| 661 | @defvar before-revert-hook | 685 | @defvar before-revert-hook |
diff --git a/lispref/buffers.texi b/lispref/buffers.texi index 670b147a3b8..098dfd88463 100644 --- a/lispref/buffers.texi +++ b/lispref/buffers.texi | |||
| @@ -370,7 +370,8 @@ supplied, it defaults to the current buffer. | |||
| 370 | @defvar buffer-file-name | 370 | @defvar buffer-file-name |
| 371 | This buffer-local variable contains the name of the file being visited | 371 | This buffer-local variable contains the name of the file being visited |
| 372 | in the current buffer, or @code{nil} if it is not visiting a file. It | 372 | in the current buffer, or @code{nil} if it is not visiting a file. It |
| 373 | is a permanent local variable, unaffected by @code{kill-local-variables}. | 373 | is a permanent local variable, unaffected by |
| 374 | @code{kill-all-local-variables}. | ||
| 374 | 375 | ||
| 375 | @example | 376 | @example |
| 376 | @group | 377 | @group |
| @@ -389,14 +390,14 @@ Emacs. | |||
| 389 | @defvar buffer-file-truename | 390 | @defvar buffer-file-truename |
| 390 | This buffer-local variable holds the truename of the file visited in the | 391 | This buffer-local variable holds the truename of the file visited in the |
| 391 | current buffer, or @code{nil} if no file is visited. It is a permanent | 392 | current buffer, or @code{nil} if no file is visited. It is a permanent |
| 392 | local, unaffected by @code{kill-local-variables}. @xref{Truenames}. | 393 | local, unaffected by @code{kill-all-local-variables}. @xref{Truenames}. |
| 393 | @end defvar | 394 | @end defvar |
| 394 | 395 | ||
| 395 | @defvar buffer-file-number | 396 | @defvar buffer-file-number |
| 396 | This buffer-local variable holds the file number and directory device | 397 | This buffer-local variable holds the file number and directory device |
| 397 | number of the file visited in the current buffer, or @code{nil} if no | 398 | number of the file visited in the current buffer, or @code{nil} if no |
| 398 | file or a nonexistent file is visited. It is a permanent local, | 399 | file or a nonexistent file is visited. It is a permanent local, |
| 399 | unaffected by @code{kill-local-variables}. | 400 | unaffected by @code{kill-all-local-variables}. |
| 400 | 401 | ||
| 401 | The value is normally a list of the form @code{(@var{filenum} | 402 | The value is normally a list of the form @code{(@var{filenum} |
| 402 | @var{devnum})}. This pair of numbers uniquely identifies the file among | 403 | @var{devnum})}. This pair of numbers uniquely identifies the file among |
diff --git a/lispref/customize.texi b/lispref/customize.texi index ff5f724cd74..555799c620d 100644 --- a/lispref/customize.texi +++ b/lispref/customize.texi | |||
| @@ -267,7 +267,7 @@ Keywords}. Here is an example, from the library @file{paren.el}: | |||
| 267 | 267 | ||
| 268 | @example | 268 | @example |
| 269 | (defcustom show-paren-mode nil | 269 | (defcustom show-paren-mode nil |
| 270 | "Toggle Show Paren mode@enddots{}" | 270 | "Toggle Show Paren mode..." |
| 271 | :set (lambda (symbol value) | 271 | :set (lambda (symbol value) |
| 272 | (show-paren-mode (or value 0))) | 272 | (show-paren-mode (or value 0))) |
| 273 | :initialize 'custom-initialize-default | 273 | :initialize 'custom-initialize-default |
diff --git a/lispref/modes.texi b/lispref/modes.texi index b783e0b5d2c..b0bb00771f7 100644 --- a/lispref/modes.texi +++ b/lispref/modes.texi | |||
| @@ -322,7 +322,7 @@ inherit all the commands defined in this map.") | |||
| 322 | @smallexample | 322 | @smallexample |
| 323 | @group | 323 | @group |
| 324 | (defun text-mode () | 324 | (defun text-mode () |
| 325 | "Major mode for editing text intended for humans to read@enddots{} | 325 | "Major mode for editing text intended for humans to read... |
| 326 | Special commands: \\@{text-mode-map@} | 326 | Special commands: \\@{text-mode-map@} |
| 327 | @end group | 327 | @end group |
| 328 | @group | 328 | @group |
| @@ -459,7 +459,7 @@ And here is the code to set up the keymap for Lisp mode: | |||
| 459 | @smallexample | 459 | @smallexample |
| 460 | @group | 460 | @group |
| 461 | (defvar lisp-mode-map () | 461 | (defvar lisp-mode-map () |
| 462 | "Keymap for ordinary Lisp mode@enddots{}") | 462 | "Keymap for ordinary Lisp mode...") |
| 463 | 463 | ||
| 464 | (if lisp-mode-map | 464 | (if lisp-mode-map |
| 465 | () | 465 | () |