+2014-11-18 Juri Linkov <juri@linkov.net>
+
+ * progmodes/grep.el (grep-compute-defaults):
+ Compute grep-highlight-matches before its use.
+
2014-11-18 Juri Linkov <juri@linkov.net>
* replace.el (query-replace-from-to-separator): Turn defvar into
(looking-at
(concat (regexp-quote hello-file)
":[0-9]+:English")))))))))
+
+ (when (eq grep-highlight-matches 'auto-detect)
+ (setq grep-highlight-matches
+ (with-temp-buffer
+ (and (grep-probe grep-program '(nil t nil "--help"))
+ (progn
+ (goto-char (point-min))
+ (search-forward "--color" nil t))
+ ;; Windows and DOS pipes fail `isatty' detection in Grep.
+ (if (memq system-type '(windows-nt ms-dos))
+ 'always 'auto)))))
+
(unless (and grep-command grep-find-command
grep-template grep-find-template)
(let ((grep-options
(t
(format "%s . <X> -type f <F> -print | \"%s\" %s"
find-program xargs-program gcmd))))))))
- (when (eq grep-highlight-matches 'auto-detect)
- (setq grep-highlight-matches
- (with-temp-buffer
- (and (grep-probe grep-program '(nil t nil "--help"))
- (progn
- (goto-char (point-min))
- (search-forward "--color" nil t))
- ;; Windows and DOS pipes fail `isatty' detection in Grep.
- (if (memq system-type '(windows-nt ms-dos))
- 'always 'auto)))))
;; Save defaults for this host.
(setq grep-host-defaults-alist