diff options
| -rw-r--r-- | lisp/progmodes/xref.el | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index d8098c5a54a..a507755d42e 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el | |||
| @@ -918,6 +918,10 @@ IGNORES is a list of glob patterns." | |||
| 918 | (grep-compute-defaults) | 918 | (grep-compute-defaults) |
| 919 | (defvar grep-find-template) | 919 | (defvar grep-find-template) |
| 920 | (defvar grep-highlight-matches) | 920 | (defvar grep-highlight-matches) |
| 921 | ;; 'grep -E -foo' results in 'grep: oo: No such file or directory'. | ||
| 922 | ;; while 'grep -e -foo' inexplicably doesn't. | ||
| 923 | (when (eq (aref regexp 0) ?-) | ||
| 924 | (setq regexp (concat "\\" regexp))) | ||
| 921 | (let* ((grep-find-template (replace-regexp-in-string "-e " "-E " | 925 | (let* ((grep-find-template (replace-regexp-in-string "-e " "-E " |
| 922 | grep-find-template t t)) | 926 | grep-find-template t t)) |
| 923 | (grep-highlight-matches nil) | 927 | (grep-highlight-matches nil) |