diff options
author | Chong Yidong <cyd@stupidchicken.com> | 2011-01-08 17:01:13 -0500 |
---|---|---|
committer | Chong Yidong <cyd@stupidchicken.com> | 2011-01-08 17:01:13 -0500 |
commit | c40b51e0ff77adfbe27150de0e154bd0015a4ec5 (patch) | |
tree | eaaa84b12661dda5343a39e4bb7b72cf02edc4d7 /doc/lispref | |
parent | ad2d9b0e33e4eef277b67f58ec8b024d0dd1e0e7 (diff) | |
download | emacs-c40b51e0ff77adfbe27150de0e154bd0015a4ec5.tar.gz emacs-c40b51e0ff77adfbe27150de0e154bd0015a4ec5.tar.bz2 emacs-c40b51e0ff77adfbe27150de0e154bd0015a4ec5.zip |
Move directory-abbrev-alist doc from Lispref to Emacs manual.
* doc/emacs/files.texi (File Aliases): Move directory-abbrev-alist doc from Lisp
manual. Explain why directory-abbrev-alist elements should be anchored
(Bug#7777).
* doc/lispref/files.texi (Directory Names): Move directory-abbrev-alist doc to
Emacs manual.
Diffstat (limited to 'doc/lispref')
-rw-r--r-- | doc/lispref/ChangeLog | 4 | ||||
-rw-r--r-- | doc/lispref/files.texi | 55 |
2 files changed, 13 insertions, 46 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 1c4e6b9074f..e1180124c05 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,7 +1,7 @@ 2011-01-08 Chong Yidong <cyd@stupidchicken.com> - * files.texi (Directory Names): Explain why directory-abbrev-alist - elements should be anchored (Bug#7777). + * files.texi (Directory Names): Move directory-abbrev-alist doc to + Emacs manual. 2011-01-07 Eli Zaretskii <eliz@gnu.org> diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi index c2a14b5025e..1f66da98347 100644 --- a/doc/lispref/files.texi +++ b/doc/lispref/files.texi @@ -1920,55 +1920,22 @@ Don't try concatenating a slash by hand, as in because this is not portable. Always use @code{file-name-as-directory}. -@cindex directory name abbreviation - Directory name abbreviations are useful for directories that are -normally accessed through symbolic links. Sometimes the users recognize -primarily the link's name as ``the name'' of the directory, and find it -annoying to see the directory's ``real'' name. If you define the link -name as an abbreviation for the ``real'' name, Emacs shows users the -abbreviation instead. - -@defopt directory-abbrev-alist -The variable @code{directory-abbrev-alist} contains an alist of -abbreviations to use for file directories. Each element has the form -@code{(@var{from} . @var{to})}, and says to replace @var{from} with -@var{to} when it appears in a directory name. - -The @var{from} string is actually a regular expression. It ought to -always start with @samp{\`}, to avoid incorrectly matching to a -relative portion of the supplied directory name. - -The @var{to} string should be an ordinary absolute directory name. -Do not use @samp{~} to stand for a home directory in that string; the -function @code{abbreviate-file-name} performs these substitutions. - -You can set this variable in @file{site-init.el} to describe the -abbreviations appropriate for your site. - -Here's an example, from a system on which file system @file{/home/fsf} -and so on are normally accessed through symbolic links named @file{/fsf} -and so on. - -@example -(("\\`/home/fsf" . "/fsf") - ("\\`/home/gp" . "/gp") - ("\\`/home/gd" . "/gd")) -@end example -@end defopt - To convert a directory name to its abbreviation, use this function: @defun abbreviate-file-name filename @anchor{Definition of abbreviate-file-name} -This function applies abbreviations from @code{directory-abbrev-alist} -to its argument, and also substitutes @samp{~} for the user's home -directory if the argument names a file in the home directory or one of -its subdirectories. (If the home directory is a root directory, it is -not replaced with @samp{~}, because this does not make the result -shorter on many systems.) You can use it for directory names and for -file names, because it recognizes abbreviations even as part of the -name. +This function returns an abbreviated form of @var{filename}. It +applies the abbreviations specified in @code{directory-abbrev-alist} +(@pxref{File Aliases,,File Aliases, emacs, The GNU Emacs Manual}), +then substitutes @samp{~} for the user's home directory if the +argument names a file in the home directory or one of its +subdirectories. If the home directory is a root directory, it is not +replaced with @samp{~}, because this does not make the result shorter +on many systems. + +You can use this function for directory names and for file names, +because it recognizes abbreviations even as part of the name. @end defun @node File Name Expansion |