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

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

how to search and replace in nested expressions


From: JAMES FUNDERBURK
Subject: how to search and replace in nested expressions
Date: Mon, 13 Feb 2006 05:22:52 GMT

Is there a way to search and replace in nested expressions?
  The particular form of my nested expressions is
     form[x,y,...z]  where each 'argument' may be either
    a word (simple character string) or else
    another nested expression.  Note that the arguments are
    separated by commas, but there may be only one argument.
    For example, it might be desired to change expressions of the form
       simple[x,y] to simple[y,x]  in such a way that
       simple[apple[u],pear[v,w]] is changed to
       simple[pear[v,w],apple[u]].
   I am familiar with Emacs-Lisp, so am looking for a function to do
   such changes on a buffer.  I have used the regular expression search  and 
replace functions quite a bit, but don't see how to apply them in this 
situation.



Thanks for any suggestions.





reply via email to

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