[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: buffer-substring vs. buffer-substring-no-properties
From: |
Juanma Barranquero |
Subject: |
Re: buffer-substring vs. buffer-substring-no-properties |
Date: |
Thu, 15 Nov 2001 09:25:55 +0100 |
On 14 Nov 2001 21:22:36 -0800, Kevin Layer
<layer@--you-know-what-to-remove--.franz.com> wrote:
> Also, note I couldn't get copy-sequence to remove properties. It
> always preserves them for me:
Can you remove properties with that?
(defun substring-no-properties (string from &optional to)
"Return a substring of STRING, without text properties.
The substring starts at index FROM and ends before TO.
TO may be nil or omitted; then the substring runs to the end of STRING.
If FROM or TO is negative, it counts from the end."
(let ((str (substring string from to)))
(set-text-properties 0 (length str) nil str)
str))
/L/e/k/t/u
- 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, 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, 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 <=
- 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