[mcclim-cvs] CVS mcclim/Drei

thenriksen thenriksen at common-lisp.net
Fri Feb 8 18:05:51 UTC 2008


Update of /project/mcclim/cvsroot/mcclim/Drei
In directory clnet:/tmp/cvs-serv31674/Drei

Modified Files:
	lisp-syntax-commands.lisp 
Log Message:
Added argument hinting for Lisp when entering newlines and right parentheses.


--- /project/mcclim/cvsroot/mcclim/Drei/lisp-syntax-commands.lisp	2008/01/17 11:29:55	1.16
+++ /project/mcclim/cvsroot/mcclim/Drei/lisp-syntax-commands.lisp	2008/02/08 18:05:51	1.17
@@ -90,16 +90,21 @@
   "Show argument list for a given symbol."
   (show-arglist (current-syntax) symbol))
 
-(define-command (com-space :command-table lisp-table)
+(define-command (com-self-insert-then-arglist :command-table lisp-table)
     ()
-  "Insert a space and display argument hints in the minibuffer."
-  (insert-character #\Space)
-  ;; We must update the syntax in order to reflect any changes to
-  ;; the parse tree our insertion of a space character may have
-  ;; done.
+  "Insert the gesture used to invoke this command and display
+argument hints in the minibuffer."
+  (insert-character *current-gesture*)
   (show-arglist-for-form-at-mark (point) (current-syntax))
   (clear-completions))
 
+(define-command (com-newline-indent-then-arglist :command-table lisp-table) ()
+  "Inserts a newline, indents the new line, then displays
+argument hints in the minibuffer."
+  (insert-object (point) #\Newline)
+  (indent-current-line (current-view) (point))
+  (show-arglist-for-form-at-mark (point) (current-syntax)))
+
 (define-command (com-complete-symbol :name t :command-table lisp-table)
     ()
   "Attempt to complete the symbol at mark. If successful, move point
@@ -216,10 +221,14 @@
          'lisp-table
          '((#\c :control) (#\d :control) (#\a)))
 
-(set-key 'com-space
+(set-key 'com-self-insert-then-arglist
          'lisp-table
          '((#\Space)))
 
+(set-key 'com-self-insert-then-arglist
+         'lisp-table
+         '((#\))))
+
 (set-key 'com-complete-symbol
          'lisp-table
          '((#\Tab :meta)))
@@ -232,7 +241,7 @@
          'lisp-table
          '((#\Tab)))
 
-(set-key 'drei-commands::com-newline-and-indent
+(set-key 'com-newline-indent-then-arglist
          'lisp-table
          '(#\Newline))
 




More information about the Mcclim-cvs mailing list