diff options
author | Yoni Rabkin <yoni@rabkins.net> | 2018-06-18 12:17:22 -0400 |
---|---|---|
committer | Yoni Rabkin <yoni@rabkins.net> | 2018-06-18 12:17:22 -0400 |
commit | ab3012ebc5da166ef242b8ebd63de53b738c4f96 (patch) | |
tree | 17e90046190e67e91ee9954ed4853703ad10d10b | |
parent | 95df1c69c6a7b2c8085115d651cf90756cc338a1 (diff) |
* lisp/emms-playlist-limit.el: make buffer local
-rw-r--r-- | lisp/emms-playlist-limit.el | 20 |
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. |