openbsd-ports/textproc/p5-Text-Autoformat/files/dot.emacs
naddy 4a5473494f * update to 1.11
* add emacs and vi dot file examples
* by new maintainer Han Boetes <han@linux-mandrake.com>
2003-05-15 06:19:41 +00:00

10 lines
498 B
Plaintext

;; Add these lines to your .emacs and you will be happy with
;; p5-Text-Autoformat.
;; Use ctrl-c k to reformat a region.
;; Set a global key for autoformat region
(global-set-key (kbd "C-c k") (lambda () (interactive) (shell-command-on-region (region-beginning) (region-end)
"perl -MText::Autoformat -e \"{autoformat{all=>1,justify=>\'full\'};}\""
(current-buffer) t)))