branch: elpa/inf-clojure
commit 839de5bf5db3c61fe44ab85250482db729f72319
Author: Bozhidar Batsov <[email protected]>
Commit: Bozhidar Batsov <[email protected]>

    Remove unused inf-clojure-chomp function
---
 inf-clojure.el            |  4 ----
 test/inf-clojure-tests.el | 10 ----------
 2 files changed, 14 deletions(-)

diff --git a/inf-clojure.el b/inf-clojure.el
index a5516bb5c1..54b6278d0d 100644
--- a/inf-clojure.el
+++ b/inf-clojure.el
@@ -670,10 +670,6 @@ If `comint-use-prompt-regexp' is nil (the default), 
\\[comint-insert-input] on
   "Return t if STR does not match `inf-clojure-filter-regexp'."
   (not (string-match inf-clojure-filter-regexp str)))
 
-(defun inf-clojure-chomp (string)
-  "Remove final newline from STRING."
-  (string-trim-right string "\n"))
-
 (defun inf-clojure-remove-subprompts (string)
   "Remove subprompts from STRING."
   (replace-regexp-in-string inf-clojure-subprompt "" string))
diff --git a/test/inf-clojure-tests.el b/test/inf-clojure-tests.el
index 12cc6dee8e..67355b329f 100644
--- a/test/inf-clojure-tests.el
+++ b/test/inf-clojure-tests.el
@@ -228,16 +228,6 @@ is a string\")
     (expect (inf-clojure--project-name "/home/user/projects/my-app/")
             :to-equal "my-app")))
 
-(describe "inf-clojure-chomp"
-  (it "removes a trailing newline"
-    (expect (inf-clojure-chomp "hello\n") :to-equal "hello"))
-  (it "removes only the final trailing newline"
-    (expect (inf-clojure-chomp "hello\n\n\n") :to-equal "hello\n\n"))
-  (it "returns unchanged string when no trailing newline"
-    (expect (inf-clojure-chomp "hello") :to-equal "hello"))
-  (it "preserves internal newlines"
-    (expect (inf-clojure-chomp "hello\nworld\n") :to-equal "hello\nworld")))
-
 (describe "inf-clojure-preoutput-filter"
   (it "passes through output when not filtering"
     (let ((inf-clojure--filtering-output nil)

Reply via email to