bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: buffer-substring vs. buffer-substring-no-properties


From: David Kastrup
Subject: Re: buffer-substring vs. buffer-substring-no-properties
Date: 14 Nov 2001 23:22:56 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1

>>>>> "Kevin" == Kevin Layer <address@hidden> writes:

    Kevin> Can someone tell me if there is a way to make
    Kevin> buffer-substring behave like it used to, and prevent me
    Kevin> from having to change a zillion instances of
    Kevin> buffer-substring to my-buffer-substring?  (I can't just
    Kevin> change them to buffer-substring-no-properties because I
    Kevin> support xemacs, too.)

(let ((saved-bufsub (symbol-function 'buffer-substring)))
  (defmacro buffer-substring (start end)
      (list 'buffer-substring-no-properties start end))
All of your code...
  (fset 'buffer-substring saved-bufsub))

Have not actually tried it, of course...

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum
Email: address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]