From 2030e9b1274a92066428ef150f847d9fc24520a5 Mon Sep 17 00:00:00 2001 From: forcer Date: Sun, 18 Sep 2005 19:44:00 +0000 Subject: Make `with-current-emms-playlist' disable read-onlyness. darcs-hash:20050918194432-2189f-a9a8d3e0d34ff56250308a1d812d4d9e110218de.gz --- emms.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'emms.el') diff --git a/emms.el b/emms.el index b18bc75..564cf4e 100644 --- a/emms.el +++ b/emms.el @@ -419,13 +419,15 @@ Otherwise, return the type and the name with a colon in between." (error "Not an EMMS playlist buffer"))) (defmacro with-current-emms-playlist (&rest body) - "Run BODY with the current buffer being the current playlist buffer." + "Run BODY with the current buffer being the current playlist buffer. +This also disables any read-onliness of the current buffer." `(progn (when (or (not emms-playlist-buffer) (not (buffer-live-p emms-playlist-buffer))) (emms-playlist-current-clear)) (with-current-buffer emms-playlist-buffer - ,@body))) + (let ((inhibit-read-only t)) + ,@body)))) (put 'with-current-emms-playlist 'lisp-indent-function 0) (defun emms-playlist-set-playlist-buffer (&optional buffer) -- cgit v1.2.3