[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/xr 8425772 01/13: Sync with ELPA: compilation workaroun
From: |
Mattias Engdegård |
Subject: |
[elpa] externals/xr 8425772 01/13: Sync with ELPA: compilation workaround |
Date: |
Wed, 13 Feb 2019 04:03:26 -0500 (EST) |
branch: externals/xr
commit 84257724a851a4cfd515f6c98dc840c437720b1c
Author: Mattias Engdegård <address@hidden>
Commit: Mattias Engdegård <address@hidden>
Sync with ELPA: compilation workaround
---
xr.el | 21 +++++++++++++++++----
1 file changed, 17 insertions(+), 4 deletions(-)
diff --git a/xr.el b/xr.el
index 3c8e3d3..199f0e3 100644
--- a/xr.el
+++ b/xr.el
@@ -2,7 +2,7 @@
;; Copyright (C) 2019 Free Software Foundation, Inc.
-;; Author: Mattias Engdegård <mattiase at acm dot org>
+;; Author: Mattias Engdegård <address@hidden>
;; Version: 1.0
;; Keywords: lisp, maint, regexps
@@ -50,6 +50,10 @@
;; maximum readability, consistency and personal preference when
;; replacing existing regexps in elisp code.
+;; Similar functionality is provided by the `lex' package in the form of the
+;; `lex-parse-re' function, but `xr' does not depend on `lex' and does
+;; a more thorough job of handling all corner cases of Elisp's regexp syntax.
+
;;; Code:
(require 'rx)
@@ -500,7 +504,18 @@ Returns nil."
"Verify (xr--pp-rx-to-str RX) against EXPECTED-STR."
(xr--expect-result 'xr--pp-rx-to-str rx expected-str))
+(provide 'xr)
+
(eval-when-compile
+ ;; FIXME: When byte-compiling the file, this `eval-when-compile' block
+ ;; will be executed at a time where the above functions have been compiled
+ ;; but they're not necessarily known by the current Emacs session yet
+ ;; (because the neither `xr.el' nor `xr.elc' has been loaded yet).
+ ;; As a quick fix, we (require 'xr) here to load the `xr' file (and fail
+ ;; silently if the file is not in `load-path').
+ ;; Maybe a better fix is to move those tests to a separate file, and/or
+ ;; to wrap them in an `ert-deftest'.
+ (when (require 'xr nil 'noerror)
(xr--expect "a\\$b\\\\c\\[\\]\\q"
"a$b\\c[]q")
(xr--expect "\\(?:ab\\|c*d\\)?"
@@ -660,8 +675,6 @@ Returns nil."
"(?? nonl)\n")
(xr--expect-pp '(repeat 1 63 "a")
"(repeat 1 63 \"a\")\n")
- )
-
-(provide 'xr)
+ ))
;;; xr.el ends here
- [elpa] externals/xr updated (7ba1fc6 -> e1c7734), Mattias Engdegård, 2019/02/13
- [elpa] externals/xr 4e2bd17 04/13: Export xr-pp-rx-to-str and fix a typo, Mattias Engdegård, 2019/02/13
- [elpa] externals/xr c2ede95 08/13: Improved errors for bad \s and \c sequences, Mattias Engdegård, 2019/02/13
- [elpa] externals/xr 8425772 01/13: Sync with ELPA: compilation workaround,
Mattias Engdegård <=
- [elpa] externals/xr f79d50c 12/13: Add categories L, R, . and SPC, Mattias Engdegård, 2019/02/13
- [elpa] externals/xr 2a1de75 03/13: Correct parsing of group and backref, Mattias Engdegård, 2019/02/13
- [elpa] externals/xr 8d052d6 09/13: Check for errors in \_, Mattias Engdegård, 2019/02/13
- [elpa] externals/xr 37b2bcb 06/13: Merge branch 'master' of https://github.com/mattiase/xr, Mattias Engdegård, 2019/02/13
- [elpa] externals/xr 41474cb 11/13: Accept unknown character categories, Mattias Engdegård, 2019/02/13
- [elpa] externals/xr e1c7734 13/13: Merge branch 'externals/xr' of elpa.git (no actual change), Mattias Engdegård, 2019/02/13
- [elpa] externals/xr e8ec2d9 07/13: Add reference to the pcre2el package, Mattias Engdegård, 2019/02/13
- [elpa] externals/xr 4bf6043 05/13: Export xr-pp-rx-to-str and fix a typo, Mattias Engdegård, 2019/02/13
- [elpa] externals/xr 8532df8 02/13: Move tests to separate file, Mattias Engdegård, 2019/02/13
- [elpa] externals/xr 0331e00 10/13: Recognise \sW as alias for \sw, Mattias Engdegård, 2019/02/13