diff options
| author | Stefan Monnier | 2009-08-19 17:15:30 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2009-08-19 17:15:30 +0000 |
| commit | 28930e394d0b542a70aa6ac25956d3b7e035f627 (patch) | |
| tree | d5d79bfd24fbeb085a6efc157762aa1e3d191357 | |
| parent | 1373f3bebca225b0416df029c2259f60aa4cb5ef (diff) | |
| download | emacs-28930e394d0b542a70aa6ac25956d3b7e035f627.tar.gz emacs-28930e394d0b542a70aa6ac25956d3b7e035f627.zip | |
(inferior-prolog-error-regexp-alist): New var.
(inferior-prolog-mode): Use it.
(inferior-prolog-load-file): Reset list of errors.
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/progmodes/prolog.el | 13 |
2 files changed, 19 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 81f2152b08a..d7fc48c0e22 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2009-08-19 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * progmodes/prolog.el (inferior-prolog-error-regexp-alist): New var. | ||
| 4 | (inferior-prolog-mode): Use it. | ||
| 5 | (inferior-prolog-load-file): Reset list of errors. | ||
| 6 | |||
| 1 | 2009-08-19 ARISAWA Akihiro <ari@mbf.ocn.ne.jp> (tiny change) | 7 | 2009-08-19 ARISAWA Akihiro <ari@mbf.ocn.ne.jp> (tiny change) |
| 2 | 8 | ||
| 3 | * language/tibetan.el ("Tibetan"): Fix sample-text entry. | 9 | * language/tibetan.el ("Tibetan"): Fix sample-text entry. |
diff --git a/lisp/progmodes/prolog.el b/lisp/progmodes/prolog.el index b62255fbf91..d422d85b13a 100644 --- a/lisp/progmodes/prolog.el +++ b/lisp/progmodes/prolog.el | |||
| @@ -238,6 +238,11 @@ rigidly along with this one (not yet)." | |||
| 238 | (defvar inferior-prolog-mode-syntax-table prolog-mode-syntax-table) | 238 | (defvar inferior-prolog-mode-syntax-table prolog-mode-syntax-table) |
| 239 | (defvar inferior-prolog-mode-abbrev-table prolog-mode-abbrev-table) | 239 | (defvar inferior-prolog-mode-abbrev-table prolog-mode-abbrev-table) |
| 240 | 240 | ||
| 241 | (defvar inferior-prolog-error-regexp-alist | ||
| 242 | ;; GNU Prolog used to not follow the GNU standard format. | ||
| 243 | '(("^\\(.*?\\):\\([0-9]+\\) error: .*(char:\\([0-9]+\\)" 1 2 3) | ||
| 244 | gnu)) | ||
| 245 | |||
| 241 | (declare-function comint-mode "comint") | 246 | (declare-function comint-mode "comint") |
| 242 | (declare-function comint-send-string "comint" (process string)) | 247 | (declare-function comint-send-string "comint" (process string)) |
| 243 | (declare-function comint-send-region "comint" (process start end)) | 248 | (declare-function comint-send-region "comint" (process start end)) |
| @@ -268,6 +273,9 @@ Return not at end copies rest of line to end and sends it. | |||
| 268 | \\[comint-interrupt-subjob] interrupts the shell or its current subjob if any. | 273 | \\[comint-interrupt-subjob] interrupts the shell or its current subjob if any. |
| 269 | \\[comint-stop-subjob] stops. \\[comint-quit-subjob] sends quit signal." | 274 | \\[comint-stop-subjob] stops. \\[comint-quit-subjob] sends quit signal." |
| 270 | (setq comint-prompt-regexp "^| [ ?][- ] *") | 275 | (setq comint-prompt-regexp "^| [ ?][- ] *") |
| 276 | (set (make-local-variable 'compilation-error-regexp-alist) | ||
| 277 | inferior-prolog-error-regexp-alist) | ||
| 278 | (compilation-shell-minor-mode) | ||
| 271 | (prolog-mode-variables)) | 279 | (prolog-mode-variables)) |
| 272 | 280 | ||
| 273 | (defvar inferior-prolog-buffer nil) | 281 | (defvar inferior-prolog-buffer nil) |
| @@ -357,6 +365,10 @@ With prefix argument \\[universal-prefix], prompt for the program to use." | |||
| 357 | (save-excursion | 365 | (save-excursion |
| 358 | (goto-char (- pmark 3)) | 366 | (goto-char (- pmark 3)) |
| 359 | (looking-at " \\? "))) | 367 | (looking-at " \\? "))) |
| 368 | ;; This is GNU prolog waiting to know whether you want more answers | ||
| 369 | ;; or not (or abort, etc...). The answer is a single char, not | ||
| 370 | ;; a line, so pass this char directly rather than wait for RET to | ||
| 371 | ;; send a whole line. | ||
| 360 | (comint-send-string proc (string last-command-event)) | 372 | (comint-send-string proc (string last-command-event)) |
| 361 | (call-interactively 'self-insert-command)))) | 373 | (call-interactively 'self-insert-command)))) |
| 362 | 374 | ||
| @@ -389,6 +401,7 @@ If COMPILE (prefix arg) is not nil, use compile mode rather than consult mode." | |||
| 389 | (let ((file buffer-file-name) | 401 | (let ((file buffer-file-name) |
| 390 | (proc (inferior-prolog-process))) | 402 | (proc (inferior-prolog-process))) |
| 391 | (with-current-buffer (process-buffer proc) | 403 | (with-current-buffer (process-buffer proc) |
| 404 | (compilation-forget-errors) | ||
| 392 | (comint-send-string proc (concat "['" (file-relative-name file) "'].\n")) | 405 | (comint-send-string proc (concat "['" (file-relative-name file) "'].\n")) |
| 393 | (pop-to-buffer (current-buffer))))) | 406 | (pop-to-buffer (current-buffer))))) |
| 394 | 407 | ||