[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: buffer-substring vs. buffer-substring-no-properties
From: |
Kevin Layer |
Subject: |
Re: buffer-substring vs. buffer-substring-no-properties |
Date: |
14 Nov 2001 21:13:19 -0800 |
User-agent: |
Gnus/5.0803 (Gnus v5.8.3) Emacs/20.7 |
abraham@dina.kvl.dk (Per Abrahamsen) writes:
> 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?
>
> > how do I defontify a string?
>
> You mean remove all text properties?
>
> (set-text-properties 0 (length string) nil string)
This does the trick for me. I just had to make one change, since the
places that make the strings external always call this:
(defun fi::defontify-string (str)
(format "%s" str))
changed to this:
(defun fi::defontify-string (str)
(cond ((fboundp 'set-text-properties)
(set-text-properties 0 (length str) nil str)
str)
(t (format "%s" str))))
> You can use 'remove-text-properties' to remove specific properties
> (like those added by font lock), but if you are going to send the
> string out of emacs you probably want them all gone.
Correct.
Thanks.
- Re: buffer-substring vs. buffer-substring-no-properties, (continued)
- 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, 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/15
- Re: buffer-substring vs. buffer-substring-no-properties,
Kevin Layer <=
- 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
Re: buffer-substring vs. buffer-substring-no-properties, Ehud Karni, 2001/11/14
Re: buffer-substring vs. buffer-substring-no-properties, David Kastrup, 2001/11/14