|
@@ -23,11 +23,21 @@
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
;; Customizations
|
|
|
;;
|
|
|
-(defcustom rpl-sysrpl-default-calculator :HP50G
|
|
|
+(defcustom sysrpl-default-calculator :HP50G
|
|
|
"Default calculator type for SysRPL mode."
|
|
|
:type '(radio :HP38G :HP39G :HP48G :HP49G :HP50G)
|
|
|
:group 'rpl)
|
|
|
|
|
|
+(defcustom sysrpl-compiler-program "rplcomp"
|
|
|
+ "External SysRPL compiler program name."
|
|
|
+ :type 'string
|
|
|
+ :group 'rpl)
|
|
|
+
|
|
|
+(defcustom sysrpl-compiler-output-bufname "*rplcomp*"
|
|
|
+ "Buffer name in which to capture SysRPL compiler output."
|
|
|
+ :type 'string
|
|
|
+ :group 'rpl)
|
|
|
+
|
|
|
(defface sysrpl-name '((t :foreground "darkblue"))
|
|
|
"Face used for displaying SysRPL names (e.g DROP)."
|
|
|
:group 'rpl)
|
|
@@ -97,9 +107,9 @@
|
|
|
names)))
|
|
|
|
|
|
(defvar sysrpl-font-lock-keywords
|
|
|
- (sysrpl-font-lock-compile-keywords (rpl-edb-all-names (sysrpl-edb-calculator rpl-sysrpl-default-calculator))))
|
|
|
+ (sysrpl-font-lock-compile-keywords (rpl-edb-all-names (sysrpl-edb-calculator sysrpl-default-calculator))))
|
|
|
|
|
|
-(defvar sysrpl-selected-calculator rpl-sysrpl-default-calculator
|
|
|
+(defvar sysrpl-selected-calculator sysrpl-default-calculator
|
|
|
"Currently selected calculator model.")
|
|
|
|
|
|
(defun sysrpl-select-hp38g ()
|
|
@@ -171,6 +181,17 @@ point."
|
|
|
(setq buffer-read-only t))
|
|
|
(fit-window-to-buffer (display-buffer bufname))))
|
|
|
|
|
|
+(defun sysrpl-compile-buffer ()
|
|
|
+ "Compile the current buffer."
|
|
|
+ (interactive)
|
|
|
+ (let ((tmp-filename (make-temp-file "sysrpl" nil ".s")))
|
|
|
+ (write-region (point-min) (point-max) tmp-filename)
|
|
|
+ (with-current-buffer (get-buffer-create sysrpl-compiler-output-bufname)
|
|
|
+ (setq buffer-read-only nil)
|
|
|
+ (erase-buffer)
|
|
|
+ (call-process sysrpl-compiler-program tmp-filename t nil "-" "-"))
|
|
|
+ (display-buffer sysrpl-compiler-output-bufname)))
|
|
|
+
|
|
|
(defvar sysrpl-mode-map
|
|
|
(let ((map (make-sparse-keymap))
|
|
|
(menu-map (make-sparse-keymap)))
|
|
@@ -206,7 +227,7 @@ point."
|
|
|
(make-local-variable 'eldoc-documentation-function)
|
|
|
(setq eldoc-documentation-function 'sysrpl-get-eldoc-message)
|
|
|
(setq font-lock-defaults (list 'sysrpl-font-lock-keywords))
|
|
|
- (setq rpl-menu-compile-file-enable nil))
|
|
|
+ (setq rpl-menu-compile-buffer-enable t))
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
;; End of file
|