all messages for Emacs-related lists mirrored at yhetil.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; 7+ 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] 7+ messages in thread

end of thread, other threads:[~2025-01-05 15:05 UTC | newest]

Thread overview: 7+ 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
2024-12-22  3:36   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2025-01-04 11:42     ` Eli Zaretskii
2025-01-05  8:02       ` Yikai Zhao
2025-01-05  9:11         ` Eli Zaretskii
2025-01-05 15:05           ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.