From ce0eee83854a23985a476f72306c9cc04eb8747e Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 25 Jan 2016 10:56:04 -0500 Subject: [PATCH] (rng-c-fix-escaped-newlines): Use subst-char-in-string * lisp/nxml/rng-cmpct.el (rng-c-fix-escaped-newlines): Use subst-char-in-string. --- lisp/nxml/rng-cmpct.el | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/lisp/nxml/rng-cmpct.el b/lisp/nxml/rng-cmpct.el index a699e9e3d96..ed88dfa98e9 100644 --- a/lisp/nxml/rng-cmpct.el +++ b/lisp/nxml/rng-cmpct.el @@ -674,13 +674,7 @@ the primary expression." (substring rng-c-current-token n (- n))))) (defun rng-c-fix-escaped-newlines (str) - (let ((pos 0)) - (while (progn - (let ((n (string-match "\C-@" str pos))) - (and n - (aset str n ?\n) - (setq pos (1+ n))))))) - str) + (subst-char-in-string ?\C-@ ?\n str)) (defun rng-c-parse-identifier-or-keyword () (cond ((rng-c-current-token-ncname-p) -- 2.39.2