help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: catching parenthesis errors in elisp


From: Xah Lee
Subject: Re: catching parenthesis errors in elisp
Date: Fri, 12 Jun 2009 04:55:57 -0700 (PDT)
User-agent: G2/1.0

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.

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 via email to

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