Mercurial > hg > xemacs-beta
comparison lisp/text-props.el @ 272:c5d627a313b1 r21-0b34
Import from CVS: tag r21-0b34
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:28:48 +0200 |
parents | 41ff10fd062f |
children | 74fd4e045ea6 |
comparison
equal
deleted
inserted
replaced
271:c7b7086b0a39 | 272:c5d627a313b1 |
---|---|
57 ;; If you are dealing with styles of text, where things do not have explicit | 57 ;; If you are dealing with styles of text, where things do not have explicit |
58 ;; endpoints (as is done in font-lock.el and shell-font.el) or if you want to | 58 ;; endpoints (as is done in font-lock.el and shell-font.el) or if you want to |
59 ;; partition a buffer (that is, change some attribute of a range from one | 59 ;; partition a buffer (that is, change some attribute of a range from one |
60 ;; value to another without disturbing the properties outside of that range) | 60 ;; value to another without disturbing the properties outside of that range) |
61 ;; then an interface that deals with properties of characters may be most | 61 ;; then an interface that deals with properties of characters may be most |
62 ;; natural. | 62 ;; natural. |
63 | 63 |
64 ;; Another way of thinking of it is, do you care where the endpoints of the | 64 ;; Another way of thinking of it is, do you care where the endpoints of the |
65 ;; region are? If you do, then you should use extents. If it's ok for the | 65 ;; region are? If you do, then you should use extents. If it's ok for the |
66 ;; region to become divided, and for two regions with identical properties to | 66 ;; region to become divided, and for two regions with identical properties to |
67 ;; be merged into one region, then you might want to use text properties. | 67 ;; be merged into one region, then you might want to use text properties. |
198 props)))) | 198 props)))) |
199 (setq new-props (cdr (cdr new-props))))))) | 199 (setq new-props (cdr (cdr new-props))))))) |
200 props)) | 200 props)) |
201 | 201 |
202 (defun extent-properties-at (position &optional object) | 202 (defun extent-properties-at (position &optional object) |
203 "Returns the properties of the character at the given position | 203 "Return the properties of the character at the given position in OBJECT. |
204 in OBJECT (a string or buffer) by merging the properties of overlapping | 204 OBJECT is either a string or a buffer. The properties of overlapping |
205 extents. The returned value is a property list, some of which may be | 205 extents are merged. The returned value is a property list, some of |
206 shared with other structures. You must not modify it. | 206 which may be shared with other structures. You must not modify it. |
207 | 207 |
208 If POSITION is at the end of OBJECT, the value is nil. | 208 If POSITION is at the end of OBJECT, the value is nil. |
209 | 209 |
210 This returns all properties on all extents. | 210 This returns all properties on all extents. |
211 See also `text-properties-at'." | 211 See also `text-properties-at'." |
212 (extent-properties-at-1 position object nil)) | 212 (extent-properties-at-1 position object nil)) |
213 | 213 |
214 (defun text-properties-at (position &optional object) | 214 (defun text-properties-at (position &optional object) |
215 "Returns the properties of the character at the given position | 215 "Return the properties of the character at the given position in OBJECT. |
216 in OBJECT (a string or buffer) by merging the properties of overlapping | 216 OBJECT is either a string or a buffer. The properties of overlapping |
217 extents. The returned value is a property list, some of which may be | 217 extents are merged. The returned value is a property list, some of |
218 shared with other structures. You must not modify it. | 218 which may be shared with other structures. You must not modify it. |
219 | 219 |
220 If POSITION is at the end of OBJECT, the value is nil. | 220 If POSITION is at the end of OBJECT, the value is nil. |
221 | 221 |
222 This returns only those properties added with `put-text-property'. | 222 This returns only those properties added with `put-text-property'. |
223 See also `extent-properties-at'." | 223 See also `extent-properties-at'." |