From: Stefan Monnier Date: Mon, 25 Jan 2016 15:56:04 +0000 (-0500) Subject: (rng-c-fix-escaped-newlines): Use subst-char-in-string X-Git-Tag: emacs-26.0.90~2805 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ce0eee83854a23985a476f72306c9cc04eb8747e;p=emacs.git (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. --- 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)