all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: rustom <rustompmody@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: catching parenthesis errors in elisp
Date: Fri, 12 Jun 2009 05:06:57 -0700 (PDT)	[thread overview]
Message-ID: <9879b6b4-b81f-43f3-92cf-fc22ae5bc90c@u9g2000prd.googlegroups.com> (raw)
In-Reply-To: 89aa42c7-bfc9-43de-b844-882b9db0ef77@p6g2000pre.googlegroups.com

On Jun 12, 4:55 pm, Xah Lee <xah...@gmail.com> wrote:
> On Jun 12, 12:05 am, rustom <rustompm...@gmail.com> wrote:
>
> > Im hacking on a 700 line elisp function.
> > While doing some (fairly mechanical) cut-paste operations it looks
> > like either Ive got a parenthesis or a quote (most likely double quote
> > but could also be single quote) error.
>
> > Any suggestions on how to catch such errors?
>
> here's some recommendation based on how i code elisp.
>
> • never type single paren. I always type them in pairs. And never
> delete one of them.
> • use tree navigation to move between code.
> • to delete or move parts of expression, select the whole expression,
> cut & copy to move.
>
> so, when i code in lisp, there is never ever unmatched parenthesis.
>
> this method beats paren-edit mode.
Ive *not* written this lisp.
All did (or tried to do) was take some existing lisp and change it a
bit here and there -- mostly nothing more than changing some strings.
>
> the detail of my editing and setup is here:
>
> • Tips For Editing Lisp Code With Emacs
>  http://xahlee.org/emacs/emacs_editing_lisp.html
>
> to select current unit of sexp, i press one key, which is bound to
> extend-selection, which is defined in my ergoemacs mode. The code is
> shown here:
>
> • A Text Editor Feature: Extend Selection By Semantic Unit
>  http://xahlee.org/emacs/syntax_tree_walk.html
>
>   Xah
> ∑http://xahlee.org/
>
> ☄



  reply	other threads:[~2009-06-12 12:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-12  7:05 catching parenthesis errors in elisp rustom
2009-06-12  9:57 ` Thien-Thi Nguyen
2009-06-12 10:18 ` Tim X
2009-06-12 11:02   ` rustom
2009-06-12 10:26 ` Thierry Volpiatto
2009-06-12 11:55 ` Xah Lee
2009-06-12 12:06   ` rustom [this message]
2009-06-12 12:24     ` Pascal J. Bourguignon
2009-06-12 12:25     ` rustom
2009-06-12 15:32       ` Giorgos Keramidas
2009-06-13  2:47       ` Barry Margolin
2009-06-13  6:43         ` rustom
2009-06-13  1:04 ` Joe Fineman

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9879b6b4-b81f-43f3-92cf-fc22ae5bc90c@u9g2000prd.googlegroups.com \
    --to=rustompmody@gmail.com \
    --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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.