Merge branch 'master' of http://alfredobeaumont.org/factor
commit
1e3cac9a86
|
@ -29,6 +29,12 @@
|
|||
(defvar factor-mode-syntax-table nil
|
||||
"Syntax table used while in Factor mode.")
|
||||
|
||||
(defcustom factor-display-compilation-output t
|
||||
"Display the REPL buffer before compiling files."
|
||||
:type '(choice (const :tag "Enable" t) (const :tag "Disable" nil))
|
||||
:group 'factor)
|
||||
|
||||
|
||||
(if factor-mode-syntax-table
|
||||
()
|
||||
(let ((i 0))
|
||||
|
@ -139,9 +145,20 @@
|
|||
|
||||
(defun factor-run-file ()
|
||||
(interactive)
|
||||
(when (and (buffer-modified-p)
|
||||
(y-or-n-p (format "Save file %s? " (buffer-file-name))))
|
||||
(save-buffer))
|
||||
(when factor-display-compilation-output
|
||||
(factor-display-output-buffer))
|
||||
(comint-send-string "*factor*" (format "\"%s\"" (buffer-file-name)))
|
||||
(comint-send-string "*factor*" " run-file\n"))
|
||||
|
||||
(defun factor-display-output-buffer ()
|
||||
(with-current-buffer "*factor*"
|
||||
(goto-char (point-max))
|
||||
(unless (get-buffer-window (current-buffer) t)
|
||||
(display-buffer (current-buffer) t))))
|
||||
|
||||
;; (defun factor-send-region (start end)
|
||||
;; (interactive "r")
|
||||
;; (comint-send-region "*factor*" start end)
|
||||
|
|
Loading…
Reference in New Issue