Skip to content

Commit

Permalink
Disable undo for all esup buffer (#92)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcs090218 authored Feb 2, 2022
1 parent 5169dd7 commit 4b49c8d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions esup.el
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ Includes execution time, gc time and number of gc pauses."

(define-derived-mode esup-mode
special-mode "esup"
(buffer-disable-undo)
(font-lock-mode 1))

(define-key esup-mode-map (kbd "<return>") 'esup-visit-item)
Expand Down Expand Up @@ -389,8 +390,10 @@ Provides a useful default for SERVER, CONNECTION and MESSAGE."
"Reset all variables and buffers for another run of `esup'."
(setq esup-last-result-start-point 1)
(with-current-buffer (get-buffer-create esup-server-log-buffer)
(buffer-disable-undo)
(erase-buffer))
(with-current-buffer (get-buffer-create esup-incoming-results-buffer)
(buffer-disable-undo)
(erase-buffer))
(setq esup-errors '())
(when esup-server-process
Expand Down Expand Up @@ -565,8 +568,8 @@ ARGS is a list of extra command line arguments to pass to Emacs."
do
(erase-buffer)
(insert (slot-value result 'expression-string))
(font-lock-ensure)
(setf (slot-value result 'expression-string) (buffer-string)))
(font-lock-ensure)
(setf (slot-value result 'expression-string) (buffer-string)))
results))

(defun esup-read-result (start-point)
Expand Down

0 comments on commit 4b49c8d

Please sign in to comment.