aboutsummaryrefslogtreecommitdiff
path: root/emms-tageditor.el
diff options
context:
space:
mode:
authorMichael Olson <mwolson@gnu.org>2006-01-05 17:21:00 +0000
committerMichael Olson <mwolson@gnu.org>2006-01-05 17:21:00 +0000
commit4b913cf81982670faadaa3f9672a60e8ea63e720 (patch)
treece1ee476918b0e21ff72d12c5fdb241f158cbc0c /emms-tageditor.el
parent417ef863ffd9868d086ad1f3046769e7c0dce821 (diff)
New XEmacs compatibility function: emms-replace-regexp-in-string
darcs-hash:20060105172144-1bfb2-36678408233ea377cc5b7deda59d37362948a78b.gz
Diffstat (limited to 'emms-tageditor.el')
-rw-r--r--emms-tageditor.el18
1 files changed, 6 insertions, 12 deletions
diff --git a/emms-tageditor.el b/emms-tageditor.el
index f093d85..4afe4e3 100644
--- a/emms-tageditor.el
+++ b/emms-tageditor.el
@@ -235,20 +235,14 @@
(setq emms-tageditor-widgets nil)
(kill-buffer (get-buffer-create emms-tageditor-buffer-name)))
-(defun emms-tageditor-replace-regexp (regexp rep string &optional fixedcase literal subexp start)
- "Compatibility wrapper for replace-regexp-in-string/replace-in-string."
- (if (featurep 'xemacs)
- (replace-in-string regexp rep string fixedcase literal subexp start)
- (replace-regexp-in-string regexp rep string fixedcase literal subexp start)))
-
(defun emms-tageditor-replace-create-replacement (replace-with trackidx)
(let ((info (aref emms-tageditor-current-infos trackidx))
(track (aref emms-tageditor-current-tracks trackidx)))
- (setq replace-with (emms-tageditor-replace-regexp "$TITLE" (emms-info-title info) replace-with))
- (setq replace-with (emms-tageditor-replace-regexp "$ALBUM" (emms-info-album info) replace-with))
- (setq replace-with (emms-tageditor-replace-regexp "$ARTIST" (emms-info-artist info) replace-with))
- (setq replace-with (emms-tageditor-replace-regexp "$NOTE" (emms-info-note info) replace-with))
- (setq replace-with (emms-tageditor-replace-regexp "$TRACKNAME" (emms-track-name track) replace-with)))
+ (setq replace-with (emms-replace-regexp-in-string "$TITLE" (emms-info-title info) replace-with))
+ (setq replace-with (emms-replace-regexp-in-string "$ALBUM" (emms-info-album info) replace-with))
+ (setq replace-with (emms-replace-regexp-in-string "$ARTIST" (emms-info-artist info) replace-with))
+ (setq replace-with (emms-replace-regexp-in-string "$NOTE" (emms-info-note info) replace-with))
+ (setq replace-with (emms-replace-regexp-in-string "$TRACKNAME" (emms-track-name track) replace-with)))
replace-with)
(defun emms-tageditor-replace-tag (field regexp replace-with)
@@ -258,7 +252,7 @@
;; Find the widget for the current track
(let ((widget (emms-tageditor-get-widget idx field)))
(let* ((str (widget-value widget))
- (str (emms-tageditor-replace-regexp regexp replace-with str)))
+ (str (emms-replace-regexp-in-string regexp replace-with str)))
(if (string= "$SET" regexp)
(widget-value-set
widget