Perl-Sensitive Sunglasses | |
PerlMonks |
Customizing Emacs for Perl Best Practicesby ait (Hermit) |
on Nov 13, 2007 at 00:29 UTC ( [id://650413]=perlquestion: print w/replies, xml ) | Need Help?? |
ait has asked for the wisdom of the Perl Monks concerning the following question:
Update 2007-11-13: Got it Working! Read more to find out how...
I was breaking my head with cperlmode until I discovered that the c-perl-mode.el bundled with Emacs 21 on Debian Etch is *VERY* outdated. I downloaded the latest c-perl-mode.el file from here and copied it to /usr/share/emacs/21.4/lisp/progmodes/
Hello knowledgeable monks. Today I seek the wisdom of any fellow citizen of the monastery that uses Emacs and has been able to customize the indentation, in order to comply with Damian's K&R parenthesize recommendation. I have searched PM and many other places, and have truly tried my best to customize the c-style-alist variable but I don't seem to find a method in in cc-align.el to actually align the arglist anywhere except under the opening parenthesis.Remember to remove the .elc file and recompile the new one if you want faster load, although it is not mandatory for it to work. After this, the recommendations in the PBP book (Chapter 2, under tabs, p. 22 in my edition (First Edition, July 2005)) work perfectly:
Thanks to all Monks that responded! I am certain that some fellow monk uses Emacs and has a working hack in their .emacs file for this and other code layout recommendations described in the book. Furthermore, I think that by posting these Emacs hacks here, will later be found by the search engine and help other Perl enthusiasts that use Emacs to comply with and promote the use of these standards.
Back to
Seekers of Perl Wisdom
|
|