Permalink
Browse files

Add csstidy path as defvar (thanks Stan)

  • Loading branch information...
1 parent 127cf22 commit 2b2014c32a2e81143351093504c83dc7f80eb15f niels giesen committed Apr 2, 2010
Showing with 13 additions and 1 deletion.
  1. +13 −1 css-check.el
View
@@ -63,6 +63,16 @@
(defvar css-check-follow-mode nil)
+(defvar css-check-csstidy-path nil
+ "Whether the csstidy executable in path.\n
+When non-nil return value is the path to local csstidy.\n
+:SEE (URL `http://csstidy.sourceforge.net/index.php')")
+;;
+(unless (bound-and-true-p css-check-csstidy-path)
+ (let ((csstidy-path
+ (or (executable-find "csstidy")(executable-find "csstidy.exe"))))
+ (when csstidy-path (setq css-check-csstidy-path csstidy-path))))
+
(defun css-check-toggle-follow ()
(interactive)
(setq css-check-follow-mode
@@ -118,7 +128,9 @@
(when (and oldtext newtext)
(css-check-goto-line-at-p)
(save-excursion
- (replace-string oldtext newtext nil (point-at-bol) (point-at-eol)))
+ (replace-string oldtext newtext nil
+ (point-at-bol)
+ (point-at-eol)))
(switch-to-buffer-other-window buffer)
(save-excursion
(let (buffer-read-only)

0 comments on commit 2b2014c

Please sign in to comment.