* Re: package for silencing the bytecompiler
[not found] <ur8cvv3j4.fsf@sdm.de>
@ 2002-12-08 18:43 ` Eric Eide
0 siblings, 0 replies; only message in thread
From: Eric Eide @ 2002-12-08 18:43 UTC (permalink / raw)
"Klaus" == Klaus Berndl <Klaus.Berndl@sdm.de> writes about `silcomp.el' (in
group `gnu.emacs.sources'):
Klaus> ;; foo.el should be work for both of Emacs and XEmacs, so we use
Klaus> ;; the functions `display-message' and `clear-message' for the
Klaus> ;; XEmacs stuff and the variables `message-log-max' and
Klaus> ;; `message-truncate-lines' for Emacs. The XEmacs-symbols are
Klaus> ;; unbound in Emacs and vice versa. Therefore the bytecompiler
Klaus> ;; throws warnings about undefined symbols. [...]
Klaus> ;;
Klaus> ;; With silcomp.el you can silence the bytecompiler for foo.el:
Klaus> ;; [...]
Klaus> ;; | ;; XEmacs
Klaus> ;; | (silcomp-defun display-message)
Klaus> ;; | (silcomp-defun clear-message)
Klaus> ;; | ;; Emacs
Klaus> ;; | (silcomp-defvar message-log-max)
Klaus> ;; | (silcomp-defvar message-truncate-lines)
For a different approach to avoiding portability-related warnings from the byte
compiler, look at my `emacs-vers.el' package:
<http://www.cs.utah.edu/~eeide/emacs/emacs-vers.el.gz>
With `emacs-vers.el', one can specify that Emacs flavor/version tests should be
resolved at compile-time by the byte compiler. The optimizer can then
eliminate dead code (i.e., for the non-targeted versions of Emacs) that would
otherwise give rise to various warnings about undefined symbols, etc.
(Note that compile-time version testing is *not* the default behavior of the
`emacs-vers.el' package. Comments in the file describe how one chooses between
run-time and compile-time version tests.)
Of course, compile-time version determination is not always what one wants.
For cases in which one wants run-time tests, `silcomp.el' looks like a nice way
to avoid unwanted warnings.
Eric.
--
-------------------------------------------------------------------------------
Eric Eide <eeide@cs.utah.edu> . University of Utah School of Computing
http://www.cs.utah.edu/~eeide/ . +1 (801) 585-5512 voice, +1 (801) 581-5843 FAX
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-12-08 18:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <ur8cvv3j4.fsf@sdm.de>
2002-12-08 18:43 ` package for silencing the bytecompiler Eric Eide
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.