diff options
| author | Dmitry Gutov | 2017-02-03 03:10:30 +0200 |
|---|---|---|
| committer | Dmitry Gutov | 2017-02-03 03:12:05 +0200 |
| commit | 604724e49d7b44dc663ad941998a0a44aa4fc178 (patch) | |
| tree | 986b450a66f5e6c4e78289b7a54a39934aa0c139 | |
| parent | 53c16c75a57aa486dfc1f46ef5aa538264e6ad47 (diff) | |
| download | emacs-604724e49d7b44dc663ad941998a0a44aa4fc178.tar.gz emacs-604724e49d7b44dc663ad941998a0a44aa4fc178.zip | |
(xref-collect-matches): Use '-E' together with '-e'
* lisp/progmodes/xref.el (xref-collect-matches): Use '-E'
together with '-e', as suggested by Noam Postavsky
(http://lists.gnu.org/archive/html/emacs-devel/2017-01/msg00780.html).
| -rw-r--r-- | lisp/progmodes/xref.el | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index a507755d42e..a8933b0103e 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el | |||
| @@ -918,11 +918,7 @@ 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'. | 921 | (let* ((grep-find-template (replace-regexp-in-string "<C>" "<C> -E" |
| 922 | ;; while 'grep -e -foo' inexplicably doesn't. | ||
| 923 | (when (eq (aref regexp 0) ?-) | ||
| 924 | (setq regexp (concat "\\" regexp))) | ||
| 925 | (let* ((grep-find-template (replace-regexp-in-string "-e " "-E " | ||
| 926 | grep-find-template t t)) | 922 | grep-find-template t t)) |
| 927 | (grep-highlight-matches nil) | 923 | (grep-highlight-matches nil) |
| 928 | (command (xref--rgrep-command (xref--regexp-to-extended regexp) | 924 | (command (xref--rgrep-command (xref--regexp-to-extended regexp) |