emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

directory-abbrev-alist


From: Alexander Klimov
Subject: directory-abbrev-alist
Date: Thu, 2 Sep 2010 17:06:48 +0300

There is a little inconsistency in documentation of
directory-abbrev-alist: comments in code proposes to start each
`from' string with \`, while files.texi proposes ^ (the same,
except in file names with newline). The initial value proposed
by defcustom should reflect this convention. The following patch
fixes both problems:

=== modified file 'doc/lispref/files.texi'
--- doc/lispref/files.texi      2010-06-23 03:36:56 +0000
+++ doc/lispref/files.texi      2010-09-02 13:49:49 +0000
@@ -1933,7 +1933,7 @@
 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{^}.
+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.
@@ -1946,9 +1946,9 @@
 and so on.

 @example
-(("^/home/fsf" . "/fsf")
- ("^/home/gp" . "/gp")
- ("^/home/gd" . "/gd"))
+(("\\`/home/fsf" . "/fsf")
+ ("\\`/home/gp" . "/gp")
+ ("\\`/home/gd" . "/gd"))
 @end example
 @end defopt


=== modified file 'lisp/files.el'
--- lisp/files.el       2010-08-29 16:17:13 +0000
+++ lisp/files.el       2010-09-02 13:44:32 +0000
@@ -67,7 +67,7 @@
 via absolute symbolic links.  Make TO the name of the link, and FROM
 the name it is linked to."
   :type '(repeat (cons :format "%v"
-                      :value ("" . "")
+                      :value ("\\`" . "")
                       (regexp :tag "From")
                       (regexp :tag "To")))
   :group 'abbrev


-- 
Regards,
ASK



reply via email to

[Prev in Thread] Current Thread [Next in Thread]