summaryrefslogtreecommitdiff
path: root/cider-compat.el
diff options
context:
space:
mode:
authorBozhidar Batsov <bozhidar@batsov.com>2016-02-13 11:50:08 +0200
committerBozhidar Batsov <bozhidar@batsov.com>2016-02-13 11:50:08 +0200
commit5ef2cadcc18269c1f1fcbd67a11fb1f59773a04c (patch)
treeb8a9704b620be62f089974b3c26faeebbedf70e3 /cider-compat.el
parent10acc018bbf22adb6a612ddd77ed7632c16104e2 (diff)
Move string compatibility functions to cider-util
I can't figure out what's bothering the byte-compiler in the old approach... this should solve the problem, though.
Diffstat (limited to 'cider-compat.el')
-rw-r--r--cider-compat.el18
1 files changed, 0 insertions, 18 deletions
diff --git a/cider-compat.el b/cider-compat.el
index 3c0b1107..d551d64f 100644
--- a/cider-compat.el
+++ b/cider-compat.el
@@ -153,23 +153,5 @@ to bind a single value, BINDINGS can just be a plain tuple."
(declare (indent 1) (debug if-let))
(list 'if-let bindings (macroexp-progn body)))))
-(eval-and-compile
- (unless (fboundp 'string-trim)
- (defun string-trim-left (string)
- "Remove leading whitespace from STRING."
- (if (string-match "\\`[ \t\n\r]+" string)
- (replace-match "" t t string)
- string))
-
- (defun string-trim-right (string)
- "Remove trailing whitespace from STRING."
- (if (string-match "[ \t\n\r]+\\'" string)
- (replace-match "" t t string)
- string))
-
- (defun string-trim (string)
- "Remove leading and trailing whitespace from STRING."
- (string-trim-left (string-trim-right string)))))
-
(provide 'cider-compat)
;;; cider-compat.el ends here