[climacs-cvs] CVS update: climacs/esa.lisp climacs/gui.lisp climacs/packages.lisp

Robert Strandh rstrandh at common-lisp.net
Mon Jul 25 03:41:16 UTC 2005


Update of /project/climacs/cvsroot/climacs
In directory common-lisp.net:/tmp/cvs-serv26310

Modified Files:
	esa.lisp gui.lisp packages.lisp 
Log Message:
Moved keyboard macros to esa.lisp and to a new command table: 
keyboard-macro-table.

Date: Mon Jul 25 05:41:14 2005
Author: rstrandh

Index: climacs/esa.lisp
diff -u climacs/esa.lisp:1.10 climacs/esa.lisp:1.11
--- climacs/esa.lisp:1.10	Sun Jul 24 07:10:47 2005
+++ climacs/esa.lisp	Mon Jul 25 05:41:13 2005
@@ -331,6 +331,42 @@
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;; 
+;;; Keyboard macros
+
+(define-command-table keyboard-macro-table)
+
+(define-command (com-start-kbd-macro
+		 :name t
+		 :command-table keyboard-macro-table)
+    ()
+  (setf (recordingp *application-frame*) t)
+  (setf (recorded-keys *application-frame*) '()))
+
+(set-key 'com-start-kbd-macro 'keyboard-macro-table '((#\x :control) #\())
+
+(define-command (com-end-kbd-macro
+		 :name t
+		 :command-table keyboard-macro-table)
+    ()
+  (setf (recordingp *application-frame*) nil)
+  (setf (recorded-keys *application-frame*)
+	;; this won't work if the command was invoked in any old way
+	(reverse (cddr (recorded-keys *application-frame*)))))
+
+(set-key 'com-end-kbd-macro 'keyboard-macro-table '((#\x :control) #\)))
+
+(define-command (com-call-last-kbd-macro
+		 :name t
+		 :command-table keyboard-macro-table)
+    ()
+  (setf (remaining-keys *application-frame*)
+	(recorded-keys *application-frame*))
+  (setf (executingp *application-frame*) t))
+
+(set-key 'com-call-last-kbd-macro 'keyboard-macro-table '((#\x :control) #\e))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; 
 ;;; example application
 
 (defclass example-info-pane (info-pane)
@@ -393,5 +429,6 @@
 ;;; 
 ;;; Commands and key bindings
 
-(define-command-table global-example-table :inherit-from (global-esa-table))
+(define-command-table global-example-table
+    :inherit-from (global-esa-table keyboard-macro-table))
 


Index: climacs/gui.lisp
diff -u climacs/gui.lisp:1.164 climacs/gui.lisp:1.165
--- climacs/gui.lisp:1.164	Sun Jul 24 07:10:47 2005
+++ climacs/gui.lisp	Mon Jul 25 05:41:13 2005
@@ -159,7 +159,8 @@
 	do (when (modified-p buffer)
 	     (setf (needs-saving buffer) t))))	
 
-(make-command-table 'global-climacs-table :errorp nil :inherit-from '(global-esa-table))
+(make-command-table 'global-climacs-table :errorp nil
+		    :inherit-from '(global-esa-table keyboard-macro-table))
 
 (defmacro define-named-command (command-name args &body body)
   `(define-command ,(if (listp command-name)
@@ -740,25 +741,6 @@
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;; 
-;;; Keyboard macros
-
-(define-named-command com-start-kbd-macro ()
-  (setf (recordingp *application-frame*) t)
-  (setf (recorded-keys *application-frame*) '()))
-
-(define-named-command com-end-kbd-macro ()
-  (setf (recordingp *application-frame*) nil)
-  (setf (recorded-keys *application-frame*)
-	;; this won't work if the command was invoked in any old way
-	(reverse (cddr (recorded-keys *application-frame*)))))
-
-(define-named-command com-call-last-kbd-macro ()
-  (setf (remaining-keys *application-frame*)
-	(recorded-keys *application-frame*))
-  (setf (executingp *application-frame*) t))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; 
 ;;; Commands for splitting windows
 
 (defun replace-constellation (constellation additional-constellation vertical-p)
@@ -1361,10 +1343,7 @@
 (c-x-set-key '(#\1) 'com-single-window)
 (c-x-set-key '(#\2) 'com-split-window-vertically)
 (c-x-set-key '(#\3) 'com-split-window-horizontally)
-(c-x-set-key '(#\() 'com-start-kbd-macro)
-(c-x-set-key '(#\)) 'com-end-kbd-macro)
 (c-x-set-key '(#\b) 'com-switch-to-buffer)
-(c-x-set-key '(#\e) 'com-call-last-kbd-macro)
 (c-x-set-key '(#\f :control) 'com-find-file)
 (c-x-set-key '(#\i) 'com-insert-file)
 (c-x-set-key '(#\k) 'com-kill-buffer)


Index: climacs/packages.lisp
diff -u climacs/packages.lisp:1.68 climacs/packages.lisp:1.69
--- climacs/packages.lisp:1.68	Sun Jul 24 07:10:48 2005
+++ climacs/packages.lisp	Mon Jul 25 05:41:13 2005
@@ -174,9 +174,7 @@
 	   #:esa-frame-mixin #:windows #:recordingp #:executingp
 	   #:*numeric-argument-p* #:*current-gesture*
 	   #:esa-top-level #:simple-command-loop
-	   #:global-esa-table
-	   ;; remove these when kbd macros move to esa
-	   #:recorded-keys #:remaining-keys))
+	   #:global-esa-table #:keyboard-macro-table))
 
 (defpackage :climacs-gui
   (:use :clim-lisp :clim :climacs-buffer :climacs-base :climacs-abbrev :climacs-syntax




More information about the Climacs-cvs mailing list