diff options
author | yonirabkin <yonirabkin> | 2005-09-18 10:22:00 +0000 |
---|---|---|
committer | yonirabkin <mwolson@gnu.org> | 2005-09-18 10:22:00 +0000 |
commit | d30e5fe8d8bb874013b1dbdbbc9822b405738429 (patch) | |
tree | 08f69e30df773f8569c4d291a8f32be72531a6ec | |
parent | 5ea605bdb7972862bbd9df1e7679d64a854eafa0 (diff) |
emms.el missing quote fix, emms-playlist-mode.el kill-track fix
darcs-hash:20050918102240-be80e-01feafe2aeab07d9a6f61dcd10027b22abe17812.gz
-rw-r--r-- | emms-playlist-mode.el | 14 | ||||
-rw-r--r-- | emms.el | 2 |
2 files changed, 13 insertions, 3 deletions
diff --git a/emms-playlist-mode.el b/emms-playlist-mode.el index 28c34e6..e2fcdaf 100644 --- a/emms-playlist-mode.el +++ b/emms-playlist-mode.el @@ -16,7 +16,7 @@ ;;; (1) Lukhas wants `emms-list-playlist-buffers' to list all the ;;; playlist buffers. ;;; -;;; (2) Add multi-line formatting and arbitrary comment entry. +;;; (2) Arbitrary comment entry with color overlays. ;;; ;;; (3) Font-locking for unselected tracks via overlays. @@ -138,7 +138,8 @@ FUN should be a function." (defun emms-playlist-mode-kill-track () "Kill the track at point." (interactive) - (let ((region (emms-property-region (point) 'emms-track))) + (let ((region (emms-property-region (point) 'emms-track)) + (inhibit-read-only t)) (cond ((not (emms-playlist-track-at)) (kill-line 1)) ; Purposfully kills only one line ((and (not (emms-playlist-mode-selected-at)) @@ -179,6 +180,12 @@ FACE should be a valid face." (let ((o (make-overlay (point-at-bol) (point-at-eol)))) (overlay-put o 'face face))) +(defun emms-playlist-mode-overlay-unselected () + ;; point-mix/max because -insert-source narrows the world + (emms-playlist-mode-overlay-track (point-min) + (point-max) + 'emms-playlist-track-face)) + ;; Selected track overlaying track in constant time. (defun emms-playlist-mode-overlay-selected () "Place an overlay over the currently selected track." @@ -199,6 +206,9 @@ FACE should be a valid face." ;;; Hooks ;;; -------------------------------------------------------- +(add-hook 'emms-playlist-source-inserted-hook + 'emms-playlist-mode-overlay-unselected) + (add-hook 'emms-playlist-selection-changed-hook 'emms-playlist-mode-overlay-selected) @@ -694,7 +694,7 @@ This uses `emms-playlist-insert-track-function'." (narrow-to-region (point) (point)) (apply source args) - (run-hooks emms-playlist-source-inserted-hook)))) + (run-hooks 'emms-playlist-source-inserted-hook)))) (defun emms-playlist-tracks-in-region (beg end) "Return all tracks between BEG and END." |