From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Vaidheeswaran C Newsgroups: gmane.emacs.bugs Subject: bug#20806: 25.0.50; `string-match' is confused??? Date: Sun, 14 Jun 2015 00:29:18 +0530 Message-ID: <557C7D86.9070902@gmail.com> References: <557BF8E9.9040007@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------040109000003050001080701" X-Trace: ger.gmane.org 1434252261 7287 80.91.229.3 (14 Jun 2015 03:24:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 14 Jun 2015 03:24:21 +0000 (UTC) To: 20806@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jun 14 05:24:11 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Z3yWo-00031z-HN for geb-bug-gnu-emacs@m.gmane.org; Sun, 14 Jun 2015 05:24:10 +0200 Original-Received: from localhost ([::1]:57629 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z3yWn-00066h-JI for geb-bug-gnu-emacs@m.gmane.org; Sat, 13 Jun 2015 23:24:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41170) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z3yWj-00066O-CJ for bug-gnu-emacs@gnu.org; Sat, 13 Jun 2015 23:24:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z3yWg-00079y-78 for bug-gnu-emacs@gnu.org; Sat, 13 Jun 2015 23:24:05 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:38627) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z3yWg-00079t-3l for bug-gnu-emacs@gnu.org; Sat, 13 Jun 2015 23:24:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Z3yWf-0003UT-QQ for bug-gnu-emacs@gnu.org; Sat, 13 Jun 2015 23:24:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Vaidheeswaran C Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 14 Jun 2015 03:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20806 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 20806-submit@debbugs.gnu.org id=B20806.143425222913397 (code B ref 20806); Sun, 14 Jun 2015 03:24:01 +0000 Original-Received: (at 20806) by debbugs.gnu.org; 14 Jun 2015 03:23:49 +0000 Original-Received: from localhost ([127.0.0.1]:53085 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z3yWS-0003Tz-6k for submit@debbugs.gnu.org; Sat, 13 Jun 2015 23:23:48 -0400 Original-Received: from mail-pa0-f49.google.com ([209.85.220.49]:33612) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z3qgk-00079V-QC for 20806@debbugs.gnu.org; Sat, 13 Jun 2015 15:01:55 -0400 Original-Received: by padev16 with SMTP id ev16so40600535pad.0 for <20806@debbugs.gnu.org>; Sat, 13 Jun 2015 12:01:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type; bh=xv9KUjYXEm2NuTbRVnAIyGAdb2Dmed/iV+aNchEmz3w=; b=y2B7ZxoM0a47CK0jW85L5krwO1oYSaQqTAHyq2Gh227bbGll8pPWJTO3dXJUorqGEG VSLLVu6WusOPpQ0KFh1scawhew83dyAM2s/YyxHB83/YoKqphf3GGHD+PV70mZzjQ4Sz GEye/rAZSZC3m8pPhY/qbqc5ugXMLctU0aCL3MUcaS+XfT9MOTQIqup4niPduXdQNhBb +GqZ8sBMN+l9gFOiH3NmrN7WYoCkHt/1rHmQXW6SbC0phdXAIHb5Rrm6cbg2i21TTrDc JN/C/UVKDYlHCV5S3wujmPJIKDoXBSCeel2XVGg/IumvYDwNFsnvHJZopylrOJd+9NRJ Xl/Q== X-Received: by 10.70.94.73 with SMTP id da9mr34064522pdb.28.1434222108710; Sat, 13 Jun 2015 12:01:48 -0700 (PDT) Original-Received: from [192.168.43.83] ([171.78.183.108]) by mx.google.com with ESMTPSA id je4sm7360651pbb.17.2015.06.13.12.01.45 for <20806@debbugs.gnu.org> (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 13 Jun 2015 12:01:47 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Icedove/31.3.0 In-Reply-To: <557BF8E9.9040007@gmail.com> X-Mailman-Approved-At: Sat, 13 Jun 2015 23:23:47 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:103923 Archived-At: This is a multi-part message in MIME format. --------------040109000003050001080701 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit On Saturday 13 June 2015 03:03 PM, Vaidheeswaran C wrote: > 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) > The attached patch solves the above issue. I hope it is OK. (Stupid me got the title wrong. Apologies.) --------------040109000003050001080701 Content-Type: text/x-patch; name="0001-lisp-hi-lock.el-hi-lock-regexp-okay-Minor-change.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0001-lisp-hi-lock.el-hi-lock-regexp-okay-Minor-change.patch" >From dd0786d3caa8ca83276dbc8ecd363c590cbccdbb Mon Sep 17 00:00:00 2001 From: Vaidheeswaran C Date: Sat, 13 Jun 2015 15:48:10 +0530 Subject: [PATCH] * lisp/hi-lock.el (hi-lock-regexp-okay): Minor change --- lisp/hi-lock.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/hi-lock.el b/lisp/hi-lock.el index 0255585..deb827c 100644 --- a/lisp/hi-lock.el +++ b/lisp/hi-lock.el @@ -658,7 +658,7 @@ not suitable." (cond ((null regexp) (error "Regexp cannot match nil")) - ((string-match regexp "") + ((string= regexp "") (error "Regexp cannot match an empty string")) (t regexp))) -- 1.7.10.4 --------------040109000003050001080701--