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

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

Extending forward-list to include multi-letter tags


From: gnuist006
Subject: Extending forward-list to include multi-letter tags
Date: Sat, 20 Oct 2007 04:51:26 -0000
User-agent: G2/1.0

I am sure this is a trivial problem for many of you, and it is one of
those problems that is like a mathematical puzzle with definite
solutions. I am interested in seeing multiple solutions to it.

Here is the problem:

The pair of functions forward-list and backward-list allow moving
the cursor to the next matching paren, bracket or brace. So it
works for characters like
{[(  )]}

The main utility of this function is mainly due to the nesting that
may be there, so a simple forward search wont take care of it.

Here, I would like to find out how one can find matching multi
letter tags.

For example, I have a tag like

<tag> and its matching tag is </tag>

there may be nested tags like this.

Essentially, the solution involves first finding the algorithm for
the forward-list and then extending it to multi-letter tags.

How can I get the lisp definition of a function inside emacs ?

I have posted this in cll and cls because their solutions may
be modified to work in emacs lisp.

Thanks to the star who can solve it.
gnuist



reply via email to

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