[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: buffer-substring vs. buffer-substring-no-properties
From: |
Peter S Galbraith |
Subject: |
Re: buffer-substring vs. buffer-substring-no-properties |
Date: |
Wed, 14 Nov 2001 12:41:50 -0500 |
Per Abrahamsen wrote:
> layer@--you-know-what-to-remove--.franz.com (Kevin Layer) writes:
>
> > Given that I have lots and lots of calls to buffer-substring that I
> > don't want to change to buffer-substring-no-properties,
>
> Why not?
Earlier he said:
: (I can't just change them to buffer-substring-no-properties because I
: support xemacs, too.)
Except that 'buffer-substring-no-properties' is in xemacs21 !
If it's not in xemacs20 (I can't check for you) then define it in your
code:
(or (fboundp 'buffer-substring-no-properties)
(defun buffer-substring-no-properties (beg end)
"Return the text from BEG to END, without text properties, as a string."
(let ((string (buffer-substring beg end)))
(set-text-properties 0 (length string) nil string)
string)))
By coincidence, I recall cutting this snippet out from an early version of
Per's custom.el.
Peter
- Re: buffer-substring vs. buffer-substring-no-properties, (continued)
- Re: buffer-substring vs. buffer-substring-no-properties, Eli Zaretskii, 2001/11/14
- Re: buffer-substring vs. buffer-substring-no-properties, Kevin Layer, 2001/11/14
- Re: buffer-substring vs. buffer-substring-no-properties, Miles Bader, 2001/11/14
- Re: buffer-substring vs. buffer-substring-no-properties, Kevin Layer, 2001/11/14
- Re: buffer-substring vs. buffer-substring-no-properties, Per Abrahamsen, 2001/11/14
- Re: buffer-substring vs. buffer-substring-no-properties, Stefan Monnier, 2001/11/14
- Re: buffer-substring vs. buffer-substring-no-properties, Kevin Layer, 2001/11/15
- Re: buffer-substring vs. buffer-substring-no-properties, Miles Bader, 2001/11/15
- Re: buffer-substring vs. buffer-substring-no-properties, Kevin Layer, 2001/11/14
- Re: buffer-substring vs. buffer-substring-no-properties, Per Abrahamsen, 2001/11/14
- Re: buffer-substring vs. buffer-substring-no-properties,
Peter S Galbraith <=
- Re: buffer-substring vs. buffer-substring-no-properties, Kevin Layer, 2001/11/14
- Re: buffer-substring vs. buffer-substring-no-properties, Per Abrahamsen, 2001/11/15
- Re: buffer-substring vs. buffer-substring-no-properties, Kevin Layer, 2001/11/15
- Re: buffer-substring vs. buffer-substring-no-properties, Eli Zaretskii, 2001/11/14
- Re: buffer-substring vs. buffer-substring-no-properties, Kim F. Storm, 2001/11/14
- Re: buffer-substring vs. buffer-substring-no-properties, Kevin Layer, 2001/11/15
- Re: buffer-substring vs. buffer-substring-no-properties, Eli Zaretskii, 2001/11/15
- Re: buffer-substring vs. buffer-substring-no-properties, Juanma Barranquero, 2001/11/15
- Re: buffer-substring vs. buffer-substring-no-properties, Stefan Monnier, 2001/11/14
- Re: buffer-substring vs. buffer-substring-no-properties, Kevin Layer, 2001/11/14