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

Replacement of expressions in Zmacs buffers



Does anybody know how to do a replacement of list expressions in a Zmacs
Buffer.  My specific case is this: I have an old function FOO which takes three
arguments, one of them optional, which is used extensively in some old code I
am re-using.  I want to simplify things and replace FOO with a system-defined
function FOO1, which takes exactly two arguments.  As things currently stand, I
can either redefine FOO as a wrapper around FOO1 which discards the third
optional argument, or do replacement by hand, since Zmacs does not seem to
provide a facility for doing non-string-based replacement.  The only exception
seems to be Atom Query Replace, which explicitly states that it does not work
for lists.  I would like to be able to say:

	Expression Replace (FOO ?a ?b ?c) with (FOO1 ?a ?b)

This seems like an easy thing to write in lisp, but I don't want to take the
time to figure out how to access Zmacs buffers programmatically.  Does anybody
have any code for doing this or know of an existing way?

Steve Jameson                           General Electric Aerospace 
sjameson@atl.ge.com                     Advanced Technology Laboratories
                                        Moorestown, New Jersey              
****************************************************************************
**  . . . but I do not love the sword for its sharpness, nor the arrow    **
**  for its swiftness, nor the warrior for his glory.  I love only that   **
**  which they defend . . .                                               **
**    -- Faramir, "The Two Towers"                                        **
****************************************************************************