From 5d1019b4d8866e2a00dcb6410aea212a61946db6 Mon Sep 17 00:00:00 2001 From: forcer Date: Thu, 20 Apr 2006 21:07:00 +0000 Subject: Provide emms-propertize compatibility function. darcs-hash:20060420210744-2189f-c648403a30e0c47d63986e7378d122c7d811aab9.gz --- emms-playlist-mode.el | 4 ++-- emms.el | 13 +++++++++++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/emms-playlist-mode.el b/emms-playlist-mode.el index f7e6464..8b7ade5 100644 --- a/emms-playlist-mode.el +++ b/emms-playlist-mode.el @@ -385,8 +385,8 @@ of the saved playlist inside." When NO-NEWLINE is non-nil, do not insert a newline after the track." (emms-playlist-ensure-playlist-buffer) (emms-with-inhibit-read-only-t - (insert (propertize (emms-track-description track) - 'emms-track track)) + (insert (emms-propertize (emms-track-description track) + 'emms-track track)) (save-restriction (widen) (let ((p (emms-property-region (point-at-bol) 'emms-track)) diff --git a/emms.el b/emms.el index 10fa92e..b981ea2 100644 --- a/emms.el +++ b/emms.el @@ -368,6 +368,15 @@ See `emms-repeat-track'." (when (not emms-player-playing-p) (error "No EMMS player playing right now"))) + +;;; Compatibility functions + +(if (not (fboundp 'propertize)) + (defun emms-propertize (string &rest properties) + (set-text-properties 0 (length string) properties string) + string) + (defalias 'emms-propertize 'propertize)) + ;;; Tracks @@ -783,8 +792,8 @@ This is supplying ARGS as arguments to the source." "Insert the description of TRACK at point." (emms-playlist-ensure-playlist-buffer) (let ((inhibit-read-only t)) - (insert (propertize (emms-track-description track) - 'emms-track track) + (insert (emms-propertize (emms-track-description track) + 'emms-track track) "\n"))) (defun emms-playlist-simple-update-track () -- cgit v1.2.3