;;; predictive-compat.el --- compatability functions for predictive package ;; Copyright (C) 2004-2006 Toby Cubitt ;; Author: Toby Cubitt ;; Version: 0.12 ;; Keywords: predictive, completion, compatability ;; URL: http://www.dr-qubit.org/emacs.php ;; This file is part of the Emacs Predictive Completion package. ;; ;; This program is free software; you can redistribute it and/or ;; modify it under the terms of the GNU General Public License ;; as published by the Free Software Foundation; either version 2 ;; of the License, or (at your option) any later version. ;; ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; ;; You should have received a copy of the GNU General Public License ;; along with this program; if not, write to the Free Software ;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, ;; MA 02110-1301, USA. (defun predictive-compat-replace-regexp-in-string (regexp rep string) "Return a new string with all matches for REGEXP in STRING replaced with REP." (let ((str string)) (while (string-match regexp str) (setq str (replace-match rep nil nil str))) str) )