diff options
| author | Chong Yidong | 2012-02-27 15:26:13 +0800 |
|---|---|---|
| committer | Chong Yidong | 2012-02-27 15:26:13 +0800 |
| commit | 431ee44bbe15fa0b5d67cfb70df29e5d45039850 (patch) | |
| tree | 45c2df8c33bafc0f79019f4792fe5897ff954566 | |
| parent | 9c62cd0479bdd7ab1bb2849cc44e705d274c401c (diff) | |
| download | emacs-431ee44bbe15fa0b5d67cfb70df29e5d45039850.tar.gz emacs-431ee44bbe15fa0b5d67cfb70df29e5d45039850.zip | |
More updates for Buffers and Files chapters of Lisp manual.
* doc/emacs/buffers.texi (Creating Buffers): Clarify that
generate-new-buffer uses generate-new-buffer-names.
(Killing Buffers): Remove bogus example duplicating buffer-live-p.
* doc/emacs/files.texi (Directory Names): Index entry for file name abbreviations.
(Relative File Names, File Name Expansion): Refer to it.
(Locating Files): Move locate-user-emacs-file documentation to
Standard File Names.
(Standard File Names): Add locate-user-emacs-file; update examples.
| -rw-r--r-- | admin/FOR-RELEASE | 2 | ||||
| -rw-r--r-- | doc/lispref/ChangeLog | 12 | ||||
| -rw-r--r-- | doc/lispref/buffers.texi | 61 | ||||
| -rw-r--r-- | doc/lispref/files.texi | 152 |
4 files changed, 115 insertions, 112 deletions
diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE index 1401bad10d2..beb60eb93d6 100644 --- a/admin/FOR-RELEASE +++ b/admin/FOR-RELEASE | |||
| @@ -185,7 +185,7 @@ advice.texi cyd | |||
| 185 | anti.texi | 185 | anti.texi |
| 186 | back.texi | 186 | back.texi |
| 187 | backups.texi cyd | 187 | backups.texi cyd |
| 188 | buffers.texi | 188 | buffers.texi cyd |
| 189 | commands.texi cyd | 189 | commands.texi cyd |
| 190 | compile.texi cyd | 190 | compile.texi cyd |
| 191 | control.texi cyd | 191 | control.texi cyd |
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 09a32de0547..a3ddc5b1cff 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,15 @@ | |||
| 1 | 2012-02-27 Chong Yidong <cyd@gnu.org> | ||
| 2 | |||
| 3 | * buffers.texi (Creating Buffers): Clarify that | ||
| 4 | generate-new-buffer uses generate-new-buffer-names. | ||
| 5 | (Killing Buffers): Remove bogus example duplicating buffer-live-p. | ||
| 6 | |||
| 7 | * files.texi (Directory Names): Index entry for file name abbreviations. | ||
| 8 | (Relative File Names, File Name Expansion): Refer to it. | ||
| 9 | (Locating Files): Move locate-user-emacs-file documentation to | ||
| 10 | Standard File Names. | ||
| 11 | (Standard File Names): Add locate-user-emacs-file; update examples. | ||
| 12 | |||
| 1 | 2012-02-26 Michael Albinus <michael.albinus@gmx.de> | 13 | 2012-02-26 Michael Albinus <michael.albinus@gmx.de> |
| 2 | 14 | ||
| 3 | * files.texi (Magic File Names): Add files-equal-p and file-subdir-of-p. | 15 | * files.texi (Magic File Names): Add files-equal-p and file-subdir-of-p. |
diff --git a/doc/lispref/buffers.texi b/doc/lispref/buffers.texi index c2e792cd585..125a886ecb2 100644 --- a/doc/lispref/buffers.texi +++ b/doc/lispref/buffers.texi | |||
| @@ -417,7 +417,7 @@ This buffer-local variable holds the abbreviated truename of the file | |||
| 417 | visited in the current buffer, or @code{nil} if no file is visited. | 417 | visited in the current buffer, or @code{nil} if no file is visited. |
| 418 | It is a permanent local, unaffected by | 418 | It is a permanent local, unaffected by |
| 419 | @code{kill-all-local-variables}. @xref{Truenames}, and | 419 | @code{kill-all-local-variables}. @xref{Truenames}, and |
| 420 | @ref{Definition of abbreviate-file-name}. | 420 | @ref{abbreviate-file-name}. |
| 421 | @end defvar | 421 | @end defvar |
| 422 | 422 | ||
| 423 | @defvar buffer-file-number | 423 | @defvar buffer-file-number |
| @@ -502,9 +502,8 @@ buffer's recorded last file modification time as reported by | |||
| 502 | last file modification time, after which @code{visited-file-modtime} | 502 | last file modification time, after which @code{visited-file-modtime} |
| 503 | returns zero. | 503 | returns zero. |
| 504 | 504 | ||
| 505 | @c Wordy to avoid overfull hbox. --rjc 16mar92 | 505 | When the function @code{set-visited-file-name} is called |
| 506 | When the function @code{set-visited-file-name} is called interactively, it | 506 | interactively, it prompts for @var{filename} in the minibuffer. |
| 507 | prompts for @var{filename} in the minibuffer. | ||
| 508 | @end deffn | 507 | @end deffn |
| 509 | 508 | ||
| 510 | @defvar list-buffers-directory | 509 | @defvar list-buffers-directory |
| @@ -913,7 +912,7 @@ To replace a buffer in all the windows that display it, use | |||
| 913 | This command switches to the last buffer in the local buffer list of | 912 | This command switches to the last buffer in the local buffer list of |
| 914 | the selected frame. More precisely, it calls the function | 913 | the selected frame. More precisely, it calls the function |
| 915 | @code{switch-to-buffer} (@pxref{Switching Buffers}), to display the | 914 | @code{switch-to-buffer} (@pxref{Switching Buffers}), to display the |
| 916 | buffer returned by @code{last-buffer}, see above, in the selected | 915 | buffer returned by @code{last-buffer} (see above), in the selected |
| 917 | window. | 916 | window. |
| 918 | @end deffn | 917 | @end deffn |
| 919 | 918 | ||
| @@ -959,11 +958,12 @@ buffer initially disables undo information recording (@pxref{Undo}). | |||
| 959 | 958 | ||
| 960 | @defun generate-new-buffer name | 959 | @defun generate-new-buffer name |
| 961 | This function returns a newly created, empty buffer, but does not make | 960 | This function returns a newly created, empty buffer, but does not make |
| 962 | it current. If there is no buffer named @var{name}, then that is the | 961 | it current. The name of the buffer is generated by passing @var{name} |
| 963 | name of the new buffer. If that name is in use, this function adds | 962 | to the function @code{generate-new-buffer-name} (@pxref{Buffer |
| 964 | suffixes of the form @samp{<@var{n}>} to @var{name}, where @var{n} is an | 963 | Names}). Thus, if there is no buffer named @var{name}, then that is |
| 965 | integer. It tries successive integers starting with 2 until it finds an | 964 | the name of the new buffer; if that name is in use, a suffix of the |
| 966 | available name. | 965 | form @samp{<@var{n}>}, where @var{n} is an integer, is appended to |
| 966 | @var{name}. | ||
| 967 | 967 | ||
| 968 | An error is signaled if @var{name} is not a string. | 968 | An error is signaled if @var{name} is not a string. |
| 969 | 969 | ||
| @@ -985,9 +985,6 @@ An error is signaled if @var{name} is not a string. | |||
| 985 | The major mode for the new buffer is set to Fundamental mode. The default | 985 | The major mode for the new buffer is set to Fundamental mode. The default |
| 986 | value of the variable @code{major-mode} is handled at a higher level. | 986 | value of the variable @code{major-mode} is handled at a higher level. |
| 987 | @xref{Auto Major Mode}. | 987 | @xref{Auto Major Mode}. |
| 988 | |||
| 989 | See the related function @code{generate-new-buffer-name} in @ref{Buffer | ||
| 990 | Names}. | ||
| 991 | @end defun | 988 | @end defun |
| 992 | 989 | ||
| 993 | @node Killing Buffers | 990 | @node Killing Buffers |
| @@ -1005,25 +1002,26 @@ their identity, however; if you kill two distinct buffers, they remain | |||
| 1005 | distinct according to @code{eq} although both are dead. | 1002 | distinct according to @code{eq} although both are dead. |
| 1006 | 1003 | ||
| 1007 | If you kill a buffer that is current or displayed in a window, Emacs | 1004 | If you kill a buffer that is current or displayed in a window, Emacs |
| 1008 | automatically selects or displays some other buffer instead. This means | 1005 | automatically selects or displays some other buffer instead. This |
| 1009 | that killing a buffer can in general change the current buffer. | 1006 | means that killing a buffer can change the current buffer. Therefore, |
| 1010 | Therefore, when you kill a buffer, you should also take the precautions | 1007 | when you kill a buffer, you should also take the precautions |
| 1011 | associated with changing the current buffer (unless you happen to know | 1008 | associated with changing the current buffer (unless you happen to know |
| 1012 | that the buffer being killed isn't current). @xref{Current Buffer}. | 1009 | that the buffer being killed isn't current). @xref{Current Buffer}. |
| 1013 | 1010 | ||
| 1014 | If you kill a buffer that is the base buffer of one or more indirect | 1011 | If you kill a buffer that is the base buffer of one or more indirect |
| 1015 | buffers, the indirect buffers are automatically killed as well. | 1012 | @iftex |
| 1016 | 1013 | buffers, | |
| 1017 | The @code{buffer-name} of a killed buffer is @code{nil}. You can use | 1014 | @end iftex |
| 1018 | this feature to test whether a buffer has been killed: | 1015 | @ifnottex |
| 1016 | buffers (@pxref{Indirect Buffers}), | ||
| 1017 | @end ifnottex | ||
| 1018 | the indirect buffers are automatically killed as well. | ||
| 1019 | 1019 | ||
| 1020 | @example | 1020 | @cindex live buffer |
| 1021 | @group | 1021 | The @code{buffer-name} of a buffer is @code{nil} if, and only if, |
| 1022 | (defun buffer-killed-p (buffer) | 1022 | the buffer is killed. A buffer that has not been killed is called a |
| 1023 | "Return t if BUFFER is killed." | 1023 | @dfn{live} buffer. To test whether a buffer is live or killed, use |
| 1024 | (not (buffer-name buffer))) | 1024 | the function @code{buffer-live-p} (see below). |
| 1025 | @end group | ||
| 1026 | @end example | ||
| 1027 | 1025 | ||
| 1028 | @deffn Command kill-buffer &optional buffer-or-name | 1026 | @deffn Command kill-buffer &optional buffer-or-name |
| 1029 | This function kills the buffer @var{buffer-or-name}, freeing all its | 1027 | This function kills the buffer @var{buffer-or-name}, freeing all its |
| @@ -1032,9 +1030,8 @@ memory for other uses or to be returned to the operating system. If | |||
| 1032 | buffer. | 1030 | buffer. |
| 1033 | 1031 | ||
| 1034 | Any processes that have this buffer as the @code{process-buffer} are | 1032 | Any processes that have this buffer as the @code{process-buffer} are |
| 1035 | sent the @code{SIGHUP} signal, which normally causes them to terminate. | 1033 | sent the @code{SIGHUP} (``hangup'') signal, which normally causes them |
| 1036 | (The basic meaning of @code{SIGHUP} is that a dialup line has been | 1034 | to terminate. @xref{Signals to Processes}. |
| 1037 | disconnected.) @xref{Signals to Processes}. | ||
| 1038 | 1035 | ||
| 1039 | If the buffer is visiting a file and contains unsaved changes, | 1036 | If the buffer is visiting a file and contains unsaved changes, |
| 1040 | @code{kill-buffer} asks the user to confirm before the buffer is killed. | 1037 | @code{kill-buffer} asks the user to confirm before the buffer is killed. |
| @@ -1099,8 +1096,8 @@ automatically becomes buffer-local when set for any reason. | |||
| 1099 | @end defvar | 1096 | @end defvar |
| 1100 | 1097 | ||
| 1101 | @defun buffer-live-p object | 1098 | @defun buffer-live-p object |
| 1102 | This function returns @code{t} if @var{object} is a buffer which has | 1099 | This function returns @code{t} if @var{object} is a live buffer (a |
| 1103 | not been killed, @code{nil} otherwise. | 1100 | buffer which has not been killed), @code{nil} otherwise. |
| 1104 | @end defun | 1101 | @end defun |
| 1105 | 1102 | ||
| 1106 | @node Indirect Buffers | 1103 | @node Indirect Buffers |
diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi index bc62e9b1a49..cffaef37988 100644 --- a/doc/lispref/files.texi +++ b/doc/lispref/files.texi | |||
| @@ -1360,8 +1360,10 @@ support, then the return value is @code{(nil nil nil nil)}. | |||
| 1360 | 1360 | ||
| 1361 | This section explains how to search for a file in a list of | 1361 | This section explains how to search for a file in a list of |
| 1362 | directories (a @dfn{path}), or for an executable file in the standard | 1362 | directories (a @dfn{path}), or for an executable file in the standard |
| 1363 | list of executable file directories, or for an Emacs-specific user | 1363 | list of executable file directories. |
| 1364 | configuration file. | 1364 | |
| 1365 | To search for a user-specific configuration file, @xref{Standard | ||
| 1366 | File Names}, for the @code{locate-user-emacs-file} function. | ||
| 1365 | 1367 | ||
| 1366 | @defun locate-file filename path &optional suffixes predicate | 1368 | @defun locate-file filename path &optional suffixes predicate |
| 1367 | This function searches for a file whose name is @var{filename} in a | 1369 | This function searches for a file whose name is @var{filename} in a |
| @@ -1408,32 +1410,6 @@ in @code{exec-path}, and tries all the file-name extensions in | |||
| 1408 | @code{exec-suffixes} (@pxref{Subprocess Creation}). | 1410 | @code{exec-suffixes} (@pxref{Subprocess Creation}). |
| 1409 | @end defun | 1411 | @end defun |
| 1410 | 1412 | ||
| 1411 | @defun locate-user-emacs-file base-name &optional old-name | ||
| 1412 | This function returns an absolute file name for an Emacs-specific | ||
| 1413 | configuration or data file. The argument @file{base-name} should be a | ||
| 1414 | relative file name. The return value is the absolute name of a file | ||
| 1415 | in the directory specified by @code{user-emacs-directory}; if that | ||
| 1416 | directory does not exist, this function creates it. | ||
| 1417 | |||
| 1418 | If the optional argument @var{old-name} is non-@code{nil}, it | ||
| 1419 | specifies a file in the user's home directory, | ||
| 1420 | @file{~/@var{old-name}}. If such a file exists, the return value is | ||
| 1421 | the absolute name of that file, instead of the file specified by | ||
| 1422 | @var{base-name}. This argument is intended to be used by Emacs | ||
| 1423 | packages to provide backward compatibility. For instance, prior to | ||
| 1424 | the introduction of @code{user-emacs-directory}, the abbrev file was | ||
| 1425 | located in @file{~/.abbrev_defs}, so the definition of | ||
| 1426 | @code{abbrev-file-name} is | ||
| 1427 | |||
| 1428 | @example | ||
| 1429 | (defcustom abbrev-file-name | ||
| 1430 | (locate-user-emacs-file "abbrev_defs" ".abbrev_defs") | ||
| 1431 | "Default name of file from which to read abbrevs." | ||
| 1432 | @dots{} | ||
| 1433 | :type 'file) | ||
| 1434 | @end example | ||
| 1435 | @end defun | ||
| 1436 | |||
| 1437 | @node Changing Files | 1413 | @node Changing Files |
| 1438 | @section Changing File Names and Attributes | 1414 | @section Changing File Names and Attributes |
| 1439 | @c @cindex renaming files Duplicates rename-file | 1415 | @c @cindex renaming files Duplicates rename-file |
| @@ -1880,14 +1856,15 @@ not an extension. | |||
| 1880 | 1856 | ||
| 1881 | All the directories in the file system form a tree starting at the | 1857 | All the directories in the file system form a tree starting at the |
| 1882 | root directory. A file name can specify all the directory names | 1858 | root directory. A file name can specify all the directory names |
| 1883 | starting from the root of the tree; then it is called an @dfn{absolute} | 1859 | starting from the root of the tree; then it is called an |
| 1884 | file name. Or it can specify the position of the file in the tree | 1860 | @dfn{absolute} file name. Or it can specify the position of the file |
| 1885 | relative to a default directory; then it is called a @dfn{relative} file | 1861 | in the tree relative to a default directory; then it is called a |
| 1886 | name. On Unix and GNU/Linux, an absolute file name starts with a slash | 1862 | @dfn{relative} file name. On Unix and GNU/Linux, an absolute file |
| 1887 | or a tilde (@samp{~}), and a relative one does not. On MS-DOS and | 1863 | name starts with a @samp{/} or a @samp{~} |
| 1888 | MS-Windows, an absolute file name starts with a slash or a backslash, or | 1864 | (@pxref{abbreviate-file-name}), and a relative one does not. On |
| 1889 | with a drive specification @samp{@var{x}:/}, where @var{x} is the | 1865 | MS-DOS and MS-Windows, an absolute file name starts with a slash or a |
| 1890 | @dfn{drive letter}. | 1866 | backslash, or with a drive specification @samp{@var{x}:/}, where |
| 1867 | @var{x} is the @dfn{drive letter}. | ||
| 1891 | 1868 | ||
| 1892 | @defun file-name-absolute-p filename | 1869 | @defun file-name-absolute-p filename |
| 1893 | This function returns @code{t} if file @var{filename} is an absolute | 1870 | This function returns @code{t} if file @var{filename} is an absolute |
| @@ -2023,8 +2000,10 @@ because this is not portable. Always use | |||
| 2023 | To convert a directory name to its abbreviation, use this | 2000 | To convert a directory name to its abbreviation, use this |
| 2024 | function: | 2001 | function: |
| 2025 | 2002 | ||
| 2003 | @cindex file name abbreviations | ||
| 2004 | @cindex abbreviated file names | ||
| 2026 | @defun abbreviate-file-name filename | 2005 | @defun abbreviate-file-name filename |
| 2027 | @anchor{Definition of abbreviate-file-name} | 2006 | @anchor{abbreviate-file-name} |
| 2028 | This function returns an abbreviated form of @var{filename}. It | 2007 | This function returns an abbreviated form of @var{filename}. It |
| 2029 | applies the abbreviations specified in @code{directory-abbrev-alist} | 2008 | applies the abbreviations specified in @code{directory-abbrev-alist} |
| 2030 | (@pxref{File Aliases,,File Aliases, emacs, The GNU Emacs Manual}), | 2009 | (@pxref{File Aliases,,File Aliases, emacs, The GNU Emacs Manual}), |
| @@ -2042,11 +2021,15 @@ because it recognizes abbreviations even as part of the name. | |||
| 2042 | @subsection Functions that Expand Filenames | 2021 | @subsection Functions that Expand Filenames |
| 2043 | @cindex expansion of file names | 2022 | @cindex expansion of file names |
| 2044 | 2023 | ||
| 2045 | @dfn{Expansion} of a file name means converting a relative file name | 2024 | @dfn{Expanding} a file name means converting a relative file name to |
| 2046 | to an absolute one. Since this is done relative to a default directory, | 2025 | an absolute one. Since this is done relative to a default directory, |
| 2047 | you must specify the default directory name as well as the file name to | 2026 | you must specify the default directory name as well as the file name |
| 2048 | be expanded. Expansion also simplifies file names by eliminating | 2027 | to be expanded. It also involves expanding abbreviations like |
| 2049 | redundancies such as @file{./} and @file{@var{name}/../}. | 2028 | @file{~/} |
| 2029 | @ifnottex | ||
| 2030 | (@pxref{abbreviate-file-name}), | ||
| 2031 | @end ifnottex | ||
| 2032 | and eliminating redundancies like @file{./} and @file{@var{name}/../}. | ||
| 2050 | 2033 | ||
| 2051 | @defun expand-file-name filename &optional directory | 2034 | @defun expand-file-name filename &optional directory |
| 2052 | This function converts @var{filename} to an absolute file name. If | 2035 | This function converts @var{filename} to an absolute file name. If |
| @@ -2411,49 +2394,60 @@ filter out a directory named @file{foo.elc}. | |||
| 2411 | @node Standard File Names | 2394 | @node Standard File Names |
| 2412 | @subsection Standard File Names | 2395 | @subsection Standard File Names |
| 2413 | 2396 | ||
| 2414 | Most of the file names used in Lisp programs are entered by the user. | 2397 | Sometimes, an Emacs Lisp program needs to specify a standard file |
| 2415 | But occasionally a Lisp program needs to specify a standard file name | 2398 | name for a particular use---typically, to hold configuration data |
| 2416 | for a particular use---typically, to hold customization information | 2399 | specified by the current user. Usually, such files should be located |
| 2417 | about each user. For example, abbrev definitions are stored (by | 2400 | in the directory specified by @code{user-emacs-directory}, which is |
| 2418 | default) in the file @file{~/.abbrev_defs}; the @code{completion} | 2401 | @file{~/.emacs.d} by default (@pxref{Init File}). For example, abbrev |
| 2419 | package stores completions in the file @file{~/.completions}. These are | 2402 | definitions are stored by default in @file{~/.emacs.d/abbrev_defs}. |
| 2420 | two of the many standard file names used by parts of Emacs for certain | 2403 | The easiest way to specify such a file name is to use the function |
| 2421 | purposes. | 2404 | @code{locate-user-emacs-file}. |
| 2422 | |||
| 2423 | Various operating systems have their own conventions for valid file | ||
| 2424 | names and for which file names to use for user profile data. A Lisp | ||
| 2425 | program which reads a file using a standard file name ought to use, on | ||
| 2426 | each type of system, a file name suitable for that system. The function | ||
| 2427 | @code{convert-standard-filename} makes this easy to do. | ||
| 2428 | 2405 | ||
| 2429 | @defun convert-standard-filename filename | 2406 | @defun locate-user-emacs-file base-name &optional old-name |
| 2430 | This function alters the file name @var{filename} to fit the conventions | 2407 | This function returns an absolute file name for an Emacs-specific |
| 2431 | of the operating system in use, and returns the result as a new string. | 2408 | configuration or data file. The argument @file{base-name} should be a |
| 2432 | @end defun | 2409 | relative file name. The return value is the absolute name of a file |
| 2410 | in the directory specified by @code{user-emacs-directory}; if that | ||
| 2411 | directory does not exist, this function creates it. | ||
| 2433 | 2412 | ||
| 2434 | The recommended way to specify a standard file name in a Lisp program | 2413 | If the optional argument @var{old-name} is non-@code{nil}, it |
| 2435 | is to choose a name which fits the conventions of GNU and Unix systems, | 2414 | specifies a file in the user's home directory, |
| 2436 | usually with a nondirectory part that starts with a period, and pass it | 2415 | @file{~/@var{old-name}}. If such a file exists, the return value is |
| 2437 | to @code{convert-standard-filename} instead of using it directly. Here | 2416 | the absolute name of that file, instead of the file specified by |
| 2438 | is an example from the @code{completion} package: | 2417 | @var{base-name}. This argument is intended to be used by Emacs |
| 2418 | packages to provide backward compatibility. For instance, prior to | ||
| 2419 | the introduction of @code{user-emacs-directory}, the abbrev file was | ||
| 2420 | located in @file{~/.abbrev_defs}. Here is the definition of | ||
| 2421 | @code{abbrev-file-name}: | ||
| 2439 | 2422 | ||
| 2440 | @example | 2423 | @example |
| 2441 | (defvar save-completions-file-name | 2424 | (defcustom abbrev-file-name |
| 2442 | (convert-standard-filename "~/.completions") | 2425 | (locate-user-emacs-file "abbrev_defs" ".abbrev_defs") |
| 2443 | "*The file name to save completions to.") | 2426 | "Default name of file from which to read abbrevs." |
| 2427 | @dots{} | ||
| 2428 | :type 'file) | ||
| 2444 | @end example | 2429 | @end example |
| 2430 | @end defun | ||
| 2445 | 2431 | ||
| 2446 | On GNU and Unix systems, and on some other systems as well, | 2432 | A lower-level function for standardizing file names, which |
| 2447 | @code{convert-standard-filename} returns its argument unchanged. On | 2433 | @code{locate-user-emacs-file} uses as a subroutine, is |
| 2448 | some other systems, it alters the name to fit the system's conventions. | 2434 | @code{convert-standard-filename}. |
| 2449 | 2435 | ||
| 2450 | For example, on MS-DOS the alterations made by this function include | 2436 | @defun convert-standard-filename filename |
| 2451 | converting a leading @samp{.} to @samp{_}, converting a @samp{_} in the | 2437 | This function returns a file name based on @var{filename}, which fits |
| 2452 | middle of the name to @samp{.} if there is no other @samp{.}, inserting | 2438 | the conventions of the current operating system. |
| 2453 | a @samp{.} after eight characters if there is none, and truncating to | 2439 | |
| 2454 | three characters after the @samp{.}. (It makes other changes as well.) | 2440 | On GNU and Unix systems, this simply returns @var{filename}. On other |
| 2455 | Thus, @file{.abbrev_defs} becomes @file{_abbrev.def}, and | 2441 | operating systems, it may enforce system-specific file name |
| 2456 | @file{.completions} becomes @file{_complet.ion}. | 2442 | conventions; for example, on MS-DOS this function performs a variety |
| 2443 | of changes to enforce MS-DOS file name limitations, including | ||
| 2444 | converting any leading @samp{.} to @samp{_} and truncating to three | ||
| 2445 | characters after the @samp{.}. | ||
| 2446 | |||
| 2447 | The recommended way to use this function is to specify a name which | ||
| 2448 | fits the conventions of GNU and Unix systems, and pass it to | ||
| 2449 | @code{convert-standard-filename}. | ||
| 2450 | @end defun | ||
| 2457 | 2451 | ||
| 2458 | @node Contents of Directories | 2452 | @node Contents of Directories |
| 2459 | @section Contents of Directories | 2453 | @section Contents of Directories |