emacscollective / auto-compile

Automatically compile Emacs Lisp libraries
GNU General Public License v3.0
172 stars 16 forks source link

Difference between README and official documentation regarding no-byte-compile #17

Closed DamienCassou closed 6 years ago

DamienCassou commented 6 years ago

Emacs documentation explicitly recommends adding no-byte-compile at the end of the elisp file:

This is normally set in local file variables at the end of the elisp file:

;; Local Variables:
;; no-byte-compile: t
;; End:

But auto-compile's README suggests to do it in the very first line. Could you please explain why the difference? Is there any impact?

tarsius commented 6 years ago

I think both instructions just point out one way of doing it, without saying anything about that method being preferable over the other method (or even just mentioning that there is another method). And which method is described depends on what method is more convenient to describe in that context.

(I am talking about adding stuff at the beginning of the file anyway. And they probably describe the eof approach because otherwise they would have to explain that the -*- ... -*- really has to be on the first line (no the second won't work), even though you might not like ;;; foo.el --- long description -*- variables -*-. And by the way ;;; foo.el -- bla really has to come on the first line too. Of course you know that, but I have seen many packages that put one or the other on the second line.)

I don't think there is any impact, but for some variables there is. The file encoding has to be set at bof, it won't be taken into account at eof. That might be another reason why I have chosen to suggest bof - while it is not necessary for this variable, I feel it is somewhat similar in spirit to the encoding variable, so I picked the same place.

DamienCassou commented 6 years ago

I understand. Another example is lexical-binding.