summaryrefslogtreecommitdiff
path: root/lisp/cedet/semantic/edit.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/cedet/semantic/edit.el')
-rw-r--r--lisp/cedet/semantic/edit.el56
1 files changed, 28 insertions, 28 deletions
diff --git a/lisp/cedet/semantic/edit.el b/lisp/cedet/semantic/edit.el
index 122549212dc..2a25bb5db1c 100644
--- a/lisp/cedet/semantic/edit.el
+++ b/lisp/cedet/semantic/edit.el
@@ -150,15 +150,15 @@ Argument START, END, and LENGTH specify the bounds of the change."
Optional argument BUFFER is the buffer to search for changes in."
(save-excursion
(if buffer (set-buffer buffer))
- (let ((ol (semantic-overlays-in (max start (point-min))
- (min end (point-max))))
+ (let ((ol (overlays-in (max start (point-min))
+ (min end (point-max))))
(ret nil))
(while ol
- (when (semantic-overlay-get (car ol) 'semantic-change)
+ (when (overlay-get (car ol) 'semantic-change)
(setq ret (cons (car ol) ret)))
(setq ol (cdr ol)))
- (sort ret #'(lambda (a b) (< (semantic-overlay-start a)
- (semantic-overlay-start b)))))))
+ (sort ret #'(lambda (a b) (< (overlay-start a)
+ (overlay-start b)))))))
(defun semantic-edits-change-function-handle-changes (start end length)
"Run whenever a buffer controlled by `semantic-mode' change.
@@ -171,8 +171,8 @@ Argument START, END, and LENGTH specify the bounds of the change."
)
(semantic-parse-tree-set-needs-update)
(if (not changes-in-change)
- (let ((o (semantic-make-overlay start end)))
- (semantic-overlay-put o 'semantic-change t)
+ (let ((o (make-overlay start end)))
+ (overlay-put o 'semantic-change t)
;; Run the hooks safely. When hooks blow it, our dirty
;; function will be removed from the list of active change
;; functions.
@@ -182,13 +182,13 @@ Argument START, END, and LENGTH specify the bounds of the change."
(let ((tmp changes-in-change))
;; Find greatest bounds of all changes
(while tmp
- (when (< (semantic-overlay-start (car tmp)) start)
- (setq start (semantic-overlay-start (car tmp))))
- (when (> (semantic-overlay-end (car tmp)) end)
- (setq end (semantic-overlay-end (car tmp))))
+ (when (< (overlay-start (car tmp)) start)
+ (setq start (overlay-start (car tmp))))
+ (when (> (overlay-end (car tmp)) end)
+ (setq end (overlay-end (car tmp))))
(setq tmp (cdr tmp)))
;; Move the first found overlay, recycling that overlay.
- (semantic-overlay-move (car changes-in-change) start end)
+ (move-overlay (car changes-in-change) start end)
(condition-case nil
(run-hook-with-args 'semantic-edits-move-change-hooks
(car changes-in-change))
@@ -200,7 +200,7 @@ Argument START, END, and LENGTH specify the bounds of the change."
(run-hook-with-args 'semantic-edits-delete-change-functions
(car changes-in-change))
(error nil))
- (semantic-overlay-delete (car changes-in-change))
+ (delete-overlay (car changes-in-change))
(setq changes-in-change (cdr changes-in-change))))
)))
@@ -210,7 +210,7 @@ Argument START, END, and LENGTH specify the bounds of the change."
(run-hook-with-args 'semantic-edits-delete-change-functions
change)
(error nil))
- (semantic-overlay-delete change))
+ (delete-overlay change))
(defun semantic-edits-flush-changes ()
"Flush the changes in the current buffer."
@@ -225,9 +225,9 @@ Argument START, END, and LENGTH specify the bounds of the change."
HITS is the list of tags that CHANGE is in. It can have more than
one tag in it if the leaf tag is within a parent tag."
(and (< (semantic-tag-start (car hits))
- (semantic-overlay-start change))
+ (overlay-start change))
(> (semantic-tag-end (car hits))
- (semantic-overlay-end change))
+ (overlay-end change))
;; Recurse on the rest. If this change is inside all
;; of these tags, then they are all leaves or parents
;; of the smallest tag.
@@ -245,12 +245,12 @@ one tag in it if the leaf tag is within a parent tag."
;; at point and mark (via comments I assume.)
(defsubst semantic-edits-os (change)
"For testing: Start of CHANGE, or smaller of (point) and (mark)."
- (if change (semantic-overlay-start change)
+ (if change (overlay-start change)
(if (< (point) (mark)) (point) (mark))))
(defsubst semantic-edits-oe (change)
"For testing: End of CHANGE, or larger of (point) and (mark)."
- (if change (semantic-overlay-end change)
+ (if change (overlay-end change)
(if (> (point) (mark)) (point) (mark))))
(defun semantic-edits-change-leaf-tag (change)
@@ -562,7 +562,7 @@ This function is for internal use by `semantic-edits-incremental-parser'."
;; encompassed within the bounds of tags
;; modified by the previous iteration's
;; change.
- (< (semantic-overlay-start (car changes))
+ (< (overlay-start (car changes))
parse-end)))
;; REMOVE LATER
@@ -607,7 +607,7 @@ This function is for internal use by `semantic-edits-incremental-parser'."
;; our change, meaning there is nothing before
;; the change.
((> (semantic-tag-start (car cache-list))
- (semantic-overlay-end (car changes)))
+ (overlay-end (car changes)))
(setq last-cond "Beginning of buffer")
(setq parse-start
;; Don't worry about parents since
@@ -621,13 +621,13 @@ This function is for internal use by `semantic-edits-incremental-parser'."
)
;; A change stuck on the first surrounding tag.
((= (semantic-tag-end (car cache-list))
- (semantic-overlay-start (car changes)))
+ (overlay-start (car changes)))
(setq last-cond "Beginning of Tag")
;; Reparse that first tag.
(setq parse-start
(semantic-tag-start (car cache-list))
parse-end
- (semantic-overlay-end (car changes))
+ (overlay-end (car changes))
tags
(list (car cache-list)))
(semantic-edits-assert-valid-region)
@@ -671,7 +671,7 @@ This function is for internal use by `semantic-edits-incremental-parser'."
(if end-marker
(setq parse-end
(semantic-tag-start end-marker))
- (setq parse-end (semantic-overlay-end
+ (setq parse-end (overlay-end
(car changes))))
(semantic-edits-assert-valid-region)
)
@@ -690,7 +690,7 @@ This function is for internal use by `semantic-edits-incremental-parser'."
;; list of tags. Only possible if END
;; already matches the end of that tag.
(setq parse-end
- (semantic-overlay-end (car changes)))))
+ (overlay-end (car changes)))))
(semantic-edits-assert-valid-region)
))
@@ -700,7 +700,7 @@ This function is for internal use by `semantic-edits-incremental-parser'."
))
;; Is this change inside the previous parse group?
;; We already checked start.
- ((< (semantic-overlay-end (car changes)) parse-end)
+ ((< (overlay-end (car changes)) parse-end)
(setq last-cond "in bounds")
nil)
;; This change extends the current parse group.
@@ -947,9 +947,9 @@ When this routine returns, OLDTAG is raw, and the data will be
lost if not transferred into NEWTAG."
(let* ((oo (semantic-tag-overlay oldtag))
(o (semantic-tag-overlay newtag))
- (oo-props (semantic-overlay-properties oo)))
+ (oo-props (overlay-properties oo)))
(while oo-props
- (semantic-overlay-put o (car oo-props) (car (cdr oo-props)))
+ (overlay-put o (car oo-props) (car (cdr oo-props)))
(setq oo-props (cdr (cdr oo-props)))
)
;; Free the old overlay(s)
@@ -963,7 +963,7 @@ lost if not transferred into NEWTAG."
;; OLDTAG is now pointing to NEWTAG, but the NEWTAG
;; cell is about to be abandoned. Here we update our overlay
;; to point at the updated state of the world.
- (semantic-overlay-put o 'semantic oldtag)
+ (overlay-put o 'semantic oldtag)
))
(add-hook 'semantic-before-toplevel-cache-flush-hook