summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2019-06-20 03:14:11 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2019-06-20 12:51:39 +0200
commit31b1e4cbdc402b7465dfa009dc3379247a4468d8 (patch)
tree32e619ab669064aee70c6ab691ba71b44dd0833b
parente383aade0f215b3829600f8c2cb045aa81511042 (diff)
downloademacs-31b1e4cbdc402b7465dfa009dc3379247a4468d8.tar.gz
Throughout cedet, don't use semantic-overlay-* compat aliases
-rw-r--r--lisp/cedet/semantic.el2
-rw-r--r--lisp/cedet/semantic/complete.el52
-rw-r--r--lisp/cedet/semantic/db-debug.el2
-rw-r--r--lisp/cedet/semantic/db-find.el2
-rw-r--r--lisp/cedet/semantic/debug.el14
-rw-r--r--lisp/cedet/semantic/decorate.el66
-rw-r--r--lisp/cedet/semantic/decorate/include.el19
-rw-r--r--lisp/cedet/semantic/decorate/mode.el16
-rw-r--r--lisp/cedet/semantic/edit.el56
-rw-r--r--lisp/cedet/semantic/find.el36
-rw-r--r--lisp/cedet/semantic/fw.el24
-rw-r--r--lisp/cedet/semantic/grammar.el6
-rw-r--r--lisp/cedet/semantic/idle.el12
-rw-r--r--lisp/cedet/semantic/imenu.el8
-rw-r--r--lisp/cedet/semantic/lex-spp.el2
-rw-r--r--lisp/cedet/semantic/lex.el10
-rw-r--r--lisp/cedet/semantic/senator.el6
-rw-r--r--lisp/cedet/semantic/symref/list.el20
-rw-r--r--lisp/cedet/semantic/tag.el37
-rw-r--r--lisp/cedet/semantic/util-modes.el60
-rw-r--r--lisp/cedet/semantic/util.el10
-rw-r--r--test/manual/cedet/srecode-tests.el4
22 files changed, 227 insertions, 237 deletions
diff --git a/lisp/cedet/semantic.el b/lisp/cedet/semantic.el
index 5e05d86d113..8ffdbf0ff2a 100644
--- a/lisp/cedet/semantic.el
+++ b/lisp/cedet/semantic.el
@@ -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))
)
diff --git a/lisp/cedet/semantic/complete.el b/lisp/cedet/semantic/complete.el
index ec377f0103b..bf86c3f9a37 100644
--- a/lisp/cedet/semantic/complete.el
+++ b/lisp/cedet/semantic/complete.el
@@ -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.
diff --git a/lisp/cedet/semantic/db-debug.el b/lisp/cedet/semantic/db-debug.el
index bbff2963314..7635c649c23 100644
--- a/lisp/cedet/semantic/db-debug.el
+++ b/lisp/cedet/semantic/db-debug.el
@@ -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
diff --git a/lisp/cedet/semantic/db-find.el b/lisp/cedet/semantic/db-find.el
index 084085e656a..54935c3a7c7 100644
--- a/lisp/cedet/semantic/db-find.el
+++ b/lisp/cedet/semantic/db-find.el
@@ -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)
diff --git a/lisp/cedet/semantic/debug.el b/lisp/cedet/semantic/debug.el
index b5bb00d8cda..1b1639cbf14 100644
--- a/lisp/cedet/semantic/debug.el
+++ b/lisp/cedet/semantic/debug.el
@@ -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
diff --git a/lisp/cedet/semantic/decorate.el b/lisp/cedet/semantic/decorate.el
index 1368c63739d..1a7cd77d1e0 100644
--- a/lisp/cedet/semantic/decorate.el
+++ b/lisp/cedet/semantic/decorate.el
@@ -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")
diff --git a/lisp/cedet/semantic/decorate/include.el b/lisp/cedet/semantic/decorate/include.el
index 82dc887ef3e..aa870b663c0 100644
--- a/lisp/cedet/semantic/decorate/include.el
+++ b/lisp/cedet/semantic/decorate/include.el
@@ -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)))
diff --git a/lisp/cedet/semantic/decorate/mode.el b/lisp/cedet/semantic/decorate/mode.el
index be1d5db069f..4e3ca2c6ee3 100644
--- a/lisp/cedet/semantic/decorate/mode.el
+++ b/lisp/cedet/semantic/decorate/mode.el
@@ -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."
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
diff --git a/lisp/cedet/semantic/find.el b/lisp/cedet/semantic/find.el
index 57a296dfa94..ec38a37295f 100644
--- a/lisp/cedet/semantic/find.el
+++ b/lisp/cedet/semantic/find.el
@@ -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
- (setq ol (semantic-overlays-at os))
+ (setq ol (overlays-at os))
;; find the overlay that belongs to semantic
;; and starts at the found position.
(while (and ol (listp ol))
- (if (and (semantic-overlay-get (car ol) 'semantic)
+ (if (and (overlay-get (car ol) 'semantic)
(semantic-tag-p
- (semantic-overlay-get (car ol) 'semantic))
- (= (semantic-overlay-start (car ol)) os))
+ (overlay-get (car ol) 'semantic))
+ (= (overlay-start (car ol)) os))
(setq ol (car ol)))
(when (listp ol) (setq ol (cdr ol))))))
;; convert ol to a tag
- (when (and ol (semantic-tag-p (semantic-overlay-get ol 'semantic)))
- (semantic-overlay-get ol 'semantic)))))
+ (when (and ol (semantic-tag-p (overlay-get ol 'semantic)))
+ (overlay-get ol 'semantic)))))
;;;###autoload
(defun semantic-find-tag-by-overlay-prev (&optional start buffer)
@@ -139,25 +139,25 @@ not the current tag."
(if (not start) (setq start (point)))
(let ((os start) (ol nil))
(while (and os (> os (point-min)) (not ol))
- (setq os (semantic-overlay-previous-change os))
+ (setq os (previous-overlay-change os))
(when os
;; Get overlays at position
- (setq ol (semantic-overlays-at (1- os)))
+ (setq ol (overlays-at (1- os)))
;; find the overlay that belongs to semantic
;; and ENDS at the found position.
;;
;; Use end because we are going backward.
(while (and ol (listp ol))
- (if (and (semantic-overlay-get (car ol) 'semantic)
+ (if (and (overlay-get (car ol) 'semantic)
(semantic-tag-p
- (semantic-overlay-get (car ol) 'semantic))
- (= (semantic-overlay-end (car ol)) os))
+ (overlay-get (car ol) 'semantic))
+ (= (overlay-end (car ol)) os))
(setq ol (car ol)))
(when (listp ol) (setq ol (cdr ol))))))
;; convert ol to a tag
(when (and ol
- (semantic-tag-p (semantic-overlay-get ol 'semantic)))
- (semantic-overlay-get ol 'semantic)))))
+ (semantic-tag-p (overlay-get ol 'semantic)))
+ (overlay-get ol 'semantic)))))
;;;###autoload
(defun semantic-find-tag-parent-by-overlay (tag)
diff --git a/lisp/cedet/semantic/fw.el b/lisp/cedet/semantic/fw.el
index a9a014fa370..5b7386b7a29 100644
--- a/lisp/cedet/semantic/fw.el
+++ b/lisp/cedet/semantic/fw.el
@@ -76,8 +76,8 @@
(defun semantic-delete-overlay-maybe (overlay)
"Delete OVERLAY if it is a semantic token overlay."
- (if (semantic-overlay-get overlay 'semantic)
- (semantic-overlay-delete overlay)))
+ (if (overlay-get overlay 'semantic)
+ (delete-overlay overlay)))
;;; Menu Item compatibility
;;
@@ -104,10 +104,10 @@ Possible Lifespans are:
(or (memq lifespan '(end-of-command exit-cache-zone))
(error "semantic-cache-data-to-buffer: Unknown LIFESPAN: %s"
lifespan))
- (let ((o (semantic-make-overlay start end buffer)))
- (semantic-overlay-put o 'cache-name name)
- (semantic-overlay-put o 'cached-value value)
- (semantic-overlay-put o 'lifespan lifespan)
+ (let ((o (make-overlay start end buffer)))
+ (overlay-put o 'cache-name name)
+ (overlay-put o 'cached-value value)
+ (overlay-put o 'lifespan lifespan)
(setq semantic-cache-data-overlays
(cons o semantic-cache-data-overlays))
;;(message "Adding to cache: %s" o)
@@ -121,14 +121,14 @@ Remove self from `post-command-hook' if it is empty."
(oldcache semantic-cache-data-overlays))
(while oldcache
(let* ((o (car oldcache))
- (life (semantic-overlay-get o 'lifespan))
+ (life (overlay-get o 'lifespan))
)
(if (or (eq life 'end-of-command)
(and (eq life 'exit-cache-zone)
- (not (member o (semantic-overlays-at (point))))))
+ (not (member o (overlays-at (point))))))
(progn
;;(message "Removing from cache: %s" o)
- (semantic-overlay-delete o)
+ (delete-overlay o)
)
(setq newcache (cons o newcache))))
(setq oldcache (cdr oldcache)))
@@ -143,14 +143,14 @@ Remove self from `post-command-hook' if it is empty."
"Get cached data with NAME from optional POINT."
(save-excursion
(if point (goto-char point))
- (let ((o (semantic-overlays-at (point)))
+ (let ((o (overlays-at (point)))
(ans nil))
(while (and (not ans) o)
- (if (equal (semantic-overlay-get (car o) 'cache-name) name)
+ (if (equal (overlay-get (car o) 'cache-name) name)
(setq ans (car o))
(setq o (cdr o))))
(when ans
- (semantic-overlay-get ans 'cached-value)))))
+ (overlay-get ans 'cached-value)))))
(defun semantic-test-data-cache ()
"Test the data cache."
diff --git a/lisp/cedet/semantic/grammar.el b/lisp/cedet/semantic/grammar.el
index 291291552f8..4237f9cef11 100644
--- a/lisp/cedet/semantic/grammar.el
+++ b/lisp/cedet/semantic/grammar.el
@@ -1292,9 +1292,9 @@ the change bounds to encompass the whole nonterminal tag."
(semantic-edits-os overlay)
(semantic-edits-oe overlay)))))
(if (semantic-tag-of-class-p outer 'nonterminal)
- (semantic-overlay-move overlay
- (semantic-tag-start outer)
- (semantic-tag-end outer)))))
+ (move-overlay overlay
+ (semantic-tag-start outer)
+ (semantic-tag-end outer)))))
(define-derived-mode semantic-grammar-mode
fundamental-mode "Semantic Grammar Framework"
diff --git a/lisp/cedet/semantic/idle.el b/lisp/cedet/semantic/idle.el
index bd4f80046f7..3df51052c00 100644
--- a/lisp/cedet/semantic/idle.el
+++ b/lisp/cedet/semantic/idle.el
@@ -849,18 +849,18 @@ visible, then highlight it."
;; just the stable version.
(pulse-flag nil)
)
- (cond ((semantic-overlay-p region)
- (with-current-buffer (semantic-overlay-buffer region)
+ (cond ((overlayp region)
+ (with-current-buffer (overlay-buffer region)
(save-excursion
- (goto-char (semantic-overlay-start region))
+ (goto-char (overlay-start region))
(when (pos-visible-in-window-p
(point) (get-buffer-window (current-buffer) 'visible))
- (if (< (semantic-overlay-end region) (point-at-eol))
+ (if (< (overlay-end region) (point-at-eol))
(pulse-momentary-highlight-overlay
region semantic-idle-symbol-highlight-face)
;; Not the same
(pulse-momentary-highlight-region
- (semantic-overlay-start region)
+ (overlay-start region)
(point-at-eol)
semantic-idle-symbol-highlight-face))))
))
@@ -1074,7 +1074,7 @@ be called."
(let ((old-window (selected-window))
(window (semantic-event-window event)))
(select-window window t)
- (semantic-popup-menu semantic-idle-breadcrumbs-popup-menu)
+ (popup-menu semantic-idle-breadcrumbs-popup-menu)
(select-window old-window)))
(defmacro semantic-idle-breadcrumbs--tag-function (function)
diff --git a/lisp/cedet/semantic/imenu.el b/lisp/cedet/semantic/imenu.el
index 027c9891cda..009d04dbd75 100644
--- a/lisp/cedet/semantic/imenu.el
+++ b/lisp/cedet/semantic/imenu.el
@@ -155,7 +155,7 @@ By default, a `type' has interesting children. In Texinfo, however, a
If TAG doesn't have an overlay, and instead as a vector of positions,
concoct a combination of file name, and position."
(let ((o (semantic-tag-overlay tag)))
- (if (not (semantic-overlay-p o))
+ (if (not (overlayp o))
(let ((v (make-vector 3 nil)))
(aset v 0 semantic-imenu-directory-current-file)
(aset v 1 (aref o 0))
@@ -170,9 +170,9 @@ Used to override function `imenu-default-goto-function' so that
we can continue to use overlays to maintain the current position.
Optional argument REST is some extra stuff."
(require 'pulse)
- (if (semantic-overlay-p position)
- (let ((os (semantic-overlay-start position))
- (ob (semantic-overlay-buffer position)))
+ (if (overlayp position)
+ (let ((os (overlay-start position))
+ (ob (overlay-buffer position)))
(if os
(progn
(if (not (eq ob (current-buffer)))
diff --git a/lisp/cedet/semantic/lex-spp.el b/lisp/cedet/semantic/lex-spp.el
index b704bd684e9..6fe33f93110 100644
--- a/lisp/cedet/semantic/lex-spp.el
+++ b/lisp/cedet/semantic/lex-spp.el
@@ -1092,7 +1092,7 @@ and variable state from the current buffer."
;; the originating buffer we are parsing. We need to do this every time
;; since the state changes.
(dolist (V important-vars)
- (set V (semantic-buffer-local-value V origbuff)))
+ (set V (buffer-local-value V origbuff)))
(insert text)
(goto-char (point-min))
diff --git a/lisp/cedet/semantic/lex.el b/lisp/cedet/semantic/lex.el
index 2690122f067..8dbc9e7ae83 100644
--- a/lisp/cedet/semantic/lex.el
+++ b/lisp/cedet/semantic/lex.el
@@ -686,9 +686,9 @@ displayed in the minibuffer. Press SPC to move to the next lexical token."
"Highlight the lexical TOKEN.
TOKEN is a lexical token with a START And END position.
Return the overlay."
- (let ((o (semantic-make-overlay (semantic-lex-token-start token)
- (semantic-lex-token-end token))))
- (semantic-overlay-put o 'face 'highlight)
+ (let ((o (make-overlay (semantic-lex-token-start token)
+ (semantic-lex-token-end token))))
+ (overlay-put o 'face 'highlight)
o))
;;; Lexical analyzer creation
@@ -752,11 +752,11 @@ a LOCAL option.")
(progn
(when token
(setq o (semantic-lex-highlight-token token)))
- (semantic-read-event
+ (read-event
(format "%S :: Depth: %d :: SPC - continue" token semantic-lex-current-depth))
)
(when o
- (semantic-overlay-delete o))))))
+ (delete-overlay o))))))
(defmacro define-lex (name doc &rest analyzers)
"Create a new lexical analyzer with NAME.
diff --git a/lisp/cedet/semantic/senator.el b/lisp/cedet/semantic/senator.el
index ebe171a3a7a..b36f801988b 100644
--- a/lisp/cedet/semantic/senator.el
+++ b/lisp/cedet/semantic/senator.el
@@ -148,14 +148,14 @@ Return nil otherwise."
"Return the tag before POS or one of its parent where to step."
(let (ol tag)
(while (and pos (> pos (point-min)) (not tag))
- (setq pos (semantic-overlay-previous-change pos))
+ (setq pos (previous-overlay-change pos))
(when pos
;; Get overlays at position
- (setq ol (semantic-overlays-at pos))
+ (setq ol (overlays-at pos))
;; find the overlay that belongs to semantic
;; and STARTS or ENDS at the found position.
(while (and ol (not tag))
- (setq tag (semantic-overlay-get (car ol) 'semantic))
+ (setq tag (overlay-get (car ol) 'semantic))
(unless (and tag (semantic-tag-p tag)
(or (= (semantic-tag-start tag) pos)
(= (semantic-tag-end tag) pos)))
diff --git a/lisp/cedet/semantic/symref/list.el b/lisp/cedet/semantic/symref/list.el
index ce656d61a48..133356ec625 100644
--- a/lisp/cedet/semantic/symref/list.el
+++ b/lisp/cedet/semantic/symref/list.el
@@ -379,8 +379,8 @@ BUTTON is the button that was clicked."
Hits are the line of code from the buffer, not the tag summar or file lines."
(save-excursion
(end-of-line)
- (let* ((ol (car (semantic-overlays-at (1- (point)))))) ;; trust this for now
- (when ol (semantic-overlay-get ol 'line)))))
+ (let* ((ol (car (overlays-at (1- (point)))))) ;; trust this for now
+ (when ol (overlay-get ol 'line)))))
;;; Keyboard Macros on a Hit
@@ -398,9 +398,9 @@ cursor to the beginning of that symbol, then record a macro as if
searchfor))
(ol (save-excursion
(end-of-line)
- (car (semantic-overlays-at (1- (point))))))
- (tag (when ol (semantic-overlay-get ol 'tag)))
- (line (when ol (semantic-overlay-get ol 'line))))
+ (car (overlays-at (1- (point))))))
+ (tag (when ol (overlay-get ol 'tag)))
+ (line (when ol (overlay-get ol 'line))))
(when (not line)
(error "Cannot create macro on a non-hit line"))
;; Go there, and do something useful.
@@ -468,9 +468,9 @@ Return the number of occurrences FUNCTION was operated upon."
(goto-char (point-min))
(while (not (eobp))
;; Is this line a "hit" line?
- (let* ((ol (car (semantic-overlays-at (1- (point))))) ;; trust this for now
- (tag (when ol (semantic-overlay-get ol 'tag)))
- (line (when ol (semantic-overlay-get ol 'line))))
+ (let* ((ol (car (overlays-at (1- (point))))) ;; trust this for now
+ (tag (when ol (overlay-get ol 'tag)))
+ (line (when ol (overlay-get ol 'line))))
(when line
;; The "line" means we have an open hit.
(with-current-buffer (semantic-tag-buffer tag)
@@ -493,8 +493,8 @@ Return the number of occurrences FUNCTION was operated upon."
(goto-char (point-min))
(while (re-search-forward "\\[-\\]" nil t)
(end-of-line)
- (let* ((ol (car (semantic-overlays-at (1- (point))))) ;; trust this for now
- (tag (when ol (semantic-overlay-get ol 'tag))))
+ (let* ((ol (car (overlays-at (1- (point))))) ;; trust this for now
+ (tag (when ol (overlay-get ol 'tag))))
;; If there is a tag, then close/open it.
(when tag
(semantic-symref-list-toggle-showing)
diff --git a/lisp/cedet/semantic/tag.el b/lisp/cedet/semantic/tag.el
index 1011d1c3689..ec8a800ec41 100644
--- a/lisp/cedet/semantic/tag.el
+++ b/lisp/cedet/semantic/tag.el
@@ -148,15 +148,15 @@ That function is for internal use only."
(defsubst semantic-tag-start (tag)
"Return the start location of TAG."
(let ((o (semantic-tag-overlay tag)))
- (if (semantic-overlay-p o)
- (semantic-overlay-start o)
+ (if (overlayp o)
+ (overlay-start o)
(aref o 0))))
(defsubst semantic-tag-end (tag)
"Return the end location of TAG."
(let ((o (semantic-tag-overlay tag)))
- (if (semantic-overlay-p o)
- (semantic-overlay-end o)
+ (if (overlayp o)
+ (overlay-end o)
(aref o 1))))
(defsubst semantic-tag-bounds (tag)
@@ -167,8 +167,8 @@ That function is for internal use only."
(defun semantic-tag-set-bounds (tag start end)
"In TAG, set the START and END location of data it describes."
(let ((o (semantic-tag-overlay tag)))
- (if (semantic-overlay-p o)
- (semantic-overlay-move o start end)
+ (if (overlayp o)
+ (move-overlay o start end)
(semantic--tag-set-overlay tag (vector start end)))))
(defun semantic-tag-in-buffer-p (tag)
@@ -176,9 +176,9 @@ That function is for internal use only."
If a tag is not in a buffer, return nil."
(let ((o (semantic-tag-overlay tag)))
;; TAG is currently linked to a buffer, return it.
- (when (and (semantic-overlay-p o)
- (semantic-overlay-live-p o))
- (semantic-overlay-buffer o))))
+ (when (and (overlayp o)
+ (overlay-buffer o))
+ (overlay-buffer o))))
(defsubst semantic--tag-get-property (tag property)
"From TAG, extract the value of PROPERTY.
@@ -344,8 +344,8 @@ struct or union."
"Return non-nil if TAG has positional information."
(and (semantic-tag-p tag)
(let ((o (semantic-tag-overlay tag)))
- (or (and (semantic-overlay-p o)
- (semantic-overlay-live-p o))
+ (or (and (overlayp o)
+ (overlay-buffer o))
(arrayp o)))))
(defun semantic-equivalent-tag-p (tag1 tag2)
@@ -647,7 +647,7 @@ This runs the tag hook `unlink-copy-hook'."
;; Call the unlink-copy hook. This should tell tools that
;; this tag is not part of any buffer.
- (when (semantic-overlay-p (semantic-tag-overlay tag))
+ (when (overlayp (semantic-tag-overlay tag))
(semantic--tag-run-hooks copy 'unlink-copy-hook))
)
copy))
@@ -1114,11 +1114,11 @@ This function is for internal use only."
This function is for internal use only."
(when (semantic-tag-p tag)
(let ((o (semantic-tag-overlay tag)))
- (when (semantic-overlay-p o)
+ (when (overlayp o)
(semantic--tag-set-overlay
- tag (vector (semantic-overlay-start o)
- (semantic-overlay-end o)))
- (semantic-overlay-delete o))
+ tag (vector (overlay-start o)
+ (overlay-end o)))
+ (delete-overlay o))
;; Look for a link hook on TAG.
(semantic--tag-run-hooks tag 'unlink-hook)
;; Fix the sub-tags which contain overlays.
@@ -1136,10 +1136,9 @@ This function is for internal use only."
(when (semantic-tag-p tag)
(let ((o (semantic-tag-overlay tag)))
(when (and (vectorp o) (= (length o) 2))
- (setq o (semantic-make-overlay (aref o 0) (aref o 1)
- (current-buffer)))
+ (setq o (make-overlay (aref o 0) (aref o 1) (current-buffer)))
(semantic--tag-set-overlay tag o)
- (semantic-overlay-put o 'semantic tag)
+ (overlay-put o 'semantic tag)
;; Clear the :filename property
(semantic--tag-put-property tag :filename nil))
;; Look for a link hook on TAG.
diff --git a/lisp/cedet/semantic/util-modes.el b/lisp/cedet/semantic/util-modes.el
index e345bd53e42..954181c2cd9 100644
--- a/lisp/cedet/semantic/util-modes.el
+++ b/lisp/cedet/semantic/util-modes.el
@@ -194,7 +194,7 @@ too an interactive function used to toggle the mode."
"Function set into `semantic-edits-new-change-hook'.
Argument OVERLAY is the overlay created to mark the change.
This function will set the face property on this overlay."
- (semantic-overlay-put overlay 'face 'semantic-highlight-edits-face))
+ (overlay-put overlay 'face 'semantic-highlight-edits-face))
(defvar semantic-highlight-edits-mode-map
(let ((km (make-sparse-keymap)))
@@ -260,11 +260,11 @@ The face is used in `semantic-show-unmatched-syntax-mode'."
(defsubst semantic-unmatched-syntax-overlay-p (overlay)
"Return non-nil if OVERLAY is an unmatched syntax one."
- (eq (semantic-overlay-get overlay 'semantic) 'unmatched))
+ (eq (overlay-get overlay 'semantic) 'unmatched))
(defun semantic-showing-unmatched-syntax-p ()
"Return non-nil if an unmatched syntax overlay was found in buffer."
- (let ((ol (semantic-overlays-in (point-min) (point-max)))
+ (let ((ol (overlays-in (point-min) (point-max)))
found)
(while (and ol (not found))
(setq found (semantic-unmatched-syntax-overlay-p (car ol))
@@ -275,13 +275,13 @@ The face is used in `semantic-show-unmatched-syntax-mode'."
"Fetch a list of unmatched lexical tokens from the current buffer.
Uses the overlays which have accurate bounds, and rebuilds what was
originally passed in."
- (let ((ol (semantic-overlays-in (point-min) (point-max)))
+ (let ((ol (overlays-in (point-min) (point-max)))
(ustc nil))
(while ol
(if (semantic-unmatched-syntax-overlay-p (car ol))
(setq ustc (cons (cons 'thing
- (cons (semantic-overlay-start (car ol))
- (semantic-overlay-end (car ol))))
+ (cons (overlay-start (car ol))
+ (overlay-end (car ol))))
ustc)))
(setq ol (cdr ol)))
(nreverse ustc))
@@ -289,10 +289,10 @@ originally passed in."
(defun semantic-clean-unmatched-syntax-in-region (beg end)
"Remove all unmatched syntax overlays between BEG and END."
- (let ((ol (semantic-overlays-in beg end)))
+ (let ((ol (overlays-in beg end)))
(while ol
(if (semantic-unmatched-syntax-overlay-p (car ol))
- (semantic-overlay-delete (car ol)))
+ (delete-overlay (car ol)))
(setq ol (cdr ol)))))
(defsubst semantic-clean-unmatched-syntax-in-buffer ()
@@ -317,10 +317,10 @@ This will highlight elements in SYNTAX as unmatched syntax."
(if syntax
(let (o)
(while syntax
- (setq o (semantic-make-overlay (semantic-lex-token-start (car syntax))
- (semantic-lex-token-end (car syntax))))
- (semantic-overlay-put o 'semantic 'unmatched)
- (semantic-overlay-put o 'face 'semantic-unmatched-syntax-face)
+ (setq o (make-overlay (semantic-lex-token-start (car syntax))
+ (semantic-lex-token-end (car syntax))))
+ (overlay-put o 'semantic 'unmatched)
+ (overlay-put o 'face 'semantic-unmatched-syntax-face)
(setq syntax (cdr syntax))))
))
@@ -331,10 +331,10 @@ Do not search past BOUND if non-nil."
(goto-char point)
(let ((os point) (ol nil))
(while (and os (< os (or bound (point-max))) (not ol))
- (setq os (semantic-overlay-next-change os))
+ (setq os (next-overlay-change os))
(when os
;; Get overlays at position
- (setq ol (semantic-overlays-at os))
+ (setq ol (overlays-at os))
;; find the overlay that belongs to semantic
;; and starts at the found position.
(while (and ol (listp ol))
@@ -398,7 +398,7 @@ non-nil if the minor mode is enabled.
(interactive)
(let ((o (semantic-next-unmatched-syntax (point))))
(if o
- (goto-char (semantic-overlay-start o)))))
+ (goto-char (overlay-start o)))))
;;;;
@@ -892,7 +892,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-highlight-func-popup-menu)
+ (popup-menu semantic-highlight-func-popup-menu)
)
(select-window startwin)))
@@ -946,19 +946,19 @@ If the current tag for this buffer is different from the last time this
function was called, move the overlay."
(when (and (not (minibufferp))
(or (not semantic-highlight-func-ct-overlay)
- (eq (semantic-overlay-buffer
+ (eq (overlay-buffer
semantic-highlight-func-ct-overlay)
(current-buffer))))
(let* ((tag (semantic-stickyfunc-tag-to-stick))
(ol semantic-highlight-func-ct-overlay))
(when (not ol)
;; No overlay in this buffer. Make one.
- (setq ol (semantic-make-overlay (point-min) (point-min)
- (current-buffer) t nil))
- (semantic-overlay-put ol 'highlight-func t)
- (semantic-overlay-put ol 'face 'semantic-highlight-func-current-tag-face)
- (semantic-overlay-put ol 'keymap semantic-highlight-func-mode-map)
- (semantic-overlay-put ol 'help-echo
+ (setq ol (make-overlay (point-min) (point-min)
+ (current-buffer) t nil))
+ (overlay-put ol 'highlight-func t)
+ (overlay-put ol 'face 'semantic-highlight-func-current-tag-face)
+ (overlay-put ol 'keymap semantic-highlight-func-mode-map)
+ (overlay-put ol 'help-echo
"Current Function : mouse-3 - Context menu")
(setq semantic-highlight-func-ct-overlay ol)
)
@@ -967,20 +967,16 @@ function was called, move the overlay."
(if (or (not tag) disable)
;; No tag, make the overlay go away.
(progn
- (semantic-overlay-put ol 'tag nil)
- (semantic-overlay-move ol (point-min) (point-min) (current-buffer))
- )
+ (overlay-put ol 'tag nil)
+ (move-overlay ol (point-min) (point-min) (current-buffer)))
;; We have a tag, if it is the same, do nothing.
- (unless (eq (semantic-overlay-get ol 'tag) tag)
+ (unless (eq (overlay-get ol 'tag) tag)
(save-excursion
(goto-char (semantic-tag-start tag))
(search-forward (semantic-tag-name tag) nil t)
- (semantic-overlay-put ol 'tag tag)
- (semantic-overlay-move ol (point-at-bol) (point-at-eol))
- )
- )
- )))
+ (overlay-put ol 'tag tag)
+ (move-overlay ol (point-at-bol) (point-at-eol)))))))
nil)
(semantic-add-minor-mode 'semantic-highlight-func-mode
diff --git a/lisp/cedet/semantic/util.el b/lisp/cedet/semantic/util.el
index 6b1cc61198c..6cae8a8bdf9 100644
--- a/lisp/cedet/semantic/util.el
+++ b/lisp/cedet/semantic/util.el
@@ -328,8 +328,8 @@ If TAG is not specified, use the tag at point."
(if (semantic-tag-p tok)
(if (semantic-tag-with-position-p tok)
(let ((o (semantic-tag-overlay tok)))
- (if (and (semantic-overlay-p o)
- (not (semantic-overlay-live-p o)))
+ (if (and (overlayp o)
+ (not (overlay-buffer o)))
(let ((debug-on-error t))
(error "Tag %s is invalid!" (semantic-tag-name tok)))
;; else, tag is OK.
@@ -348,7 +348,7 @@ NOTFIRST indicates that this was not the first call in the recursive use."
(interactive)
(if (and (not cache) (not over) (not notfirst))
(setq cache semantic--buffer-cache
- over (semantic-overlays-in (point-min) (point-max))))
+ over (overlays-in (point-min) (point-max))))
(while cache
(let ((chil (semantic-tag-components-with-overlays (car cache))))
(if (not (memq (semantic-tag-overlay (car cache)) over))
@@ -361,8 +361,8 @@ NOTFIRST indicates that this was not the first call in the recursive use."
;; Strip out all overlays which aren't semantic overlays
(let ((o nil))
(while over
- (when (and (semantic-overlay-get (car over) 'semantic)
- (not (eq (semantic-overlay-get (car over) 'semantic)
+ (when (and (overlay-get (car over) 'semantic)
+ (not (eq (overlay-get (car over) 'semantic)
'unmatched)))
(setq o (cons (car over) o)))
(setq over (cdr over)))
diff --git a/test/manual/cedet/srecode-tests.el b/test/manual/cedet/srecode-tests.el
index b849d7a6039..63d10973e51 100644
--- a/test/manual/cedet/srecode-tests.el
+++ b/test/manual/cedet/srecode-tests.el
@@ -68,13 +68,13 @@ It is filled with some text."
(when (or (not (slot-boundp f 'overlay)) (not (oref f overlay)))
(error "Field test: Overlay info not created for field"))
- (when (and (overlay-p (oref f overlay))
+ (when (and (overlayp (oref f overlay))
(not (overlay-get (oref f overlay) 'srecode-init-only)))
(error "Field creation overlay is not tagged w/ init flag"))
(srecode-overlaid-activate f)
- (when (or (not (overlay-p (oref f overlay)))
+ (when (or (not (overlayp (oref f overlay)))
(overlay-get (oref f overlay) 'srecode-init-only))
(error "New field overlay not created during activation"))