소스 검색

Added compilation complete/error message.

Paul Onions 11 년 전
부모
커밋
75c431392b
1개의 변경된 파일7개의 추가작업 그리고 3개의 파일을 삭제
  1. 7 3
      sysrpl-mode.el

+ 7 - 3
sysrpl-mode.el

@@ -184,13 +184,17 @@ point."
 (defun sysrpl-compile-buffer ()
   "Compile the current buffer."
   (interactive)
-  (let ((tmp-filename (make-temp-file "sysrpl" nil ".s")))
+  (let ((tmp-filename (make-temp-file "sysrpl" nil ".s"))
+        (rtn-code 0))
     (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)))
+      (setq rtn-code (call-process sysrpl-compiler-program tmp-filename t nil "-" "-")))
+    (display-buffer sysrpl-compiler-output-bufname)
+    (if (eql rtn-code 0)
+        (message "Compilation complete")
+      (message "*** Compiled with ERRORS ***"))))
 
 (defvar sysrpl-mode-map
   (let ((map (make-sparse-keymap))