Commit 31b1e4cb authored by Lars Ingebrigtsen's avatar Lars Ingebrigtsen

Throughout cedet, don't use semantic-overlay-* compat aliases

parent e383aade
......@@ -510,7 +510,7 @@ is requested."
(semantic-clear-parser-warnings)
;; Nuke all semantic overlays. This is faster than deleting based
;; on our data structure.
(let ((l (semantic-overlay-lists)))
(let ((l (overlay-lists)))
(mapc 'semantic-delete-overlay-maybe (car l))
(mapc 'semantic-delete-overlay-maybe (cdr l))
)
......
......@@ -127,8 +127,8 @@
(defun semantic-completion-inline-active-p ()
"Non-nil if inline completion is active."
(when (and semantic-complete-inline-overlay
(not (semantic-overlay-live-p semantic-complete-inline-overlay)))
(semantic-overlay-delete semantic-complete-inline-overlay)
(not (overlay-buffer semantic-complete-inline-overlay)))
(delete-overlay semantic-complete-inline-overlay)
(setq semantic-complete-inline-overlay nil))
semantic-complete-inline-overlay)
......@@ -574,8 +574,8 @@ The face is used in `semantic-complete-inline-tag-engine'."
(defun semantic-complete-inline-text ()
"Return the text that is being completed inline.
Similar to `minibuffer-contents' when completing in the minibuffer."
(let ((s (semantic-overlay-start semantic-complete-inline-overlay))
(e (semantic-overlay-end semantic-complete-inline-overlay)))
(let ((s (overlay-start semantic-complete-inline-overlay))
(e (overlay-end semantic-complete-inline-overlay)))
(if (= s e)
""
(buffer-substring-no-properties s e ))))
......@@ -583,8 +583,8 @@ Similar to `minibuffer-contents' when completing in the minibuffer."
(defun semantic-complete-inline-delete-text ()
"Delete the text currently being completed in the current buffer."
(delete-region
(semantic-overlay-start semantic-complete-inline-overlay)
(semantic-overlay-end semantic-complete-inline-overlay)))
(overlay-start semantic-complete-inline-overlay)
(overlay-end semantic-complete-inline-overlay)))
(defun semantic-complete-inline-done ()
"This completion thing is DONE, OR, insert a newline."
......@@ -630,11 +630,11 @@ Similar to `minibuffer-contents' when completing in the minibuffer."
(semantic-displayor-cleanup semantic-completion-display-engine))
(when semantic-complete-inline-overlay
(let ((wc (semantic-overlay-get semantic-complete-inline-overlay
(let ((wc (overlay-get semantic-complete-inline-overlay
'window-config-start))
(buf (semantic-overlay-buffer semantic-complete-inline-overlay))
(buf (overlay-buffer semantic-complete-inline-overlay))
)
(semantic-overlay-delete semantic-complete-inline-overlay)
(delete-overlay semantic-complete-inline-overlay)
(setq semantic-complete-inline-overlay nil)
;; DONT restore the window configuration if we just
;; switched windows!
......@@ -680,10 +680,10 @@ a reasonable distance."
;;(message "Inline Hook installed, but overlay deleted.")
(semantic-complete-inline-exit))
;; Exit if commands caused us to exit the area of interest
(let ((os (semantic-overlay-get semantic-complete-inline-overlay 'semantic-original-start))
(s (semantic-overlay-start semantic-complete-inline-overlay))
(e (semantic-overlay-end semantic-complete-inline-overlay))
(b (semantic-overlay-buffer semantic-complete-inline-overlay))
(let ((os (overlay-get semantic-complete-inline-overlay 'semantic-original-start))
(s (overlay-start semantic-complete-inline-overlay))
(e (overlay-end semantic-complete-inline-overlay))
(b (overlay-buffer semantic-complete-inline-overlay))
(txt nil)
)
(cond
......@@ -758,17 +758,17 @@ END is at the end of the current symbol being completed."
semantic-completion-display-engine displayor)
;; Create an overlay
(setq semantic-complete-inline-overlay
(semantic-make-overlay start end buffer nil t))
(semantic-overlay-put semantic-complete-inline-overlay
'face
'semantic-complete-inline-face)
(semantic-overlay-put semantic-complete-inline-overlay
'window-config-start
(current-window-configuration))
(make-overlay start end buffer nil t))
(overlay-put semantic-complete-inline-overlay
'face
'semantic-complete-inline-face)
(overlay-put semantic-complete-inline-overlay
'window-config-start
(current-window-configuration))
;; Save the original start. We need to exit completion if START
;; moves.
(semantic-overlay-put semantic-complete-inline-overlay
'semantic-original-start start)
(overlay-put semantic-complete-inline-overlay
'semantic-original-start start)
;; Install our command hooks
(add-hook 'pre-command-hook 'semantic-complete-pre-command-hook)
(add-hook 'post-command-hook 'semantic-complete-post-command-hook)
......@@ -1783,7 +1783,7 @@ text using overlay options.")
(cl-defmethod semantic-displayor-cleanup ((obj semantic-displayor-ghost))
"Clean up any mess this displayor may have."
(when (slot-boundp obj 'ghostoverlay)
(semantic-overlay-delete (oref obj ghostoverlay)))
(delete-overlay (oref obj ghostoverlay)))
)
(cl-defmethod semantic-displayor-set-completions ((obj semantic-displayor-ghost)
......@@ -1824,9 +1824,9 @@ completion text in ghost text."
;; Display the focus completion as ghost text after the current
;; inline text.
(when (or (not (slot-boundp obj 'ghostoverlay))
(not (semantic-overlay-live-p (oref obj ghostoverlay))))
(not (overlay-buffer (oref obj ghostoverlay))))
(oset obj ghostoverlay
(semantic-make-overlay (point) (1+ (point)) (current-buffer) t)))
(make-overlay (point) (1+ (point)) (current-buffer) t)))
(let* ((lp (semantic-completion-text))
(os (substring (semantic-tag-name tag) (length lp)))
......@@ -1835,7 +1835,7 @@ completion text in ghost text."
(put-text-property 0 (length os) 'face 'region os)
(semantic-overlay-put
(overlay-put
ol 'display (concat os (buffer-substring (point) (1+ (point)))))
)
;; Calculate text difference between contents and the focus item.
......
......@@ -74,7 +74,7 @@
(defun semanticdb-table-oob-sanity-check (cache)
"Validate that CACHE tags do not have any overlays in them."
(while cache
(when (semantic-overlay-p (semantic-tag-overlay cache))
(when (overlayp (semantic-tag-overlay cache))
(message "Tag %s has an erroneous overlay!"
(semantic-format-tag-summarize (car cache))))
(semanticdb-table-oob-sanity-check
......
......@@ -399,7 +399,7 @@ Default action as described in `semanticdb-find-translate-path'."
(let ((table (cond ((null path)
semanticdb-current-table)
((bufferp path)
(semantic-buffer-local-value 'semanticdb-current-table path))
(buffer-local-value 'semanticdb-current-table path))
((and (stringp path) (file-exists-p path))
(semanticdb-file-table-object path t))
((cl-typep path 'semanticdb-abstract-table)
......
......@@ -193,12 +193,12 @@ If RULE and MATCH indices are specified, highlight those also."
;; I know it is the first symbol appearing in the body of this token.
(goto-char (semantic-tag-start nt))
(setq o (semantic-make-overlay (point) (progn (forward-sexp 1) (point))))
(semantic-overlay-put o 'face 'highlight)
(setq o (make-overlay (point) (progn (forward-sexp 1) (point))))
(overlay-put o 'face 'highlight)
(object-add-to-list iface 'overlays o)
(semantic-debug-set-parser-location iface (semantic-overlay-start o))
(semantic-debug-set-parser-location iface (overlay-start o))
(when (and rule match)
......@@ -215,20 +215,20 @@ If RULE and MATCH indices are specified, highlight those also."
(setq match (1- match)))
;; Now highlight the thingy we find there.
(setq o (semantic-make-overlay (point) (progn (forward-sexp 1) (point))))
(semantic-overlay-put o 'face 'highlight)
(setq o (make-overlay (point) (progn (forward-sexp 1) (point))))
(overlay-put o 'face 'highlight)
(object-add-to-list iface 'overlays o)
;; If we have a match for a sub-rule, have the parser position
;; move so we can see it in the output window for very long rules.
(semantic-debug-set-parser-location iface (semantic-overlay-start o))
(semantic-debug-set-parser-location iface (overlay-start o))
))))
(cl-defmethod semantic-debug-unhighlight ((iface semantic-debug-interface))
"Remove all debugging overlays."
(mapc 'semantic-overlay-delete (oref iface overlays))
(mapc #'delete-overlay (oref iface overlays))
(oset iface overlays nil))
;; Call from the parser at a breakpoint
......
......@@ -38,17 +38,16 @@
"Specify that TAG should be highlighted.
Optional FACE specifies the face to use."
(let ((o (semantic-tag-overlay tag)))
(semantic-overlay-put o 'old-face
(cons (semantic-overlay-get o 'face)
(semantic-overlay-get o 'old-face)))
(semantic-overlay-put o 'face (or face 'semantic-tag-highlight-face))
))
(overlay-put o 'old-face
(cons (overlay-get o 'face)
(overlay-get o 'old-face)))
(overlay-put o 'face (or face 'semantic-tag-highlight-face))))
(defun semantic-unhighlight-tag (tag)
"Unhighlight TAG, restoring its previous face."
(let ((o (semantic-tag-overlay tag)))
(semantic-overlay-put o 'face (car (semantic-overlay-get o 'old-face)))
(semantic-overlay-put o 'old-face (cdr (semantic-overlay-get o 'old-face)))
(overlay-put o 'face (car (overlay-get o 'old-face)))
(overlay-put o 'old-face (cdr (overlay-get o 'old-face)))
))
;;; Momentary Highlighting - One line
......@@ -66,7 +65,7 @@ Optional argument FACE specifies the face to do the highlighting."
Optional argument FACE is the face to use for highlighting.
If FACE is not specified, then `highlight' will be used."
(when (semantic-tag-with-position-p tag)
(if (not (semantic-overlay-p (semantic-tag-overlay tag)))
(if (not (overlayp (semantic-tag-overlay tag)))
;; No overlay, but a position. Highlight the first line only.
(semantic-momentary-highlight-one-tag-line tag face)
;; The tag has an overlay, highlight the whole thing
......@@ -76,17 +75,17 @@ If FACE is not specified, then `highlight' will be used."
(defun semantic-set-tag-face (tag face)
"Specify that TAG should use FACE for display."
(semantic-overlay-put (semantic-tag-overlay tag) 'face face))
(overlay-put (semantic-tag-overlay tag) 'face face))
(defun semantic-set-tag-invisible (tag &optional visible)
"Enable the text in TAG to be made invisible.
If VISIBLE is non-nil, make the text visible."
(semantic-overlay-put (semantic-tag-overlay tag) 'invisible
(not visible)))
(overlay-put (semantic-tag-overlay tag) 'invisible
(not visible)))
(defun semantic-tag-invisible-p (tag)
"Return non-nil if TAG is invisible."
(semantic-overlay-get (semantic-tag-overlay tag) 'invisible))
(overlay-get (semantic-tag-overlay tag) 'invisible))
(defun semantic-overlay-signal-read-only
(overlay after start end &optional len)
......@@ -95,8 +94,8 @@ Allows deletion of the entire text.
Argument OVERLAY, AFTER, START, END, and LEN are passed in by the system."
;; Stolen blithely from cpp.el in Emacs 21.1
(if (and (not after)
(or (< (semantic-overlay-start overlay) start)
(> (semantic-overlay-end overlay) end)))
(or (< (overlay-start overlay) start)
(> (overlay-end overlay) end)))
(error "This text is read only")))
(defun semantic-set-tag-read-only (tag &optional writable)
......@@ -104,16 +103,16 @@ Argument OVERLAY, AFTER, START, END, and LEN are passed in by the system."
Optional argument WRITABLE should be non-nil to make the text writable
instead of read-only."
(let ((o (semantic-tag-overlay tag))
(hook (if writable nil '(semantic-overlay-signal-read-only))))
(semantic-overlay-put o 'modification-hooks hook)
(semantic-overlay-put o 'insert-in-front-hooks hook)
(semantic-overlay-put o 'insert-behind-hooks hook)))
(hook (if writable nil '(overlay-signal-read-only))))
(overlay-put o 'modification-hooks hook)
(overlay-put o 'insert-in-front-hooks hook)
(overlay-put o 'insert-behind-hooks hook)))
(defun semantic-tag-read-only-p (tag)
"Return non-nil if the current TAG is marked read only."
(let ((o (semantic-tag-overlay tag)))
(member 'semantic-overlay-signal-read-only
(semantic-overlay-get o 'modification-hooks))))
(overlay-get o 'modification-hooks))))
;;; Secondary overlays
;;
......@@ -138,12 +137,12 @@ generated secondary overlay."
nil
(let* ((os (semantic-tag-start tag))
(oe (semantic-tag-end tag))
(o (semantic-make-overlay os oe (semantic-tag-buffer tag) t))
(o (make-overlay os oe (semantic-tag-buffer tag) t))
(attr (semantic-tag-secondary-overlays tag))
)
(semantic--tag-put-property tag 'secondary-overlays (cons o attr))
(semantic-overlay-put o 'semantic-secondary t)
(semantic-overlay-put o 'semantic-link-hook link-hook)
(overlay-put o 'semantic-secondary t)
(overlay-put o 'semantic-link-hook link-hook)
(semantic-tag-add-hook tag 'link-hook 'semantic--tag-link-secondary-overlays)
(semantic-tag-add-hook tag 'unlink-hook 'semantic--tag-unlink-secondary-overlays)
(semantic-tag-add-hook tag 'unlink-copy-hook 'semantic--tag-unlink-copy-secondary-overlays)
......@@ -156,7 +155,7 @@ PROPERTY is a symbol and all overlays with that symbol are returned.."
(let* ((olsearch (semantic-tag-secondary-overlays tag))
(o nil))
(while olsearch
(when (semantic-overlay-get (car olsearch) property)
(when (overlay-get (car olsearch) property)
(setq o (cons (car olsearch) o)))
(setq olsearch (cdr olsearch)))
o))
......@@ -166,16 +165,16 @@ PROPERTY is a symbol and all overlays with that symbol are returned.."
If OVERLAY-OR-PROPERTY is an overlay, delete that overlay.
If OVERLAY-OR-PROPERTY is a symbol, find the overlay with that property."
(let* ((o overlay-or-property))
(if (semantic-overlay-p o)
(if (overlayp o)
(setq o (list o))
(setq o (semantic-tag-get-secondary-overlay tag overlay-or-property)))
(while (semantic-overlay-p (car o))
(while (overlayp (car o))
;; We don't really need to worry about the hooks.
;; They will clean themselves up eventually ??
(semantic--tag-put-property
tag 'secondary-overlays
(delete (car o) (semantic-tag-secondary-overlays tag)))
(semantic-overlay-delete (car o))
(delete-overlay (car o))
(setq o (cdr o)))))
(defun semantic--tag-unlink-copy-secondary-overlays (tag)
......@@ -200,10 +199,10 @@ from them in TAG."
(let ((ol (semantic-tag-secondary-overlays tag))
(nl nil))
(while ol
(if (semantic-overlay-get (car ol) 'semantic-link-hook)
(if (overlay-get (car ol) 'semantic-link-hook)
;; Only put in a proxy if there is a link-hook. If there is no link-hook
;; the decorating mode must know when tags are unlinked on its own.
(setq nl (cons (semantic-overlay-get (car ol) 'semantic-link-hook)
(setq nl (cons (overlay-get (car ol) 'semantic-link-hook)
nl))
;; Else, remove all traces of ourself from the tag
;; Note to self: Does this prevent multiple types of secondary
......@@ -212,7 +211,7 @@ from them in TAG."
(semantic-tag-remove-hook tag 'unlink-hook 'semantic--tag-unlink-secondary-overlays)
(semantic-tag-remove-hook tag 'unlink-copy-hook 'semantic--tag-unlink-copy-secondary-overlays)
)
(semantic-overlay-delete (car ol))
(delete-overlay (car ol))
(setq ol (cdr ol)))
(semantic--tag-put-property tag 'secondary-overlays (nreverse nl))
))
......@@ -245,21 +244,20 @@ nil implies the tag should be fully shown."
;; Add the foldn
(setq o (semantic-tag-create-secondary-overlay tag))
;; mark as folded
(semantic-overlay-put o 'semantic-folded t)
(overlay-put o 'semantic-folded t)
;; Move to cover end of tag
(save-excursion
(goto-char (semantic-tag-start tag))
(end-of-line)
(semantic-overlay-move o (point) (semantic-tag-end tag)))
(move-overlay o (point) (semantic-tag-end tag)))
;; We need to modify the invisibility spec for this to
;; work.
(if (or (eq buffer-invisibility-spec t)
(not (assoc 'semantic-fold buffer-invisibility-spec)))
(add-to-invisibility-spec '(semantic-fold . t)))
(semantic-overlay-put o 'invisible 'semantic-fold)
(overlay-put o 'invisible 'semantic-fold)
(overlay-put o 'isearch-open-invisible
'semantic-set-tag-folded-isearch)))
))
'semantic-set-tag-folded-isearch)))))
(declare-function semantic-current-tag "semantic/find")
......
......@@ -336,13 +336,10 @@ This mode provides a nice context menu on the include statements."
(let ((ol (semantic-decorate-tag tag
(semantic-tag-start tag)
(semantic-tag-end tag)
face))
)
(semantic-overlay-put ol 'mouse-face 'highlight)
(semantic-overlay-put ol 'keymap map)
(semantic-overlay-put ol 'help-echo
"Header File : mouse-3 - Context menu")
))))
face)))
(overlay-put ol 'mouse-face 'highlight)
(overlay-put ol 'keymap map)
(overlay-put ol 'help-echo "Header File : mouse-3 - Context menu")))))
;;; Regular Include Functions
;;
......@@ -441,7 +438,7 @@ Argument EVENT describes the event that caused this function to be called."
;(goto-char (window-start win))
(mouse-set-point event)
(sit-for 0)
(semantic-popup-menu semantic-decoration-on-include-menu)
(popup-menu semantic-decoration-on-include-menu)
)
(select-window startwin)))
......@@ -525,7 +522,7 @@ Argument EVENT describes the event that caused this function to be called."
;(goto-char (window-start win))
(mouse-set-point event)
(sit-for 0)
(semantic-popup-menu semantic-decoration-on-unknown-include-menu)
(popup-menu semantic-decoration-on-unknown-include-menu)
)
(select-window startwin)))
......@@ -568,7 +565,7 @@ Argument EVENT describes the event that caused this function to be called."
;(goto-char (window-start win))
(mouse-set-point event)
(sit-for 0)
(semantic-popup-menu semantic-decoration-on-fileless-include-menu)
(popup-menu semantic-decoration-on-fileless-include-menu)
)
(select-window startwin)))
......@@ -632,7 +629,7 @@ Argument EVENT describes the event that caused this function to be called."
;(goto-char (window-start win))
(mouse-set-point event)
(sit-for 0)
(semantic-popup-menu semantic-decoration-on-unparsed-include-menu)
(popup-menu semantic-decoration-on-unparsed-include-menu)
)
(select-window startwin)))
......
......@@ -76,20 +76,20 @@ add items to this list."
;;
(defsubst semantic-decoration-p (object)
"Return non-nil if OBJECT is a tag decoration."
(and (semantic-overlay-p object)
(semantic-overlay-get object 'semantic-decoration)))
(and (overlayp object)
(overlay-get object 'semantic-decoration)))
(defsubst semantic-decoration-set-property (deco property value)
"Set the DECO decoration's PROPERTY to VALUE.
Return DECO."
(cl-assert (semantic-decoration-p deco))
(semantic-overlay-put deco property value)
(overlay-put deco property value)
deco)
(defsubst semantic-decoration-get-property (deco property)
"Return the DECO decoration's PROPERTY value."
(cl-assert (semantic-decoration-p deco))
(semantic-overlay-get deco property))
(overlay-get deco property))
(defsubst semantic-decoration-set-face (deco face)
"Set the face of the decoration DECO to FACE.
......@@ -114,7 +114,7 @@ Return DECO."
"Move the decoration DECO on the region between BEGIN and END.
Return DECO."
(cl-assert (semantic-decoration-p deco))
(semantic-overlay-move deco begin end)
(move-overlay deco begin end)
deco)
;;; Tag decoration
......@@ -127,7 +127,7 @@ Return the overlay that makes up the new decoration."
(let ((deco (semantic-tag-create-secondary-overlay tag)))
;; We do not use the unlink property because we do not want to
;; save the highlighting information in the DB.
(semantic-overlay-put deco 'semantic-decoration t)
(overlay-put deco 'semantic-decoration t)
(semantic-decoration-move deco begin end)
(semantic-decoration-set-face deco face)
deco))
......@@ -156,9 +156,9 @@ BUFFER defaults to the current buffer.
Should be used to flush decorations that might remain in BUFFER, for
example, after tags have been refreshed."
(with-current-buffer (or buffer (current-buffer))
(dolist (o (semantic-overlays-in (point-min) (point-max)))
(dolist (o (overlays-in (point-min) (point-max)))
(and (semantic-decoration-p o)
(semantic-overlay-delete o)))))
(delete-overlay o)))))
(defun semantic-decorate-clear-decorations (tag-list)
"Remove decorations found in tags in TAG-LIST."
......
......@@ -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
......
......@@ -70,10 +70,10 @@ from largest to smallest via the start location."
(set-buffer (marker-buffer positionormarker))
(if (bufferp buffer)
(set-buffer buffer))))
(let ((ol (semantic-overlays-at (or positionormarker (point))))
(let ((ol (overlays-at (or positionormarker (point))))
(ret nil))
(while ol
(let ((tmp (semantic-overlay-get (car ol) 'semantic)))
(let ((tmp (overlay-get (car ol) 'semantic)))
(when (and tmp
;; We don't need with-position because no tag w/out
;; a position could exist in an overlay.
......@@ -90,10 +90,10 @@ Uses overlays to determine position.
Optional BUFFER argument specifies the buffer to use."
(save-excursion
(if buffer (set-buffer buffer))
(let ((ol (semantic-overlays-in start end))
(let ((ol (overlays-in start end))
(ret nil))
(while ol
(let ((tmp (semantic-overlay-get (car ol) 'semantic)))
(let ((tmp (overlay-get (car ol) 'semantic)))
(when (and tmp
;; See above about position
(semantic-tag-p tmp))
......@@ -112,22 +112,22 @@ not the current tag."
(if (not start) (setq start (point)))
(let ((os start) (ol nil))
(while (and os (< os (point-max)) (not ol))
(setq os (semantic-overlay-next-change os))
(setq os (next-overlay-change os))
(when os
;; Get overlays at position