From bf4906d7ca3833f11f929d0feae0feb622131604 Mon Sep 17 00:00:00 2001 From: Cameron Desautels Date: Thu, 5 Dec 2013 15:25:54 -0500 Subject: * lisp/emacs-lisp/regexp-opt.el (regexp-opt-charset): Fix ^. * test/automated/regexp-tests.el: New file. Fixes: debbugs:16046 --- lisp/emacs-lisp/regexp-opt.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lisp/emacs-lisp/regexp-opt.el') diff --git a/lisp/emacs-lisp/regexp-opt.el b/lisp/emacs-lisp/regexp-opt.el index de9966c0af0..cb7828ddd95 100644 --- a/lisp/emacs-lisp/regexp-opt.el +++ b/lisp/emacs-lisp/regexp-opt.el @@ -285,7 +285,9 @@ CHARS should be a list of characters." ;; ;; 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) -- cgit v1.2.1 From ba3189039adc8ec5eba5ed3e21d42019a4616b7c Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 1 Jan 2014 07:43:34 +0000 Subject: Update copyright year to 2014 by running admin/update-copyright. --- lisp/emacs-lisp/regexp-opt.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp/emacs-lisp/regexp-opt.el') diff --git a/lisp/emacs-lisp/regexp-opt.el b/lisp/emacs-lisp/regexp-opt.el index cb7828ddd95..9d83e133744 100644 --- a/lisp/emacs-lisp/regexp-opt.el +++ b/lisp/emacs-lisp/regexp-opt.el @@ -1,6 +1,6 @@ ;;; regexp-opt.el --- generate efficient regexps to match strings -;; Copyright (C) 1994-2013 Free Software Foundation, Inc. +;; Copyright (C) 1994-2014 Free Software Foundation, Inc. ;; Author: Simon Marshall ;; Maintainer: FSF -- cgit v1.2.1 From 34dc21db6e57ebbad81a196002fcd3cc557f096e Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sun, 9 Feb 2014 17:34:22 -0800 Subject: Replace "Maintainer: FSF" with the emacs-devel mailing address --- lisp/emacs-lisp/regexp-opt.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp/emacs-lisp/regexp-opt.el') diff --git a/lisp/emacs-lisp/regexp-opt.el b/lisp/emacs-lisp/regexp-opt.el index 9d83e133744..b2d4f2b71dd 100644 --- a/lisp/emacs-lisp/regexp-opt.el +++ b/lisp/emacs-lisp/regexp-opt.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1994-2014 Free Software Foundation, Inc. ;; Author: Simon Marshall -;; Maintainer: FSF +;; Maintainer: emacs-devel@gnu.org ;; Keywords: strings, regexps, extensions ;; This file is part of GNU Emacs. -- cgit v1.2.1