Hi, it's my first post to the list so i want to salute everyone. And here is my question,…
Jacobo García López de Araújo wrote 17 lines
Add
(add-to-list 'auto-mode-alist '("\\.pas\\'" . pascal-mode)) to your ~/.emacs file to inform Emacs that files with extension "pas" should use Pascal mode.
Add
(add-hook 'pascal-mode-hook
(lambda ()
(set (make-local-variable 'compile-command)
(concat "fpc " (file-name-nondirectory (buffer-file-name))) )
)
t)
to your ~/.emacs file to tell Emacs that when you use "compile" function in Pascal mode it should propose you command-line like "fpc foo.pas".
You may want to adjust this Elisp code in many ways -- look for documentation for all these functions and variables (like compile-command or auto-mode-alist) in Emacs using "C-h f" and "C-h v".
