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

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

bug#20806: 25.0.50; `string-match' is confused???


From: Vaidheeswaran C
Subject: bug#20806: 25.0.50; `string-match' is confused???
Date: Sat, 13 Jun 2015 15:03:29 +0530
User-agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Icedove/31.3.0

Is an empty string a prefix of all strings or not? `string-match'
should settle this matter first.

Here is an eshell transaction.

----------------------------------------------------------------

Welcome to the Emacs shell

/tmp $ (string-match "\\(.*\\)" "")
0
/tmp $ (string-match "foo" "")
/tmp $

----------------------------------------------------------------

Here is how I ended up with this bug.

Debugger entered--Lisp error: (error "Regexp cannot match an empty string")
  signal(error ("Regexp cannot match an empty string"))
  error("Regexp cannot match an empty string")
  hi-lock-regexp-okay("\\(.*\\)")
  byte-code("\300\301\302\303\"!\304 D\207" [hi-lock-regexp-okay
read-regexp "Regexp to highlight" regexp-history-last
hi-lock-read-face-name] 4)
  call-interactively(highlight-regexp nil nil)
  command-execute(highlight-regexp)





reply via email to

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