Changeset 674
- Timestamp:
- Mar 19, 2004, 11:36:23 PM (21 years ago)
- Location:
- trunk/ccl/hemlock/src
- Files:
-
- 3 edited
-
cocoa-hemlock.lisp (modified) (2 diffs)
-
command.lisp (modified) (1 diff)
-
interp.lisp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ccl/hemlock/src/cocoa-hemlock.lisp
r667 r674 15 15 (prefix-argument-supplied nil) 16 16 frame 17 ( function nil)17 (event-mode-list nil) ; for extended modal 18 18 ) 19 19 20 20 (defvar *current-command-info* nil) 21 22 (defun push-event-mode-function (f) 23 (push f (command-interpreter-info-event-mode-list *current-command-info*)) 24 f) 25 26 (defun exit-event-mode () 27 (setf (command-interpreter-info-event-mode-list *current-command-info*) 28 (cdr (command-interpreter-info-event-mode-list *current-command-info*)))) 29 30 (defun current-event-mode () 31 (car (command-interpreter-info-event-mode-list *current-command-info*))) 32 33 (defun add-one-shot-event-mode-function (f) 34 (push-event-mode-function #'(lambda (key) 35 (exit-event-mode) 36 (funcall f key)))) 37 38 21 39 22 40 (defun buffer-windows (buffer) … … 38 56 #+not-yet 39 57 (invoke-hook hemlock::set-window-hook new-window) 40 #+clx 41 (move-mark (window-point *current-window*) 42 (buffer-point (window-buffer *current-window*))) 43 #+clx 44 (move-mark (buffer-point (window-buffer new-window)) 45 (window-point new-window)) 58 (activate-hemlock-view new-window) 46 59 (setq *current-window* new-window)) 47 60 -
trunk/ccl/hemlock/src/command.lisp
r668 r674 64 64 With prefix argument, insert the character that many times." 65 65 "Reads a key-event from *editor-input* and inserts it at the point." 66 ( setf (hi::command-interpreter-info-function hi::*current-command-info*)67 #'(lambda (key-event)66 (hi::add-one-shot-event-mode-function 67 #'(lambda (key-event) 68 68 (let* ((char (hemlock-ext:key-event-char key-event)) 69 69 (point (current-point))) -
trunk/ccl/hemlock/src/interp.lisp
r670 r674 428 428 (cmd (command-interpreter-info-current-command info)) 429 429 (trans (command-interpreter-info-current-translation info)) 430 (func (c ommand-interpreter-info-function info)))430 (func (current-event-mode))) 431 431 (handler-bind 432 432 ;; Bind this outside the invocation loop to save consing. … … 450 450 (write-char #\space *echo-area-stream*))))) 451 451 (cond (func 452 (setf (command-interpreter-info-function info) nil)453 452 (funcall func key-event)) 454 453 (t … … 493 492 ;;; Read commands from the terminal and execute them, forever. 494 493 ;;; 494 #+original 495 495 (defun %command-loop () 496 496 (let ((cmd *current-command*) … … 551 551 (hash-table)))))))) 552 552 553 (defun %command-loop () 554 (format t "~& in %command-loop: current buffer = ~s" (current-buffer))) 555 556 553 557 554 558 ;;; EXIT-HEMLOCK -- Public
Note:
See TracChangeset
for help on using the changeset viewer.
