From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: elisp questions for Advanced Closing brackets function Date: Tue, 20 May 2008 11:24:44 -0700 Message-ID: <000601c8baa6$c7706af0$0200a8c0@us.oracle.com> References: <17346961.post@talk.nabble.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 1211307961 26210 80.91.229.12 (20 May 2008 18:26:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 20 May 2008 18:26:01 +0000 (UTC) To: "'TheLonelyStar'" , Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue May 20 20:26:38 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 1JyWXY-0001aC-Tj for geh-help-gnu-emacs@m.gmane.org; Tue, 20 May 2008 20:26:25 +0200 Original-Received: from localhost ([127.0.0.1]:34195 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JyWWo-0004Gc-Ns for geh-help-gnu-emacs@m.gmane.org; Tue, 20 May 2008 14:25:38 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JyWWA-0003zG-D3 for help-gnu-emacs@gnu.org; Tue, 20 May 2008 14:24:58 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JyWW8-0003wd-PM for help-gnu-emacs@gnu.org; Tue, 20 May 2008 14:24:58 -0400 Original-Received: from [199.232.76.173] (port=42477 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JyWW8-0003wS-EG for help-gnu-emacs@gnu.org; Tue, 20 May 2008 14:24:56 -0400 Original-Received: from rgminet01.oracle.com ([148.87.113.118]:10373) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JyWW8-000896-3X for help-gnu-emacs@gnu.org; Tue, 20 May 2008 14:24:56 -0400 Original-Received: from agmgw1.us.oracle.com (agmgw1.us.oracle.com [152.68.180.212]) by rgminet01.oracle.com (Switch-3.2.4/Switch-3.1.6) with ESMTP id m4KIOrEK028058; Tue, 20 May 2008 12:24:53 -0600 Original-Received: from acsmt351.oracle.com (acsmt351.oracle.com [141.146.40.151]) by agmgw1.us.oracle.com (Switch-3.2.0/Switch-3.2.0) with ESMTP id m4K9L1kn030677; Tue, 20 May 2008 12:24:52 -0600 Original-Received: from inet-141-146-46-1.oracle.com by acsmt351.oracle.com with ESMTP id 3675672261211307883; Tue, 20 May 2008 11:24:43 -0700 Original-Received: from dradamslap1 (/24.5.171.3) by bhmail.oracle.com (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 20 May 2008 11:24:43 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <17346961.post@talk.nabble.com> Thread-Index: Aci6parrPIN0jMHFTv69bZAj4VBVRwAAEHIA X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 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:54175 Archived-At: > - 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".