[PD-dev] Pd code formatter?

Tim Blechmann tim at klingt.org
Wed Sep 26 19:14:21 CEST 2007


> Ah, ok, I didn't notice the switch.  I've originally used the default  
> Emacs settings for the indent. Now I think I now use stroustrup,  
> because it was the closest to Miller's style that I found.

i generally avoid tabs in my source files with the following
before-save-hook:
(defun clean-code()
  "Remove trailing spaces, turn tab into spaces"
  (when (memq major-mode '(c-mode c++-mode emacs-lisp-mode python-mode))
    (delete-trailing-whitespace)
    (untabify (point-min) (point-max))))

(add-hook 'before-save-hook 'clean-code)

if you then set c-basic-offset to 4 you are almost there ...

hth, tim

--
tim at klingt.org    ICQ: 96771783
http://tim.klingt.org

Linux is like a wigwam: no windows, no gates, apache inside, stable.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20070926/03159b34/attachment.pgp>


More information about the Pd-dev mailing list