User: aidan
Date: 05/03/12 22:59:02
Modified: packages/xemacs-packages/re-builder ChangeLog Makefile
re-builder.el
Log:
This is Steve Youngs change of microsoft-free.87vf7z6dqk.fsf(a)youngs.au.com ,
moving re-builder to using extents, and fixing a bug related to
reb-color-display-p.
Revision Changes Path
1.3 +12 -0 XEmacs/packages/xemacs-packages/re-builder/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/re-builder/ChangeLog,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ChangeLog 2005/03/09 20:23:20 1.2
+++ ChangeLog 2005/03/12 21:59:00 1.3
@@ -1,3 +1,15 @@
+2005-03-10 Steve Youngs <steve(a)sxemacs.org>
+
+ * Makefile (REQUIRES): Remove fsf-compat. This package uses
+ extents natively now.
+
+ * re-builder.el: Set up better extent/overlay compatibility.
+ (reb-delete-overlays): Use it here.
+ (reb-update-overlays): Ditto.
+
+ (reb-color-display-p): Call `device-class' in
+ XEmacs so this function will DTRT in XEmacs.
+
2005-03-09 Norbert Koch <viteno(a)xemacs.org>
* Makefile (VERSION): XEmacs package 1.01 released.
1.3 +1 -1 XEmacs/packages/xemacs-packages/re-builder/Makefile
Index: Makefile
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/re-builder/Makefile,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Makefile 2005/03/09 20:23:20 1.2
+++ Makefile 2005/03/12 21:59:00 1.3
@@ -25,7 +25,7 @@
MAINTAINER = Aidan Kehoe <aidan(a)xemacs.org>
PACKAGE = re-builder
PKG_TYPE = regular
-REQUIRES = fsf-compat
+REQUIRES =
CATEGORY = standard
STANDARD_DOCS = t
1.2 +18 -10 XEmacs/packages/xemacs-packages/re-builder/re-builder.el
Index: re-builder.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/re-builder/re-builder.el,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- re-builder.el 2005/03/04 20:29:56 1.1
+++ re-builder.el 2005/03/12 21:59:00 1.2
@@ -110,9 +110,17 @@
;;; Code:
-;; On XEmacs, load the overlay compatibility library
-(if (not (fboundp 'make-overlay))
- (require 'overlay))
+;; Extent/overlay compatibility
+(if (featurep 'xemacs)
+ ;; (S)XEmacs
+ (progn
+ (defalias 'reb-delete-overlay 'delete-extent)
+ (defalias 'reb-make-overlay 'make-extent)
+ (defalias 'reb-overlay-put 'set-extent-property))
+ ;; GNU/Emacs
+ (defalias 'reb-delete-overlay 'delete-overlay)
+ (defalias 'reb-make-overlay 'make-overlay)
+ (defalias 'reb-overlay-put 'overlay-put))
;; User costomizable variables
(defgroup re-builder nil
@@ -320,7 +328,7 @@
;; emacs/xemacs compatibility
(if (fboundp 'frame-parameter)
(frame-parameter (selected-frame) 'display-type)
- (frame-property (selected-frame) 'display-type))))
+ (device-class (frame-device (selected-frame))))))
(defsubst reb-lisp-syntax-p ()
"Return non-nil if RE Builder uses a Lisp syntax."
@@ -532,7 +540,7 @@
"Delete all RE Builder overlays in the `reb-target-buffer' buffer."
(if (buffer-live-p reb-target-buffer)
(with-current-buffer reb-target-buffer
- (mapcar 'delete-overlay reb-overlays)
+ (mapcar 'reb-delete-overlay reb-overlays)
(setq reb-overlays nil))))
(defun reb-assert-buffer-in-window ()
@@ -661,25 +669,25 @@
(or (not reb-auto-match-limit)
(< matches reb-auto-match-limit)))
(if (= 0 (length (match-string 0)))
- (error "Empty regular expression!"))
+ (error "Empty regular expression!"))
(let ((i 0))
(setq matches (1+ matches))
(while (<= i subexps)
(if (and (or (not subexp) (= subexp i))
(match-beginning i))
- (let ((overlay (make-overlay (match-beginning i)
- (match-end i)))
+ (let ((overlay (reb-make-overlay (match-beginning i)
+ (match-end i)))
(face-name (format "reb-match-%d" i)))
(if (not firstmatch)
(setq firstmatch (match-data)))
(setq reb-overlays (cons overlay reb-overlays)
submatches (1+ submatches))
- (overlay-put
+ (reb-overlay-put
overlay 'face
(or (intern-soft face-name)
(error "Too many subexpressions - face `%s' not defined"
face-name )))
- (overlay-put overlay 'priority i)))
+ (reb-overlay-put overlay 'priority i)))
(setq i (1+ i))))))
(let ((count (if subexp submatches matches)))
(message "%s %smatch%s%s"
Show replies by date