On ZZamboni's request, this is the emacs code you will need to print a postscript copy of your pretty-printed perl code (in file "perl-indent-ps.el"):
(cperl-mode) (indent-region 0 (buffer-size) nil) (save-buffer) (ps-print-buffer (cond (command-line-args-left (car command-line-args-left)) (t nil)))
(Sorry about the peculiar indentation, fellow LISPers, but the formatter here makes it necessary to do something like this.)
You have to call emacs like this to make it work:
> emacs -batch try.pl -l .emacs -l perl-indent-ps.el try.ps
If you omit the last argument in the preceding command line, your postscript will be send to the printer (at least this is what my emacs docs say, I could not test this since there is no printer hooked up to the server I currently work on).
Christian Lemburg
Brainbench MVP for Perl
http://www.brainbench.com
In reply to Re: how to indent/pretty print perl code
by clemburg
in thread how to indent/pretty print perl code
by snowcrash
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |