summaryrefslogtreecommitdiffstats
path: root/misc
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-08-13 03:01:12 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-08-13 03:01:12 +0000
commit58e6677933d504c98dcc3ebf10009dc767a73a37 (patch)
treed4b5a4866e4d8b2874d165f4d7e096328e6326e1 /misc
parentc927e68bfd5e070d666642de786a971b9f0330e9 (diff)
downloadperl_checker-58e6677933d504c98dcc3ebf10009dc767a73a37.tar
perl_checker-58e6677933d504c98dcc3ebf10009dc767a73a37.tar.gz
perl_checker-58e6677933d504c98dcc3ebf10009dc767a73a37.tar.bz2
perl_checker-58e6677933d504c98dcc3ebf10009dc767a73a37.tar.xz
perl_checker-58e6677933d504c98dcc3ebf10009dc767a73a37.zip
- use DESTDIR
- add perl_checker-vim - add Ctrl-return in perl and cperl emacs mode
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