[climacs-cvs] CVS climacs

thenriksen thenriksen at common-lisp.net
Mon Jan 21 17:19:34 UTC 2008


Update of /project/climacs/cvsroot/climacs
In directory clnet:/tmp/cvs-serv21244

Modified Files:
	TODO climacs-lisp-syntax-commands.lisp packages.lisp 
Log Message:
Added Print Last Expression command, TODO changes and README changes,
courtesy of Cyrus Harmon.


--- /project/climacs/cvsroot/climacs/TODO	2005/03/20 22:03:40	1.7
+++ /project/climacs/cvsroot/climacs/TODO	2008/01/21 17:19:34	1.8
@@ -4,3 +4,34 @@
 - speed up com-goto-line (when possible)
 
 - replace the use of the scroller pane by custom pane
+
+Cyrus' Feature Requests/Bug Reports
+
+- vertical scrolling
+
+- fix horizontal scrolling such that the scrollbar can be used to move
+  the point offscreen
+
+- speaking of which, why have typeout panes at all? Or at least why
+  not make them full-fledged climacs panes such that one can type in
+  them, copy/paste, etc...?
+
+- support M-Right and M-Left in structedit mode
+
+- C-k at the end of a line breaks in structedit mode
+
+- support cycling through possible choices for windows to switch to in
+  C-x b
+
+- allow for selecting among possibilities in a DEFINITION view
+
+- allow for closing individual panes
+
+- make tab (or double-tab) in M-x command entry pane show
+  possibilities
+
+- the choice of buffer for C-x b should be smarter
+
+- weird flicker in creating/removing views (C-x 1, 2 or 3)
+
+- delete region on really large regions is prohibitively slow
--- /project/climacs/cvsroot/climacs/climacs-lisp-syntax-commands.lisp	2008/01/10 11:22:03	1.8
+++ /project/climacs/cvsroot/climacs/climacs-lisp-syntax-commands.lisp	2008/01/21 17:19:34	1.9
@@ -74,6 +74,33 @@
         (macroexpand-token (current-syntax) token t)
         (esa:display-message "Nothing to expand at point."))))
 
+(define-command (com-print-last-expression :name t :command-table climacs-lisp-table)
+    ()
+  "Evaluate the expression before point in the local Lisp image
+and print the resulting value to the \"*Results*\"-buffer."
+  (let* ((token (form-before (current-syntax) (offset (point)))))
+    (if token
+        (let ((*read-base* (base (current-syntax)))
+              (exp (form-to-object (current-syntax) token :read t)))
+          (let ((values (multiple-value-list
+                         (handler-case (eval exp)
+                           (error (condition)
+                             (progn (beep)
+                                    (display-message "~a" condition)
+                                    (return-from
+                                     com-print-last-expression nil)))))))
+            (let* ((current-view (esa-current-window *esa-instance*))
+                   (view (climacs-core:switch-or-move-to-view (current-window) "*Results*")))
+              (set-syntax view "Lisp")
+              (end-of-buffer (point))
+              (unless (beginning-of-buffer-p (point))
+                (insert-object (point) #\Newline))
+              (insert-sequence (point)
+                               (format nil "~{~A~%~}" values))
+              (insert-object (point) #\Newline)
+              (climacs-gui:other-window current-view))))
+        (esa:display-message "Nothing to evaluate at point."))))
+
 (define-command (com-compile-and-load-file :name t :command-table climacs-lisp-table)
     ()
   "Compile and load the current file.
@@ -140,6 +167,10 @@
              'climacs-lisp-table
              '((#\x :control :meta)))
 
+(esa:set-key 'com-print-last-expression
+             'climacs-lisp-table
+             '((#\c :control) (#\p :control)))
+
 (esa:set-key 'com-macroexpand-1
              'climacs-lisp-table
              '((#\c :control) (#\Newline)))
--- /project/climacs/cvsroot/climacs/packages.lisp	2008/01/20 19:51:48	1.134
+++ /project/climacs/cvsroot/climacs/packages.lisp	2008/01/21 17:19:34	1.135
@@ -46,7 +46,8 @@
              #:view-setting-error #:view
              #:unknown-view
              #:view-already-displayed #:window
-             #:remove-other-use #:remove-other-pane #:clone-view #:cancel
+             ;; Restarts
+             #:switch-to-pane #:remove-other-use #:remove-other-pane #:clone-view #:cancel
              #:any-view #:any-undisplayed-view
              #:clone-view-for-climacs
              #:make-new-view-for-climacs




More information about the Climacs-cvs mailing list