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

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

byte compile condioning


From: Miguel Frasson
Subject: byte compile condioning
Date: 23 May 2004 00:00:07 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

Hi.

Suppose that I want to make a program to byte-compile in both GNU Emacs and
Xemacs.

Is it possible to define a function in two different ways, one for each
emacs? (before somebody asks, I have a reason to do that, because I am
dealling with toolbars in both emacs.)

Suppose I want to define a function foo like

;; for xemacs
(defun foo (a b) (function-only-defined-in-xemacs a b))

;; for gnu emacs
(defun foo (a b) (function-only-defined-in-gnu-emacs a b))

I thought about put functions in different files and `require' then with
`eval-when-compile'using a regexp on `emacs-version', but I don't know it
the result is good. Also, I don't like to split a program in files if not
strictly necessary (program is not so big to do so.)

Thanks for any advise.

Miguel.

 

-- 
Miguel Vinicius Santini Frasson
http://www.math.leidenuniv.nl/~frasson


reply via email to

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