POV-Ray : Newsgroups : povray.unix : Emacs POV-Ray mode : Re: How do I use pov-mode.elc? (Was: Emacs POV-Ray mode) Server Time
28 Jul 2024 20:24:08 EDT (-0400)
  Re: How do I use pov-mode.elc? (Was: Emacs POV-Ray mode)  
From: Peter Toneby
Date: 13 Apr 1999 18:16:24
Message: <3713B427.8D49DA48@acc.umu.se>
Nieminen Mika wrote:
> 
>   I once downloaded the pov-mode.el and compiled it to pov-mode.elc, but
> I don't have the slightest idea how to use it. Can anyone tell me?
> 

This is actually very nicely documented in the pov-mode.el file.

-- excerp from my .emacs ---
(autoload 'pov-mode "/home/peter/lib/emacs/pov-mode.el" "PoVray scene
file mode" t)
(setq auto-mode-alist
      (append '(("\\.pov$" . pov-mode)
                ("\\.inc$" . pov-mode))
              auto-mode-alist))
(add-hook 'pov-mode-hook 'turn-on-font-lock)
(setq pov-indent-level '2)
(setq pov-autoindent-endblocks t)   ;;Automatically reindents
else/end/break
(setq pov-indent-under-declare '2)  ;;Try it!  Tell me if you like it...
(setq pov-fontify-insanely t)       ;;When it's non-nil, we fontify
*every*
                                    ;;Povray keyword.  Careful!
--- end of excerp ---

Here is whats done:
the autoload line points emacs to the pov-mode file.
the setq...(append...auto-mode-alist) tells emacs that files ending with
.pov and .inc should use pov-mode.
the add-hook turns on font-lock (syntax highlighting)
The rest of the lines are variables that describes pov-modes behavior.

/Peter Toneby


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.