* How do you check for a feature during byte compilation? @ 2008-12-28 19:10 Lennart Borgman 2008-12-30 20:20 ` Stefan Monnier 0 siblings, 1 reply; 3+ messages in thread From: Lennart Borgman @ 2008-12-28 19:10 UTC (permalink / raw) To: Emacs Devel This does not work during byte compilation AFAICS, featurep returns nil: (when (featurep 'typesetter) (defun typesetter-init-nxhtml-mode () (typesetter-init-html-mode))) What do you do instead? ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How do you check for a feature during byte compilation? 2008-12-28 19:10 How do you check for a feature during byte compilation? Lennart Borgman @ 2008-12-30 20:20 ` Stefan Monnier 2008-12-31 1:19 ` Lennart Borgman 0 siblings, 1 reply; 3+ messages in thread From: Stefan Monnier @ 2008-12-30 20:20 UTC (permalink / raw) To: Lennart Borgman; +Cc: Emacs Devel > This does not work during byte compilation AFAICS, featurep returns nil: > (when (featurep 'typesetter) > (defun typesetter-init-nxhtml-mode () > (typesetter-init-html-mode))) > What do you do instead? In what way does it fail to work? Give us more info. Stefan PS: BTW, your defun could be replaced by a defalias. ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How do you check for a feature during byte compilation? 2008-12-30 20:20 ` Stefan Monnier @ 2008-12-31 1:19 ` Lennart Borgman 0 siblings, 0 replies; 3+ messages in thread From: Lennart Borgman @ 2008-12-31 1:19 UTC (permalink / raw) To: Stefan Monnier; +Cc: Emacs Devel On Tue, Dec 30, 2008 at 9:20 PM, Stefan Monnier <monnier@iro.umontreal.ca> wrote: >> This does not work during byte compilation AFAICS, featurep returns nil: >> (when (featurep 'typesetter) >> (defun typesetter-init-nxhtml-mode () >> (typesetter-init-html-mode))) >> What do you do instead? > > In what way does it fail to work? Give us more info. My mistake. Top level forms are not evaluated during byte compilation unless you use eval-when-compile or eval-and-compile, I forgot that. ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-12-31 1:19 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-12-28 19:10 How do you check for a feature during byte compilation? Lennart Borgman 2008-12-30 20:20 ` Stefan Monnier 2008-12-31 1:19 ` Lennart Borgman
Code repositories for project(s) associated with this public inbox https://git.savannah.gnu.org/cgit/emacs.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).