diff options
| author | Leo Liu | 2013-10-04 17:45:25 +0800 |
|---|---|---|
| committer | Leo Liu | 2013-10-04 17:45:25 +0800 |
| commit | 1dab32a392d0a5f6b5368cd0dbc4ab8cd071cf96 (patch) | |
| tree | 15b9443ca809ebfd1a683e9fe4d9fe1dc80a0208 | |
| parent | 4eed3157327f8406921658442a11af7e9d84d603 (diff) | |
| download | emacs-1dab32a392d0a5f6b5368cd0dbc4ab8cd071cf96.tar.gz emacs-1dab32a392d0a5f6b5368cd0dbc4ab8cd071cf96.zip | |
* progmodes/octave.el (inferior-octave-error-regexp-alist)
(inferior-octave-compilation-font-lock-keywords): New variables.
(compilation-error-regexp-alist)
(compilation-mode-font-lock-keywords): Defvar to pacify compiler.
(inferior-octave-mode): Use compilation-shell-minor-mode.
| -rw-r--r-- | lisp/ChangeLog | 8 | ||||
| -rw-r--r-- | lisp/progmodes/octave.el | 26 |
2 files changed, 33 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b2bd9900ac3..a8f2776d49a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2013-10-04 Leo Liu <sdl.web@gmail.com> | ||
| 2 | |||
| 3 | * progmodes/octave.el (inferior-octave-error-regexp-alist) | ||
| 4 | (inferior-octave-compilation-font-lock-keywords): New variables. | ||
| 5 | (compilation-error-regexp-alist) | ||
| 6 | (compilation-mode-font-lock-keywords): Defvar to pacify compiler. | ||
| 7 | (inferior-octave-mode): Use compilation-shell-minor-mode. | ||
| 8 | |||
| 1 | 2013-10-04 Jorgen Schaefer <forcer@forcix.cx> | 9 | 2013-10-04 Jorgen Schaefer <forcer@forcix.cx> |
| 2 | 10 | ||
| 3 | * minibuffer.el (completion--replace): Be careful that `end' might be | 11 | * minibuffer.el (completion--replace): Be careful that `end' might be |
diff --git a/lisp/progmodes/octave.el b/lisp/progmodes/octave.el index 51cee8b2989..ec48f75dd68 100644 --- a/lisp/progmodes/octave.el +++ b/lisp/progmodes/octave.el | |||
| @@ -631,6 +631,24 @@ mode, include \"-q\" and \"--traditional\"." | |||
| 631 | :type 'hook | 631 | :type 'hook |
| 632 | :group 'octave) | 632 | :group 'octave) |
| 633 | 633 | ||
| 634 | (defcustom inferior-octave-error-regexp-alist | ||
| 635 | '(("error:\\s-*\\(.*?\\) at line \\([0-9]+\\), column \\([0-9]+\\)" | ||
| 636 | 1 2 3 2 1) | ||
| 637 | ("warning:\\s-*\\([^:\n]+\\):.*at line \\([0-9]+\\), column \\([0-9]+\\)" | ||
| 638 | 1 2 3 1 1)) | ||
| 639 | "Value for `compilation-error-regexp-alist' in inferior octave." | ||
| 640 | :type '(repeat (choice (symbol :tag "Predefined symbol") | ||
| 641 | (sexp :tag "Error specification"))) | ||
| 642 | :group 'octave) | ||
| 643 | |||
| 644 | (defvar inferior-octave-compilation-font-lock-keywords | ||
| 645 | '(("\\_<PASS\\_>" . compilation-info-face) | ||
| 646 | ("\\_<FAIL\\_>" . compilation-error-face) | ||
| 647 | ("\\_<\\(warning\\):" 1 compilation-warning-face) | ||
| 648 | ("\\_<\\(error\\):" 1 compilation-error-face) | ||
| 649 | ("^\\s-*!!!!!.*\\|^.*failed$" . compilation-error-face)) | ||
| 650 | "Value for `compilation-mode-font-lock-keywords' in inferior octave.") | ||
| 651 | |||
| 634 | (defvar inferior-octave-process nil) | 652 | (defvar inferior-octave-process nil) |
| 635 | 653 | ||
| 636 | (defvar inferior-octave-mode-map | 654 | (defvar inferior-octave-mode-map |
| @@ -673,6 +691,8 @@ This variable is used to initialize `comint-dynamic-complete-functions' | |||
| 673 | in the Inferior Octave buffer.") | 691 | in the Inferior Octave buffer.") |
| 674 | 692 | ||
| 675 | (defvar info-lookup-mode) | 693 | (defvar info-lookup-mode) |
| 694 | (defvar compilation-error-regexp-alist) | ||
| 695 | (defvar compilation-mode-font-lock-keywords) | ||
| 676 | 696 | ||
| 677 | (define-derived-mode inferior-octave-mode comint-mode "Inferior Octave" | 697 | (define-derived-mode inferior-octave-mode comint-mode "Inferior Octave" |
| 678 | "Major mode for interacting with an inferior Octave process." | 698 | "Major mode for interacting with an inferior Octave process." |
| @@ -698,10 +718,14 @@ in the Inferior Octave buffer.") | |||
| 698 | (setq-local comint-prompt-read-only inferior-octave-prompt-read-only) | 718 | (setq-local comint-prompt-read-only inferior-octave-prompt-read-only) |
| 699 | (add-hook 'comint-input-filter-functions | 719 | (add-hook 'comint-input-filter-functions |
| 700 | 'inferior-octave-directory-tracker nil t) | 720 | 'inferior-octave-directory-tracker nil t) |
| 721 | (comint-read-input-ring t) | ||
| 701 | ;; http://thread.gmane.org/gmane.comp.gnu.octave.general/48572 | 722 | ;; http://thread.gmane.org/gmane.comp.gnu.octave.general/48572 |
| 702 | (add-hook 'window-configuration-change-hook | 723 | (add-hook 'window-configuration-change-hook |
| 703 | 'inferior-octave-track-window-width-change nil t) | 724 | 'inferior-octave-track-window-width-change nil t) |
| 704 | (comint-read-input-ring t)) | 725 | (setq-local compilation-error-regexp-alist inferior-octave-error-regexp-alist) |
| 726 | (setq-local compilation-mode-font-lock-keywords | ||
| 727 | inferior-octave-compilation-font-lock-keywords) | ||
| 728 | (compilation-shell-minor-mode 1)) | ||
| 705 | 729 | ||
| 706 | ;;;###autoload | 730 | ;;;###autoload |
| 707 | (defun inferior-octave (&optional arg) | 731 | (defun inferior-octave (&optional arg) |