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

[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 <jason_addison@hotmail.com> 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))


        Stefan
>From miles@lsi.nec.co.jp Mon Dec 09 20:47:55 2002
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
        id 18LZV5-0008LZ-00
        for help-gnu-emacs@gnu.org; Mon, 09 Dec 2002 20:47:55 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
        id 18LZV3-0008LO-00
        for help-gnu-emacs@gnu.org; Mon, 09 Dec 2002 20:47:54 -0500
Received: from tyo202.gate.nec.co.jp ([202.32.8.202])
        by monty-python.gnu.org with esmtp (Exim 4.10.13)
        id 18LZV2-0008LB-00; Mon, 09 Dec 2002 20:47:53 -0500
Received: from mailgate4.nec.co.jp ([10.7.69.197])gBA1loU25563;
        Tue, 10 Dec 2002 10:47:50 +0900 (JST)
Received: from mailsv.nec.co.jp (mailgate51.nec.co.jp [10.7.69.196]) by
        mailgate4.nec.co.jp (8.11.6/3.7W-MAILGATE-NEC) with ESMTP
        id gBA1lnq22845; Tue, 10 Dec 2002 10:47:49 +0900 (JST)
Received: from mcsss2.ucom.lsi.nec.co.jp ([10.30.114.133]) by mailsv.nec.co.jp
        (8.11.6/3.7W-MAILSV-NEC) with ESMTP
        id gBA1lTs04981; Tue, 10 Dec 2002 10:47:48 +0900 (JST)
Received: from mcspd15.ucom.lsi.nec.co.jp (mcspd15 [10.30.114.174])
        id gBA1lTB29741;        Tue, 10 Dec 2002 10:47:29 +0900 (JST)
Received: by mcspd15.ucom.lsi.nec.co.jp (Postfix, from userid 31295)
        id E1EEE3703; Tue, 10 Dec 2002 10:47:28 +0900 (JST)
Sender: miles@mcspd15.ucom.lsi.nec.co.jp
To: help-gnu-emacs@gnu.org
References: <84u1hw36zt.fsf@lucy.cs.uni-dortmund.de>
        <5lr8d0me0i.fsf@rum.cs.yale.edu>
        <87vg26h6w6.fsf@tc-1-100.kawasaki.gol.ne.jp>
        <5lptsbjfy9.fsf@rum.cs.yale.edu>
System-Type: i686-pc-linux-gnu
Blat: Foop
From: Miles Bader <miles@lsi.nec.co.jp>
Date: 10 Dec 2002 10:47:28 +0900
In-Reply-To: <5lptsbjfy9.fsf@rum.cs.yale.edu>
Message-ID: <buovg224pcf.fsf@mcspd15.ucom.lsi.nec.co.jp>
Lines: 22
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Subject: Re: PCL-CVS only committing some files
X-BeenThere: help-gnu-emacs@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
Reply-To: Miles Bader <miles@gnu.org>
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: Tue, 10 Dec 2002 01:47:56 -0000

"Stefan Monnier <foo@acm.com>" <monnier+gnu.emacs.help/news/@flint.cs.yale.edu> 
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
repository).

-Miles
-- 
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]