/[mcclim]/mcclim/dead-keys.lisp
ViewVC logotype

Diff of /mcclim/dead-keys.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by thenriksen, Thu May 1 06:48:23 2008 UTC revision 1.3 by thenriksen, Thu May 1 07:48:45 2008 UTC
# Line 117  table)." Line 117  table)."
117  (defmacro merging-dead-keys ((gesture state) &body body)  (defmacro merging-dead-keys ((gesture state) &body body)
118    "Accumulate dead keys and subsequent characters. `Gesture'    "Accumulate dead keys and subsequent characters. `Gesture'
119  should be a symbol bound to either a gesture or an input  should be a symbol bound to either a gesture or an input
120  event. When it has been determined that a sequence of `gesture's  event. `Body' will be evaluated either with the `gesture' binding
121  either does or doesn't result in a full gesture, `body' will be  unchanged, or with `gesture' bound to the result of merging
122  evaluated with `gesture' bound to that gesture. `State' must be a  preceding dead keys. `State' must be a place, initially NIL, that
123  place, initially NIL, that will contain the state of dead-key  will contain the state of dead-key handling, enabling
124  handling, enabling asynchronous use of the macro."  asynchronous use of the macro."
125    `(flet ((invoke-body (,gesture)    `(flet ((invoke-body (,gesture)
             (setf ,state *dead-key-table*)  
126              ,@body))              ,@body))
127       (when (null ,state)       (when (null ,state)
128         (setf ,state *dead-key-table*))         (setf ,state *dead-key-table*))
# Line 141  handling, enabling asynchronous use of t Line 140  handling, enabling asynchronous use of t
140                           (characterp ,gesture))                           (characterp ,gesture))
141                       (setf ,state *dead-key-table*))))                       (setf ,state *dead-key-table*))))
142               (character               (character
143                  (setf ,state *dead-key-table*)
144                (invoke-body value))                (invoke-body value))
145               (hash-table               (hash-table
146                (setf ,state value))))                (setf ,state value)
147           (invoke-body ,gesture))))                (invoke-body value))))
148             (progn (setf ,state *dead-key-table*)
149                    (invoke-body ,gesture)))))

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.5