From: TheLonelyStar <nabble@lonely-star.org>
To: Help-gnu-emacs@gnu.org
Subject: RE: elisp questions for Advanced Closing brackets function
Date: Tue, 20 May 2008 13:04:14 -0700 (PDT) [thread overview]
Message-ID: <17349504.post@talk.nabble.com> (raw)
In-Reply-To: <000601c8baa6$c7706af0$0200a8c0@us.oracle.com>
Hi,
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:
http://www.gnu.org/software/emacs/manual/elisp.html ?
I have a another question for which I did not find an answer in the link
above:
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.
Thanks!
Nathan
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: http://www.nabble.com/elisp-questions-for-Advanced-Closing-brackets-function-tp17346961p17349504.html
Sent from the Emacs - Help mailing list archive at Nabble.com.
next prev parent reply other threads:[~2008-05-20 20:04 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-20 18:12 elisp questions for Advanced Closing brackets function TheLonelyStar
2008-05-20 18:24 ` Drew Adams
2008-05-20 20:04 ` TheLonelyStar [this message]
2008-05-20 20:19 ` Drew Adams
2008-05-21 6:18 ` Pierre Lorenzon
-- strict thread matches above, loose matches on Subject: below --
2008-05-21 8:47 Lorenzo Isella
[not found] <mailman.11908.1211307132.18990.help-gnu-emacs@gnu.org>
2008-05-21 9:09 ` Tim X
[not found] <mailman.11944.1211359652.18990.help-gnu-emacs@gnu.org>
2008-05-21 10:28 ` Rupert Swarbrick
2008-05-21 10:33 ` Rupert Swarbrick
2008-05-21 18:30 ` Ralf Angeli
2008-05-21 18:40 ` Rupert Swarbrick
2008-05-21 20:14 ` Ralf Angeli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=17349504.post@talk.nabble.com \
--to=nabble@lonely-star.org \
--cc=Help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).