comparison lisp/utils/text-props.el @ 70:131b0175ea99 r20-0b30

Import from CVS: tag r20-0b30
author cvs
date Mon, 13 Aug 2007 09:02:59 +0200
parents 56c54cf7c5b6
children c7528f8e288d
comparison
equal deleted inserted replaced
69:804d1389bcd6 70:131b0175ea99
20 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 20 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
21 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 ;; GNU General Public License for more details. 22 ;; GNU General Public License for more details.
23 23
24 ;; You should have received a copy of the GNU General Public License 24 ;; You should have received a copy of the GNU General Public License
25 ;; along with XEmacs; see the file COPYING. If not, write to the Free 25 ;; along with XEmacs; see the file COPYING. If not, write to
26 ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 26 ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
27 ;; 02111-1307, USA.
28 27
29 ;;; Synched up with: Not in FSF. 28 ;;; Synched up with: Not in FSF.
30 29
31 ;;; Commentary: 30 ;;; Commentary:
32 31
308 Completely replace properties of text from START to END. 307 Completely replace properties of text from START to END.
309 The third argument PROPS is the new property list. 308 The third argument PROPS is the new property list.
310 The optional fourth argument, BUFFER-OR-STRING, 309 The optional fourth argument, BUFFER-OR-STRING,
311 is the string or buffer containing the text." 310 is the string or buffer containing the text."
312 (map-extents #'(lambda (extent ignored) 311 (map-extents #'(lambda (extent ignored)
313 ;; #### dmoore - shouldn't this use
314 ;; (extent-start-position extent)
315 ;; (extent-end-position extent)
316 (remove-text-properties start end 312 (remove-text-properties start end
317 (list (extent-property extent 313 (list (extent-property extent
318 'text-prop) 314 'text-prop)
319 nil) 315 nil)
320 buffer-or-string) 316 buffer-or-string))
321 nil)
322 buffer-or-string start end nil nil 'text-prop) 317 buffer-or-string start end nil nil 'text-prop)
323 (add-text-properties start end props buffer-or-string)) 318 (add-text-properties start end props buffer-or-string))
324 319
325 320
326 ;;; The following functions can probably stay in lisp, since they're so simple. 321 ;;; The following functions can probably stay in lisp, since they're so simple.