[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: byte compiler warnings for different Emacs versions
From: |
Stefan Monnier |
Subject: |
Re: byte compiler warnings for different Emacs versions |
Date: |
Thu, 11 Nov 2004 17:32:06 -0500 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux) |
> Thanks for your help. I guess I was ignorantly assuming that
> define-minor-mode was a built-in function, like defun.
It's got nothing to do with being built-in or not. The issue is whether
it's a function or not. Neither `defun' nor `define-minor-mode' are
functions (one is a macro, the other is a special form). I.e. both would
suffer similarly (except that `defun' also exists in Emacs-20 so the
specific problem wouldn't show up).
> (eval-when-compile ; (`define-minor-mode' is a macro.)
> (if (fboundp 'define-minor-mode)
This is not what I suggested. Read carefully what I said: *the comparison*
should be wrapped in eval-when-compile, not the whole if expression. I.e.:
(if (eval-when-compile (fboundp 'define-minor-mode))
...
...)
-- Stefan
- byte compiler warnings for different Emacs versions, Drew Adams, 2004/11/09
- Re: byte compiler warnings for different Emacs versions, Stefan Monnier, 2004/11/10
- RE: byte compiler warnings for different Emacs versions, Drew Adams, 2004/11/10
- Re: byte compiler warnings for different Emacs versions, Stefan, 2004/11/10
- RE: byte compiler warnings for different Emacs versions, Drew Adams, 2004/11/11
- Re: byte compiler warnings for different Emacs versions,
Stefan Monnier <=
- RE: byte compiler warnings for different Emacs versions, Drew Adams, 2004/11/11
- Re: byte compiler warnings for different Emacs versions, Stefan Monnier, 2004/11/11
- RE: byte compiler warnings for different Emacs versions, Drew Adams, 2004/11/12