[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/xr 4e2bd17 04/13: Export xr-pp-rx-to-str and fix a typo
From: |
Mattias Engdegård |
Subject: |
[elpa] externals/xr 4e2bd17 04/13: Export xr-pp-rx-to-str and fix a typo |
Date: |
Wed, 13 Feb 2019 04:03:27 -0500 (EST) |
branch: externals/xr
commit 4e2bd17df0e370ab6fd24c29711aa278575ca29b
Author: Mattias Engdegård <address@hidden>
Commit: Mattias Engdegård <address@hidden>
Export xr-pp-rx-to-str and fix a typo
Rename xr--pp-rx-to-str to xr-pp-rx-to-str for external use,
and fix a typo in the doc string of xr-pp.
Requested and reported by Michael Heerdegen.
---
xr-test.el | 6 +++---
xr.el | 12 ++++++------
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/xr-test.el b/xr-test.el
index b0e52d3..bd04bcb 100644
--- a/xr-test.el
+++ b/xr-test.el
@@ -222,11 +222,11 @@
)
(ert-deftest xr-pretty ()
- (should (equal (xr--pp-rx-to-str "A\e\r\n\t\0 \x7f\x80\ B\xff\x02")
+ (should (equal (xr-pp-rx-to-str "A\e\r\n\t\0 \x7f\x80\ B\xff\x02")
"\"A\\e\\r\\n\\t\\x00 \\x7f\\200B\\xff\\x02\"\n"))
- (should (equal (xr--pp-rx-to-str '(?? nonl))
+ (should (equal (xr-pp-rx-to-str '(?? nonl))
"(?? nonl)\n"))
- (should (equal (xr--pp-rx-to-str '(repeat 1 63 "a"))
+ (should (equal (xr-pp-rx-to-str '(repeat 1 63 "a"))
"(repeat 1 63 \"a\")\n"))
)
diff --git a/xr.el b/xr.el
index e28b986..761cac7 100644
--- a/xr.el
+++ b/xr.el
@@ -3,7 +3,7 @@
;; Copyright (C) 2019 Free Software Foundation, Inc.
;; Author: Mattias Engdegård <address@hidden>
-;; Version: 1.0
+;; Version: 1.1
;; Keywords: lisp, maint, regexps
;; This program is free software; you can redistribute it and/or modify
@@ -464,9 +464,9 @@ equivalent to RE-STRING."
"\""))
(t (prin1-to-string rx))))
-;; Pretty-print a regexp (in rx notation) to a string.
-;; It does a slightly better job than standard `pp' for rx purposes.
-(defun xr--pp-rx-to-str (rx)
+(defun xr-pp-rx-to-str (rx)
+ "Pretty-print the regexp RX (in rx notation) to a string.
+It does a slightly better job than standard `pp' for rx purposes."
(with-temp-buffer
(insert (xr--rx-to-string rx) "\n")
(pp-buffer)
@@ -487,10 +487,10 @@ equivalent to RE-STRING."
;;;###autoload
(defun xr-pp (re-string)
"Convert to `rx' notation and pretty-print.
-This basically does `(pp (rx RE-STRING))', but in a slightly more readable
+This basically does `(pp (xr RE-STRING))', but in a slightly more readable
way. It is intended for use from an interactive elisp session.
Returns nil."
- (insert (xr--pp-rx-to-str (xr re-string))))
+ (insert (xr-pp-rx-to-str (xr re-string))))
(provide 'xr)
- [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 <=
- [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, 2019/02/13
- [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