Skip to main content
3 of 7
added 397 characters in body
shynur
  • 5.9k
  • 1
  • 5
  • 28

Yes, possible. You need to change the definition of hack-local-variables-confirm. Find the form (customize-push-and-save (if (= char ?!) ...)) and modify it.

I agree with you to some extent: these should be put into another file. But to be honest, I don’t recommend you change the function’s definition, because this is not elegant, so maybe we'll wait and see if there's any other way.


BTW, you can take a look at my code. (Please ignore the coding style; I will refactor it some day but not now.) It doesn't answer your question, but does solve your problem: you just need to put the .dir-locals.el file’s path to your .emacs, then Emacs will never ask you to confirm.

shynur
  • 5.9k
  • 1
  • 5
  • 28