From e86df54230bef088faf8f04ff847a2bbf179d329 Mon Sep 17 00:00:00 2001 From: Michael Olson Date: Fri, 24 Jun 2005 21:15:35 +0000 Subject: [PATCH] Make muse-replace-regexp-in-string closer to its parent; no func change. * lisp/muse.el (muse-replace-regexp-in-string): Add 2 more optional args to implement all functionality of `replace-regexp-in-string'. No functionality change. git-archimport-id: mwolson@gnu.org--2005/muse--main--1.0--patch-77 --- ChangeLog | 16 ++++++++++++++++ lisp/muse.el | 12 ++++++------ 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3af9aa6..27d1ce6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,22 @@ # arch-tag: automatic-ChangeLog--mwolson@gnu.org--2005/muse--main--1.0 # +2005-06-24 21:15:35 GMT Michael Olson patch-77 + + Summary: + Make muse-replace-regexp-in-string closer to its parent; no func change. + Revision: + muse--main--1.0--patch-77 + + * lisp/muse.el (muse-replace-regexp-in-string): Add 2 more optional args + to implement all functionality of `replace-regexp-in-string'. No + functionality change. + + + modified files: + ChangeLog lisp/muse.el + + 2005-06-24 00:22:12 GMT Michael Olson patch-76 Summary: diff --git a/lisp/muse.el b/lisp/muse.el index a55f561..f20116c 100644 --- a/lisp/muse.el +++ b/lisp/muse.el @@ -177,17 +177,17 @@ omitted, a default message listing FORM itself is used." (match-string-no-properties num string) (match-string num string))) -(defun muse-replace-regexp-in-string (regexp replacement text &rest args) +(defun muse-replace-regexp-in-string (regexp replacement text &optional fixedcase literal) "Replace REGEXP with REPLACEMENT in TEXT. -Other ARGS are ignored." - ;; If we really need any more args, that could be hacked in later. +If fourth arg FIXEDCASE is non-nil, do not alter case of replacement text. +If fifth arg LITERAL is non-nil, insert REPLACEMENT literally." (cond ((fboundp 'replace-regexp-in-string) - (replace-regexp-in-string regexp replacement text)) + (replace-regexp-in-string regexp replacement text fixedcase literal)) ((fboundp 'replace-in-string) - (replace-in-string text regexp replacement)) + (replace-in-string text regexp replacement literal)) (t (while (string-match regexp text) - (setq text (replace-match replacement nil t text))) + (setq text (replace-match replacement fixedcase literal text))) text))) (defun muse-add-to-invisibility-spec (element) -- 2.11.4.GIT