emacs-devel
[Top][All Lists]
Advanced

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

Problems with defcustom setter functions during byte-compile


From: David Engster
Subject: Problems with defcustom setter functions during byte-compile
Date: Sat, 06 Oct 2012 11:15:51 +0200
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.1.50 (gnu/linux)

I'd like to get some input on a problem I'm currently experiencing with
compiling CEDET upstream. Note that the following does not affect the
CEDET in Emacs trunk, since we do not generate the parsers there on the
fly.

The problem is a defcustom in srecode/map.el:

(defcustom srecode-map-load-path
   [... stuff snipped ...]
  :set 'srecode-map-load-path-set)

The :set function `srecode-map-load-path-set' is called as soon as this
file is loaded. This also happens when this file is byte-compiled.
However, this setter function will only work *after* CEDET was
successfully compiled since it depends on a parser which is generated
during build, so this is a typical chicken/egg problem.

While I can carefully rearrange the order of compilation so that this
still works, this is just destined to break regularly. Also, it slows
down compilation because the above is called pretty often.  Hence I
wonder if there's a "clean" way to avoid calling this setter function
during byte-compilation. Is there some kind of flag during
byte-compilation I could use? Or is there some clever 'eval-*' construct
which will fix this?

-David



reply via email to

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