bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#6114: 23.1; grep-read-files does incorrect wildcard match


From: Juri Linkov
Subject: bug#6114: 23.1; grep-read-files does incorrect wildcard match
Date: Thu, 06 May 2010 23:50:50 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (x86_64-pc-linux-gnu)

> This bug is for (defun grep-read-files (regexp) in file grep.el.
>
> In grep-read-files, there's a call to (wildcard-to-regexp (cdr alias))
> with the assumption that (cdr alias) is a single pattern.  However,
> the variable grep-files-aliases actually can have multiple patterns
> for each alias.  So, the multi-pattern aliases, such as for "cc",
> cannot correctly match:
>
> (defcustom grep-files-aliases
>   '(("asm" .    "*.[sS]")
>     ("c" .     "*.c")
>     ("cc" .    "*.cc *.cxx *.cpp *.C *.CC *.c++")
>     ... etc...

Evaluating

  (wildcard-to-regexp "*.cc *.cxx *.cpp *.C *.CC *.c++")

returns

  "\\`[^^@]*\\.cc [^^@]*\\.cxx [^^@]*\\.cpp [^^@]*\\.C [^^@]*\\.CC 
[^^@]*\\.c\\+\\+\\'"

Do you think it should be

  
"\\`[^^@]*\\.cc\\|[^^@]*\\.cxx\\|[^^@]*\\.cpp\\|[^^@]*\\.C\\|[^^@]*\\.CC\\|[^^@]*\\.c\\+\\+\\'"

?

-- 
Juri Linkov
http://www.jurta.org/emacs/






reply via email to

[Prev in Thread] Current Thread [Next in Thread]