diff options
author | Bozhidar Batsov <bozhidar@batsov.com> | 2016-11-25 11:59:04 +0100 |
---|---|---|
committer | Bozhidar Batsov <bozhidar@batsov.com> | 2016-11-25 11:59:04 +0100 |
commit | c2d32d8b078ebbd5cb30abadf7b027c07b9ca76b (patch) | |
tree | 24daa76848baa923256933156e71501772762755 /cider-util.el | |
parent | 8fef15e7ef83793f1cdc29404ce57596406935d3 (diff) |
Drop some redundant string-related functions
We can now use the versions of those functions that were added in Emacs
24.4.
Diffstat (limited to 'cider-util.el')
-rw-r--r-- | cider-util.el | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/cider-util.el b/cider-util.el index 87f911ce..6bf9bb29 100644 --- a/cider-util.el +++ b/cider-util.el @@ -305,26 +305,6 @@ A codename is added to stable versions." ;;; Strings -(defun cider-string-trim-left (string) - "Remove leading whitespace from STRING." - (if (string-match "\\`[ \t\n\r]+" string) - (replace-match "" t t string) - string)) - -(defun cider-string-trim-right (string) - "Remove trailing whitespace from STRING." - (if (string-match "[ \t\n\r]+\\'" string) - (replace-match "" t t string) - string)) - -(defun cider-string-trim (string) - "Remove leading and trailing whitespace from STRING." - (cider-string-trim-left (cider-string-trim-right string))) - -(defun cider-string-join (strings &optional separator) - "Join all STRINGS using SEPARATOR." - (mapconcat #'identity strings separator)) - (defun cider-join-into-alist (candidates &optional separator) "Make an alist from CANDIDATES. The keys are the elements joined with SEPARATOR and values are the original @@ -332,7 +312,7 @@ elements. Useful for `completing-read' when candidates are complex objects." (mapcar (lambda (el) (if (listp el) - (cons (cider-string-join el (or separator ":")) el) + (cons (string-join el (or separator ":")) el) (cons el el))) candidates)) |