unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#74964: 31.0.50 master; .dir-locals.el vars does not work with changing major mode
@ 2024-12-19  7:53 Yikai Zhao
  2024-12-20 16:20 ` Robert Pluim
  0 siblings, 1 reply; 2+ messages in thread
From: Yikai Zhao @ 2024-12-19  7:53 UTC (permalink / raw)
  To: 74964

How to reproduce:

With following content in /tmp/test/.dir-locals.el:

((nil . ((my/test . "test")))
 (c-mode . ((eval . (when (eq major-mode 'c-mode)
                      (c++-mode))))))
;; I use this code because I want my projects' .h files always opened
in c++ mode

Then open a new file test.c in the folder.

Expected behavior: my/test variable is set.
Actual behavior: my/test variable is not set.

Emacs 29 and 30 does give me the expected result.





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-12-20 16:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-19  7:53 bug#74964: 31.0.50 master; .dir-locals.el vars does not work with changing major mode Yikai Zhao
2024-12-20 16:20 ` Robert Pluim

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).