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

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

detect emacs/xemacs in elisp?


From: Jason Addison
Subject: detect emacs/xemacs in elisp?
Date: 9 Dec 2002 10:30:51 -0800

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. 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? Also, how do you
determine the version of emacs that is running in elisp?

Thanks, Jason
>From help-gnu-emacs-bounces@gnu.org  Mon Dec  9 14:00:08 2002
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
Newsgroups: gnu.emacs.help
References: <49e2e83d.0212091030.7c05b32@posting.google.com>
From: Jesper Harder <harder@myrealbox.com>
X-Face: ^RrvqCr7c,P$zTR:QED"@h9+BTm-"fjZJJ-3=OU7.)i/K]<.J88}s>'Z_$r;
        <N5ksn~%wJ@2pjF}="tV;FBsdpFarSWA<oYkZsViGf:F^SD-KXhvFxh;~]?)SWm~+u};
        0=x}<vOm&5J+?]yB2d]q4x8\0g7SX
Organization: http://purl.org/harder/
Mail-Copies-To: never
Date: Mon, 09 Dec 2002 19:52:48 +0100
Message-ID: <m365u36n3z.fsf@defun.localdomain>
User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2
 (i386-redhat-linux-gnu)
Cancel-Lock: sha1:ZRGmlF1t0mWQbI3GceTXswp91Rc=
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Lines: 24
NNTP-Posting-Host: 195.215.96.213
X-Trace: 1039460134 dtext01.news.tele.dk 47414 195.215.96.213
X-Complaints-To: abuse@post.tele.dk
Xref: shelby.stanford.edu gnu.emacs.help:107898
To: help-gnu-emacs@gnu.org
Subject: Re: detect emacs/xemacs in elisp?
X-BeenThere: help-gnu-emacs@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Users list for the GNU Emacs text editor <help-gnu-emacs.gnu.org>
List-Help: <mailto:help-gnu-emacs-request@gnu.org?subject=help>
List-Post: <mailto:help-gnu-emacs@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-gnu-emacs>,
        <mailto:help-gnu-emacs-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/help-gnu-emacs>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-gnu-emacs>,
        <mailto:help-gnu-emacs-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Mon, 09 Dec 2002 19:00:08 -0000

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'.
>From help-gnu-emacs-bounces@gnu.org  Mon Dec  9 14:10:24 2002
Path: 
shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news-han1.dfn.de!news-koe1.dfn.de!lnewspeer00.lnd.ops.eu.uu.net!emea.uu.net!server1.netnews.ja.net!news.york.ac.uk!not-for-mail
From: Kester Clegg <kester@cs.york.ac.uk>
Newsgroups: gnu.emacs.help
Date: 09 Dec 2002 19:08:56 +0000
Organization: Rolls Royce UTC, Dept. of Computer Science, University of York,
        UK
Lines: 9
Sender: kc11@york.ac.uk
Message-ID: <yqr1y4r80xj.fsf@cs.york.ac.uk>
NNTP-Posting-Host: pc310.cs.york.ac.uk
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: pump1.york.ac.uk 1039460935 5035 144.32.40.101 (9 Dec 2002 19:08:55
        GMT)
X-Complaints-To: abuse@york.ac.uk
NNTP-Posting-Date: 9 Dec 2002 19:08:55 GMT
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1
Xref: shelby.stanford.edu gnu.emacs.help:107899
To: help-gnu-emacs@gnu.org
Subject: move to last article
X-BeenThere: help-gnu-emacs@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Users list for the GNU Emacs text editor <help-gnu-emacs.gnu.org>
List-Help: <mailto:help-gnu-emacs-request@gnu.org?subject=help>
List-Post: <mailto:help-gnu-emacs@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-gnu-emacs>,
        <mailto:help-gnu-emacs-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/help-gnu-emacs>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-gnu-emacs>,
        <mailto:help-gnu-emacs-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Mon, 09 Dec 2002 19:10:24 -0000


In my mail groups, I have to tried to jump to the last article by
variously pressing 'l' and 'C-u l' but neither of them seem to work on a
reliable basis.  Either the cursor stays where it is (oldest mail) or it
opens the oldest mail.  Using the menu option also does nothing.

What's going on?

-- 
>From help-gnu-emacs-bounces@gnu.org  Mon Dec  9 14:40:08 2002
Path: 
shelby.stanford.edu!newsfeed.stanford.edu!canoe.uoregon.edu!logbridge.uoregon.edu!news.ycc.yale.edu!rum.cs.yale.edu!rum.cs.yale.edu
From: "Stefan Monnier <foo@acm.com>"
        <monnier+gnu.emacs.help/news/@flint.cs.yale.edu>
Newsgroups: comp.sys.mac.apps,comp.text.tex,gnu.emacs.help
Date: 09 Dec 2002 14:29:38 -0500
Organization: Yale University
Lines: 12
Sender: monnier@rum.cs.yale.edu
Message-ID: <5ld6obj8il.fsf@rum.cs.yale.edu>
References: <041220020952400758%ajanta@no.spam>
        <56cfb0e3.0212041458.5eab182a@posting.google.com>
        <x5k7ipl35x.fsf@lola.goethe.zz> <061220020416350201%ajanta@no.spam>
        <slrnav1ed1.ho.smullerin@esb.bbn.com> <m2hedrm4oc.fsf@owlbear.local>
        <061220021433180478%ajanta@no.spam> <5l3cpalpa1.fsf@rum.cs.yale.edu>
        <071220020055513124%ajanta@no.spam> 
<84bs3xsyi8.fsf@lucy.cs.uni-dortmund.de>
        <071220021155280606%ajanta@no.spam>
NNTP-Posting-Host: rum.cs.yale.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50
X-Original-NNTP-Posting-Host: rum.cs.yale.edu
X-Original-Trace: 9 Dec 2002 14:29:40 -0500, rum.cs.yale.edu
Xref: shelby.stanford.edu comp.sys.mac.apps:348429 comp.text.tex:237691
        gnu.emacs.help:107900
To: help-gnu-emacs@gnu.org
Subject: Re: Emacs 21.3.50 on Mac OSX 10.2.2
X-BeenThere: help-gnu-emacs@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Users list for the GNU Emacs text editor <help-gnu-emacs.gnu.org>
List-Help: <mailto:help-gnu-emacs-request@gnu.org?subject=help>
List-Post: <mailto:help-gnu-emacs@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-gnu-emacs>,
        <mailto:help-gnu-emacs-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/help-gnu-emacs>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-gnu-emacs>,
        <mailto:help-gnu-emacs-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Mon, 09 Dec 2002 19:40:08 -0000

>>>>> "Ajanta" == Ajanta  <ajanta@no.spam> writes:
> 339997  /Applications/Emacs.app/Contents/MacOS/Emacs*
> 340006  /Applications/Emacs.app/Contents/Resources/bin/emacs*
> 340007  /Applications/Emacs.app/Contents/Resources/bin/emacs-21.3.50*

Bad!
Please send a bug-report (after checking with whoever made the Emacs.app
package that he followed the normal instructions).
M-x report-emacs-bug is the way to send a bug-report, BTW.


        Stefan
>From help-gnu-emacs-bounces@gnu.org  Mon Dec  9 16:15:20 2002
Path: 
shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!feed.news.nacamar.de!newsfeed01.sul.t-online.de!t-online.de!newspeer1-gui.server.ntli.net!ntli.net!sn-xit-02!sn-xit-06!sn-post-01!supernews.com!corp.supernews.com!not-for-mail
From: Tom Oswald <toswald@sharplabs.com>
Newsgroups: gnu.emacs.help
Date: Mon, 09 Dec 2002 13:28:37 -0800
Organization: Posted via Supernews, http://www.supernews.com
Message-ID: <uva1nb8lbd4j9c@corp.supernews.com>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020827
X-Accept-Language: en-us, en
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: abuse@supernews.com
Lines: 7
Xref: shelby.stanford.edu gnu.emacs.help:107901
To: help-gnu-emacs@gnu.org
Subject: How to set a pixmap as an emacs background rather than a color?
X-BeenThere: help-gnu-emacs@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Users list for the GNU Emacs text editor <help-gnu-emacs.gnu.org>
List-Help: <mailto:help-gnu-emacs-request@gnu.org?subject=help>
List-Post: <mailto:help-gnu-emacs@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-gnu-emacs>,
        <mailto:help-gnu-emacs-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/help-gnu-emacs>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-gnu-emacs>,
        <mailto:help-gnu-emacs-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Mon, 09 Dec 2002 21:15:20 -0000

I am using emacs 21.2.1 in a redhat 7.3 distribution.  Can a pixmap be 
set as the background rather then a color?

Thanks,

Tom


reply via email to

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