File: config.emacs

package info (click to toggle)
libtext-autoformat-perl 1.750000-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 200 kB
  • sloc: perl: 745; makefile: 7
file content (9 lines) | stat: -rwxr-xr-x 374 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
;; 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};}\"" 
  (current-buffer) t)))