[climacs-cvs] CVS climacs

thenriksen thenriksen at common-lisp.net
Tue Feb 7 15:21:30 UTC 2006


Update of /project/climacs/cvsroot/climacs
In directory common-lisp:/tmp/cvs-serv12315

Modified Files:
	packages.lisp misc-commands.lisp lisp-syntax.lisp gui.lisp 
	climacs.asd 
Log Message:
Refactored the Lisp syntax module so it is no longer integrated with
the global command table and gui.lisp.


--- /project/climacs/cvsroot/climacs/packages.lisp	2005/11/12 23:09:34	1.83
+++ /project/climacs/cvsroot/climacs/packages.lisp	2006/02/07 15:21:30	1.84
@@ -161,6 +161,31 @@
 	   #:url
 	   #:climacs-textual-view #:+climacs-textual-view+))
 
+(defpackage :esa
+  (:use :clim-lisp :clim)
+  (:export #:minibuffer-pane #:display-message
+	   #:esa-pane-mixin #:previous-command
+	   #:info-pane #:master-pane
+	   #:esa-frame-mixin #:windows #:recordingp #:executingp
+	   #:*numeric-argument-p* #:*current-gesture*
+	   #:esa-top-level #:simple-command-loop
+	   #:global-esa-table #:keyboard-macro-table
+	   #:help-table
+	   #:set-key
+	   #:find-applicable-command-table))
+
+(defpackage :climacs-gui
+  (:use :clim-lisp :clim :climacs-buffer :climacs-base :climacs-abbrev :climacs-syntax
+	:climacs-kill-ring :climacs-pane :clim-extensions :undo :esa)
+  ;;(:import-from :lisp-string)
+  (:export :climacs ; Main entry point.
+           ;; GUI functions follow.
+           :current-window
+           :point
+           :syntax
+           :mark
+           :insert-character))
+
 (defpackage :climacs-fundamental-syntax
   (:use :clim-lisp :clim :climacs-buffer :climacs-base 
 	:climacs-syntax :flexichain :climacs-pane)
@@ -182,24 +207,7 @@
 
 (defpackage :climacs-lisp-syntax
   (:use :clim-lisp :clim :climacs-buffer :climacs-base 
-	:climacs-syntax :flexichain :climacs-pane)
+	:climacs-syntax :flexichain :climacs-pane :climacs-gui)
   (:export :lisp-string))
 
-(defpackage :esa
-  (:use :clim-lisp :clim)
-  (:export #:minibuffer-pane #:display-message
-	   #:esa-pane-mixin #:previous-command
-	   #:info-pane #:master-pane
-	   #:esa-frame-mixin #:windows #:recordingp #:executingp
-	   #:*numeric-argument-p* #:*current-gesture*
-	   #:esa-top-level #:simple-command-loop
-	   #:global-esa-table #:keyboard-macro-table
-	   #:help-table
-	   #:set-key
-	   #:find-applicable-command-table))
 
-(defpackage :climacs-gui
-  (:use :clim-lisp :clim :climacs-buffer :climacs-base :climacs-abbrev :climacs-syntax
-	:climacs-kill-ring :climacs-pane :clim-extensions :undo :esa)
-  (:import-from :climacs-lisp-syntax :lisp-string)
-  (:export :climacs))
--- /project/climacs/cvsroot/climacs/misc-commands.lisp	2005/11/12 23:09:34	1.2
+++ /project/climacs/cvsroot/climacs/misc-commands.lisp	2006/02/07 15:21:30	1.3
@@ -1304,16 +1304,6 @@
 	(loop repeat count do (up-list point syntax))
 	(loop repeat (- count) do (backward-up-list point syntax)))))
 
-(define-command (com-eval-defun :name t :command-table lisp-table) ()
-  (let* ((pane (current-window))
-	 (point (point pane))
-	 (syntax (syntax (buffer pane))))
-    (eval-defun point syntax)))
-
-(set-key 'com-eval-defun
-	 'lisp-table
-	 '((#\x :control :meta)))
-
 (define-command (com-beginning-of-definition :name t :command-table movement-table)
     ((count 'integer :prompt "Number of definitions"))
   (let* ((pane (current-window))
@@ -1354,11 +1344,5 @@
 	 'marking-table
 	 '((#\h :control :meta)))
 
-(define-command (com-package :name t :command-table lisp-table) ()
-  (let* ((pane (current-window))
-	 (syntax (syntax (buffer pane)))
-	 (package (climacs-lisp-syntax::package-of syntax)))
-    (display-message (format nil "~s" package))))
-
 (define-command (com-visible-mark :name t :command-table marking-table) ()
   (setf (mark-visible-p (current-window)) (not (mark-visible-p (current-window)))))
--- /project/climacs/cvsroot/climacs/lisp-syntax.lisp	2006/02/01 21:57:56	1.42
+++ /project/climacs/cvsroot/climacs/lisp-syntax.lisp	2006/02/07 15:21:30	1.43
@@ -24,6 +24,14 @@
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;;
+;;; The command table.
+
+(make-command-table 'lisp-table
+                    :errorp nil
+                    :inherit-from '(climacs-gui::global-climacs-table))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
 ;;; the syntax object
 
 (define-syntax lisp-syntax (basic-syntax)
@@ -36,7 +44,8 @@
    (scan)
    (package))
   (:name "Lisp")
-  (:pathname-types "lisp" "lsp" "cl"))
+  (:pathname-types "lisp" "lsp" "cl")
+  (:command-table lisp-table))
 
 (defmethod initialize-instance :after ((syntax lisp-syntax) &rest args)
   (declare (ignore args))
--- /project/climacs/cvsroot/climacs/gui.lisp	2006/01/22 13:20:54	1.200
+++ /project/climacs/cvsroot/climacs/gui.lisp	2006/02/07 15:21:30	1.201
@@ -63,6 +63,14 @@
 (defparameter *with-scrollbars* t
   "If T, classic look and feel. If NIL, stripped-down look (:")
 
+;;; Basic command tables follow. The global command table,
+;;; `global-climacs-table', inherits from these, so they should not
+;;; contain any overly syntax-specific commands. The idea is that it
+;;; should be safe for any syntax to inherit its command-table from
+;;; `global-climacs-table' (so the usual movement, search and
+;;; navigation-commands are available), without risking adding alien
+;;; commands that require the buffer to be in a specific syntax.
+
 ;;; Basic functionality
 (make-command-table 'base-table :errorp nil)
 ;;; buffers
@@ -83,8 +91,6 @@
 (make-command-table 'indent-table :errorp nil)
 ;;; information about the buffer
 (make-command-table 'info-table :errorp nil)
-;;; lisp-related commands
-(make-command-table 'lisp-table :errorp nil)
 ;;; marking things
 (make-command-table 'marking-table :errorp nil)
 ;;; moving around
@@ -124,7 +130,6 @@
 				  fill-table
 				  indent-table
 				  info-table
-				  lisp-table
 				  marking-table
 				  movement-table
 				  pane-table
--- /project/climacs/cvsroot/climacs/climacs.asd	2005/11/23 17:39:28	1.40
+++ /project/climacs/cvsroot/climacs/climacs.asd	2006/02/07 15:21:30	1.41
@@ -69,7 +69,8 @@
    (:file "prolog-syntax" :depends-on ("packages" "base" "syntax" "pane" "buffer"))
    (:file "prolog2paiprolog" :depends-on ("prolog-syntax"))
    (:file "ttcn3-syntax" :depends-on ("packages" "buffer" "syntax" "base" "pane"))
-   (:file "lisp-syntax" :depends-on ("packages" "syntax" "buffer" "base" "pane"))
+   (:file "lisp-syntax" :depends-on ("packages" "syntax" "buffer" "base" "pane" "gui"))
+   (:file "lisp-syntax-commands" :depends-on ("lisp-syntax"))
    (:file "esa" :depends-on ("packages"))
    (:file "gui" :depends-on ("packages" "syntax" "base" "buffer" "undo" "pane"
                                         "esa" "kill-ring" "io" "text-syntax" "abbrev"))




More information about the Climacs-cvs mailing list