From: Francis L. <fr...@wo...> - 2002-12-19 15:55:15
|
ERC Developers, Here's a patch to erc.el that I think makes erc-string-no-properties more efficient, because it no longer creates and destroys a temporary buffer, changes the current buffer twice, or does any inserts. Hope this helps. -- Francis Litterio fr...@wo... http://world.std.com/~franl/ GPG and PGP public keys available on keyservers. --- erc.el 14 Dec 2002 10:31:46 -0000 1.361 +++ erc.el 19 Dec 2002 15:46:19 -0000 @@ -225,9 +225,9 @@ :type '(repeat string)) (defun erc-string-no-properties (string) - (with-temp-buffer - (insert string) - (buffer-substring-no-properties (point-min) (point-max)))) + (let ((newstring (copy-sequence string))) + (set-text-properties 0 (length newstring) nil newstring) + newstring)) (if (not (fboundp 'propertize)) (defun erc-propertize (string &rest props) |