diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2004-08-13 03:01:12 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2004-08-13 03:01:12 +0000 |
commit | 3fc7ffeb3d832c8a84ced4b597535326676d68a3 (patch) | |
tree | e9b58f3fe3659f5591b3208e00e412e37f3c6c0d /misc | |
parent | ae203b7f2f5ccc9d7fd3711dae54e0177f683e49 (diff) | |
download | perl-MDK-Common-3fc7ffeb3d832c8a84ced4b597535326676d68a3.tar perl-MDK-Common-3fc7ffeb3d832c8a84ced4b597535326676d68a3.tar.gz perl-MDK-Common-3fc7ffeb3d832c8a84ced4b597535326676d68a3.tar.bz2 perl-MDK-Common-3fc7ffeb3d832c8a84ced4b597535326676d68a3.tar.xz perl-MDK-Common-3fc7ffeb3d832c8a84ced4b597535326676d68a3.zip |
- use DESTDIR
- add perl_checker-vim
- add Ctrl-return in perl and cperl emacs mode
Diffstat (limited to 'misc')
-rw-r--r-- | misc/Makefile | 7 | ||||
-rwxr-xr-x | misc/perl_checker-vim | 3 | ||||
-rw-r--r-- | misc/perl_checker.el | 10 | ||||
-rw-r--r-- | misc/perl_checker.vim | 1 |
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 |