From 724b6e09443a51ae0cf5a27f826037d08dc419af Mon Sep 17 00:00:00 2001 From: "Michael W. Olson" Date: Wed, 19 Sep 2007 07:27:01 -0400 Subject: [PATCH] Remove buggy fallback code in muse-replace-regexp-in-string * lisp/muse.el (muse-replace-regexp-in-string): Remove fallback code, since it is not needed in any version of Emacs we support, and it also has a couple of bugs that I don't want to waste time fixing. --- ChangeLog | 7 +++++++ lisp/muse.el | 11 ++--------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index a0afd1e..46245d2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-09-19 Michael Olson + + * lisp/muse.el (muse-replace-regexp-in-string): Remove fallback + code, since it is not needed in any version of Emacs we support, + and it also has a couple of bugs that I don't want to waste time + fixing. + 2007-09-18 Michael Olson * lisp/muse-mode.el (muse-mode): Fix bug involving filling and diff --git a/lisp/muse.el b/lisp/muse.el index 251fa38..f66b78b 100644 --- a/lisp/muse.el +++ b/lisp/muse.el @@ -542,15 +542,8 @@ If fifth arg LITERAL is non-nil, insert REPLACEMENT literally." (replace-in-string text regexp replacement literal)) ((fboundp 'replace-regexp-in-string) (replace-regexp-in-string regexp replacement text fixedcase literal)) - (t (let ((repl-len (length replacement)) - start) - (unless (string= regexp "") - (save-match-data - (while (setq start (string-match regexp text start)) - (setq start (+ start repl-len) - text (replace-match replacement fixedcase literal - text)))))) - text))) + (t (error (concat "Neither `replace-in-string' nor " + "`replace-regexp-in-string' was found"))))) (if (fboundp 'add-to-invisibility-spec) (defalias 'muse-add-to-invisibility-spec 'add-to-invisibility-spec) -- 2.11.4.GIT