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

Re: keyboard macros



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)))))