# HG changeset patch # User Chong Yidong # Date 1294522640 18000 # Node ID a60d544f122298e1a1a72d809edf263185cd3bfe # Parent 3a76bad4161461536b9dc2bd1bd4eb99f2dd8290 Explain why directory-abbrev-alist should be anchored (Bug#7777). * files.texi (Directory Names): Explain why directory-abbrev-alist elements should be anchored (Bug#7777). diff -r 3a76bad41614 -r a60d544f1222 doc/lispref/ChangeLog --- a/doc/lispref/ChangeLog Sat Jan 08 14:49:02 2011 -0500 +++ b/doc/lispref/ChangeLog Sat Jan 08 16:37:20 2011 -0500 @@ -1,3 +1,8 @@ +2011-01-08 Chong Yidong + + * files.texi (Directory Names): Explain why directory-abbrev-alist + elements should be anchored (Bug#7777). + 2011-01-07 Eli Zaretskii * files.texi (Directory Names): Explain why FROM in diff -r 3a76bad41614 -r a60d544f1222 doc/lispref/files.texi --- a/doc/lispref/files.texi Sat Jan 08 14:49:02 2011 -0500 +++ b/doc/lispref/files.texi Sat Jan 08 16:37:20 2011 -0500 @@ -1932,14 +1932,15 @@ 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 is matched against directory names -anchored at the first character, so it should start with @samp{\`}, to -support directory names with embedded newlines (which will defeat -@samp{^}). 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. +@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.