[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
search string in FRED window
- To: info-mcl
- Subject: search string in FRED window
- From: ralex@cs.Colorado.EDU (Repenning Alexander)
- Date: 23 Oct 91 03:49:57 GMT
- Distribution: usa
- Newsgroups: comp.lang.lisp.mcl
- Organization: University of Colorado, Boulder, Department of Computer Science
- Sender: firstname.lastname@example.org (The Daily Planet)
I like to search for a string in a FRED buffer non-interactively,
i.e., by calling a function like
search-string-in-fred-window <window> <string>
If the string is found in the window it should be marked and
positioned to a visible window location. Is there a nice way to do
this in MACL 1.3.2? After all, the string search dialog must be doing
this. A naive (read not working) approach is:
(defun search-string-in-fred-window (Window String)
(dotimes (I (length String))
(window-key-event-handler (char String I)))))
Calling this function results in:
> Error: Unbound variable: *CURRENT-EVENT* .
> While executing: DO-NEXT-I-SEARCH
> Type Command-/ to continue, Command-. to abort.
Apparently once incremental search is started DO-NEXT-I-SEARCH is
expecting an event. This event has not really taken place as I "faked"
it by sending window-key-event-handler myself.
Well, I assume that there's a much better way to do this. Any
suggestions are welcome. In general it would be nice to have a
low-level batch facility based on individual keystrokes to implement