Subject: Re: bug#23476: 25.0.93; Visiting C files on master signals an error

From: Andy Moreton <[email-masked]>
Date: Sat, 07 May 2016 17:43:12 +0100

On Sat 07 May 2016, Eli Zaretskii wrote:

> If you visit any C file on the master branch with Emacs 25.0.93, Emacs
> asks an annoying question about unsafe local variables:
>
>
>
>
> If you answer "y", Emacs signals an error:
>
>   File local-variables error: (void-function c-make-noise-macro-regexps)
>
> If I do the same with Emacs built from master, the problem doesn't
> happen.  Did someone assume that the sources on master are only edited
> by an Emacs produced from that master?  If so, that's bad assumption.

I assume that is due to c-make-noise-macro-regexps being a new feature
on the master branch. The following patch fixes it for me:

diff --git a/.dir-locals.el b/.dir-locals.el
index 1aa71ff..3725cc1 100644
--- a/.dir-locals.el
+++ b/.dir-locals.el
@@ -3,7 +3,8 @@
          (fill-column . 70)))
  (c-mode . ((c-file-style . "GNU")
             (c-noise-macro-with-parens-names . ("IF_LINT"))
-            (eval . (c-make-noise-macro-regexps))
+            (eval . (when (fboundp 'c-make-noise-macro-regexps)
+                      (c-make-noise-macro-regexps)))

Regards,

    AndyM