|
From: lawrence m. <we...@gm...> - 2003-09-27 22:36:54
|
Idly browsing the erc.el code, I stumbled across usage of REPLACE-REGEXP-IN-STRING, which doesn't exist in XEmacs. A compatibilty function probably belongs in erc-compat.el. Do we want to go the Gnus route, and try and cater for everyone: /---[ gnus-util.el ] | (eval-and-compile | (cond | ((fboundp 'replace-in-string) | (defalias 'gnus-replace-in-string 'replace-in-string)) | ((fboundp 'replace-regexp-in-string) | (defun gnus-replace-in-string (string regexp newtext &optional literal) | (replace-regexp-in-string regexp newtext string nil literal))) | (t | (defun gnus-replace-in-string (string regexp newtext &optional literal) | (let ((start 0) tail) | (while (string-match regexp string start) | (setq tail (- (length string) (match-end 0))) | (setq string (replace-match newtext nil literal string)) | (setq start (- (length string) tail)))) | string)))) \--- Or just provide a definition of REPLACE-REGEXP-IN-STRING for XEmacsen? -- lawrence mitchell <we...@gm...> |