unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#58486: [PATCH] Prevent .dir-locals.el from being byte-compiled
@ 2022-10-13  9:05 Philip Kaludercic
  2022-10-13 14:20 ` Stefan Kangas
  2022-10-13 18:02 ` Lars Ingebrigtsen
  0 siblings, 2 replies; 43+ messages in thread
From: Philip Kaludercic @ 2022-10-13  9:05 UTC (permalink / raw)
  To: 58486

[-- Attachment #1: Type: text/plain, Size: 551 bytes --]

Tags: patch


When selecting a number of .el files in Dired and byte-compiling them
I'll usually also select a .dir-locals.el file that won't compile.
Would annotating them as non-byte-compilable files be sensible?


In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
 3.24.34, cairo version 1.17.6) of 2022-10-13 built on rhea
Repository revision: 36505800b5a0c8d7b4af5ceb54483cfdfdbf6925
Repository branch: local
System Description: Fedora Linux 36 (Workstation Edition)

Configured using:
 'configure --with-pgtk --with-imagemagick'


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Prevent-.dir-locals.el-from-being-byte-compiled.patch --]
[-- Type: text/patch, Size: 1029 bytes --]

From 8bf2e39c36a66df7e415800caa77c9116648effb Mon Sep 17 00:00:00 2001
From: Philip Kaludercic <philipk@posteo.net>
Date: Wed, 5 Oct 2022 19:45:27 +0200
Subject: [PATCH] Prevent .dir-locals.el from being byte-compiled

* lisp/files-x.el (modify-dir-local-variable): Add a 'no-byte-compile'
file local variable when generating a .dir-locals.el file.
---
 lisp/files-x.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/files-x.el b/lisp/files-x.el
index da1e44e250..f6d5d6cc27 100644
--- a/lisp/files-x.el
+++ b/lisp/files-x.el
@@ -489,7 +489,7 @@ modify-dir-local-variable
                               dir-locals-directory-cache))
 
       ;; Insert modified alist of directory-local variables.
-      (insert ";;; Directory Local Variables\n")
+      (insert ";;; Directory Local Variables            -*- no-byte-compile: t -*-\n")
       (insert ";;; For more information see (info \"(emacs) Directory Variables\")\n\n")
       (princ (dir-locals-to-string
               (sort variables
-- 
2.37.3


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

end of thread, other threads:[~2022-10-18 13:30 UTC | newest]

Thread overview: 43+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-13  9:05 bug#58486: [PATCH] Prevent .dir-locals.el from being byte-compiled Philip Kaludercic
2022-10-13 14:20 ` Stefan Kangas
2022-10-13 14:32   ` Philip Kaludercic
2022-10-13 14:51     ` Stefan Kangas
2022-10-13 17:18   ` Juri Linkov
2022-10-13 19:11     ` Philip Kaludercic
2022-10-14  9:22     ` bug#58506: Use ".dir-locals.eld" and ".dir-locals-2.eld" when they exist Stefan Kangas
2022-10-14 10:38       ` Eli Zaretskii
2022-10-14 12:36         ` Stefan Kangas
2022-10-14 11:25       ` Lars Ingebrigtsen
2022-10-14 12:36         ` Stefan Kangas
2022-10-14 13:04         ` Robert Pluim
2022-10-14 13:10           ` Lars Ingebrigtsen
2022-10-14 13:23             ` Robert Pluim
2022-10-14 13:29               ` Lars Ingebrigtsen
2022-10-14 13:41                 ` Robert Pluim
2022-10-14 15:13           ` Philip Kaludercic
2022-10-15  9:18             ` Lars Ingebrigtsen
2022-10-15  9:38               ` Philip Kaludercic
2022-10-15  9:42                 ` Lars Ingebrigtsen
2022-10-15 10:00                   ` Lars Ingebrigtsen
2022-10-15 11:35                   ` Philip Kaludercic
2022-10-15 13:56                     ` Lars Ingebrigtsen
2022-10-15 15:12                       ` Philip Kaludercic
2022-10-15 16:22                         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-16  8:39                         ` Lars Ingebrigtsen
2022-10-15 10:05                 ` Stefan Kangas
2022-10-15 15:19               ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-16  8:47                 ` Lars Ingebrigtsen
2022-10-16  9:34                   ` Philip Kaludercic
2022-10-16  9:43                     ` Lars Ingebrigtsen
2022-10-16 13:38                   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-16 13:44                     ` Lars Ingebrigtsen
2022-10-18 13:30                       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-18  7:28                 ` Juri Linkov
2022-10-18 13:25                   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-14 13:38         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-14 15:07       ` Philip Kaludercic
2022-10-14 16:32     ` bug#58486: [PATCH] Prevent .dir-locals.el from being byte-compiled Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-15 19:16       ` Juri Linkov
2022-10-16 13:17         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-13 18:02 ` Lars Ingebrigtsen
2022-10-14 18:14   ` Philip Kaludercic

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