aboutsummaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/emms-playlist-limit.el20
1 files changed, 8 insertions, 12 deletions
diff --git a/lisp/emms-playlist-limit.el b/lisp/emms-playlist-limit.el
index 1704b88..eaa918b 100644
--- a/lisp/emms-playlist-limit.el
+++ b/lisp/emms-playlist-limit.el
@@ -127,18 +127,14 @@
"Run in `emms-playlist-source-inserted-hook'."
(with-current-emms-playlist
(emms-playlist-ensure-playlist-buffer)
- (setq emms-playlist-limit-tracks
- (emms-with-widened-buffer
- (emms-playlist-tracks-in-region (point-min) (point-max))))))
-
-;; FIXME: When user deletes some tracks, `emms-playlist-limit-tracks'
-;; should be updated.
-;; (defun emms-playlist-limit-clear ()
-;; "Run in `emms-playlist-cleared-hook'."
-;; (setq emms-playlist-limit-tracks
-;; (append emms-playlist-limit-tracks
-;; (emms-playlist-tracks-in-region
-;; (point-min) (point-max)))))
+ (setq-local emms-playlist-limit-tracks
+ (emms-with-widened-buffer
+ (emms-playlist-tracks-in-region (point-min)
+ (point-max))))))
+
+;; FIXME: What happens when a user deletes some tracks,
+;; `emms-playlist-limit-tracks' should be updated (a general look
+;; through this code shows that it is preliminary.)
(defun emms-playlist-limit-do (name value)
"Limit by NAME with VALUE.