Update of /project/climacs/cvsroot/climacs In directory common-lisp.net:/tmp/cvs-serv9121
Modified Files: abbrev.lisp gui.lisp packages.lisp syntax.lisp Log Message: Fixed up abbrevs somewhat.
Made the cursor wider, so easier to find.
Added new command `Load File'.
Date: Thu Jan 13 06:38:41 2005 Author: rstrandh
Index: climacs/abbrev.lisp diff -u climacs/abbrev.lisp:1.5 climacs/abbrev.lisp:1.6 --- climacs/abbrev.lisp:1.5 Fri Dec 31 07:39:21 2004 +++ climacs/abbrev.lisp Thu Jan 13 06:38:40 2005 @@ -50,6 +50,9 @@ (defgeneric add-abbrev (word expansion dictionary-abbrev-expander) (:documentation "Add an abbrev expansion to a dictionary abbrev expander"))
+(defmethod add-abbrev (word expansion (expander dictionary-abbrev-expander)) + (push (cons word expansion) (dictionary expander))) + (defun string-upper-case-p (string) "A predicate testing if each character of a string is uppercase." (every #'upper-case-p string)) @@ -74,7 +77,8 @@ (loop until (zerop offset1) while (constituentp (buffer-object buffer (1- offset1))) do (decf offset1)) - (let ((expansion (expand-abbrev (buffer-sequence buffer offset1 offset2) + (let ((expansion (expand-abbrev (coerce (buffer-sequence buffer offset1 offset2) + 'string) (abbrev-expander buffer)))) (when expansion (delete-buffer-range buffer offset1 (- offset2 offset1))
Index: climacs/gui.lisp diff -u climacs/gui.lisp:1.62 climacs/gui.lisp:1.63 --- climacs/gui.lisp:1.62 Wed Jan 12 17:41:16 2005 +++ climacs/gui.lisp Thu Jan 13 06:38:41 2005 @@ -525,6 +525,11 @@ (needs-saving buffer) nil) (display-message "Wrote: ~a" (filename buffer))))
+(define-named-command com-load-file () + (let ((filename (accept 'completable-pathname + :prompt "Load File"))) + (load filename))) + (define-named-command com-beginning-of-buffer () (beginning-of-buffer (point (win *application-frame*))))
@@ -745,6 +750,7 @@
(c-x-set-key '(#\c :control) 'com-quit) (c-x-set-key '(#\f :control) 'com-find-file) +(c-x-set-key '(#\l :control) 'com-load-file) (c-x-set-key '(#\s :control) 'com-save-buffer) (c-x-set-key '(#\t :control) 'com-transpose-lines) (c-x-set-key '(#\w :control) 'com-write-buffer)
Index: climacs/packages.lisp diff -u climacs/packages.lisp:1.26 climacs/packages.lisp:1.27 --- climacs/packages.lisp:1.26 Sun Jan 9 15:08:27 2005 +++ climacs/packages.lisp Thu Jan 13 06:38:41 2005 @@ -59,7 +59,8 @@ (defpackage :climacs-abbrev (:use :clim-lisp :clim :climacs-buffer :climacs-base) (:export #:abbrev-expander #:dictionary-abbrev-expander #:dictionary - #:expand-abbrev #:abbrev-mixin #:possibly-expand-abbrev)) + #:expand-abbrev #:abbrev-mixin #:possibly-expand-abbrev + #:add-abbrev))
(defpackage :climacs-syntax (:use :clim-lisp :clim :climacs-buffer :climacs-base :flexichain)
Index: climacs/syntax.lisp diff -u climacs/syntax.lisp:1.22 climacs/syntax.lisp:1.23 --- climacs/syntax.lisp:1.22 Wed Jan 12 17:41:17 2005 +++ climacs/syntax.lisp Thu Jan 13 06:38:41 2005 @@ -305,8 +305,8 @@ cursor-y y))) (updating-output (pane :unique-id -1) (draw-rectangle* pane - cursor-x (- cursor-y (* 0.2 height)) - (1+ cursor-x) (+ cursor-y (* 0.8 height)) + (1- cursor-x) (- cursor-y (* 0.2 height)) + (+ cursor-x 2) (+ cursor-y (* 0.8 height)) :ink +red+)))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;