|
From: | Emanuel Berg |
Subject: | Re: replace deprecated function ? |
Date: | Tue, 13 Feb 2018 21:00:53 +0100 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) |
(require 'cl-lib) (defun replace-regexp-buffer (regexp replace) (save-excursion (goto-char (point-min)) (while (re-search-forward regexp nil t) (replace-match replace) ))) (defun replace-list (list-pairs) (cl-loop for (search . replace) in list-pairs do (replace-regexp-buffer search replace) )) (replace-list '(("james" . "James") ("blish" . "Blish"))) ;; james blish james blish -- underground experts united http://user.it.uu.se/~embe8573
[Prev in Thread] | Current Thread | [Next in Thread] |