summaryrefslogtreecommitdiffstats
path: root/misc
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-04-25 15:08:17 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-04-25 15:08:17 +0000
commit2033330a441ab99695c064faf6d55af3d2f7732d (patch)
treeae8483790358b1a7e971b8676191a156fced72b1 /misc
parent60e159ef702b60aeb4515f36ca23b8a73181d028 (diff)
downloadperl_checker-2033330a441ab99695c064faf6d55af3d2f7732d.tar
perl_checker-2033330a441ab99695c064faf6d55af3d2f7732d.tar.gz
perl_checker-2033330a441ab99695c064faf6d55af3d2f7732d.tar.bz2
perl_checker-2033330a441ab99695c064faf6d55af3d2f7732d.tar.xz
perl_checker-2033330a441ab99695c064faf6d55af3d2f7732d.zip
re-sync after the big svn loss
Diffstat (limited to 'misc')
-rw-r--r--misc/Makefile7
-rwxr-xr-xmisc/perl_checker-vim3
-rw-r--r--misc/perl_checker.el10
-rw-r--r--misc/perl_checker.vim1
4 files changed, 21 insertions, 0 deletions
diff --git a/misc/Makefile b/misc/Makefile
new file mode 100644
index 0000000..70c3def
--- /dev/null
+++ b/misc/Makefile
@@ -0,0 +1,7 @@
+PREFIX = /usr
+DATADIR = $(PREFIX)/share
+
+install:
+ install -D -m 644 perl_checker.vim $(DESTDIR)$(DATADIR)/vim/ftplugin/perl_checker.vim
+ install -D -m 644 perl_checker.el $(DESTDIR)/etc/emacs/site-start.d/perl_checker.el
+ install -D perl_checker-vim $(DESTDIR)$(PREFIX)/bin/perl_checker-vim
diff --git a/misc/perl_checker-vim b/misc/perl_checker-vim
new file mode 100755
index 0000000..a32478b
--- /dev/null
+++ b/misc/perl_checker-vim
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+perl_checker --restrict-to-files "$@" > errors.err && vim -c ':copen 4' -c ':so /usr/share/vim/ftplugin/perl_checker.vim' -q
diff --git a/misc/perl_checker.el b/misc/perl_checker.el
new file mode 100644
index 0000000..135cb99
--- /dev/null
+++ b/misc/perl_checker.el
@@ -0,0 +1,10 @@
+(defun run-perl_checker ()
+ (interactive)
+ (save-some-buffers 1)
+ (compile (concat "perl_checker --restrict-to-files " (buffer-file-name (current-buffer)))))
+
+(let ((hook '(lambda ()
+ (local-set-key [(control return)] 'run-perl_checker)
+ )))
+ (add-hook 'perl-mode-hook hook)
+ (add-hook 'cperl-mode-hook hook))
diff --git a/misc/perl_checker.vim b/misc/perl_checker.vim
new file mode 100644
index 0000000..1b34dc2
--- /dev/null
+++ b/misc/perl_checker.vim
@@ -0,0 +1 @@
+setlocal errorformat=%EFile\ \"%f\"\\,\ line\ %l\\,\ character\ %c-%n,%Z%m