aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1999-10-09 18:07:32 +0000
committerRichard M. Stallman1999-10-09 18:07:32 +0000
commit29b677db48bdfe1177d3b460a764f9b237ff2c19 (patch)
tree510fea68034e7dae11fc2f49cca4d9e5778d5248
parentd177c5835233dd811adad081cfc86e2f2f29d7bb (diff)
downloademacs-29b677db48bdfe1177d3b460a764f9b237ff2c19.tar.gz
emacs-29b677db48bdfe1177d3b460a764f9b237ff2c19.zip
*** empty log message ***
-rw-r--r--lispref/backups.texi60
-rw-r--r--lispref/buffers.texi7
-rw-r--r--lispref/customize.texi2
-rw-r--r--lispref/modes.texi4
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.
61been backed up on account of this buffer. If it is non-@code{nil}, then 61been backed up on account of this buffer. If it is non-@code{nil}, then
62the backup file has been written. Otherwise, the file should be backed 62the backup file has been written. Otherwise, the file should be backed
63up when it is next saved (if backups are enabled). This is a 63up when it is next saved (if backups are enabled). This is a
64permanent local; @code{kill-local-variables} does not alter it. 64permanent 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
244If this variable is non-@code{nil}, then saving a file deletes excess 244If this variable is @code{t}, then saving a file deletes excess
245backup versions silently. Otherwise, it asks the user whether to delete 245backup versions silently. If it is @code{nil}, that means
246them. 246to ask for confirmation before deleting excess backups.
247Otherwise, 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 \
285name (numeric or not)..." 286name (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
393buffer-auto-save-file-name 394buffer-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
400When used interactively without an argument, this command is a toggle 401When used interactively without an argument, this command is a toggle
401switch: it turns on auto-saving of the current buffer if it is off, and 402switch: it turns on auto-saving of the current buffer if it is off, and
402vice-versa. With an argument @var{arg}, the command turns auto-saving 403vice versa. With an argument @var{arg}, the command turns auto-saving
403on if the value of @var{arg} is @code{t}, a nonempty list, or a positive 404on if the value of @var{arg} is @code{t}, a nonempty list, or a positive
404integer. Otherwise, it turns auto-saving off. 405integer. 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 \
465of current buffer@enddots{}" 466of 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
517The value of this variable is the number of seconds of idle time that 518The value of this variable is the number of seconds of idle time that
518should cause auto-saving. Each time the user pauses for this long, 519should cause auto-saving. Each time the user pauses for this long,
519Emacs does auto-saving for all buffers in which that is enabled. 520Emacs does auto-saving for all buffers in which that is enabled. (If
520(Actually, the specified timeout is multiplied by a factor depending on 521the current buffer is large, the specified timeout is multiplied by a
521the size of the current buffer.) 522factor that depends increases as the size increases; for a million-byte
523buffer, the factor is almost 4.)
524
525If the value is zero or nil, then auto-saving is not done as a result
526of idleness, only after a certain number of input events
527as 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
595host name. 601host name.
596@end defvar 602@end defvar
597 603
604@defvar auto-save-list-file-prefix
605@tindex auto-save-list-file-prefix
606After Emacs reads your init file, it initializes
607@code{auto-save-list-file-name} (if you have not already set it
608non-@code{nil}) based on this prefix, adding the host name and process
609ID. If you set this to @code{nil} in your init file, then Emacs does
610not 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
631You can customize how @code{revert-buffer} does its work by setting 646You can customize how @code{revert-buffer} does its work by setting
632these variables---typically, as buffer-local variables. 647the variables described in the rest of this section.
633 648
634@defvar revert-without-query 649@defvar revert-without-query
635This variable holds a list of files that should be reverted without 650This 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}
639reverts the file without asking the user for confirmation. 654reverts 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
658buffer-local bindings for these variables:
659
642@defvar revert-buffer-function 660@defvar revert-buffer-function
643The value of this variable is the function to use to revert this buffer. 661The value of this variable is the function to use to revert this buffer.
644If non-@code{nil}, it is called as a function with no arguments to do 662If non-@code{nil}, it is called as a function with no arguments to do
@@ -647,7 +665,7 @@ usual way.
647 665
648Modes such as Dired mode, in which the text being edited does not 666Modes such as Dired mode, in which the text being edited does not
649consist of a file's contents but can be regenerated in some other 667consist of a file's contents but can be regenerated in some other
650fashion, give this variable a buffer-local value that is a function to 668fashion, can give this variable a buffer-local value that is a function to
651regenerate the contents. 669regenerate 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
656insert the updated contents when reverting this buffer. The function 674insert the updated contents when reverting this buffer. The function
657receives two arguments: first the file name to use; second, @code{t} if 675receives two arguments: first the file name to use; second, @code{t} if
658the user has asked to read the auto-save file. 676the user has asked to read the auto-save file.
677
678The reason for a mode to set this variable instead of
679@code{revert-buffer-function} is to avoid duplicating or replacing the
680rest of what @code{revert-buffer} does: asking for confirmation,
681clearing the undo list, deciding the proper major mode, and running the
682hooks 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
371This buffer-local variable contains the name of the file being visited 371This buffer-local variable contains the name of the file being visited
372in the current buffer, or @code{nil} if it is not visiting a file. It 372in the current buffer, or @code{nil} if it is not visiting a file. It
373is a permanent local variable, unaffected by @code{kill-local-variables}. 373is 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
390This buffer-local variable holds the truename of the file visited in the 391This buffer-local variable holds the truename of the file visited in the
391current buffer, or @code{nil} if no file is visited. It is a permanent 392current buffer, or @code{nil} if no file is visited. It is a permanent
392local, unaffected by @code{kill-local-variables}. @xref{Truenames}. 393local, 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
396This buffer-local variable holds the file number and directory device 397This buffer-local variable holds the file number and directory device
397number of the file visited in the current buffer, or @code{nil} if no 398number of the file visited in the current buffer, or @code{nil} if no
398file or a nonexistent file is visited. It is a permanent local, 399file or a nonexistent file is visited. It is a permanent local,
399unaffected by @code{kill-local-variables}. 400unaffected by @code{kill-all-local-variables}.
400 401
401The value is normally a list of the form @code{(@var{filenum} 402The 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 ()