unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Kaushal Modi <kaushal.modi@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: Relics of removed dir-locals-file-2 feature in pretest
Date: Mon, 27 Nov 2017 19:27:58 +0200	[thread overview]
Message-ID: <83h8tf638h.fsf@gnu.org> (raw)
In-Reply-To: <CAFyQvY1ktYpPrieEv0P7b6STVsZStWBHxTmk_v9EceOjoDU-MQ@mail.gmail.com> (message from Kaushal Modi on Mon, 27 Nov 2017 17:04:21 +0000)

> From: Kaushal Modi <kaushal.modi@gmail.com>
> Date: Mon, 27 Nov 2017 17:04:21 +0000
> Cc: emacs-devel@gnu.org
>
> 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
> -@file{.dir-locals.el}@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
> -@ref{Directory Variables, , Per-directory Local Variables, emacs, The
> -GNU Emacs Manual}, for more details.
> +@file{.dir-locals.el}@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.  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
> +@file{.dir-locals.el}.  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	other threads:[~2017-11-27 17:27 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-12 13:58 Relics of removed dir-locals-file-2 feature in pretest Kaushal Modi
2017-11-21 19:56 ` Kaushal Modi
2017-11-21 20:33   ` Eli Zaretskii
2017-11-21 21:11     ` Kaushal Modi
2017-11-22 15:19       ` Eli Zaretskii
2017-11-22 15:58         ` Kaushal Modi
2017-11-22 16:20           ` Eli Zaretskii
2017-11-22 16:28             ` Kaushal Modi
2017-11-23 15:53               ` Eli Zaretskii
2017-11-23 17:34                 ` Kaushal Modi
2017-11-23 20:08                   ` Eli Zaretskii
2017-11-27 14:57                     ` Kaushal Modi
2017-11-27 16:14                       ` Eli Zaretskii
2017-11-27 17:04                         ` Kaushal Modi
2017-11-27 17:27                           ` Eli Zaretskii [this message]
2017-11-27 17:50                             ` Kaushal Modi
2017-11-28 17:19                               ` Eli Zaretskii
2017-11-28 17:34                                 ` Kaushal Modi
2017-11-28 17:51                                   ` Eli Zaretskii
2017-11-28 17:59                                     ` Kaushal Modi
2017-11-28 20:02                                     ` Davis Herring
2017-11-28 20:36                                       ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83h8tf638h.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=kaushal.modi@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).