-This is Info file ../info/lispref.info, produced by Makeinfo version
-1.68 from the input file lispref/lispref.texi.
+This is ../info/lispref.info, produced by makeinfo version 4.0 from
+lispref/lispref.texi.
INFO-DIR-SECTION XEmacs Editor
START-INFO-DIR-ENTRY
file type of the buffer's visited file. The value is `nil' for
text, `t' for binary.
- - Function: find-buffer-file-type FILENAME
+ - Function: find-buffer-file-type filename
This function determines whether file FILENAME is a text file or a
binary file. It returns `nil' for text, `t' for binary.
don't indicate anything in particular. Its value should be `nil'
for text, or `t' for binary.
- - Command: find-file-text FILENAME
+ - Command: find-file-text filename
Like `find-file', but treat the file as text regardless of its
name.
- - Command: find-file-binary FILENAME
+ - Command: find-file-binary filename
Like `find-file', but treat the file as binary regardless of its
name.
variables have the value 2, then the backups numbered 1 and 2 are kept
as old versions and those numbered 5 and 7 are kept as new versions;
backup version 3 is excess. The function `find-backup-file-name'
-(*note Backup Names::.) is responsible for determining which backup
+(*note Backup Names::) is responsible for determining which backup
versions to delete, but does not delete them itself.
- User Option: trim-versions-without-asking
customize the naming conventions for backup files by redefining them.
If you change one, you probably need to change the rest.
- - Function: backup-file-name-p FILENAME
+ - Function: backup-file-name-p filename
This function returns a non-`nil' value if FILENAME is a possible
name for a backup file. A file with the name FILENAME need not
exist; the function just checks the name.
(backup-file-name-p "foo")
=> nil
-
(backup-file-name-p "foo~")
=> 3
This simple expression is placed in a separate function to make it
easy to redefine for customization.
- - Function: make-backup-file-name FILENAME
+ - Function: make-backup-file-name filename
This function returns a string that is the name to use for a
non-numbered backup file for file FILENAME. On Unix, this is just
FILENAME with a tilde appended.
(defun make-backup-file-name (filename)
(concat "." filename "~"))
-
+
(make-backup-file-name "backups.texi")
=> ".backups.texi~"
- - Function: find-backup-file-name FILENAME
+ - Function: find-backup-file-name filename
This function computes the file name for a new backup file for
FILENAME. It may also propose certain existing backup files for
deletion. `find-backup-file-name' returns a list whose CAR is the
(find-backup-file-name "~rms/foo")
=> ("~rms/foo.~5~" "~rms/foo.~3~")
- - Function: file-newest-backup FILENAME
+ - Function: file-newest-backup filename
This function returns the name of the most recent backup file for
FILENAME, or `nil' if that file has no backup files.
buffer-auto-save-file-name
=> "/xcssun/users/rms/lewis/#files.texi#"
- - Command: auto-save-mode ARG
+ - Command: auto-save-mode arg
When used interactively without an argument, this command is a
toggle switch: it turns on auto-saving of the current buffer if it
is off, and vice-versa. With an argument ARG, the command turns
auto-saving on if the value of ARG is `t', a nonempty list, or a
positive integer. Otherwise, it turns auto-saving off.
- - Function: auto-save-file-name-p FILENAME
+ - Function: auto-save-file-name-p filename
This function returns a non-`nil' value if FILENAME is a string
that could be the name of an auto-save file. It works based on
knowledge of the naming convention for auto-save files: a name that
If this variable is non-`nil', buffers that are visiting files
have auto-saving enabled by default. Otherwise, they do not.
- - Command: do-auto-save &optional NO-MESSAGE CURRENT-ONLY
+ - Command: do-auto-save &optional no-message current-only
This function auto-saves all buffers that need to be auto-saved.
It saves all buffers for which auto-saving is enabled and that
have been changed since the previous auto-save.
version of the file with the `revert-buffer' command. *Note Reverting
a Buffer: (emacs)Reverting.
- - Command: revert-buffer &optional CHECK-AUTO-SAVE NOCONFIRM
+ - Command: revert-buffer &optional check-auto-save noconfirm
This command replaces the buffer text with the text of the visited
file on disk. This action undoes all changes since the file was
visited or saved.
* Buffer File Name:: The buffer file name indicates which file is visited.
* Buffer Modification:: A buffer is "modified" if it needs to be saved.
* Modification Time:: Determining whether the visited file was changed
- "behind XEmacs's back".
+ ``behind XEmacs's back''.
* Read Only Buffers:: Modifying text is not allowed in a read-only buffer.
* The Buffer List:: How to look at all the existing buffers.
* Creating Buffers:: Functions that create buffers.
variables related to the display of buffers in windows, see *Note
Buffers and Windows::.
- - Function: bufferp OBJECT
+ - Function: bufferp object
This function returns `t' if OBJECT is a buffer, `nil' otherwise.
\1f
time, one of them is designated as the "current buffer". This is the
buffer in which most editing takes place, because most of the primitives
for examining or changing text in a buffer operate implicitly on the
-current buffer (*note Text::.). Normally the buffer that is displayed
-on the screen in the selected window is the current buffer, but this is
-not always so: a Lisp program can designate any buffer as current
+current buffer (*note Text::). Normally the buffer that is displayed on
+the screen in the selected window is the current buffer, but this is not
+always so: a Lisp program can designate any buffer as current
temporarily in order to operate on its contents, without changing what
is displayed on the screen.
(unless, of course, that is the subroutine's purpose). Therefore, you
should normally use `set-buffer' within a `save-excursion' that will
restore the current buffer when your function is done (*note
-Excursions::.). Here is an example, the code for the command
+Excursions::). Here is an example, the code for the command
`append-to-buffer' (with the documentation string abridged):
(defun append-to-buffer (buffer start end)
It is not reliable to change the current buffer back with
`set-buffer', because that won't do the job if a quit happens while the
-wrong buffer is current. Here is what *not* to do:
+wrong buffer is current. Here is what _not_ to do:
(let (buffer-read-only
(obuf (current-buffer)))
(current-buffer)
=> #<buffer buffers.texi>
- - Function: set-buffer BUFFER-OR-NAME
+ - Function: set-buffer buffer-or-name
This function makes BUFFER-OR-NAME the current buffer. It does
not display the buffer in the currently selected window or in any
other window, so the user cannot necessarily see the buffer. But
`buffer-menu' commands don't mention them. A name starting with space
also initially disables recording undo information; see *Note Undo::.
- - Function: buffer-name &optional BUFFER
+ - Function: buffer-name &optional buffer
This function returns the name of BUFFER as a string. If BUFFER
is not supplied, it defaults to the current buffer.
foo
=> #<killed buffer>
- - Command: rename-buffer NEWNAME &optional UNIQUE
+ - Command: rename-buffer newname &optional unique
This function renames the current buffer to NEWNAME. An error is
signaled if NEWNAME is not a string, or if there is already a
buffer with that name. The function returns `nil'.
to some other name, thus making it possible to create a second
shell buffer under the name `*shell*'.
- - Function: get-buffer BUFFER-OR-NAME
+ - Function: get-buffer buffer-or-name
This function returns the buffer specified by BUFFER-OR-NAME. If
BUFFER-OR-NAME is a string and there is no buffer with that name,
the value is `nil'. If BUFFER-OR-NAME is a buffer, it is returned
See also the function `get-buffer-create' in *Note Creating
Buffers::.
- - Function: generate-new-buffer-name STARTING-NAME &optional IGNORE
+ - Function: generate-new-buffer-name starting-name &optional ignore
This function returns a name that would be unique for a new
buffer--but does not create the buffer. It starts with
STARTING-NAME, and produces a name not currently in use for any
the buffer name are distinct and can be set independently. *Note
Visiting Files::.
- - Function: buffer-file-name &optional BUFFER
+ - Function: buffer-file-name &optional buffer
This function returns the absolute file name of the file that
BUFFER is visiting. If BUFFER is not visiting any file,
`buffer-file-name' returns `nil'. If BUFFER is not supplied, it
accessible on the system. See the function `file-attributes', in
*Note File Attributes::, for more information about them.
- - Function: get-file-buffer FILENAME
+ - Function: get-file-buffer filename
This function returns the buffer visiting file FILENAME. If there
is no such buffer, it returns `nil'. The argument FILENAME, which
- must be a string, is expanded (*note File Name Expansion::.), then
+ must be a string, is expanded (*note File Name Expansion::), then
compared against the visited file names of all live buffers.
(get-file-buffer "buffers.texi")
visiting the same file name. In such cases, this function returns
the first such buffer in the buffer list.
- - Command: set-visited-file-name FILENAME
+ - Command: set-visited-file-name filename
If FILENAME is a non-empty string, this function changes the name
of the file visited in current buffer to FILENAME. (If the buffer
- had no visited file, this gives it one.) The *next time* the
+ had no visited file, this gives it one.) The _next time_ the
buffer is saved it will go in the newly-specified file. This
command marks the buffer as modified, since it does not (as far as
XEmacs knows) match the contents of FILENAME, even if it matched
set to `t' whenever you alter the contents of the buffer, and cleared
to `nil' when you save it. Thus, the flag shows whether there are
unsaved changes. The flag value is normally shown in the modeline
-(*note Modeline Variables::.), and controls saving (*note Saving
-Buffers::.) and auto-saving (*note Auto-Saving::.).
+(*note Modeline Variables::), and controls saving (*note Saving
+Buffers::) and auto-saving (*note Auto-Saving::).
Some Lisp programs set the flag explicitly. For example, the
function `set-visited-file-name' sets the flag to `t', because the text
The functions that modify the contents of buffers are described in
*Note Text::.
- - Function: buffer-modified-p &optional BUFFER
+ - Function: buffer-modified-p &optional buffer
This function returns `t' if the buffer BUFFER has been modified
since it was last read in from a file or saved, or `nil'
otherwise. If BUFFER is not supplied, the current buffer is
tested.
- - Function: set-buffer-modified-p FLAG
+ - Function: set-buffer-modified-p flag
This function marks the current buffer as modified if FLAG is
non-`nil', or as unmodified if the flag is `nil'.
(set-buffer-modified-p (buffer-modified-p))
- - Command: not-modified &optional ARG
+ - Command: not-modified &optional arg
This command marks the current buffer as unmodified, and not
needing to be saved. (If ARG is non-`nil', the buffer is instead
marked as modified.) Don't use this function in programs, since it
prints a message in the echo area; use `set-buffer-modified-p'
(above) instead.
- - Function: buffer-modified-tick &optional BUFFER
+ - Function: buffer-modified-tick &optional buffer
This function returns BUFFER`s modification-count. This is a
counter that increments every time the buffer is modified. If
BUFFER is `nil' (or omitted), the current buffer is used.
XEmacs therefore checks the file's modification time using the functions
described below before saving the file.
- - Function: verify-visited-file-modtime BUFFER
+ - Function: verify-visited-file-modtime buffer
This function compares what BUFFER has recorded for the
modification time of its visited file against the actual
modification time of the file as recorded by the operating system.
format that `file-attributes' uses to return time values; see
*Note File Attributes::.)
- - Function: set-visited-file-modtime &optional TIME
+ - Function: set-visited-file-modtime &optional time
This function updates the buffer's record of the last modification
time of the visited file, to the value specified by TIME if TIME
is not `nil', and otherwise to the last modification time of the
normally, or if the file itself has been changed for some known
benign reason.
- - Function: ask-user-about-supersession-threat FILENAME
+ - Function: ask-user-about-supersession-threat filename
This function is used to ask a user how to proceed after an
attempt to modify an obsolete buffer visiting file FILENAME. An
"obsolete buffer" is an unmodified buffer for which the associated