[Top][All Lists]

[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

address@hidden (Per Abrahamsen) writes:

> address@hidden (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)
        (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.



reply via email to

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