[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[emms-help] Re: Emms2 patch rollback
From: |
Michael Olson |
Subject: |
[emms-help] Re: Emms2 patch rollback |
Date: |
Sat, 24 Sep 2005 13:33:23 -0500 |
User-agent: |
Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) |
Michael Olson <address@hidden> writes:
> Here's another version. Please let me know if this breaks anything
> that you use. I'm wrapping kill-all-local-variables to prevent the
> value of emms-playlist-buffer-p from getting clobbered.
Hmm ... that version didn't seem to do what I wanted after all.
Here's something that *does* work for me. It's not quite as graceful,
though.
(defun emms-playlist-mode ()
"A major mode for Emms playlists."
(interactive)
(let ((val emms-playlist-buffer-p))
(kill-all-local-variables)
(setq emms-playlist-buffer-p val))
(use-local-map emms-playlist-mode-map)
(setq major-mode 'emms-playlist-mode
mode-name "Emms-Playlist")
(setq emms-playlist-insert-track-function
'emms-playlist-mode-insert-track)
(setq emms-playlist-update-track-function
'emms-playlist-mode-update-track-function)
;; Not used yet
;; (setq emms-playlist-delete-track-function
;; ...)
(add-hook 'emms-playlist-selection-changed-hook
'emms-playlist-mode-overlay-selected)
(emms-playlist-mode-startup)
(run-hooks 'emms-playlist-mode-hooks))
--
Michael Olson -- FSF Associate Member #652 -- http://www.mwolson.org/
Interests: anime, Debian, XHTML, wiki, Emacs Lisp
/` |\ | | | IRC: mwolson on freenode.net: #hcoop, #muse, #PurdueLUG
|_] | \| |_| Jabber: mwolson_at_hcoop.net
pgphY0B5u2JlE.pgp
Description: PGP signature