[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: keyboard macros
- To: ogus@gaulois.berkeley.edu (Arthur E. Ogus)
- Subject: Re: keyboard macros
- From: Michael Travers <mt@media.mit.edu>
- Date: Sun, 21 Feb 93 23:39:11 -0500
- Cc: info-mcl@cambridge.apple.com
- In-reply-to: Your message of "21 Feb 93 22:46:15 GMT." <1m90nn$kfv@agate.berkeley.edu>
I have a keyboard macro hack that (I think) appears on the MCL CDROM.
Rather than posting the whole thing here, I'll just send the patch
that makes it possible for i-search to work:
;;; Patched from lib;fred-additions.lisp -- original looked at event record rather than *current-keystroke*
(defun i-search-do-keystroke (w)
(declare (special *default-command-p*))
(let* ((key-code *current-keystroke*)
(key-name (keystroke-name key-code)))
(if (and (or (%i> key-code 32)
(eq key-code (char-code #\return))
(eq key-code (char-code #\tab))
(eq key-code (char-code #\space)))
(neq key-name #\rubout)
(characterp key-name))
(i-search-add-char w key-name)
(progn
(ed-push-mark w (car *i-search-original-pos*))
(remove-shadowing-comtab w)
;(collapse-selection w t) ; I like this but Mac weenies probably wont
(run-fred-command w (keystroke-function w key-code))
(setq *default-command-p* t)
(i-search-all-done w)))))