comparison lispref/files.texi @ 56215:c9aa4127a482

Reposition @anchor's.
author Luc Teirlinck <teirllm@auburn.edu>
date Wed, 23 Jun 2004 16:40:04 +0000
parents b5f852992d97
children 6d7412bcd051
comparison
equal deleted inserted replaced
56214:169058aadeda 56215:c9aa4127a482
327 @item 327 @item
328 With an argument of 0, unconditionally do @emph{not} make any backup file. 328 With an argument of 0, unconditionally do @emph{not} make any backup file.
329 @end itemize 329 @end itemize
330 @end deffn 330 @end deffn
331 331
332 @deffn Command save-some-buffers &optional save-silently-p pred
332 @anchor{Definition of save-some-buffers} 333 @anchor{Definition of save-some-buffers}
333 @deffn Command save-some-buffers &optional save-silently-p pred
334 This command saves some modified file-visiting buffers. Normally it 334 This command saves some modified file-visiting buffers. Normally it
335 asks the user about each buffer. But if @var{save-silently-p} is 335 asks the user about each buffer. But if @var{save-silently-p} is
336 non-@code{nil}, it saves all the file-visiting buffers without querying 336 non-@code{nil}, it saves all the file-visiting buffers without querying
337 the user. 337 the user.
338 338
350 a function of no arguments. It will be called in each buffer to decide 350 a function of no arguments. It will be called in each buffer to decide
351 whether to offer to save that buffer. If it returns a non-@code{nil} 351 whether to offer to save that buffer. If it returns a non-@code{nil}
352 value in a certain buffer, that means do offer to save that buffer. 352 value in a certain buffer, that means do offer to save that buffer.
353 @end deffn 353 @end deffn
354 354
355 @deffn Command write-file filename &optional confirm
355 @anchor{Definition of write-file} 356 @anchor{Definition of write-file}
356 @deffn Command write-file filename &optional confirm
357 This function writes the current buffer into file @var{filename}, makes 357 This function writes the current buffer into file @var{filename}, makes
358 the buffer visit that file, and marks it not modified. Then it renames 358 the buffer visit that file, and marks it not modified. Then it renames
359 the buffer based on @var{filename}, appending a string like @samp{<2>} 359 the buffer based on @var{filename}, appending a string like @samp{<2>}
360 if necessary to make a unique buffer name. It does most of this work by 360 if necessary to make a unique buffer name. It does most of this work by
361 calling @code{set-visited-file-name} (@pxref{Buffer File Name}) and 361 calling @code{set-visited-file-name} (@pxref{Buffer File Name}) and
624 nor @code{nil} nor a string, then this message is inhibited. This 624 nor @code{nil} nor a string, then this message is inhibited. This
625 feature is useful for programs that use files for internal purposes, 625 feature is useful for programs that use files for internal purposes,
626 files that the user does not need to know about. 626 files that the user does not need to know about.
627 @end deffn 627 @end deffn
628 628
629 @defmac with-temp-file file body...
629 @anchor{Definition of with-temp-file} 630 @anchor{Definition of with-temp-file}
630 @defmac with-temp-file file body...
631 The @code{with-temp-file} macro evaluates the @var{body} forms with a 631 The @code{with-temp-file} macro evaluates the @var{body} forms with a
632 temporary buffer as the current buffer; then, at the end, it writes the 632 temporary buffer as the current buffer; then, at the end, it writes the
633 buffer contents into file @var{file}. It kills the temporary buffer 633 buffer contents into file @var{file}. It kills the temporary buffer
634 when finished, restoring the buffer that was current before the 634 when finished, restoring the buffer that was current before the
635 @code{with-temp-file} form. Then it returns the value of the last form 635 @code{with-temp-file} form. Then it returns the value of the last form
1123 @result{} nil 1123 @result{} nil
1124 @end group 1124 @end group
1125 @end example 1125 @end example
1126 @end defun 1126 @end defun
1127 1127
1128 @defun file-attributes filename &optional id-format
1128 @anchor{Definition of file-attributes} 1129 @anchor{Definition of file-attributes}
1129 @defun file-attributes filename &optional id-format
1130 This function returns a list of attributes of file @var{filename}. If 1130 This function returns a list of attributes of file @var{filename}. If
1131 the specified file cannot be opened, it returns @code{nil}. 1131 the specified file cannot be opened, it returns @code{nil}.
1132 The optional parameter @var{id-format} specifies the preferred format 1132 The optional parameter @var{id-format} specifies the preferred format
1133 of attributes @acronym{UID} and @acronym{GID} (see below)---the 1133 of attributes @acronym{UID} and @acronym{GID} (see below)---the
1134 valid values are @code{'string} and @code{'integer}. The latter is 1134 valid values are @code{'string} and @code{'integer}. The latter is
1822 @end defvar 1822 @end defvar
1823 1823
1824 To convert a directory name to its abbreviation, use this 1824 To convert a directory name to its abbreviation, use this
1825 function: 1825 function:
1826 1826
1827 @defun abbreviate-file-name filename
1827 @anchor{Definition of abbreviate-file-name} 1828 @anchor{Definition of abbreviate-file-name}
1828 @defun abbreviate-file-name filename
1829 This function applies abbreviations from @code{directory-abbrev-alist} 1829 This function applies abbreviations from @code{directory-abbrev-alist}
1830 to its argument, and substitutes @samp{~} for the user's home 1830 to its argument, and substitutes @samp{~} for the user's home
1831 directory. You can use it for directory names and for file names, 1831 directory. You can use it for directory names and for file names,
1832 because it recognizes abbreviations even as part of the name. 1832 because it recognizes abbreviations even as part of the name.
1833 @end defun 1833 @end defun
1950 @result{} "/user/lewis/manual/" 1950 @result{} "/user/lewis/manual/"
1951 @end group 1951 @end group
1952 @end example 1952 @end example
1953 @end defvar 1953 @end defvar
1954 1954
1955 @defun substitute-in-file-name filename
1955 @anchor{Definition of substitute-in-file-name} 1956 @anchor{Definition of substitute-in-file-name}
1956 @defun substitute-in-file-name filename
1957 This function replaces environment variable references in 1957 This function replaces environment variable references in
1958 @var{filename} with the environment variable values. Following 1958 @var{filename} with the environment variable values. Following
1959 standard Unix shell syntax, @samp{$} is the prefix to substitute an 1959 standard Unix shell syntax, @samp{$} is the prefix to substitute an
1960 environment variable value. If the input contains @samp{$$}, that is 1960 environment variable value. If the input contains @samp{$$}, that is
1961 converted to @samp{$}; this gives the user a way to ``quote'' a 1961 converted to @samp{$}; this gives the user a way to ``quote'' a