File tree Expand file tree Collapse file tree 2 files changed +11
-10
lines changed Expand file tree Collapse file tree 2 files changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -943,17 +943,18 @@ Typing these will trigger reindentation of the current line.")
943
943
:mode (" \\ .m\\ '" . octave-maybe-mode)
944
944
:config
945
945
(defun +octave-eval-last-sexp ()
946
- " Evaluate Octave sexp before point and print value into current buffer."
946
+ " Like `octave-eval-print-last- sexp' , but it doesn't print to the buffer."
947
947
(interactive )
948
948
(inferior-octave t )
949
- (let ((print-escape-newlines nil )
950
- (opoint (point )))
951
- (prin1
952
- (save-excursion
953
- (forward-sexp -1 )
954
- (inferior-octave-send-list-and-digest
955
- (list (concat (buffer-substring-no-properties (point ) opoint) " \n " )))
956
- (mapconcat 'identity inferior-octave-output-list " \n " ))))))
949
+ (let* ((print-escape-newlines nil )
950
+ (opoint (point ))
951
+ (result (save-excursion
952
+ (forward-sexp -1 )
953
+ (inferior-octave-send-list-and-digest
954
+ (list (concat (buffer-substring-no-properties (point ) opoint) " \n " )))
955
+ (string-join inferior-octave-output-list " \n " ))))
956
+ (when (called-interactively-p 'interactive ) (message " %s " result))
957
+ result)))
957
958
958
959
(use-package bookmark
959
960
:custom
Original file line number Diff line number Diff line change 98
98
(defun +eros-octave-eval-last-sexp ()
99
99
" Wrapper for `+octave-eval-last-sexp' that overlays results."
100
100
(interactive )
101
- (eros--eval- overlay (+octave-eval-last-sexp) (point )))))
101
+ (eros--make-result- overlay (+octave-eval-last-sexp) :where (point ) :duration eros-eval-result-duration ))))
102
102
103
103
104
104
; ; Elisp regexp mistake finder
You can’t perform that action at this time.
0 commit comments