emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/xr 4bf6043 05/13: Export xr-pp-rx-to-str and fix a typo


From: Mattias Engdegård
Subject: [elpa] externals/xr 4bf6043 05/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 4bf6043ef79024c27149611c09b8b602f4590b5b
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.
    
    Increment version to 1.1.
    
    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)
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]