diff options
author | Michael Olson <mwolson@gnu.org> | 2006-04-01 21:08:00 +0000 |
---|---|---|
committer | Michael Olson <mwolson@gnu.org> | 2006-04-01 21:08:00 +0000 |
commit | 1553d6a08d5c6432cfd5343dda8e7b7b57536362 (patch) | |
tree | 824be2b86f78c69fd3318f78aca01f9589dc3f2c | |
parent | bf80e02cd233409d56580bf38cc76ef58fc0f24e (diff) |
emms-streams: Add prefix to utility functions.
darcs-hash:20060401210849-1bfb2-e22b7fcd606225ad83303472525860d0e66fb6dc.gz
-rw-r--r-- | emms-streams.el | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/emms-streams.el b/emms-streams.el index cdd8ff2..004348a 100644 --- a/emms-streams.el +++ b/emms-streams.el @@ -267,7 +267,7 @@ POPUP-HEIGHT is the height of the new frame, defaulting to (goto-char (point-min))) ;; Helper functions -(defun take (n list) +(defun emms-stream-take (n list) "Takes N elements from LIST." (let ((idx 0) (res '())) @@ -276,11 +276,11 @@ POPUP-HEIGHT is the height of the new frame, defaulting to (setq idx (+ idx 1))) res)) -(defun insert-at (n elt list) +(defun emms-stream-insert-at (n elt list) "Inserts the element ELT in LIST, *before* position N. Positions are counted starting with 0." (let* ((n-1 (- n 1)) - (before (take n-1 list)) + (before (emms-stream-take n-1 list)) (after (last list (- (length list) n-1)))) (append before (list elt) after))) @@ -305,7 +305,8 @@ nFeed descriptor: SType (url or streamlist): ") (let* ((line (emms-stream-line-number-at-pos (point))) (index (+ (/ line 2) 1))) - (setq emms-stream-list (insert-at index (list name url fd type) emms-stream-list)) + (setq emms-stream-list (emms-stream-insert-at index (list name url fd type) + emms-stream-list)) (emms-stream-redisplay) (goto-line line))) |