2006-11-27

Emacs: Free pascal interaction

Hum... I googled, but have not found. Evidently, nobody was concerned with the problem of interaction emacs and fpc.

Well, I've readjusted what I can - highlight uses, support of compile errors messaging and the default compile-command.

;;Pascal mode
(require 'compile)
(pushnew '("^\\([a-zA-Z0-9\\.]+\\)(\\([0-9]+\\),\\([0-9]+\\))\s\\(.*$\\)" 1 2 3)
compilation-error-regexp-alist)
(defun pascal-mode-additional-init ()
(local-set-key "\C-c\C-c" 'compile)
(unless (or (file-exists-p "makefile")
(file-exists-p "Makefile"))
(set (make-local-variable 'compile-command)
(concat "fpc -g " buffer-file-name)))
(font-lock-add-keywords 'pascal-mode
'(("^[ \t]*\\(uses\\)\\>[ \t]*\\([a-z]\\)" 1 font-lock-keyword-face prepend))))


What should else I do so good?

No comments:

Post a Comment