Skip to content

Commit a87a969

Browse files
committed
Remove Erlang-specific compilation error regexp
The purpose of this regexp is to ensure that, when invoking the Erlang compiler inside Emacs through M-x compile, any error messages be turned into links jumping to the right line in the right source file. However, it seems like this works out of the box in modern Emacsen, and furthermore, using a non-standard regexp inhibits jumping to a certain column when this is provided by the compiler.
1 parent 9cfeeb9 commit a87a969

1 file changed

Lines changed: 0 additions & 31 deletions

File tree

lib/tools/emacs/erlang.el

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -483,10 +483,6 @@ function.")
483483
"*Non-nil means TAB in Erlang mode should always re-indent the current line,
484484
regardless of where in the line point is when the TAB command is used.")
485485

486-
(defvar erlang-error-regexp-alist
487-
'(("^\\([^:( \t\n]+\\)[:(][ \t]*\\([0-9]+\\)[:) \t]" . (1 2)))
488-
"*Patterns for matching Erlang errors.")
489-
490486
(defvar erlang-man-inhibit (eq system-type 'windows-nt)
491487
"Inhibit the creation of the Erlang Manual Pages menu.
492488
@@ -1327,7 +1323,6 @@ Other commands:
13271323
(erlang-menu-init)
13281324
(erlang-mode-variables)
13291325
(erlang-check-module-name-init)
1330-
(erlang-add-compilation-alist erlang-error-regexp-alist)
13311326
(erlang-man-init)
13321327
(erlang-tags-init)
13331328
(erlang-font-lock-init)
@@ -1443,31 +1438,6 @@ Other commands:
14431438
(set (make-local-variable 'outline-level) (lambda () 1))
14441439
(set (make-local-variable 'add-log-current-defun-function)
14451440
'erlang-current-defun))
1446-
1447-
1448-
;; Compilation.
1449-
;;
1450-
;; The following code is compatible with the standard package `compilation',
1451-
;; making it possible to go to errors using `erlang-next-error' (or just
1452-
;; `next-error' in Emacs 21).
1453-
;;
1454-
;; The normal `compile' command works of course. For best result, please
1455-
;; execute `make' with the `-w' flag.
1456-
;;
1457-
;; Please see the variables named `compiling-..' above.
1458-
1459-
(defun erlang-add-compilation-alist (alist)
1460-
(require 'compile)
1461-
(cond ((boundp 'compilation-error-regexp-alist) ; Emacs 19
1462-
(while alist
1463-
(or (assoc (car (car alist)) compilation-error-regexp-alist)
1464-
(setq compilation-error-regexp-alist
1465-
(cons (car alist) compilation-error-regexp-alist)))
1466-
(setq alist (cdr alist))))
1467-
((boundp 'compilation-error-regexp)
1468-
;; Emacs 18, Only one regexp is allowed.
1469-
(funcall (symbol-function 'set)
1470-
'compilation-error-regexp (car (car alist))))))
14711441

14721442
(defun erlang-font-lock-init ()
14731443
"Initialize Font Lock for Erlang mode."
@@ -4860,7 +4830,6 @@ The following special commands are available:
48604830
(set (make-local-variable 'compilation-old-error-list) nil))
48614831
;; Needed when compiling directly from the Erlang shell.
48624832
(setq compilation-last-buffer (current-buffer))
4863-
(erlang-add-compilation-alist erlang-error-regexp-alist)
48644833
(setq comint-prompt-regexp "^[^>=]*> *")
48654834
(setq comint-eol-on-send t)
48664835
(setq comint-input-ignoredups t)

0 commit comments

Comments
 (0)