错误一般格式
ex.pas(3,10) Fatal: 错误信息
或者
ex.pas(3,10) Warning: 错误信息
ex.pas是文件名,PASCAL-MODE
怎么配置
(eval-after-load "compile"
'(add-to-list
'compilation-error-regexp-alist-alist
'(pascal
"\\(.*\\)(\\([0-9]+\\),\\([0-9]+\\)): \\(Fatal\\|Warning\\):" 1 2 3)
)
)
怎么错了?
谢谢
[问题]NTEMACS怎么配置PASCAL编译错误分析
-
- 帖子: 32
- 注册时间: 2007-06-13 16:54
-
- 帖子: 57
- 注册时间: 2006-10-06 21:10
在 compilation-error-regexp-alist 的文档中:
Instead of an alist element, you can use a symbol, which is
looked up in `compilation-error-regexp-alist-alist'. You can see
the predefined symbols and their effects in the file
`etc/compilation.txt' (linked below if you are customizing this).
所以要在 compilation-error-regexp-alist 加上一个 'pascal .
regular expression 是否匹配可以在compilation window用 M-x re-builder。
Instead of an alist element, you can use a symbol, which is
looked up in `compilation-error-regexp-alist-alist'. You can see
the predefined symbols and their effects in the file
`etc/compilation.txt' (linked below if you are customizing this).
所以要在 compilation-error-regexp-alist 加上一个 'pascal .
regular expression 是否匹配可以在compilation window用 M-x re-builder。
-
- 帖子: 32
- 注册时间: 2007-06-13 16:54
-
- 帖子: 32
- 注册时间: 2007-06-13 16:54
-
- 帖子: 45
- 注册时间: 2007-01-27 14:11
试试这个成不:goghl 写了:多谢你了!终于搞定了!可以跳转了!
不过还有一个问题,怎么把这几行代码放如.emacs里呢?不放入compile.el里
多谢了,太好了
代码: 全选
(require 'compile)
(add-to-list 'compilation-error-regexp-alist-alist
'(pascal
"\\(.*.pas\\)\\(([0-9]+,[0-9]+)\\) \\(\\(Error.*\\|Warning.*\\|Fatal.*\\)\\)" 1 2 3))
(add-to-list 'compilation-error-regexp-alist
'pascal)