From xemacs-m  Sat Jun 21 13:38:24 1997
Received: from jagor.srce.hr (hniksic@jagor.srce.hr [161.53.2.130])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id NAA19272
	for <xemacs-beta@xemacs.org>; Sat, 21 Jun 1997 13:38:23 -0500 (CDT)
Received: (from hniksic@localhost)
          by jagor.srce.hr (8.8.5/8.8.4)
	  id UAA20100; Sat, 21 Jun 1997 20:38:20 +0200 (MET DST)
To: XEmacs Developers <xemacs-beta@xemacs.org>
Subject: overlay.el update
X-Attribution: Hrv
X-Face: Mie8:rOV<\c/~z{s.X4A{!?vY7{drJ([U]0O=W/<W*SMo/Mv:58:*_y~ki>xDi&N7XG
        KV^$k0m3Oe/)'e%3=$PCR&3ITUXH,cK>]bci&<qQ>Ff%x_>1`T(+M2Gg/fgndU%k*ft
        [(7._6e0n-V%|%'[c|q:;}td$#INd+;?!-V=c8Pqf}3J
From: Hrvoje Niksic <hniksic@srce.hr>
Date: 21 Jun 1997 20:38:20 +0200
Message-ID: <kigyb83recj.fsf@jagor.srce.hr>
Lines: 84
X-Mailer: Gnus v5.4.59/XEmacs 20.3(beta7) - "Oslo"

I have implemented the `category' and `local-map' properties, as well
as included a few additional comments to the commentary.

--- lisp/prim/overlay.el.orig	Sat Jun 21 13:51:31 1997
+++ lisp/prim/overlay.el	Sat Jun 21 20:37:39 1997
@@ -2,7 +2,8 @@
 
 ;;;; Copyright (C) 1997 Free Software Foundation, Inc.
 
-;; Maintainer: XEmacs
+;; Author: Joe Nuspl <nuspl@sequent.com>
+;; Maintainer: XEmacs Development Team (in <hniksic@srce.hr> incarnation)
 ;; Keywords: internal
 
 ;; This file is part of XEmacs.
@@ -26,8 +27,38 @@
 
 ;;; Commentary:
 
-;; Written by Joe Nuspl in 1997.
+;; Unlike the text-properties interface, these functions are in fact
+;; totally useless in XEmacs.  They are a more or less straightforward
+;; interface to the much better extent API, provided exclusively for
+;; GNU Emacs compatibility.  If you notice an incompatibility not
+;; mentioned below, be sure to mention it.  Anyways, you should really
+;; not use this.
+
+;; Known incompatibilities with the FSF interface:
+
+;; 1. There is not an `overlay' type.  Any extent with non-nil
+;;    'overlay property is considered an "overlay".
+;;
+;; 2. Some features of FSF overlays have not been implemented in
+;;    extents (or are unneeded).  Specifically, those are the
+;;    following special properties: window, insert-in-front-hooks,
+;;    insert-behind-hooks, and modification-hooks.  Some of these will
+;;    probably be implemented for extents in the future.
 ;;
+;; 3. In FSF, beginning and end of an overlay are markers, which means
+;;    that you can use `insert-before-markers' to change insertion
+;;    property of overlay.  It will not work in this emulation, and we
+;;    have no plans of providing it.
+;;
+;; 4. The `overlays-in' and `overlays-at' functions in some cases
+;;    don't work as they should.  To be fixed RSN.
+;;
+;; 5. Finally, setting or modification of overlay properties specific
+;;    to extents will have unusual results.  While (overlay-put
+;;    overlay 'start-open t) does nothing under FSF, it has a definite
+;;    effect under XEmacs.  This is solved by simply avoiding such
+;;    names (see `set-extent-property' for a list).
+
 ;; Some functions were broken; fixed-up by Hrvoje Niksic, June 1997.
 
 
@@ -180,7 +211,12 @@
 (defun overlay-get (overlay prop)
   "Get the property of overlay OVERLAY with property name PROP."
   (check-argument-type 'overlayp overlay)
-  (extent-property overlay prop))
+  (let ((value (extent-property overlay prop))
+	category)
+    (if (and (null value)
+	     (setq category (extent-property overlay 'category)))
+	(get category prop)
+      value)))
 
 (defun overlay-put (overlay prop value)
   "Set one property of overlay OVERLAY: give property PROP value VALUE."
@@ -193,6 +229,8 @@
 	((eq prop 'after-string)
 	 (set-extent-property overlay 'end-glyph
 			      (make-glyph (vector 'string :data value))))
+	((eq prop 'local-map)
+	 (set-extent-property overlay 'keymap value))
 	((memq prop '(window insert-in-front-hooks insert-behind-hooks
 			     modification-hooks))
 	 (error "cannot support overlay '%s property under XEmacs"


-- 
Hrvoje Niksic <hniksic@srce.hr> | Student at FER Zagreb, Croatia
--------------------------------+--------------------------------
ED WILL NOT CORRUPT YOUR PRECIOUS BODILY FLUIDS!!

