[Top][All Lists]

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

Re: detect emacs/xemacs in elisp?

From: Stefan Monnier <address@hidden>
Subject: Re: detect emacs/xemacs in elisp?
Date: 09 Dec 2002 19:50:23 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

>>>>> "Jason" == Jason Addison <address@hidden> writes:
> I have some elisp that works/doesn't work in emacs/xemacs in my
> ".emacs" file.

You can use

        (condition-case nil
            (this-is-the thing that might fail)
          (error nil))

to tell Emacs to ignore any error that might occur while executing
the form (this-is-the thing that might fail).

If you do (require 'cl) you can equivalently use the following shorthand:

        (ignore-errors (this-is-the thing that might fail))

> Another way around this
> would be to know how to determine if a function is defined before
> calling it.

(if (fboundp 'foo)
    (foo some arg))

>From address@hidden Mon Dec 09 20:47:55 2002
Received: from list by with tmda-scanned (Exim 4.10.13)
        id 18LZV5-0008LZ-00
        for address@hidden; Mon, 09 Dec 2002 20:47:55 -0500
Received: from mail by with spam-scanned (Exim 4.10.13)
        id 18LZV3-0008LO-00
        for address@hidden; Mon, 09 Dec 2002 20:47:54 -0500
Received: from ([])
        by with esmtp (Exim 4.10.13)
        id 18LZV2-0008LB-00; Mon, 09 Dec 2002 20:47:53 -0500
Received: from ([])gBA1loU25563;
        Tue, 10 Dec 2002 10:47:50 +0900 (JST)
Received: from ( []) by (8.11.6/3.7W-MAILGATE-NEC) with ESMTP
        id gBA1lnq22845; Tue, 10 Dec 2002 10:47:49 +0900 (JST)
Received: from ([]) by
        (8.11.6/3.7W-MAILSV-NEC) with ESMTP
        id gBA1lTs04981; Tue, 10 Dec 2002 10:47:48 +0900 (JST)
Received: from (mcspd15 [])
        id gBA1lTB29741;        Tue, 10 Dec 2002 10:47:29 +0900 (JST)
Received: by (Postfix, from userid 31295)
        id E1EEE3703; Tue, 10 Dec 2002 10:47:28 +0900 (JST)
Sender: address@hidden
To: address@hidden
References: <address@hidden>
System-Type: i686-pc-linux-gnu
Blat: Foop
From: Miles Bader <address@hidden>
Date: 10 Dec 2002 10:47:28 +0900
In-Reply-To: <address@hidden>
Message-ID: <address@hidden>
Lines: 22
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Subject: Re: PCL-CVS only committing some files
X-BeenThere: address@hidden
X-Mailman-Version: 2.1b5
Precedence: list
Reply-To: Miles Bader <address@hidden>
List-Id: Users list for the GNU Emacs text editor <>
List-Help: <mailto:address@hidden>
List-Post: <mailto:address@hidden>
List-Subscribe: <>,
List-Archive: <>
List-Unsubscribe: <>,
X-List-Received-Date: Tue, 10 Dec 2002 01:47:56 -0000

"Stefan Monnier <address@hidden>" 
<> writes:
> >   * When the user hits `C-c C-c', if the set of to-be-committed
> >     file/files is different from what it was at `c'/`C' time, ask the
> >     user to confirm the commit (`Really commit foo.c?' or `Really commit
> >     these files?' [+ temp-buffer showing the files])
> AFAIK this is the default behavior (including the temp-buffer).
> What is the value of `log-edit-confirm' ?

Gah, now I'm really confused; log-edit-confirm's value is `changed', which
looks like it should give me exactly the behavior I want, but I most
certainly have run afoul of the `accidentally moved cursor in *cvs*'
problem I mentioned earlier.  I don't know whether there's a bug, or
whether it _did_ prompt me and I forgot that part...

It's a bit of pain to test, unfortunately (I'd have to create a cvs

P.S.  All information contained in the above letter is false,
      for reasons of military security.

reply via email to

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