help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

;; Local variables: (was: Re: The function ‘cl-set-difference’ might not


From: Emanuel Berg
Subject: ;; Local variables: (was: Re: The function ‘cl-set-difference’ might not be defined at runtime)
Date: Wed, 15 Apr 2020 19:14:03 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

tomas wrote:

>> [...] what does this mean?
>> 
>> ;; Local variables:
>> ;; byte-compile-dynamic: t
>> ;; End:
>
> Quoth "describe-variable" (aka C-h v):
>
>   byte-compile-dynamic is a variable defined in
>   ‘bytecomp.el’. Its value is nil
>
>     This variable is obsolete since 27.1; not
>     worthwhile any more. This variable is safe as
>     a file local variable if its value satisfies the
>     predicate ‘booleanp’. Probably introduced at or
>     before Emacs version 19.29.
>
>   Documentation:
>   If non-nil, compile function bodies so they load
>   lazily. They are hidden in comments in the compiled
>   file, and each one is brought into core when the
>   function is called.
>
>   To enable this option, make it a file-local variable
>   in the source file you want it to apply to.
>   For example, add -*-byte-compile-dynamic: t;-*- on
>   the first line.
>
>   When this option is true, if you load the compiled
>   file and then move it, the functions you loaded will
>   not be able to run.
>
> So, if your Emacs is new enough, it's just a comment.
> Otherwise, it hides functions in comments ;-D

Yes, but I meant the comment/variable syntax, which
I haven't see before. In the particular variable's
docstring, they mention

  -*- byte-compile-dynamic: t -*-

so how does that differ from

  ;; Local variables:
  ;; byte-compile-dynamic: t
  ;; End:

?

As for the syntax, I tried with this and then did
`emacs-lisp-mode', what happened was it popped up
a warning telling me the values were possibly unsafe -
what does that mean?

  ;; Local variables:
  ;; local-test-var: t
  ;; End:

When I replied they were safe this line appeared in the
`custom-file' file, which I don't care for and prefer to
be blank or not in use

  '(safe-local-variable-values (quote ((local-test-var . t))))

I tried to do it manually like this, with a new variable
name to prevent possible interference, but it didn't
work

  (safe-local-variable-values '((local-test-var-1 . t)))
  ;; Local variables:
  ;; local-test-var-1: t
  ;; End:

because safe-local-variable-values isn't a defined
function, maybe custom just looks for it when it parses
custom-file.

Maybe one can disable custom's operations altogether by
setting custom-file to nil?

-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal




reply via email to

[Prev in Thread] Current Thread [Next in Thread]