Changeset 760


Ignore:
Timestamp:
Apr 8, 2004, 3:38:00 AM (16 years ago)
Author:
gb
Message:

Handle control-g (abort-event) in GET-KEY-EVENT.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ccl/hemlock/src/cocoa-hemlock.lisp

    r740 r760  
    7171(defvar *input-transcript* ())
    7272
     73(defparameter editor-abort-key-events (list #k"Control-g" #k"Control-G"))
     74
     75(defmacro abort-key-event-p (key-event)
     76  `(member ,key-event editor-abort-key-events))
     77
     78
    7379(defun get-key-event (q &optional ignore-pending-aborts)
    74   (declare (ignore ignore-pending-aborts))
    7580  (do* ((e (dequeue-key-event q) (dequeue-key-event q)))
    76        ((typep e 'hemlock-ext:key-event)       
     81       ((typep e 'hemlock-ext:key-event)
     82        (unless ignore-pending-aborts
     83          (when (abort-key-event-p e)
     84            (beep)
     85            (throw 'editor-top-level-catcher nil)))
    7786        (setq *last-key-event-typed* e))
    7887    (if (typep e 'buffer-operation)
Note: See TracChangeset for help on using the changeset viewer.