From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: TheLonelyStar Newsgroups: gmane.emacs.help Subject: RE: elisp questions for Advanced Closing brackets function Date: Tue, 20 May 2008 13:04:14 -0700 (PDT) Message-ID: <17349504.post@talk.nabble.com> References: <17346961.post@talk.nabble.com> <000601c8baa6$c7706af0$0200a8c0@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1211314030 18307 80.91.229.12 (20 May 2008 20:07:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 20 May 2008 20:07:10 +0000 (UTC) To: Help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue May 20 22:07:47 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JyY5J-0002fr-2S for geh-help-gnu-emacs@m.gmane.org; Tue, 20 May 2008 22:05:53 +0200 Original-Received: from localhost ([127.0.0.1]:53059 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JyY4Y-0003WK-Vb for geh-help-gnu-emacs@m.gmane.org; Tue, 20 May 2008 16:04:34 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JyY4H-0003WF-NN for help-gnu-emacs@gnu.org; Tue, 20 May 2008 16:04:17 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JyY4G-0003W3-29 for Help-gnu-emacs@gnu.org; Tue, 20 May 2008 16:04:17 -0400 Original-Received: from [199.232.76.173] (port=34443 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JyY4F-0003W0-V7 for Help-gnu-emacs@gnu.org; Tue, 20 May 2008 16:04:15 -0400 Original-Received: from kuber.nabble.com ([216.139.236.158]:41733) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JyY4F-0005Wm-Lx for Help-gnu-emacs@gnu.org; Tue, 20 May 2008 16:04:15 -0400 Original-Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1JyY4E-00054d-1h for Help-gnu-emacs@gnu.org; Tue, 20 May 2008 13:04:14 -0700 In-Reply-To: <000601c8baa6$c7706af0$0200a8c0@us.oracle.com> X-Nabble-From: nabble@lonely-star.org X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:54178 Archived-At: 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.