[Top][All Lists]

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

RE: elisp questions for Advanced Closing brackets function

From: TheLonelyStar
Subject: RE: elisp questions for Advanced Closing brackets function
Date: Tue, 20 May 2008 13:04:14 -0700 (PDT)


Thanks for your help! I am sorry if I should have found this information in
the manual.
What do you mean by the "onboard elisp manual"?
This: ?

I have a another question for which I did not find an answer in the link
I want the closing-parentese function to be more general.
I want to call the same funciton for "]", ")" and "}".
So i would bind this function to all these keys.
But how can the function know by which key it was invoked?
I thought, the key would be given as argument ... but if it is I do not know
how to format the argument to the correct character.


Drew Adams wrote:
>> - How do I check if the character under (point) is a whitespace?
> See function `looking-at'.
>> - In an "if" statement, how do I put more than one expression 
>> into the else case? Like this:
>> (if condition (do-if-case) ((do-else-case) (do-more-else-case))
> Just drop the parens around the else-case parts.
> (if (some-test)
>     (the-then-part)
>   (an-else-part)
>   (another-else-part)
>   (and-another))
> `if' allows any number of sexps in the else part. See also `cond' and
> `when'.
>> - If I have a funcion like this:
>> (defun adanced-closing-bracket (arg) ...)
>> How do I compare (arg) to the character under point?
> You can compare characters with `eq'. `char-after' picks up the character
> at a
> given buffer position.
> (eq arg (char-after (point)))
> The onboard Elisp manual is your friend.
> See also the onboard manual "Emacs Lisp Intro".

View this message in context:
Sent from the Emacs - Help mailing list archive at

reply via email to

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