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

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

Re: How to navigate to next git conflict?


From: Stefan Monnier
Subject: Re: How to navigate to next git conflict?
Date: Wed, 06 Feb 2019 10:30:47 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

>> >   (condition-case err
>> >       (not (smerge-next))
>> >     ('error
>> This catches both the `error` and the `quote` conditions.
> What is "quote condition"?

I don't know of any `quote` condition, indeed.  Yet that's what you
wrote in your code by placing a spurious ' in front of `error`.

When you write

    'error
    
it is 100% indistinguishable from writing

    (quote error)

so this is the list of conditions your code catches.  If you only want
to catch `error` then you can write

     (condition-case ...
         ...
       (error ...))
or
     (condition-case ...
         ...
       ((error) ...))

> FWIW, it's very hard to find how to catch some "error".

Have you looked in the Emacs Lisp documentation included in Emacs,
e.g. in the Emacs Lisp Introduction?

> I managed to find this way of doing that in someone's blog post.

Could you warn this blogger about his mistake so it doesn't spread
yet further?


        Stefan



reply via email to

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