commit:     3451d7ab62b52cdf5c6d069c22ceceaf69c5b218
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Fri Apr  7 16:48:04 2017 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Fri Apr  7 16:48:04 2017 +0000
URL:        https://gitweb.gentoo.org/proj/emacs-tools.git/commit/?id=3451d7ab

Call regexp-opt without duplicates in its argument list.

* ebuild-mode.el (ebuild-mode-make-keywords-list): Call regexp-opt
without duplicates in its argument list.

 ChangeLog      | 5 +++++
 ebuild-mode.el | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 5dc7fe2..4cd3357 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2017-04-07  Ulrich Müller  <[email protected]>
+
+       * ebuild-mode.el (ebuild-mode-make-keywords-list): Call regexp-opt
+       without duplicates in its argument list.
+
 2017-03-31  Ulrich Müller  <[email protected]>
 
        * ebuild-mode.el (ebuild-mode-before-save):

diff --git a/ebuild-mode.el b/ebuild-mode.el
index d24355b..cdd06ef 100644
--- a/ebuild-mode.el
+++ b/ebuild-mode.el
@@ -213,7 +213,7 @@ of lines."
       (error "Keywords argument must be a list of strings"))
     (cons (concat prefix "\\<"
                  (let ((max-specpdl-size (max max-specpdl-size 2000)))
-                   (regexp-opt keywords-list t))
+                   (regexp-opt (delete-dups keywords-list) t))
                  "\\>" suffix)
          face))
 

Reply via email to