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

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

How to structure looking-at with error conditions


From: Fren Zeee
Subject: How to structure looking-at with error conditions
Date: Tue, 23 Nov 2010 18:03:37 -0800 (PST)
User-agent: G2/1.0

hello emacs users

generally, i use looking-at as follows

(when (looking-at "desired_pattern")
        ( do_this_and_that

       (do some more things)

(when (looking-at "anther_ desired_pattern")
        ( do_this_and_that)
)

)

whats your expert advice on how to modify if the cursor is not at the
desired pattern in either case so that an error message is reported ?

should I wrap the looking-at in cond or can I add some kind of default
ie else like functioning clause to when ?

Franz Xe



reply via email to

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