unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Noam Postavsky <npostavs@users.sourceforge.net>
To: 17051@debbugs.gnu.org
Cc: Reuben Thomas <rrt@sc3d.org>
Subject: bug#17051: Order of evaluation in .dir-locals.el
Date: Sat, 4 Jun 2016 18:02:07 -0400	[thread overview]
Message-ID: <CAM-tV-8hpbeeC7dr7oyDkYPSyPMxSDOeaHkHE+Kevmqg9D3+rA@mail.gmail.com> (raw)
In-Reply-To: <CAOnWdogi4gQtDAY5imOsS1tHyhvsO5niztG687LyD2hwh4xMKw@mail.gmail.com>

reassign 17051 emacs,cc-mode
severity 17051 minor
tag 17051 + confirmed
quit

The reason this doesn't work is revealed in the docstring of c-before-hook:

c-before-hack-hook is a compiled Lisp function in ‘cc-mode.el’.

(c-before-hack-hook)

Set the CC Mode style and "offsets" when in the buffer’s local variables.
They are set only when, respectively, the pseudo variables
‘c-file-style’ and ‘c-file-offsets’ are present in the list.

This function is called from the hook ‘before-hack-local-variables-hook’.

Of course `before-hack-local-variables-hook' runs before any local
variables are set, so there is no "correct" order that a user can use
in .dir-locals.el to define a new style: `c-file-style' always applies
before any other variables.





  reply	other threads:[~2016-06-04 22:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-20 15:01 bug#17051: Order of evaluation in .dir-locals.el Reuben Thomas
2016-06-04 22:02 ` Noam Postavsky [this message]
2016-06-05 19:38   ` Reuben Thomas
2016-06-07  0:41     ` Noam Postavsky
2016-06-07 11:23 ` Alan Mackenzie
     [not found] ` <20160607112313.GA3681@acm.fritz.box>
2016-06-07 12:53   ` Reuben Thomas
2021-12-04  3:19   ` Lars Ingebrigtsen

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=CAM-tV-8hpbeeC7dr7oyDkYPSyPMxSDOeaHkHE+Kevmqg9D3+rA@mail.gmail.com \
    --to=npostavs@users.sourceforge.net \
    --cc=17051@debbugs.gnu.org \
    --cc=rrt@sc3d.org \
    /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).