[fpc-pascal]emacs & freepascal

Jacobo García López de Araújo wretched at ya.com
Thu Mar 11 13:21:04 CET 2004


Thanks for the information, that worked perfectly.

Jacobo García Lopez de Araujo

El mié, 10-03-2004 a las 23:25, Michalis Kamburelis escribió:
> Jacobo García López de Araújo wrote:
> > Hi, it's my first post to the list so i want to salute everyone.
> > 
> > And here is my question, i'm trying to make freepascal working under
> > emacs in linux debian. But i have no quote about that, i could have my
> > sintax colored using Options/Syntax Highlighting, but the thing is that
> > i want emacs to recognice my .pas files and syntax highlight them,  and
> > also want to compile and make directly from emacs like it's done in
> > other language modes. 
> > 
> > I don't know if this can help but when i try to compile a make command
> > appears in the low buffer.
> > 
> > Thanks in advance.
> > 
> > Jacobo García Lopez de Araujo.
> > 
> > 
> 
> 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".





More information about the fpc-pascal mailing list