Mercurial > hg > xemacs-beta
diff lisp/hyperbole/kotl/kprop-xe.el @ 70:131b0175ea99 r20-0b30
Import from CVS: tag r20-0b30
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:02:59 +0200 |
parents | 441bb1e64a06 |
children | 4be1180a9e89 |
line wrap: on
line diff
--- a/lisp/hyperbole/kotl/kprop-xe.el Mon Aug 13 09:00:04 2007 +0200 +++ b/lisp/hyperbole/kotl/kprop-xe.el Mon Aug 13 09:02:59 2007 +0200 @@ -6,15 +6,14 @@ ;; KEYWORDS: outlines, wp ;; ;; AUTHOR: Bob Weiner -;; ORG: InfoDock Associates ;; ;; ORIG-DATE: 7/27/93 -;; LAST-MOD: 28-Feb-97 at 23:41:02 by Bob Weiner +;; LAST-MOD: 30-Oct-95 at 21:21:20 by Bob Weiner ;; ;; This file is part of Hyperbole. ;; Available for use and distribution under the same terms as GNU Emacs. ;; -;; Copyright (C) 1993, 1994, 1995, 1997 Free Software Foundation, Inc. +;; Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc. ;; Developed with support from Motorola Inc. ;; ;; DESCRIPTION: @@ -30,11 +29,11 @@ ;;; Public functions ;;; ************************************************************************ -;; (get-text-property (pos prop &optional object)) -;; Return the value of position POS's property PROP, in OBJECT. -;; OBJECT is optional and defaults to the current buffer. -;; If POSITION is at the end of OBJECT, the value is nil. -(fset 'kproperty:get 'get-text-property) +(defun kproperty:get (pos prop &optional object) + "Return the value of position POS's property PROP, in OBJECT. +OBJECT is optional and defaults to the current buffer. +If POSITION is at the end of OBJECT, the value is nil." + (extent-property (extent-at pos object) prop)) (if (and hyperb:xemacs-p (or (>= emacs-minor-version 12) (> emacs-major-version 19))) @@ -93,8 +92,7 @@ text. Text inserted before or after this region does not inherit the added properties." ;; Don't use text properties internally because they don't work as desired - ;; when copied to a string and then reinserted, at least in some versions - ;; of XEmacs. + ;; when copied to a string and then reinserted. (let ((extent (make-extent start end object))) (if (null extent) (error "(kproperty:put): No extent at %d-%d to add properties %s" @@ -102,7 +100,7 @@ (if (/= (mod (length property-list) 2) 0) (error "(kproperty:put): Property-list has odd number of elements, %s" property-list)) - (set-extent-property extent 'text-prop (car property-list)) + (set-extent-property extent 'text-prop t) (set-extent-property extent 'duplicable t) (set-extent-property extent 'start-open t) (set-extent-property extent 'end-open t)