Rename GET-PROPERTY-AT to GET-TEXT-PROPERTY and TEXT-PROPERTIES-AT to
authorChris Hanson <org/chris-hanson/cph>
Thu, 9 Sep 1993 21:41:39 +0000 (21:41 +0000)
committerChris Hanson <org/chris-hanson/cph>
Thu, 9 Sep 1993 21:41:39 +0000 (21:41 +0000)
GET-TEXT-PROPERTIES.

v7/src/edwin/edwin.pkg
v7/src/edwin/txtprp.scm

index 26362ff12284d5231b446890fdaacf0ed4c069e9..89655713727b1def2003481cc390dffe97b51fad 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Id: edwin.pkg,v 1.131 1993/09/09 21:33:54 cph Exp $
+$Id: edwin.pkg,v 1.132 1993/09/09 21:41:39 cph Exp $
 
 Copyright (c) 1989-1993 Massachusetts Institute of Technology
 
@@ -839,9 +839,8 @@ MIT in each case. |#
   (export (edwin)
          add-text-properties
          add-text-property
-         get-property-at
-         group-extract-properties
-         group-reinsert-properties!
+         get-text-properties
+         get-text-property
          local-comtabs
          next-property-change
          next-specific-property-change
@@ -849,12 +848,15 @@ MIT in each case. |#
          previous-property-change
          remove-text-properties
          remove-text-property
-         set-text-properties
+         set-text-properties)
+  (export (edwin group-operations)
          text-not-deleteable?
          text-not-insertable?
-         text-properties-at
          update-intervals-for-deletion!
          update-intervals-for-insertion!)
+  (export (edwin undo)
+         group-extract-properties
+         group-reinsert-properties!)
   (export (edwin window)
          find-interval
          interval-end
index b0134da5efaafa09eeb4c0c0a9b85dd0e62d536e..ae2405436e4c0f1e2877b7bbfc4562af98fe2d5e 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;;    $Id: txtprp.scm,v 1.9 1993/09/09 20:59:26 cph Exp $
+;;;    $Id: txtprp.scm,v 1.10 1993/09/09 21:41:25 cph Exp $
 ;;;
 ;;;    Copyright (c) 1993 Massachusetts Institute of Technology
 ;;;
                         (fix:+ (group-modified-tick group) 1)))))
     (set-interrupt-enables! interrupt-mask)))
 \f
-(define (text-properties-at index group)
-  (validate-point-arguments group index 'TEXT-PROPERTIES-AT)
+(define (get-text-properties group index)
+  (validate-point-arguments group index 'GET-TEXT-PROPERTIES)
   (if (group-text-properties group)
       (alist-copy (interval-properties (find-interval group index)))
       '()))
 
-(define (get-property-at prop index group)
-  (validate-point-arguments group index 'GET-PROPERTY-AT)
-  (and (group-text-properties group)
-       (assq prop (interval-properties (find-interval group index)))))
+(define (get-text-property group index key default)
+  (validate-point-arguments group index 'GET-TEXT-PROPERTY)
+  (validate-symbol-argument key 'GET-TEXT-PROPERTY)
+  (if (group-text-properties group)
+      (interval-property (find-interval group index) key default)
+      default))
 
 (define (local-comtabs mark)
-  (let ((property
-        (get-property-at 'COMMAND-TABLE (mark-index mark) (mark-group mark))))
-    (and property
-        (cdr property))))
+  (get-text-property (mark-group mark) (mark-index mark) 'COMMAND-TABLE #f))
 
 ;;; The next four procedures are all about the same
 ;;; and none have been tested.