Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2004-03

Re: emacs & freepascal

3 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Michalis Kamburelis
to Jacobo García López de Araújo: 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
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".

Michalis

Reply by email

Jacobo García López de Araújo

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.

Reply by email

Jacobo García López de Araújo
to Michalis Kamburelis: Add (add-to-list 'auto-mode-alist '("\\.pas\\'" . pascal-mode)) to your ~/.emacs file to…

Thanks for the information, that worked perfectly.

Jacobo García Lopez de Araujo

Michalis Kamburelis wrote 38 lines
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".

Reply by email