# HG changeset patch # User Eli Zaretskii # Date 1294415713 -7200 # Node ID fb129cb534767f5e1ca6012b6108b6217af906e4 # Parent 8c06638b349777a805cf1de609b22695462272d2 Fix bug #7777 with documentation of directory-abbrev-alist. lisp/files.el (directory-abbrev-alist): Doc fix. doc/lispref/files.texi (Directory Names): Explain why FROM in directory-abbrev-alist should begin with \`. diff -r 8c06638b3497 -r fb129cb53476 doc/lispref/ChangeLog --- a/doc/lispref/ChangeLog Fri Jan 07 17:32:12 2011 +0200 +++ b/doc/lispref/ChangeLog Fri Jan 07 17:55:13 2011 +0200 @@ -1,3 +1,8 @@ +2011-01-07 Eli Zaretskii + + * files.texi (Directory Names): Explain why FROM in + directory-abbrev-alist should begin with \`. (Bug#7777) + 2010-12-25 Eli Zaretskii * modes.texi (Emulating Mode Line): Fix last change. diff -r 8c06638b3497 -r fb129cb53476 doc/lispref/files.texi --- a/doc/lispref/files.texi Fri Jan 07 17:32:12 2011 +0200 +++ b/doc/lispref/files.texi Fri Jan 07 17:55:13 2011 +0200 @@ -1933,10 +1933,13 @@ 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 should always start with @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. +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. You can set this variable in @file{site-init.el} to describe the abbreviations appropriate for your site. diff -r 8c06638b3497 -r fb129cb53476 lisp/ChangeLog --- a/lisp/ChangeLog Fri Jan 07 17:32:12 2011 +0200 +++ b/lisp/ChangeLog Fri Jan 07 17:55:13 2011 +0200 @@ -1,3 +1,7 @@ +2011-01-07 Eli Zaretskii + + * files.el (directory-abbrev-alist): Doc fix. (Bug#7777) + 2011-01-06 Stefan Monnier * vc-bzr.el (vc-bzr-annotate-command, vc-bzr-annotate-time): diff -r 8c06638b3497 -r fb129cb53476 lisp/files.el --- a/lisp/files.el Fri Jan 07 17:32:12 2011 +0200 +++ b/lisp/files.el Fri Jan 07 17:55:13 2011 +0200 @@ -56,7 +56,10 @@ A list of elements of the form (FROM . TO), each meaning to replace FROM with TO when it appears in a directory name. This replacement is done when setting up the default directory of a newly visited file. -*Every* FROM string should start with \"\\\\`\". + +FROM is matched against directory names anchored at the first +character, so it should start with a \"\\\\`\", or, if directory +names cannot have embedded newlines, with a \"^\". FROM and TO should be equivalent names, which refer to the same directory. Do not use `~' in the TO strings;