Permalink
Browse files

Adapt @arnested's flymake-phpcs improvements for flymake-perlcritic.

  • Loading branch information...
illusori committed Mar 28, 2012
1 parent b83e4ed commit 0692d6ad5495f6e5438bde0a10345829b8e1def8
Showing with 11 additions and 6 deletions.
  1. +4 −1 Changes
  2. +1 −1 README.mkdn
  3. +6 −4 flymake-perlcritic.el
View
@@ -1,6 +1,9 @@
-* flymake-perlcritic.el 1.0.3 (candidate)
+* flymake-perlcritic.el 1.0.3 (2012-03-28-09:13)
* Define init and cleanup functions as flymake-perlcritic-*.
* Override Flymake Perl functions less evilly.
+ * Merge in arnested's contributions from flymake-phpcs:
+ * Append flymake-mode to perl-hook rather than prepend.
+ * Attempt to autolocate flymake_perlcritic wrapper for default value.
* flymake-perlcritic.el 1.0.2 (2012-01-01-09:46)
* Add support for flymake-find-perl-lib-dir by modifying PERL5LIB
View
@@ -24,7 +24,7 @@ flymake-perlcritic.el somewhere that emacs can find it and add
something like the following to your .emacs:
```lisp
-;; If flymake_perlcritic isn't in your path.
+;; If flymake_perlcritic isn't found correctly, specify the full path
(setq flymake-perlcritic-command
"~/projects/emacs-flymake-perlcritic/bin/flymake_perlcritic")
View
@@ -5,7 +5,7 @@
;; Author: Sam Graham <libflymake-perlcritic-emacs BLAHBLAH illusori.co.uk>
;; Maintainer: Sam Graham <libflymake-perlcritic-emacs BLAHBLAH illusori.co.uk>
;; URL: https://github.com/illusori/emacs-flymake-perlcritic
-;; Version: 1.0.2
+;; Version: 1.0.3
;; Package-Requires: ((flymake "0.3"))
;;
;; This program is free software: you can redistribute it and/or modify
@@ -32,8 +32,10 @@
(eval-when-compile (require 'flymake))
-(defcustom flymake-perlcritic-command "perlcritic_flymake"
- "If perlcritic_flymake isn't in your $PATH, set this to the command needed to run it."
+(defcustom flymake-perlcritic-command (executable-find
+ (concat (file-name-directory (or load-file-name buffer-file-name))
+ "bin/flymake_perlcritic"))
+ "If flymake_perlcritic isn't in your $PATH, set this to the command needed to run it."
:group 'flymake-perlcritic
:type 'string)
@@ -82,7 +84,7 @@
(if (nth 1 mode-and-masks)
(setcar (nthcdr 1 mode-and-masks) 'flymake-perlcritic-cleanup)
(nconc mode-and-masks (list 'flymake-perlcritic-cleanup))))
- (add-hook 'perl-mode-hook (lambda() (flymake-mode 1)))))
+ (add-hook 'perl-mode-hook (lambda() (flymake-mode 1)) t)))
(provide 'flymake-perlcritic)
;;; flymake-perlcritic.el ends here

0 comments on commit 0692d6a

Please sign in to comment.