From 7ce74c2879a37d542d2b67a4376e4e2fa8760167 Mon Sep 17 00:00:00 2001 From: Marius Vollmer Date: Wed, 6 Aug 2008 03:47:42 +0300 Subject: [PATCH] Didn't know about split-string... --- magit.el | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/magit.el b/magit.el index 6f1134bf..f14df9ee 100644 --- a/magit.el +++ b/magit.el @@ -45,20 +45,11 @@ (substring str 0 (- (length str) 1)) str)))) -(defun magit-string-split (string regexp) - (let ((res nil) - (pos 0) - next) - (while (setq next (string-match regexp string pos)) - (setq res (cons (substring string pos next) res)) - (setq pos (match-end 0))) - (nreverse (cons (substring string pos) res)))) - (defun magit-shell-lines (cmd &rest args) (let ((str (shell-command-to-string (apply 'format cmd args)))) (if (string= str "") nil - (magit-string-split str "\n")))) + (split-string str "\n")))) (defun magit-concat-with-delim (delim seqs) (cond ((null seqs)