From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Jesper Harder Newsgroups: gmane.emacs.help Subject: Re: detect emacs/xemacs in elisp? Date: Mon, 09 Dec 2002 19:52:48 +0100 Organization: http://purl.org/harder/ Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: <49e2e83d.0212091030.7c05b32@posting.google.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1039463911 28992 80.91.224.249 (9 Dec 2002 19:58:31 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 9 Dec 2002 19:58:31 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18LU2u-0007XB-00 for ; Mon, 09 Dec 2002 20:58:28 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18LT8n-0002tz-03 for gnu-help-gnu-emacs@m.gmane.org; Mon, 09 Dec 2002 14:00:29 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!not-for-mail Original-Newsgroups: gnu.emacs.help X-Face: ^RrvqCr7c,P$zTR:QED"@h9+BTm-"fjZJJ-3=OU7.)i/K]<.J88}s>'Z_$r; List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:4444 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:4444 jason_addison@hotmail.com (Jason Addison) writes: > I have some elisp that works/doesn't work in emacs/xemacs in my > ".emacs" file. I would like to be able to execute or not execute code > depending on which type of emacs I'm running. (if (featurep 'xemacs) (progn ;; do Xemacs stuff ) ;; do Emacs stuff ) > Another way around this would be to know how to determine if a > function is defined before calling it. Any idea on how to do this in > elisp? Use `fboundp' to determine if a function is defined. > Also, how do you determine the version of emacs that is running in > elisp? E.g the function `emacs-version'.