[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r115389: * lisp/emacs-lisp/regexp-opt.el (regexp-opt
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] trunk r115389: * lisp/emacs-lisp/regexp-opt.el (regexp-opt-charset): Fix ^. |
Date: |
Thu, 05 Dec 2013 20:26:19 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 115389
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16046
author: Cameron Desautels <address@hidden>
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Thu 2013-12-05 15:25:54 -0500
message:
* lisp/emacs-lisp/regexp-opt.el (regexp-opt-charset): Fix ^.
* test/automated/regexp-tests.el: New file.
added:
test/automated/regexp-tests.el
regexptests.el-20131205202437-fwnhlut83m8yiohp-1
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/emacs-lisp/regexp-opt.el
regexpopt.el-20091113204419-o5vbwnq5f7feedwu-1180
test/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-8588
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2013-12-05 16:04:53 +0000
+++ b/lisp/ChangeLog 2013-12-05 20:25:54 +0000
@@ -1,3 +1,7 @@
+2013-12-05 Cameron Desautels <address@hidden> (tiny change)
+
+ * emacs-lisp/regexp-opt.el (regexp-opt-charset): Fix ^ (bug#16046).
+
2013-12-05 Teodor Zlatanov <address@hidden>
* net/eww.el (eww-current-source): New variable to store page
=== modified file 'lisp/emacs-lisp/regexp-opt.el'
--- a/lisp/emacs-lisp/regexp-opt.el 2013-01-01 09:11:05 +0000
+++ b/lisp/emacs-lisp/regexp-opt.el 2013-12-05 20:25:54 +0000
@@ -285,7 +285,9 @@
;;
;; Make sure a caret is not first and a dash is first or last.
(if (and (string-equal charset "") (string-equal bracket ""))
- (concat "[" dash caret "]")
+ (if (string-equal dash "")
+ "\\^" ; [^] is not a valid regexp
+ (concat "[" dash caret "]"))
(concat "[" bracket charset caret dash "]"))))
(provide 'regexp-opt)
=== modified file 'test/ChangeLog'
--- a/test/ChangeLog 2013-11-29 10:33:31 +0000
+++ b/test/ChangeLog 2013-12-05 20:25:54 +0000
@@ -1,13 +1,16 @@
+2013-12-05 Stefan Monnier <address@hidden>
+
+ * automated/regexp-tests.el: New file.
+
2013-11-29 Eli Zaretskii <address@hidden>
- * automated/reftex-tests.el (reftex-parse-from-file-test): Run
- temp-dir through file-truename, to make sure the temporary file
+ * automated/reftex-tests.el (reftex-parse-from-file-test):
+ Run temp-dir through file-truename, to make sure the temporary file
names are comparable as strings.
* automated/decoder-tests.el (ert-test-decoder-prefer-utf-8):
Force Unix EOLs by using 'utf-8-unix', since the default of
- 'utf-8' is system-dependent, while the test expects to see Unix
- EOLs.
+ 'utf-8' is system-dependent, while the test expects to see Unix EOLs.
2013-11-28 Glenn Morris <address@hidden>
@@ -15,8 +18,7 @@
2013-11-28 Eli Zaretskii <address@hidden>
- * automated/Makefile.in (PATH_SEP): Set this instead of
- PATH_SEPARATOR.
+ * automated/Makefile.in (PATH_SEP): Set this instead of PATH_SEPARATOR.
(EMACSOPT): Use $(PATH_SEP).
2013-11-28 Michael Albinus <address@hidden>
@@ -115,8 +117,7 @@
(tramp-test22-file-times, tramp-test23-visited-file-modtime)
(tramp-test24-file-name-completion, tramp-test25-load)
(tramp-test26-process-file, tramp-test27-start-file-process):
- (tramp-test28-shell-command): Protect unwindforms with
- `ignore-errors'.
+ (tramp-test28-shell-command): Protect unwindforms with `ignore-errors'.
(tramp-test29-utf8): New test.
2013-11-13 Michael Albinus <address@hidden>
=== added file 'test/automated/regexp-tests.el'
--- a/test/automated/regexp-tests.el 1970-01-01 00:00:00 +0000
+++ b/test/automated/regexp-tests.el 2013-12-05 20:25:54 +0000
@@ -0,0 +1,31 @@
+;;; regexp-tests.el --- Test suite for regular expression handling.
+
+;; Copyright (C) 2013 Free Software Foundation, Inc.
+
+;; Author: Stefan Monnier <address@hidden>
+;; Keywords: internal
+;; Human-Keywords: internal
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
+
+;;; Code:
+
+(ert-deftest regexp-test-regexp-opt ()
+ "Test the `compilation-error-regexp-alist' regexps.
+The test data is in `compile-tests--test-regexps-data'."
+ (should (string-match (regexp-opt-charset '(?^)) "a^b")))
+
+;;; regexp-tests.el ends here.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r115389: * lisp/emacs-lisp/regexp-opt.el (regexp-opt-charset): Fix ^.,
Stefan Monnier <=