emacs-devel
[Top][All Lists]
Advanced

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

Re: Relics of removed dir-locals-file-2 feature in pretest


From: Eli Zaretskii
Subject: Re: Relics of removed dir-locals-file-2 feature in pretest
Date: Mon, 27 Nov 2017 19:27:58 +0200

> From: Kaushal Modi <address@hidden>
> Date: Mon, 27 Nov 2017 17:04:21 +0000
> Cc: address@hidden
>
> Thanks! I have attached the patch. 

Thanks, I have a few comments.

> * lisp/files.el: Remove unused constant `dir-locals-file-2'.

This should be formatted as follows:

 * lisp/files.el (dir-locals-file-2): Remove unused constant.

> * lisp/files.el(dir-locals-file):
                ^^
Missing space.

> * doc/lispref/variables.texi (Directory Local Variables): Mention
>   ".dir-locals-2.el".

These two don't really live together well: one is code, the other
documentation.  So the first one is better written as a separate
entry:

 * lisp/files.el (dir-locals-file): Mention '.dir-locals-2.el' in the
   doc string.

>  doc/lispref/variables.texi | 29 +++++++++++++++++------------
>  etc/NEWS                   |  2 +-
>  lisp/files.el              | 18 +++++++++---------
>  3 files changed, 27 insertions(+), 22 deletions(-)

The change in NEWS should also be mentioned in the log message.

> diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi
> index a871352b00..c14a440cbf 100644
> --- a/doc/lispref/variables.texi
> +++ b/doc/lispref/variables.texi
> @@ -1911,18 +1911,23 @@ Directory Local Variables
>  @defvr Constant dir-locals-file
>  This constant is the name of the file where Emacs expects to find the
>  directory-local variables.  The name of the file is
> address@hidden@footnote{
> -The MS-DOS version of Emacs uses @file{_dir-locals.el} instead, due to
> -limitations of the DOS filesystems.
> -}.  A file by that name in a directory causes Emacs to apply its
> -settings to any file in that directory or any of its subdirectories
> -(optionally, you can exclude subdirectories; see below).
> -If some of the subdirectories have their own @file{.dir-locals.el}
> -files, Emacs uses the settings from the deepest file it finds starting
> -from the file's directory and moving up the directory tree.  The file
> -specifies local variables as a specially formatted list; see
> address@hidden Variables, , Per-directory Local Variables, emacs, The
> -GNU Emacs Manual}, for more details.
> address@hidden@footnote{ The MS-DOS version of Emacs uses
> address@hidden instead, due to limitations of the DOS
> +filesystems.  }.  A file by that name in a directory causes Emacs to
> +apply its settings to any file in that directory or any of its
> +subdirectories (optionally, you can exclude subdirectories; see
> +below).  If some of the subdirectories have their own
> address@hidden files, Emacs uses the settings from the deepest
> +file it finds starting from the file's directory and moving up the
> +directory tree.  This constant is also used to derive the name of a
> +second dir-locals file @file{.dir-locals-2.el}.  If this second
> +dir-locals file is present, then that is loaded instead of
> address@hidden  This is useful when @file{.dir-locals.el} is
> +under version control in a shared repository and cannot be used for
> +personal customizations.  The file specifies local variables as a
> +specially formatted list; see @ref{Directory Variables, ,
> +Per-directory Local Variables, emacs, The GNU Emacs Manual}, for more
> +details.

This looks like a lot of changes, but it actually only changes the
last few lines.  Please try not to refill existing text you don't
modify (unless it's really badly formatted), so that the actual
changes are clearly visible.

> +                                      This second file name is
> +derived by appending \"-2\" to the file name component without
> +extension in `dir-locals-file'.

This sentence is slightly confusing.  Suggest to reword:

  The name of this second file is derived by appending \"-2\" to
  the base name of `dir-locals-file'.

> +                                 For example, if the value of
> +`dir-locals-file' is \".dir-locals.el\", a \".dir-locals-2.el\"
> +file in the same directory will override the \".dir-locals.el\".

And this sentence could be made simpler if you just describe the
default case:

  With the default value of `dir-locals-file', a \".dir-locals-2.el\"
  file in the same directory will override \".dir-locals.el\".



reply via email to

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