emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/emacs-23 r100365: Move directory-abbrev-ali


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/emacs-23 r100365: Move directory-abbrev-alist doc from Lispref to Emacs manual.
Date: Sat, 08 Jan 2011 17:01:13 -0500
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 100365
committer: Chong Yidong <address@hidden>
branch nick: emacs-23
timestamp: Sat 2011-01-08 17:01:13 -0500
message:
  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.
modified:
  doc/emacs/ChangeLog
  doc/emacs/files.texi
  doc/lispref/ChangeLog
  doc/lispref/files.texi
=== modified file 'doc/emacs/ChangeLog'
--- a/doc/emacs/ChangeLog       2011-01-07 15:32:12 +0000
+++ b/doc/emacs/ChangeLog       2011-01-08 22:01:13 +0000
@@ -1,3 +1,9 @@
+2011-01-08  Chong Yidong  <address@hidden>
+
+       * files.texi (File Aliases): Move directory-abbrev-alist doc from Lisp
+       manual.  Explain why directory-abbrev-alist elements should be anchored
+       (Bug#7777).
+
 2011-01-07  Eli Zaretskii  <address@hidden>
 
        * msdog.texi (Windows Startup): Correct inaccurate description of

=== modified file 'doc/emacs/files.texi'
--- a/doc/emacs/files.texi      2011-01-02 23:50:46 +0000
+++ b/doc/emacs/files.texi      2011-01-08 22:01:13 +0000
@@ -1158,7 +1158,6 @@
 
 @vindex find-file-existing-other-name
 @vindex find-file-suppress-same-file-warnings
-
   Normally, if you visit a file which Emacs is already visiting under
 a different name, Emacs displays a message in the echo area and uses
 the existing buffer visiting that file.  This can happen on systems
@@ -1180,6 +1179,31 @@
 than the name you specify.  Setting @code{find-file-visit-truename} also
 implies the effect of @code{find-file-existing-other-name}.
 
address@hidden directory name abbreviation
address@hidden directory-abbrev-alist
+  Sometimes, a directory is ordinarily accessed through a symbolic
+link, and you may want Emacs to preferentially display its ``linked''
+name instead of its truename.  To do this, customize the variable
address@hidden  Each element in this list should have
+the form @code{(@var{from} . @var{to})}, which says to replace
address@hidden with @var{to} when it appears in a directory name.  For
+this feature to work properly, @var{from} and @var{to} should point to
+the same file.  The @var{from} string is actually a regular expression
+(@pxref{Regexps}); it should always start with @samp{\`}, to avoid
+matching to an incorrect part of the original directory name.  The
address@hidden string should be an ordinary absolute directory name.  Do not
+use @samp{~} to stand for a home directory in the @var{to} string;
+Emacs performs these substitutions separately.
+
+  Here's an example, from a system on which file system
address@hidden/home/fsf} and so on are normally accessed through symbolic
+links named @file{/fsf} and so on.
+
address@hidden
+(("\\`/home/fsf" . "/fsf")
+ ("\\`/home/gd" . "/gd"))
address@hidden example
+
 @node Directories
 @section File Directories
 

=== modified file 'doc/lispref/ChangeLog'
--- a/doc/lispref/ChangeLog     2011-01-08 21:37:20 +0000
+++ b/doc/lispref/ChangeLog     2011-01-08 22:01:13 +0000
@@ -1,7 +1,7 @@
 2011-01-08  Chong Yidong  <address@hidden>
 
-       * 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  <address@hidden>
 

=== modified file 'doc/lispref/files.texi'
--- a/doc/lispref/files.texi    2011-01-08 21:37:20 +0000
+++ b/doc/lispref/files.texi    2011-01-08 22:01:13 +0000
@@ -1920,55 +1920,22 @@
 because this is not portable.  Always use
 @code{file-name-as-directory}.
 
address@hidden 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.
-
address@hidden directory-abbrev-alist
-The variable @code{directory-abbrev-alist} contains an alist of
-abbreviations to use for file directories.  Each element has the form
address@hidden(@var{from} . @var{to})}, and says to replace @var{from} with
address@hidden 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.
-
address@hidden
-(("\\`/home/fsf" . "/fsf")
- ("\\`/home/gp" . "/gp")
- ("\\`/home/gd" . "/gd"))
address@hidden example
address@hidden 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


reply via email to

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