diff options
Diffstat (limited to 'emms.el')
-rw-r--r-- | emms.el | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -436,9 +436,10 @@ If fifth arg LITERAL is non-nil, insert REPLACEMENT literally." (replace-in-string text regexp replacement literal)) (t (let ((repl-len (length replacement)) start) - (while (setq start (string-match regexp text start)) - (setq start (+ start repl-len) - text (replace-match replacement fixedcase literal text)))) + (save-match-data + (while (setq start (string-match regexp text start)) + (setq start (+ start repl-len) + text (replace-match replacement fixedcase literal text))))) text))) (defun emms-line-number-at-pos (&optional pos) |