Sophie

Sophie

distrib > Mandriva > 9.1 > ppc > by-pkgid > dc74f6cae350f36a4a73123e99e289d4 > files > 7

perl-Text-Autoformat-1.04-9mdk.noarch.rpm

;; 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)))