From thenriksen at common-lisp.net Sun Mar 2 15:55:29 2008 From: thenriksen at common-lisp.net (thenriksen) Date: Sun, 2 Mar 2008 10:55:29 -0500 (EST) Subject: [mcclim-cvs] CVS mcclim/Drei Message-ID: <20080302155529.2C3A47114D@common-lisp.net> Update of /project/mcclim/cvsroot/mcclim/Drei In directory clnet:/tmp/cvs-serv27840/Drei Modified Files: lisp-syntax.lisp Log Message: Fix form-to-object problem reported by Willem Broekema. --- /project/mcclim/cvsroot/mcclim/Drei/lisp-syntax.lisp 2008/02/15 13:16:17 1.75 +++ /project/mcclim/cvsroot/mcclim/Drei/lisp-syntax.lisp 2008/03/02 15:55:28 1.76 @@ -2903,7 +2903,7 @@ (list +quote-marker+ (apply #'form-to-object syntax (second (children form)) args)) `',(apply #'form-to-object syntax (second (children form)) args))) -(defmethod form-to-object (syntax (form incomplete-quote-form) &rest args) +(defmethod form-to-object ((syntax lisp-syntax) (form incomplete-quote-form) &rest args) (declare (ignore args)) ;; Utterly arbitrary, but reasonable in my opinion. '(quote)) From thenriksen at common-lisp.net Tue Mar 4 07:54:15 2008 From: thenriksen at common-lisp.net (thenriksen) Date: Tue, 4 Mar 2008 02:54:15 -0500 (EST) Subject: [mcclim-cvs] CVS mcclim/Examples Message-ID: <20080304075415.82153111FE@common-lisp.net> Update of /project/mcclim/cvsroot/mcclim/Examples In directory clnet:/tmp/cvs-serv9390/Examples Modified Files: method-browser.lisp Log Message: Applied method-browser fix from Willem Broekema for classes without prototypes. --- /project/mcclim/cvsroot/mcclim/Examples/method-browser.lisp 2006/03/29 09:36:30 1.3 +++ /project/mcclim/cvsroot/mcclim/Examples/method-browser.lisp 2008/03/04 07:54:13 1.4 @@ -75,15 +75,27 @@ #+CMU (typep x 'pcl::class) #+scl (typep x 'clos::std-class))) +;; FIXME: returns nil if there is both an EQL specializer and a +;; class specializer for which no prototype instance is available. (defun compute-applicable-methods-from-specializers (gf specializers) - (clim-mop:compute-applicable-methods gf - (mapcar (lambda (spec) - (cond ((typep spec 'clim-mop:eql-specializer) - (clim-mop:eql-specializer-object spec)) - ((classp spec) - (clim-mop:class-prototype spec)) - (t (error "Can't compute effective methods, specializer ~A is not understood." spec)))) - specializers))) + (if (every #'classp specializers) + (clim-mop:compute-applicable-methods-using-classes gf specializers) + (let ((instances + (mapcar (lambda (s) + (cond ((classp s) + ;; Implementation-dependent whether prototypes for + ;; built-in classes (like integer, t) are available. + (multiple-value-bind (prot err) + (ignore-errors (clim-mop:class-prototype s)) + (if err 'no-prototype prot))) + ((typep s 'clim-mop:eql-specializer) + (clim-mop:eql-specializer-object s)) + (t + (error "Can't compute effective methods, specializer ~A is not understood." + s)))) + specializers))) + (unless (member 'no-prototype instances) + (clim-mop:compute-applicable-methods gf instances))))) ;; FIXME: Support EQL specializers. ;; This is hard to do ideally, and I'm not really trying. From thenriksen at common-lisp.net Fri Mar 7 11:45:18 2008 From: thenriksen at common-lisp.net (thenriksen) Date: Fri, 7 Mar 2008 06:45:18 -0500 (EST) Subject: [mcclim-cvs] CVS mcclim/Drei Message-ID: <20080307114518.6896A2E1D4@common-lisp.net> Update of /project/mcclim/cvsroot/mcclim/Drei In directory clnet:/tmp/cvs-serv30336/Drei Modified Files: views.lisp Log Message: Update line data on Drei buffer-view creation. This fixes problem with modifying the buffer before initial synchronisation has been done. --- /project/mcclim/cvsroot/mcclim/Drei/views.lisp 2008/02/17 14:54:47 1.42 +++ /project/mcclim/cvsroot/mcclim/Drei/views.lisp 2008/03/07 11:45:18 1.43 @@ -634,7 +634,8 @@ bot (clone-mark top :right) lines-prefix 0 lines-suffix 0 - buffer-size (size (buffer view))))) + buffer-size (size (buffer view))) + (update-line-data view))) (defmethod (setf top) :after (new-value (view drei-buffer-view)) (invalidate-all-strokes view)) @@ -652,7 +653,8 @@ bot (clone-mark top :right) lines-prefix 0 lines-suffix 0 - buffer-size 0))) + buffer-size 0) + (update-line-data view))) (defmethod cache-string :around ((view drei-buffer-view)) (let ((string (call-next-method))) From thenriksen at common-lisp.net Fri Mar 7 12:11:23 2008 From: thenriksen at common-lisp.net (thenriksen) Date: Fri, 7 Mar 2008 07:11:23 -0500 (EST) Subject: [mcclim-cvs] CVS mcclim/Drei Message-ID: <20080307121123.2409F2E1D4@common-lisp.net> Update of /project/mcclim/cvsroot/mcclim/Drei In directory clnet:/tmp/cvs-serv2493/Drei Modified Files: drei-redisplay.lisp Log Message: Create proper pump states for fundamental syntax, don't assume the offset is at the beginning of the line. --- /project/mcclim/cvsroot/mcclim/Drei/drei-redisplay.lisp 2008/02/18 12:22:47 1.68 +++ /project/mcclim/cvsroot/mcclim/Drei/drei-redisplay.lisp 2008/03/07 12:11:22 1.69 @@ -827,6 +827,12 @@ this pump state." line-index offset chunk-index) +(defun chunk-for-offset (buffer-line offset) + "Return the index of the first chunk of `buffer-line' that +contains `offset'." + (position (- offset (offset (start-mark buffer-line))) + (chunks buffer-line) :test #'<= :key #'car)) + (defun buffer-view-pump-state-for-offset (view offset) "Return a pump state usable for pumpting strokes for `view' (a `drei-buffer-view') from `offset'." @@ -844,7 +850,8 @@ (setf low-index (1+ middle))) ((mark< offset line-start) (setf high-index middle))) - finally (return (make-pump-state middle offset 0))))) + finally (return (make-pump-state + middle offset (chunk-for-offset this-line offset)))))) (defun fetch-chunk (line chunk-index) "Retrieve the `chunk-index'th chunk from `line'. The return From dlichteblau at common-lisp.net Fri Mar 7 15:23:14 2008 From: dlichteblau at common-lisp.net (dlichteblau) Date: Fri, 7 Mar 2008 10:23:14 -0500 (EST) Subject: [mcclim-cvs] CVS mcclim/Drei Message-ID: <20080307152314.D94F3340C9@common-lisp.net> Update of /project/mcclim/cvsroot/mcclim/Drei In directory clnet:/tmp/cvs-serv29899 Modified Files: views.lisp Log Message: compilation fix --- /project/mcclim/cvsroot/mcclim/Drei/views.lisp 2008/03/07 11:45:18 1.43 +++ /project/mcclim/cvsroot/mcclim/Drei/views.lisp 2008/03/07 15:23:14 1.44 @@ -1078,7 +1078,7 @@ modification (for example, parenthesis matching). This function should return a list of pairs of buffer offsets, each pair delimiting a buffer region that should be redrawn.") - (:method ((view textual-drei-syntax-view view) (syntax syntax)) + (:method ((view textual-drei-syntax-view) (syntax syntax)) nil)) (defun invalidate-as-appropriate (view invalid-regions) From rgoldman at common-lisp.net Fri Mar 28 19:53:19 2008 From: rgoldman at common-lisp.net (rgoldman) Date: Fri, 28 Mar 2008 14:53:19 -0500 (EST) Subject: [mcclim-cvs] CVS mcclim Message-ID: <20080328195319.DFFCD830BC@common-lisp.net> Update of /project/mcclim/cvsroot/mcclim In directory clnet:/tmp/cvs-serv8011 Modified Files: mcclim.asd Log Message: Updated the version requirement on the flexichain dependency. --- /project/mcclim/cvsroot/mcclim/mcclim.asd 2008/02/01 18:12:31 1.76 +++ /project/mcclim/cvsroot/mcclim/mcclim.asd 2008/03/28 19:53:19 1.77 @@ -119,7 +119,7 @@ (:file "package" :depends-on ("Lisp-Dep" "patch")))) (defsystem :clim-basic - :depends-on (:clim-lisp :spatial-trees :flexichain) + :depends-on (:clim-lisp :spatial-trees (:version "flexichain" "1.5.1")) :components ((:file "decls") (:file "protocol-classes" :depends-on ("decls")) (:module "Lisp-Dep" @@ -266,7 +266,7 @@ (defsystem :drei-mcclim - :depends-on (:flexichain :esa-mcclim :clim-core #+#.(mcclim.system::dep-on-swank) :swank) + :depends-on ((:version "flexichain" "1.5.1") :esa-mcclim :clim-core #+#.(mcclim.system::dep-on-swank) :swank) :components ((:module "cl-automaton" :pathname #.(make-pathname :directory '(:relative "Drei" "cl-automaton")) From thenriksen at common-lisp.net Fri Mar 28 21:09:43 2008 From: thenriksen at common-lisp.net (thenriksen) Date: Fri, 28 Mar 2008 16:09:43 -0500 (EST) Subject: [mcclim-cvs] CVS mcclim/Drei Message-ID: <20080328210943.49F745C182@common-lisp.net> Update of /project/mcclim/cvsroot/mcclim/Drei In directory clnet:/tmp/cvs-serv22830/Drei Modified Files: drei.lisp kill-ring.lisp Log Message: Drei kill rings are now global. --- /project/mcclim/cvsroot/mcclim/Drei/drei.lisp 2008/02/03 08:38:25 1.37 +++ /project/mcclim/cvsroot/mcclim/Drei/drei.lisp 2008/03/28 21:09:43 1.38 @@ -240,12 +240,6 @@ whenever this Drei is being displayed. During redisplay, the `stream-default-view' of the output stream will be temporarily bound to this value.") - (%kill-ring :initform (make-instance 'kill-ring :max-size 7) - :initarg :kill-ring - :accessor kill-ring - :type kill-ring - :documentation "The kill ring object associated -with the Drei instance.") (%previous-command :initform nil :accessor previous-command :documentation "The previous CLIM command @@ -507,12 +501,12 @@ proper values, taken from `drei-instance'. The keyword arguments can be used to provide forms that will be used to obtain values for the respective special variables, instead of finding their -value in `drei-instance'. This macro binds all of the usual Drei -special variables, but also some CLIM special variables needed -for ESA-style command parsing." +value in `drei-instance' or their existing binding. This macro +binds all of the usual Drei special variables, but also some CLIM +special variables needed for ESA-style command parsing." `(let* ((*esa-instance* ,drei-instance) (*kill-ring* ,(if kill-ring-p kill-ring - `(kill-ring (drei-instance)))) + '*kill-ring*)) (*minibuffer* ,(if minibuffer-p minibuffer `(find-available-minibuffer (drei-instance)))) (*command-parser* ,(if command-parser-p command-parser --- /project/mcclim/cvsroot/mcclim/Drei/kill-ring.lisp 2006/12/04 19:22:02 1.4 +++ /project/mcclim/cvsroot/mcclim/Drei/kill-ring.lisp 2008/03/28 21:09:43 1.5 @@ -187,6 +187,6 @@ (if reset (reset-yank-position kr)) (element> (kill-ring-cursor kr))) -(defparameter *kill-ring* nil +(defparameter *kill-ring* (make-instance 'kill-ring :max-size 7) "This special variable is bound to the kill ring of the running application or Drei instance whenever a command is executed.")