Commit 4cccf094 authored by Troels Henriksen's avatar Troels Henriksen

Added Print Last Expression command, TODO changes and README changes,

courtesy of Cyrus Harmon.
parent 497afdba
...@@ -4,3 +4,34 @@ ...@@ -4,3 +4,34 @@
- speed up com-goto-line (when possible) - speed up com-goto-line (when possible)
- replace the use of the scroller pane by custom pane - 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
...@@ -74,6 +74,33 @@ The expanded expression will be displayed in a ...@@ -74,6 +74,33 @@ The expanded expression will be displayed in a
(macroexpand-token (current-syntax) token t) (macroexpand-token (current-syntax) token t)
(esa:display-message "Nothing to expand at point.")))) (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) (define-command (com-compile-and-load-file :name t :command-table climacs-lisp-table)
() ()
"Compile and load the current file. "Compile and load the current file.
...@@ -140,6 +167,10 @@ Definition command was issued." ...@@ -140,6 +167,10 @@ Definition command was issued."
'climacs-lisp-table 'climacs-lisp-table
'((#\x :control :meta))) '((#\x :control :meta)))
(esa:set-key 'com-print-last-expression
'climacs-lisp-table
'((#\c :control) (#\p :control)))
(esa:set-key 'com-macroexpand-1 (esa:set-key 'com-macroexpand-1
'climacs-lisp-table 'climacs-lisp-table
'((#\c :control) (#\Newline))) '((#\c :control) (#\Newline)))
......
...@@ -46,7 +46,8 @@ ...@@ -46,7 +46,8 @@
#:view-setting-error #:view #:view-setting-error #:view
#:unknown-view #:unknown-view
#:view-already-displayed #:window #: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 #:any-view #:any-undisplayed-view
#:clone-view-for-climacs #:clone-view-for-climacs
#:make-new-view-for-climacs #:make-new-view-for-climacs
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment