diff options
| author | Lars Ingebrigtsen | 2019-06-20 03:14:11 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2019-06-20 12:51:39 +0200 |
| commit | 31b1e4cbdc402b7465dfa009dc3379247a4468d8 (patch) | |
| tree | 32e619ab669064aee70c6ab691ba71b44dd0833b | |
| parent | e383aade0f215b3829600f8c2cb045aa81511042 (diff) | |
| download | emacs-31b1e4cbdc402b7465dfa009dc3379247a4468d8.tar.gz emacs-31b1e4cbdc402b7465dfa009dc3379247a4468d8.zip | |
Throughout cedet, don't use semantic-overlay-* compat aliases
| -rw-r--r-- | lisp/cedet/semantic.el | 2 | ||||
| -rw-r--r-- | lisp/cedet/semantic/complete.el | 52 | ||||
| -rw-r--r-- | lisp/cedet/semantic/db-debug.el | 2 | ||||
| -rw-r--r-- | lisp/cedet/semantic/db-find.el | 2 | ||||
| -rw-r--r-- | lisp/cedet/semantic/debug.el | 14 | ||||
| -rw-r--r-- | lisp/cedet/semantic/decorate.el | 66 | ||||
| -rw-r--r-- | lisp/cedet/semantic/decorate/include.el | 19 | ||||
| -rw-r--r-- | lisp/cedet/semantic/decorate/mode.el | 16 | ||||
| -rw-r--r-- | lisp/cedet/semantic/edit.el | 56 | ||||
| -rw-r--r-- | lisp/cedet/semantic/find.el | 36 | ||||
| -rw-r--r-- | lisp/cedet/semantic/fw.el | 24 | ||||
| -rw-r--r-- | lisp/cedet/semantic/grammar.el | 6 | ||||
| -rw-r--r-- | lisp/cedet/semantic/idle.el | 12 | ||||
| -rw-r--r-- | lisp/cedet/semantic/imenu.el | 8 | ||||
| -rw-r--r-- | lisp/cedet/semantic/lex-spp.el | 2 | ||||
| -rw-r--r-- | lisp/cedet/semantic/lex.el | 10 | ||||
| -rw-r--r-- | lisp/cedet/semantic/senator.el | 6 | ||||
| -rw-r--r-- | lisp/cedet/semantic/symref/list.el | 20 | ||||
| -rw-r--r-- | lisp/cedet/semantic/tag.el | 37 | ||||
| -rw-r--r-- | lisp/cedet/semantic/util-modes.el | 60 | ||||
| -rw-r--r-- | lisp/cedet/semantic/util.el | 10 | ||||
| -rw-r--r-- | test/manual/cedet/srecode-tests.el | 4 |
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." | |||
| 510 | (semantic-clear-parser-warnings) | 510 | (semantic-clear-parser-warnings) |
| 511 | ;; Nuke all semantic overlays. This is faster than deleting based | 511 | ;; Nuke all semantic overlays. This is faster than deleting based |
| 512 | ;; on our data structure. | 512 | ;; on our data structure. |
| 513 | (let ((l (semantic-overlay-lists))) | 513 | (let ((l (overlay-lists))) |
| 514 | (mapc 'semantic-delete-overlay-maybe (car l)) | 514 | (mapc 'semantic-delete-overlay-maybe (car l)) |
| 515 | (mapc 'semantic-delete-overlay-maybe (cdr l)) | 515 | (mapc 'semantic-delete-overlay-maybe (cdr l)) |
| 516 | ) | 516 | ) |
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 @@ | |||
| 127 | (defun semantic-completion-inline-active-p () | 127 | (defun semantic-completion-inline-active-p () |
| 128 | "Non-nil if inline completion is active." | 128 | "Non-nil if inline completion is active." |
| 129 | (when (and semantic-complete-inline-overlay | 129 | (when (and semantic-complete-inline-overlay |
| 130 | (not (semantic-overlay-live-p semantic-complete-inline-overlay))) | 130 | (not (overlay-buffer semantic-complete-inline-overlay))) |
| 131 | (semantic-overlay-delete semantic-complete-inline-overlay) | 131 | (delete-overlay semantic-complete-inline-overlay) |
| 132 | (setq semantic-complete-inline-overlay nil)) | 132 | (setq semantic-complete-inline-overlay nil)) |
| 133 | semantic-complete-inline-overlay) | 133 | semantic-complete-inline-overlay) |
| 134 | 134 | ||
| @@ -574,8 +574,8 @@ The face is used in `semantic-complete-inline-tag-engine'." | |||
| 574 | (defun semantic-complete-inline-text () | 574 | (defun semantic-complete-inline-text () |
| 575 | "Return the text that is being completed inline. | 575 | "Return the text that is being completed inline. |
| 576 | Similar to `minibuffer-contents' when completing in the minibuffer." | 576 | Similar to `minibuffer-contents' when completing in the minibuffer." |
| 577 | (let ((s (semantic-overlay-start semantic-complete-inline-overlay)) | 577 | (let ((s (overlay-start semantic-complete-inline-overlay)) |
| 578 | (e (semantic-overlay-end semantic-complete-inline-overlay))) | 578 | (e (overlay-end semantic-complete-inline-overlay))) |
| 579 | (if (= s e) | 579 | (if (= s e) |
| 580 | "" | 580 | "" |
| 581 | (buffer-substring-no-properties s e )))) | 581 | (buffer-substring-no-properties s e )))) |
| @@ -583,8 +583,8 @@ Similar to `minibuffer-contents' when completing in the minibuffer." | |||
| 583 | (defun semantic-complete-inline-delete-text () | 583 | (defun semantic-complete-inline-delete-text () |
| 584 | "Delete the text currently being completed in the current buffer." | 584 | "Delete the text currently being completed in the current buffer." |
| 585 | (delete-region | 585 | (delete-region |
| 586 | (semantic-overlay-start semantic-complete-inline-overlay) | 586 | (overlay-start semantic-complete-inline-overlay) |
| 587 | (semantic-overlay-end semantic-complete-inline-overlay))) | 587 | (overlay-end semantic-complete-inline-overlay))) |
| 588 | 588 | ||
| 589 | (defun semantic-complete-inline-done () | 589 | (defun semantic-complete-inline-done () |
| 590 | "This completion thing is DONE, OR, insert a newline." | 590 | "This completion thing is DONE, OR, insert a newline." |
| @@ -630,11 +630,11 @@ Similar to `minibuffer-contents' when completing in the minibuffer." | |||
| 630 | (semantic-displayor-cleanup semantic-completion-display-engine)) | 630 | (semantic-displayor-cleanup semantic-completion-display-engine)) |
| 631 | 631 | ||
| 632 | (when semantic-complete-inline-overlay | 632 | (when semantic-complete-inline-overlay |
| 633 | (let ((wc (semantic-overlay-get semantic-complete-inline-overlay | 633 | (let ((wc (overlay-get semantic-complete-inline-overlay |
| 634 | 'window-config-start)) | 634 | 'window-config-start)) |
| 635 | (buf (semantic-overlay-buffer semantic-complete-inline-overlay)) | 635 | (buf (overlay-buffer semantic-complete-inline-overlay)) |
| 636 | ) | 636 | ) |
| 637 | (semantic-overlay-delete semantic-complete-inline-overlay) | 637 | (delete-overlay semantic-complete-inline-overlay) |
| 638 | (setq semantic-complete-inline-overlay nil) | 638 | (setq semantic-complete-inline-overlay nil) |
| 639 | ;; DONT restore the window configuration if we just | 639 | ;; DONT restore the window configuration if we just |
| 640 | ;; switched windows! | 640 | ;; switched windows! |
| @@ -680,10 +680,10 @@ a reasonable distance." | |||
| 680 | ;;(message "Inline Hook installed, but overlay deleted.") | 680 | ;;(message "Inline Hook installed, but overlay deleted.") |
| 681 | (semantic-complete-inline-exit)) | 681 | (semantic-complete-inline-exit)) |
| 682 | ;; Exit if commands caused us to exit the area of interest | 682 | ;; Exit if commands caused us to exit the area of interest |
| 683 | (let ((os (semantic-overlay-get semantic-complete-inline-overlay 'semantic-original-start)) | 683 | (let ((os (overlay-get semantic-complete-inline-overlay 'semantic-original-start)) |
| 684 | (s (semantic-overlay-start semantic-complete-inline-overlay)) | 684 | (s (overlay-start semantic-complete-inline-overlay)) |
| 685 | (e (semantic-overlay-end semantic-complete-inline-overlay)) | 685 | (e (overlay-end semantic-complete-inline-overlay)) |
| 686 | (b (semantic-overlay-buffer semantic-complete-inline-overlay)) | 686 | (b (overlay-buffer semantic-complete-inline-overlay)) |
| 687 | (txt nil) | 687 | (txt nil) |
| 688 | ) | 688 | ) |
| 689 | (cond | 689 | (cond |
| @@ -758,17 +758,17 @@ END is at the end of the current symbol being completed." | |||
| 758 | semantic-completion-display-engine displayor) | 758 | semantic-completion-display-engine displayor) |
| 759 | ;; Create an overlay | 759 | ;; Create an overlay |
| 760 | (setq semantic-complete-inline-overlay | 760 | (setq semantic-complete-inline-overlay |
| 761 | (semantic-make-overlay start end buffer nil t)) | 761 | (make-overlay start end buffer nil t)) |
| 762 | (semantic-overlay-put semantic-complete-inline-overlay | 762 | (overlay-put semantic-complete-inline-overlay |
| 763 | 'face | 763 | 'face |
| 764 | 'semantic-complete-inline-face) | 764 | 'semantic-complete-inline-face) |
| 765 | (semantic-overlay-put semantic-complete-inline-overlay | 765 | (overlay-put semantic-complete-inline-overlay |
| 766 | 'window-config-start | 766 | 'window-config-start |
| 767 | (current-window-configuration)) | 767 | (current-window-configuration)) |
| 768 | ;; Save the original start. We need to exit completion if START | 768 | ;; Save the original start. We need to exit completion if START |
| 769 | ;; moves. | 769 | ;; moves. |
| 770 | (semantic-overlay-put semantic-complete-inline-overlay | 770 | (overlay-put semantic-complete-inline-overlay |
| 771 | 'semantic-original-start start) | 771 | 'semantic-original-start start) |
| 772 | ;; Install our command hooks | 772 | ;; Install our command hooks |
| 773 | (add-hook 'pre-command-hook 'semantic-complete-pre-command-hook) | 773 | (add-hook 'pre-command-hook 'semantic-complete-pre-command-hook) |
| 774 | (add-hook 'post-command-hook 'semantic-complete-post-command-hook) | 774 | (add-hook 'post-command-hook 'semantic-complete-post-command-hook) |
| @@ -1783,7 +1783,7 @@ text using overlay options.") | |||
| 1783 | (cl-defmethod semantic-displayor-cleanup ((obj semantic-displayor-ghost)) | 1783 | (cl-defmethod semantic-displayor-cleanup ((obj semantic-displayor-ghost)) |
| 1784 | "Clean up any mess this displayor may have." | 1784 | "Clean up any mess this displayor may have." |
| 1785 | (when (slot-boundp obj 'ghostoverlay) | 1785 | (when (slot-boundp obj 'ghostoverlay) |
| 1786 | (semantic-overlay-delete (oref obj ghostoverlay))) | 1786 | (delete-overlay (oref obj ghostoverlay))) |
| 1787 | ) | 1787 | ) |
| 1788 | 1788 | ||
| 1789 | (cl-defmethod semantic-displayor-set-completions ((obj semantic-displayor-ghost) | 1789 | (cl-defmethod semantic-displayor-set-completions ((obj semantic-displayor-ghost) |
| @@ -1824,9 +1824,9 @@ completion text in ghost text." | |||
| 1824 | ;; Display the focus completion as ghost text after the current | 1824 | ;; Display the focus completion as ghost text after the current |
| 1825 | ;; inline text. | 1825 | ;; inline text. |
| 1826 | (when (or (not (slot-boundp obj 'ghostoverlay)) | 1826 | (when (or (not (slot-boundp obj 'ghostoverlay)) |
| 1827 | (not (semantic-overlay-live-p (oref obj ghostoverlay)))) | 1827 | (not (overlay-buffer (oref obj ghostoverlay)))) |
| 1828 | (oset obj ghostoverlay | 1828 | (oset obj ghostoverlay |
| 1829 | (semantic-make-overlay (point) (1+ (point)) (current-buffer) t))) | 1829 | (make-overlay (point) (1+ (point)) (current-buffer) t))) |
| 1830 | 1830 | ||
| 1831 | (let* ((lp (semantic-completion-text)) | 1831 | (let* ((lp (semantic-completion-text)) |
| 1832 | (os (substring (semantic-tag-name tag) (length lp))) | 1832 | (os (substring (semantic-tag-name tag) (length lp))) |
| @@ -1835,7 +1835,7 @@ completion text in ghost text." | |||
| 1835 | 1835 | ||
| 1836 | (put-text-property 0 (length os) 'face 'region os) | 1836 | (put-text-property 0 (length os) 'face 'region os) |
| 1837 | 1837 | ||
| 1838 | (semantic-overlay-put | 1838 | (overlay-put |
| 1839 | ol 'display (concat os (buffer-substring (point) (1+ (point))))) | 1839 | ol 'display (concat os (buffer-substring (point) (1+ (point))))) |
| 1840 | ) | 1840 | ) |
| 1841 | ;; Calculate text difference between contents and the focus item. | 1841 | ;; 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 @@ | |||
| 74 | (defun semanticdb-table-oob-sanity-check (cache) | 74 | (defun semanticdb-table-oob-sanity-check (cache) |
| 75 | "Validate that CACHE tags do not have any overlays in them." | 75 | "Validate that CACHE tags do not have any overlays in them." |
| 76 | (while cache | 76 | (while cache |
| 77 | (when (semantic-overlay-p (semantic-tag-overlay cache)) | 77 | (when (overlayp (semantic-tag-overlay cache)) |
| 78 | (message "Tag %s has an erroneous overlay!" | 78 | (message "Tag %s has an erroneous overlay!" |
| 79 | (semantic-format-tag-summarize (car cache)))) | 79 | (semantic-format-tag-summarize (car cache)))) |
| 80 | (semanticdb-table-oob-sanity-check | 80 | (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'." | |||
| 399 | (let ((table (cond ((null path) | 399 | (let ((table (cond ((null path) |
| 400 | semanticdb-current-table) | 400 | semanticdb-current-table) |
| 401 | ((bufferp path) | 401 | ((bufferp path) |
| 402 | (semantic-buffer-local-value 'semanticdb-current-table path)) | 402 | (buffer-local-value 'semanticdb-current-table path)) |
| 403 | ((and (stringp path) (file-exists-p path)) | 403 | ((and (stringp path) (file-exists-p path)) |
| 404 | (semanticdb-file-table-object path t)) | 404 | (semanticdb-file-table-object path t)) |
| 405 | ((cl-typep path 'semanticdb-abstract-table) | 405 | ((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." | |||
| 193 | ;; I know it is the first symbol appearing in the body of this token. | 193 | ;; I know it is the first symbol appearing in the body of this token. |
| 194 | (goto-char (semantic-tag-start nt)) | 194 | (goto-char (semantic-tag-start nt)) |
| 195 | 195 | ||
| 196 | (setq o (semantic-make-overlay (point) (progn (forward-sexp 1) (point)))) | 196 | (setq o (make-overlay (point) (progn (forward-sexp 1) (point)))) |
| 197 | (semantic-overlay-put o 'face 'highlight) | 197 | (overlay-put o 'face 'highlight) |
| 198 | 198 | ||
| 199 | (object-add-to-list iface 'overlays o) | 199 | (object-add-to-list iface 'overlays o) |
| 200 | 200 | ||
| 201 | (semantic-debug-set-parser-location iface (semantic-overlay-start o)) | 201 | (semantic-debug-set-parser-location iface (overlay-start o)) |
| 202 | 202 | ||
| 203 | (when (and rule match) | 203 | (when (and rule match) |
| 204 | 204 | ||
| @@ -215,20 +215,20 @@ If RULE and MATCH indices are specified, highlight those also." | |||
| 215 | (setq match (1- match))) | 215 | (setq match (1- match))) |
| 216 | 216 | ||
| 217 | ;; Now highlight the thingy we find there. | 217 | ;; Now highlight the thingy we find there. |
| 218 | (setq o (semantic-make-overlay (point) (progn (forward-sexp 1) (point)))) | 218 | (setq o (make-overlay (point) (progn (forward-sexp 1) (point)))) |
| 219 | (semantic-overlay-put o 'face 'highlight) | 219 | (overlay-put o 'face 'highlight) |
| 220 | 220 | ||
| 221 | (object-add-to-list iface 'overlays o) | 221 | (object-add-to-list iface 'overlays o) |
| 222 | 222 | ||
| 223 | ;; If we have a match for a sub-rule, have the parser position | 223 | ;; If we have a match for a sub-rule, have the parser position |
| 224 | ;; move so we can see it in the output window for very long rules. | 224 | ;; move so we can see it in the output window for very long rules. |
| 225 | (semantic-debug-set-parser-location iface (semantic-overlay-start o)) | 225 | (semantic-debug-set-parser-location iface (overlay-start o)) |
| 226 | 226 | ||
| 227 | )))) | 227 | )))) |
| 228 | 228 | ||
| 229 | (cl-defmethod semantic-debug-unhighlight ((iface semantic-debug-interface)) | 229 | (cl-defmethod semantic-debug-unhighlight ((iface semantic-debug-interface)) |
| 230 | "Remove all debugging overlays." | 230 | "Remove all debugging overlays." |
| 231 | (mapc 'semantic-overlay-delete (oref iface overlays)) | 231 | (mapc #'delete-overlay (oref iface overlays)) |
| 232 | (oset iface overlays nil)) | 232 | (oset iface overlays nil)) |
| 233 | 233 | ||
| 234 | ;; Call from the parser at a breakpoint | 234 | ;; 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 @@ | |||
| 38 | "Specify that TAG should be highlighted. | 38 | "Specify that TAG should be highlighted. |
| 39 | Optional FACE specifies the face to use." | 39 | Optional FACE specifies the face to use." |
| 40 | (let ((o (semantic-tag-overlay tag))) | 40 | (let ((o (semantic-tag-overlay tag))) |
| 41 | (semantic-overlay-put o 'old-face | 41 | (overlay-put o 'old-face |
| 42 | (cons (semantic-overlay-get o 'face) | 42 | (cons (overlay-get o 'face) |
| 43 | (semantic-overlay-get o 'old-face))) | 43 | (overlay-get o 'old-face))) |
| 44 | (semantic-overlay-put o 'face (or face 'semantic-tag-highlight-face)) | 44 | (overlay-put o 'face (or face 'semantic-tag-highlight-face)))) |
| 45 | )) | ||
| 46 | 45 | ||
| 47 | (defun semantic-unhighlight-tag (tag) | 46 | (defun semantic-unhighlight-tag (tag) |
| 48 | "Unhighlight TAG, restoring its previous face." | 47 | "Unhighlight TAG, restoring its previous face." |
| 49 | (let ((o (semantic-tag-overlay tag))) | 48 | (let ((o (semantic-tag-overlay tag))) |
| 50 | (semantic-overlay-put o 'face (car (semantic-overlay-get o 'old-face))) | 49 | (overlay-put o 'face (car (overlay-get o 'old-face))) |
| 51 | (semantic-overlay-put o 'old-face (cdr (semantic-overlay-get o 'old-face))) | 50 | (overlay-put o 'old-face (cdr (overlay-get o 'old-face))) |
| 52 | )) | 51 | )) |
| 53 | 52 | ||
| 54 | ;;; Momentary Highlighting - One line | 53 | ;;; Momentary Highlighting - One line |
| @@ -66,7 +65,7 @@ Optional argument FACE specifies the face to do the highlighting." | |||
| 66 | Optional argument FACE is the face to use for highlighting. | 65 | Optional argument FACE is the face to use for highlighting. |
| 67 | If FACE is not specified, then `highlight' will be used." | 66 | If FACE is not specified, then `highlight' will be used." |
| 68 | (when (semantic-tag-with-position-p tag) | 67 | (when (semantic-tag-with-position-p tag) |
| 69 | (if (not (semantic-overlay-p (semantic-tag-overlay tag))) | 68 | (if (not (overlayp (semantic-tag-overlay tag))) |
| 70 | ;; No overlay, but a position. Highlight the first line only. | 69 | ;; No overlay, but a position. Highlight the first line only. |
| 71 | (semantic-momentary-highlight-one-tag-line tag face) | 70 | (semantic-momentary-highlight-one-tag-line tag face) |
| 72 | ;; The tag has an overlay, highlight the whole thing | 71 | ;; The tag has an overlay, highlight the whole thing |
| @@ -76,17 +75,17 @@ If FACE is not specified, then `highlight' will be used." | |||
| 76 | 75 | ||
| 77 | (defun semantic-set-tag-face (tag face) | 76 | (defun semantic-set-tag-face (tag face) |
| 78 | "Specify that TAG should use FACE for display." | 77 | "Specify that TAG should use FACE for display." |
| 79 | (semantic-overlay-put (semantic-tag-overlay tag) 'face face)) | 78 | (overlay-put (semantic-tag-overlay tag) 'face face)) |
| 80 | 79 | ||
| 81 | (defun semantic-set-tag-invisible (tag &optional visible) | 80 | (defun semantic-set-tag-invisible (tag &optional visible) |
| 82 | "Enable the text in TAG to be made invisible. | 81 | "Enable the text in TAG to be made invisible. |
| 83 | If VISIBLE is non-nil, make the text visible." | 82 | If VISIBLE is non-nil, make the text visible." |
| 84 | (semantic-overlay-put (semantic-tag-overlay tag) 'invisible | 83 | (overlay-put (semantic-tag-overlay tag) 'invisible |
| 85 | (not visible))) | 84 | (not visible))) |
| 86 | 85 | ||
| 87 | (defun semantic-tag-invisible-p (tag) | 86 | (defun semantic-tag-invisible-p (tag) |
| 88 | "Return non-nil if TAG is invisible." | 87 | "Return non-nil if TAG is invisible." |
| 89 | (semantic-overlay-get (semantic-tag-overlay tag) 'invisible)) | 88 | (overlay-get (semantic-tag-overlay tag) 'invisible)) |
| 90 | 89 | ||
| 91 | (defun semantic-overlay-signal-read-only | 90 | (defun semantic-overlay-signal-read-only |
| 92 | (overlay after start end &optional len) | 91 | (overlay after start end &optional len) |
| @@ -95,8 +94,8 @@ Allows deletion of the entire text. | |||
| 95 | Argument OVERLAY, AFTER, START, END, and LEN are passed in by the system." | 94 | Argument OVERLAY, AFTER, START, END, and LEN are passed in by the system." |
| 96 | ;; Stolen blithely from cpp.el in Emacs 21.1 | 95 | ;; Stolen blithely from cpp.el in Emacs 21.1 |
| 97 | (if (and (not after) | 96 | (if (and (not after) |
| 98 | (or (< (semantic-overlay-start overlay) start) | 97 | (or (< (overlay-start overlay) start) |
| 99 | (> (semantic-overlay-end overlay) end))) | 98 | (> (overlay-end overlay) end))) |
| 100 | (error "This text is read only"))) | 99 | (error "This text is read only"))) |
| 101 | 100 | ||
| 102 | (defun semantic-set-tag-read-only (tag &optional writable) | 101 | (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." | |||
| 104 | Optional argument WRITABLE should be non-nil to make the text writable | 103 | Optional argument WRITABLE should be non-nil to make the text writable |
| 105 | instead of read-only." | 104 | instead of read-only." |
| 106 | (let ((o (semantic-tag-overlay tag)) | 105 | (let ((o (semantic-tag-overlay tag)) |
| 107 | (hook (if writable nil '(semantic-overlay-signal-read-only)))) | 106 | (hook (if writable nil '(overlay-signal-read-only)))) |
| 108 | (semantic-overlay-put o 'modification-hooks hook) | 107 | (overlay-put o 'modification-hooks hook) |
| 109 | (semantic-overlay-put o 'insert-in-front-hooks hook) | 108 | (overlay-put o 'insert-in-front-hooks hook) |
| 110 | (semantic-overlay-put o 'insert-behind-hooks hook))) | 109 | (overlay-put o 'insert-behind-hooks hook))) |
| 111 | 110 | ||
| 112 | (defun semantic-tag-read-only-p (tag) | 111 | (defun semantic-tag-read-only-p (tag) |
| 113 | "Return non-nil if the current TAG is marked read only." | 112 | "Return non-nil if the current TAG is marked read only." |
| 114 | (let ((o (semantic-tag-overlay tag))) | 113 | (let ((o (semantic-tag-overlay tag))) |
| 115 | (member 'semantic-overlay-signal-read-only | 114 | (member 'semantic-overlay-signal-read-only |
| 116 | (semantic-overlay-get o 'modification-hooks)))) | 115 | (overlay-get o 'modification-hooks)))) |
| 117 | 116 | ||
| 118 | ;;; Secondary overlays | 117 | ;;; Secondary overlays |
| 119 | ;; | 118 | ;; |
| @@ -138,12 +137,12 @@ generated secondary overlay." | |||
| 138 | nil | 137 | nil |
| 139 | (let* ((os (semantic-tag-start tag)) | 138 | (let* ((os (semantic-tag-start tag)) |
| 140 | (oe (semantic-tag-end tag)) | 139 | (oe (semantic-tag-end tag)) |
| 141 | (o (semantic-make-overlay os oe (semantic-tag-buffer tag) t)) | 140 | (o (make-overlay os oe (semantic-tag-buffer tag) t)) |
| 142 | (attr (semantic-tag-secondary-overlays tag)) | 141 | (attr (semantic-tag-secondary-overlays tag)) |
| 143 | ) | 142 | ) |
| 144 | (semantic--tag-put-property tag 'secondary-overlays (cons o attr)) | 143 | (semantic--tag-put-property tag 'secondary-overlays (cons o attr)) |
| 145 | (semantic-overlay-put o 'semantic-secondary t) | 144 | (overlay-put o 'semantic-secondary t) |
| 146 | (semantic-overlay-put o 'semantic-link-hook link-hook) | 145 | (overlay-put o 'semantic-link-hook link-hook) |
| 147 | (semantic-tag-add-hook tag 'link-hook 'semantic--tag-link-secondary-overlays) | 146 | (semantic-tag-add-hook tag 'link-hook 'semantic--tag-link-secondary-overlays) |
| 148 | (semantic-tag-add-hook tag 'unlink-hook 'semantic--tag-unlink-secondary-overlays) | 147 | (semantic-tag-add-hook tag 'unlink-hook 'semantic--tag-unlink-secondary-overlays) |
| 149 | (semantic-tag-add-hook tag 'unlink-copy-hook 'semantic--tag-unlink-copy-secondary-overlays) | 148 | (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.." | |||
| 156 | (let* ((olsearch (semantic-tag-secondary-overlays tag)) | 155 | (let* ((olsearch (semantic-tag-secondary-overlays tag)) |
| 157 | (o nil)) | 156 | (o nil)) |
| 158 | (while olsearch | 157 | (while olsearch |
| 159 | (when (semantic-overlay-get (car olsearch) property) | 158 | (when (overlay-get (car olsearch) property) |
| 160 | (setq o (cons (car olsearch) o))) | 159 | (setq o (cons (car olsearch) o))) |
| 161 | (setq olsearch (cdr olsearch))) | 160 | (setq olsearch (cdr olsearch))) |
| 162 | o)) | 161 | o)) |
| @@ -166,16 +165,16 @@ PROPERTY is a symbol and all overlays with that symbol are returned.." | |||
| 166 | If OVERLAY-OR-PROPERTY is an overlay, delete that overlay. | 165 | If OVERLAY-OR-PROPERTY is an overlay, delete that overlay. |
| 167 | If OVERLAY-OR-PROPERTY is a symbol, find the overlay with that property." | 166 | If OVERLAY-OR-PROPERTY is a symbol, find the overlay with that property." |
| 168 | (let* ((o overlay-or-property)) | 167 | (let* ((o overlay-or-property)) |
| 169 | (if (semantic-overlay-p o) | 168 | (if (overlayp o) |
| 170 | (setq o (list o)) | 169 | (setq o (list o)) |
| 171 | (setq o (semantic-tag-get-secondary-overlay tag overlay-or-property))) | 170 | (setq o (semantic-tag-get-secondary-overlay tag overlay-or-property))) |
| 172 | (while (semantic-overlay-p (car o)) | 171 | (while (overlayp (car o)) |
| 173 | ;; We don't really need to worry about the hooks. | 172 | ;; We don't really need to worry about the hooks. |
| 174 | ;; They will clean themselves up eventually ?? | 173 | ;; They will clean themselves up eventually ?? |
| 175 | (semantic--tag-put-property | 174 | (semantic--tag-put-property |
| 176 | tag 'secondary-overlays | 175 | tag 'secondary-overlays |
| 177 | (delete (car o) (semantic-tag-secondary-overlays tag))) | 176 | (delete (car o) (semantic-tag-secondary-overlays tag))) |
| 178 | (semantic-overlay-delete (car o)) | 177 | (delete-overlay (car o)) |
| 179 | (setq o (cdr o))))) | 178 | (setq o (cdr o))))) |
| 180 | 179 | ||
| 181 | (defun semantic--tag-unlink-copy-secondary-overlays (tag) | 180 | (defun semantic--tag-unlink-copy-secondary-overlays (tag) |
| @@ -200,10 +199,10 @@ from them in TAG." | |||
| 200 | (let ((ol (semantic-tag-secondary-overlays tag)) | 199 | (let ((ol (semantic-tag-secondary-overlays tag)) |
| 201 | (nl nil)) | 200 | (nl nil)) |
| 202 | (while ol | 201 | (while ol |
| 203 | (if (semantic-overlay-get (car ol) 'semantic-link-hook) | 202 | (if (overlay-get (car ol) 'semantic-link-hook) |
| 204 | ;; Only put in a proxy if there is a link-hook. If there is no link-hook | 203 | ;; Only put in a proxy if there is a link-hook. If there is no link-hook |
| 205 | ;; the decorating mode must know when tags are unlinked on its own. | 204 | ;; the decorating mode must know when tags are unlinked on its own. |
| 206 | (setq nl (cons (semantic-overlay-get (car ol) 'semantic-link-hook) | 205 | (setq nl (cons (overlay-get (car ol) 'semantic-link-hook) |
| 207 | nl)) | 206 | nl)) |
| 208 | ;; Else, remove all traces of ourself from the tag | 207 | ;; Else, remove all traces of ourself from the tag |
| 209 | ;; Note to self: Does this prevent multiple types of secondary | 208 | ;; Note to self: Does this prevent multiple types of secondary |
| @@ -212,7 +211,7 @@ from them in TAG." | |||
| 212 | (semantic-tag-remove-hook tag 'unlink-hook 'semantic--tag-unlink-secondary-overlays) | 211 | (semantic-tag-remove-hook tag 'unlink-hook 'semantic--tag-unlink-secondary-overlays) |
| 213 | (semantic-tag-remove-hook tag 'unlink-copy-hook 'semantic--tag-unlink-copy-secondary-overlays) | 212 | (semantic-tag-remove-hook tag 'unlink-copy-hook 'semantic--tag-unlink-copy-secondary-overlays) |
| 214 | ) | 213 | ) |
| 215 | (semantic-overlay-delete (car ol)) | 214 | (delete-overlay (car ol)) |
| 216 | (setq ol (cdr ol))) | 215 | (setq ol (cdr ol))) |
| 217 | (semantic--tag-put-property tag 'secondary-overlays (nreverse nl)) | 216 | (semantic--tag-put-property tag 'secondary-overlays (nreverse nl)) |
| 218 | )) | 217 | )) |
| @@ -245,21 +244,20 @@ nil implies the tag should be fully shown." | |||
| 245 | ;; Add the foldn | 244 | ;; Add the foldn |
| 246 | (setq o (semantic-tag-create-secondary-overlay tag)) | 245 | (setq o (semantic-tag-create-secondary-overlay tag)) |
| 247 | ;; mark as folded | 246 | ;; mark as folded |
| 248 | (semantic-overlay-put o 'semantic-folded t) | 247 | (overlay-put o 'semantic-folded t) |
| 249 | ;; Move to cover end of tag | 248 | ;; Move to cover end of tag |
| 250 | (save-excursion | 249 | (save-excursion |
| 251 | (goto-char (semantic-tag-start tag)) | 250 | (goto-char (semantic-tag-start tag)) |
| 252 | (end-of-line) | 251 | (end-of-line) |
| 253 | (semantic-overlay-move o (point) (semantic-tag-end tag))) | 252 | (move-overlay o (point) (semantic-tag-end tag))) |
| 254 | ;; We need to modify the invisibility spec for this to | 253 | ;; We need to modify the invisibility spec for this to |
| 255 | ;; work. | 254 | ;; work. |
| 256 | (if (or (eq buffer-invisibility-spec t) | 255 | (if (or (eq buffer-invisibility-spec t) |
| 257 | (not (assoc 'semantic-fold buffer-invisibility-spec))) | 256 | (not (assoc 'semantic-fold buffer-invisibility-spec))) |
| 258 | (add-to-invisibility-spec '(semantic-fold . t))) | 257 | (add-to-invisibility-spec '(semantic-fold . t))) |
| 259 | (semantic-overlay-put o 'invisible 'semantic-fold) | 258 | (overlay-put o 'invisible 'semantic-fold) |
| 260 | (overlay-put o 'isearch-open-invisible | 259 | (overlay-put o 'isearch-open-invisible |
| 261 | 'semantic-set-tag-folded-isearch))) | 260 | 'semantic-set-tag-folded-isearch))))) |
| 262 | )) | ||
| 263 | 261 | ||
| 264 | (declare-function semantic-current-tag "semantic/find") | 262 | (declare-function semantic-current-tag "semantic/find") |
| 265 | 263 | ||
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." | |||
| 336 | (let ((ol (semantic-decorate-tag tag | 336 | (let ((ol (semantic-decorate-tag tag |
| 337 | (semantic-tag-start tag) | 337 | (semantic-tag-start tag) |
| 338 | (semantic-tag-end tag) | 338 | (semantic-tag-end tag) |
| 339 | face)) | 339 | face))) |
| 340 | ) | 340 | (overlay-put ol 'mouse-face 'highlight) |
| 341 | (semantic-overlay-put ol 'mouse-face 'highlight) | 341 | (overlay-put ol 'keymap map) |
| 342 | (semantic-overlay-put ol 'keymap map) | 342 | (overlay-put ol 'help-echo "Header File : mouse-3 - Context menu"))))) |
| 343 | (semantic-overlay-put ol 'help-echo | ||
| 344 | "Header File : mouse-3 - Context menu") | ||
| 345 | )))) | ||
| 346 | 343 | ||
| 347 | ;;; Regular Include Functions | 344 | ;;; Regular Include Functions |
| 348 | ;; | 345 | ;; |
| @@ -441,7 +438,7 @@ Argument EVENT describes the event that caused this function to be called." | |||
| 441 | ;(goto-char (window-start win)) | 438 | ;(goto-char (window-start win)) |
| 442 | (mouse-set-point event) | 439 | (mouse-set-point event) |
| 443 | (sit-for 0) | 440 | (sit-for 0) |
| 444 | (semantic-popup-menu semantic-decoration-on-include-menu) | 441 | (popup-menu semantic-decoration-on-include-menu) |
| 445 | ) | 442 | ) |
| 446 | (select-window startwin))) | 443 | (select-window startwin))) |
| 447 | 444 | ||
| @@ -525,7 +522,7 @@ Argument EVENT describes the event that caused this function to be called." | |||
| 525 | ;(goto-char (window-start win)) | 522 | ;(goto-char (window-start win)) |
| 526 | (mouse-set-point event) | 523 | (mouse-set-point event) |
| 527 | (sit-for 0) | 524 | (sit-for 0) |
| 528 | (semantic-popup-menu semantic-decoration-on-unknown-include-menu) | 525 | (popup-menu semantic-decoration-on-unknown-include-menu) |
| 529 | ) | 526 | ) |
| 530 | (select-window startwin))) | 527 | (select-window startwin))) |
| 531 | 528 | ||
| @@ -568,7 +565,7 @@ Argument EVENT describes the event that caused this function to be called." | |||
| 568 | ;(goto-char (window-start win)) | 565 | ;(goto-char (window-start win)) |
| 569 | (mouse-set-point event) | 566 | (mouse-set-point event) |
| 570 | (sit-for 0) | 567 | (sit-for 0) |
| 571 | (semantic-popup-menu semantic-decoration-on-fileless-include-menu) | 568 | (popup-menu semantic-decoration-on-fileless-include-menu) |
| 572 | ) | 569 | ) |
| 573 | (select-window startwin))) | 570 | (select-window startwin))) |
| 574 | 571 | ||
| @@ -632,7 +629,7 @@ Argument EVENT describes the event that caused this function to be called." | |||
| 632 | ;(goto-char (window-start win)) | 629 | ;(goto-char (window-start win)) |
| 633 | (mouse-set-point event) | 630 | (mouse-set-point event) |
| 634 | (sit-for 0) | 631 | (sit-for 0) |
| 635 | (semantic-popup-menu semantic-decoration-on-unparsed-include-menu) | 632 | (popup-menu semantic-decoration-on-unparsed-include-menu) |
| 636 | ) | 633 | ) |
| 637 | (select-window startwin))) | 634 | (select-window startwin))) |
| 638 | 635 | ||
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." | |||
| 76 | ;; | 76 | ;; |
| 77 | (defsubst semantic-decoration-p (object) | 77 | (defsubst semantic-decoration-p (object) |
| 78 | "Return non-nil if OBJECT is a tag decoration." | 78 | "Return non-nil if OBJECT is a tag decoration." |
| 79 | (and (semantic-overlay-p object) | 79 | (and (overlayp object) |
| 80 | (semantic-overlay-get object 'semantic-decoration))) | 80 | (overlay-get object 'semantic-decoration))) |
| 81 | 81 | ||
| 82 | (defsubst semantic-decoration-set-property (deco property value) | 82 | (defsubst semantic-decoration-set-property (deco property value) |
| 83 | "Set the DECO decoration's PROPERTY to VALUE. | 83 | "Set the DECO decoration's PROPERTY to VALUE. |
| 84 | Return DECO." | 84 | Return DECO." |
| 85 | (cl-assert (semantic-decoration-p deco)) | 85 | (cl-assert (semantic-decoration-p deco)) |
| 86 | (semantic-overlay-put deco property value) | 86 | (overlay-put deco property value) |
| 87 | deco) | 87 | deco) |
| 88 | 88 | ||
| 89 | (defsubst semantic-decoration-get-property (deco property) | 89 | (defsubst semantic-decoration-get-property (deco property) |
| 90 | "Return the DECO decoration's PROPERTY value." | 90 | "Return the DECO decoration's PROPERTY value." |
| 91 | (cl-assert (semantic-decoration-p deco)) | 91 | (cl-assert (semantic-decoration-p deco)) |
| 92 | (semantic-overlay-get deco property)) | 92 | (overlay-get deco property)) |
| 93 | 93 | ||
| 94 | (defsubst semantic-decoration-set-face (deco face) | 94 | (defsubst semantic-decoration-set-face (deco face) |
| 95 | "Set the face of the decoration DECO to FACE. | 95 | "Set the face of the decoration DECO to FACE. |
| @@ -114,7 +114,7 @@ Return DECO." | |||
| 114 | "Move the decoration DECO on the region between BEGIN and END. | 114 | "Move the decoration DECO on the region between BEGIN and END. |
| 115 | Return DECO." | 115 | Return DECO." |
| 116 | (cl-assert (semantic-decoration-p deco)) | 116 | (cl-assert (semantic-decoration-p deco)) |
| 117 | (semantic-overlay-move deco begin end) | 117 | (move-overlay deco begin end) |
| 118 | deco) | 118 | deco) |
| 119 | 119 | ||
| 120 | ;;; Tag decoration | 120 | ;;; Tag decoration |
| @@ -127,7 +127,7 @@ Return the overlay that makes up the new decoration." | |||
| 127 | (let ((deco (semantic-tag-create-secondary-overlay tag))) | 127 | (let ((deco (semantic-tag-create-secondary-overlay tag))) |
| 128 | ;; We do not use the unlink property because we do not want to | 128 | ;; We do not use the unlink property because we do not want to |
| 129 | ;; save the highlighting information in the DB. | 129 | ;; save the highlighting information in the DB. |
| 130 | (semantic-overlay-put deco 'semantic-decoration t) | 130 | (overlay-put deco 'semantic-decoration t) |
| 131 | (semantic-decoration-move deco begin end) | 131 | (semantic-decoration-move deco begin end) |
| 132 | (semantic-decoration-set-face deco face) | 132 | (semantic-decoration-set-face deco face) |
| 133 | deco)) | 133 | deco)) |
| @@ -156,9 +156,9 @@ BUFFER defaults to the current buffer. | |||
| 156 | Should be used to flush decorations that might remain in BUFFER, for | 156 | Should be used to flush decorations that might remain in BUFFER, for |
| 157 | example, after tags have been refreshed." | 157 | example, after tags have been refreshed." |
| 158 | (with-current-buffer (or buffer (current-buffer)) | 158 | (with-current-buffer (or buffer (current-buffer)) |
| 159 | (dolist (o (semantic-overlays-in (point-min) (point-max))) | 159 | (dolist (o (overlays-in (point-min) (point-max))) |
| 160 | (and (semantic-decoration-p o) | 160 | (and (semantic-decoration-p o) |
| 161 | (semantic-overlay-delete o))))) | 161 | (delete-overlay o))))) |
| 162 | 162 | ||
| 163 | (defun semantic-decorate-clear-decorations (tag-list) | 163 | (defun semantic-decorate-clear-decorations (tag-list) |
| 164 | "Remove decorations found in tags in TAG-LIST." | 164 | "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." | |||
| 150 | Optional argument BUFFER is the buffer to search for changes in." | 150 | Optional argument BUFFER is the buffer to search for changes in." |
| 151 | (save-excursion | 151 | (save-excursion |
| 152 | (if buffer (set-buffer buffer)) | 152 | (if buffer (set-buffer buffer)) |
| 153 | (let ((ol (semantic-overlays-in (max start (point-min)) | 153 | (let ((ol (overlays-in (max start (point-min)) |
| 154 | (min end (point-max)))) | 154 | (min end (point-max)))) |
| 155 | (ret nil)) | 155 | (ret nil)) |
| 156 | (while ol | 156 | (while ol |
| 157 | (when (semantic-overlay-get (car ol) 'semantic-change) | 157 | (when (overlay-get (car ol) 'semantic-change) |
| 158 | (setq ret (cons (car ol) ret))) | 158 | (setq ret (cons (car ol) ret))) |
| 159 | (setq ol (cdr ol))) | 159 | (setq ol (cdr ol))) |
| 160 | (sort ret #'(lambda (a b) (< (semantic-overlay-start a) | 160 | (sort ret #'(lambda (a b) (< (overlay-start a) |
| 161 | (semantic-overlay-start b))))))) | 161 | (overlay-start b))))))) |
| 162 | 162 | ||
| 163 | (defun semantic-edits-change-function-handle-changes (start end length) | 163 | (defun semantic-edits-change-function-handle-changes (start end length) |
| 164 | "Run whenever a buffer controlled by `semantic-mode' change. | 164 | "Run whenever a buffer controlled by `semantic-mode' change. |
| @@ -171,8 +171,8 @@ Argument START, END, and LENGTH specify the bounds of the change." | |||
| 171 | ) | 171 | ) |
| 172 | (semantic-parse-tree-set-needs-update) | 172 | (semantic-parse-tree-set-needs-update) |
| 173 | (if (not changes-in-change) | 173 | (if (not changes-in-change) |
| 174 | (let ((o (semantic-make-overlay start end))) | 174 | (let ((o (make-overlay start end))) |
| 175 | (semantic-overlay-put o 'semantic-change t) | 175 | (overlay-put o 'semantic-change t) |
| 176 | ;; Run the hooks safely. When hooks blow it, our dirty | 176 | ;; Run the hooks safely. When hooks blow it, our dirty |
| 177 | ;; function will be removed from the list of active change | 177 | ;; function will be removed from the list of active change |
| 178 | ;; functions. | 178 | ;; functions. |
| @@ -182,13 +182,13 @@ Argument START, END, and LENGTH specify the bounds of the change." | |||
| 182 | (let ((tmp changes-in-change)) | 182 | (let ((tmp changes-in-change)) |
| 183 | ;; Find greatest bounds of all changes | 183 | ;; Find greatest bounds of all changes |
| 184 | (while tmp | 184 | (while tmp |
| 185 | (when (< (semantic-overlay-start (car tmp)) start) | 185 | (when (< (overlay-start (car tmp)) start) |
| 186 | (setq start (semantic-overlay-start (car tmp)))) | 186 | (setq start (overlay-start (car tmp)))) |
| 187 | (when (> (semantic-overlay-end (car tmp)) end) | 187 | (when (> (overlay-end (car tmp)) end) |
| 188 | (setq end (semantic-overlay-end (car tmp)))) | 188 | (setq end (overlay-end (car tmp)))) |
| 189 | (setq tmp (cdr tmp))) | 189 | (setq tmp (cdr tmp))) |
| 190 | ;; Move the first found overlay, recycling that overlay. | 190 | ;; Move the first found overlay, recycling that overlay. |
| 191 | (semantic-overlay-move (car changes-in-change) start end) | 191 | (move-overlay (car changes-in-change) start end) |
| 192 | (condition-case nil | 192 | (condition-case nil |
| 193 | (run-hook-with-args 'semantic-edits-move-change-hooks | 193 | (run-hook-with-args 'semantic-edits-move-change-hooks |
| 194 | (car changes-in-change)) | 194 | (car changes-in-change)) |
| @@ -200,7 +200,7 @@ Argument START, END, and LENGTH specify the bounds of the change." | |||
| 200 | (run-hook-with-args 'semantic-edits-delete-change-functions | 200 | (run-hook-with-args 'semantic-edits-delete-change-functions |
| 201 | (car changes-in-change)) | 201 | (car changes-in-change)) |
| 202 | (error nil)) | 202 | (error nil)) |
| 203 | (semantic-overlay-delete (car changes-in-change)) | 203 | (delete-overlay (car changes-in-change)) |
| 204 | (setq changes-in-change (cdr changes-in-change)))) | 204 | (setq changes-in-change (cdr changes-in-change)))) |
| 205 | ))) | 205 | ))) |
| 206 | 206 | ||
| @@ -210,7 +210,7 @@ Argument START, END, and LENGTH specify the bounds of the change." | |||
| 210 | (run-hook-with-args 'semantic-edits-delete-change-functions | 210 | (run-hook-with-args 'semantic-edits-delete-change-functions |
| 211 | change) | 211 | change) |
| 212 | (error nil)) | 212 | (error nil)) |
| 213 | (semantic-overlay-delete change)) | 213 | (delete-overlay change)) |
| 214 | 214 | ||
| 215 | (defun semantic-edits-flush-changes () | 215 | (defun semantic-edits-flush-changes () |
| 216 | "Flush the changes in the current buffer." | 216 | "Flush the changes in the current buffer." |
| @@ -225,9 +225,9 @@ Argument START, END, and LENGTH specify the bounds of the change." | |||
| 225 | HITS is the list of tags that CHANGE is in. It can have more than | 225 | HITS is the list of tags that CHANGE is in. It can have more than |
| 226 | one tag in it if the leaf tag is within a parent tag." | 226 | one tag in it if the leaf tag is within a parent tag." |
| 227 | (and (< (semantic-tag-start (car hits)) | 227 | (and (< (semantic-tag-start (car hits)) |
| 228 | (semantic-overlay-start change)) | 228 | (overlay-start change)) |
| 229 | (> (semantic-tag-end (car hits)) | 229 | (> (semantic-tag-end (car hits)) |
| 230 | (semantic-overlay-end change)) | 230 | (overlay-end change)) |
| 231 | ;; Recurse on the rest. If this change is inside all | 231 | ;; Recurse on the rest. If this change is inside all |
| 232 | ;; of these tags, then they are all leaves or parents | 232 | ;; of these tags, then they are all leaves or parents |
| 233 | ;; of the smallest tag. | 233 | ;; of the smallest tag. |
| @@ -245,12 +245,12 @@ one tag in it if the leaf tag is within a parent tag." | |||
| 245 | ;; at point and mark (via comments I assume.) | 245 | ;; at point and mark (via comments I assume.) |
| 246 | (defsubst semantic-edits-os (change) | 246 | (defsubst semantic-edits-os (change) |
| 247 | "For testing: Start of CHANGE, or smaller of (point) and (mark)." | 247 | "For testing: Start of CHANGE, or smaller of (point) and (mark)." |
| 248 | (if change (semantic-overlay-start change) | 248 | (if change (overlay-start change) |
| 249 | (if (< (point) (mark)) (point) (mark)))) | 249 | (if (< (point) (mark)) (point) (mark)))) |
| 250 | 250 | ||
| 251 | (defsubst semantic-edits-oe (change) | 251 | (defsubst semantic-edits-oe (change) |
| 252 | "For testing: End of CHANGE, or larger of (point) and (mark)." | 252 | "For testing: End of CHANGE, or larger of (point) and (mark)." |
| 253 | (if change (semantic-overlay-end change) | 253 | (if change (overlay-end change) |
| 254 | (if (> (point) (mark)) (point) (mark)))) | 254 | (if (> (point) (mark)) (point) (mark)))) |
| 255 | 255 | ||
| 256 | (defun semantic-edits-change-leaf-tag (change) | 256 | (defun semantic-edits-change-leaf-tag (change) |
| @@ -562,7 +562,7 @@ This function is for internal use by `semantic-edits-incremental-parser'." | |||
| 562 | ;; encompassed within the bounds of tags | 562 | ;; encompassed within the bounds of tags |
| 563 | ;; modified by the previous iteration's | 563 | ;; modified by the previous iteration's |
| 564 | ;; change. | 564 | ;; change. |
| 565 | (< (semantic-overlay-start (car changes)) | 565 | (< (overlay-start (car changes)) |
| 566 | parse-end))) | 566 | parse-end))) |
| 567 | 567 | ||
| 568 | ;; REMOVE LATER | 568 | ;; REMOVE LATER |
| @@ -607,7 +607,7 @@ This function is for internal use by `semantic-edits-incremental-parser'." | |||
| 607 | ;; our change, meaning there is nothing before | 607 | ;; our change, meaning there is nothing before |
| 608 | ;; the change. | 608 | ;; the change. |
| 609 | ((> (semantic-tag-start (car cache-list)) | 609 | ((> (semantic-tag-start (car cache-list)) |
| 610 | (semantic-overlay-end (car changes))) | 610 | (overlay-end (car changes))) |
| 611 | (setq last-cond "Beginning of buffer") | 611 | (setq last-cond "Beginning of buffer") |
| 612 | (setq parse-start | 612 | (setq parse-start |
| 613 | ;; Don't worry about parents since | 613 | ;; Don't worry about parents since |
| @@ -621,13 +621,13 @@ This function is for internal use by `semantic-edits-incremental-parser'." | |||
| 621 | ) | 621 | ) |
| 622 | ;; A change stuck on the first surrounding tag. | 622 | ;; A change stuck on the first surrounding tag. |
| 623 | ((= (semantic-tag-end (car cache-list)) | 623 | ((= (semantic-tag-end (car cache-list)) |
| 624 | (semantic-overlay-start (car changes))) | 624 | (overlay-start (car changes))) |
| 625 | (setq last-cond "Beginning of Tag") | 625 | (setq last-cond "Beginning of Tag") |
| 626 | ;; Reparse that first tag. | 626 | ;; Reparse that first tag. |
| 627 | (setq parse-start | 627 | (setq parse-start |
| 628 | (semantic-tag-start (car cache-list)) | 628 | (semantic-tag-start (car cache-list)) |
| 629 | parse-end | 629 | parse-end |
| 630 | (semantic-overlay-end (car changes)) | 630 | (overlay-end (car changes)) |
| 631 | tags | 631 | tags |
| 632 | (list (car cache-list))) | 632 | (list (car cache-list))) |
| 633 | (semantic-edits-assert-valid-region) | 633 | (semantic-edits-assert-valid-region) |
| @@ -671,7 +671,7 @@ This function is for internal use by `semantic-edits-incremental-parser'." | |||
| 671 | (if end-marker | 671 | (if end-marker |
| 672 | (setq parse-end | 672 | (setq parse-end |
| 673 | (semantic-tag-start end-marker)) | 673 | (semantic-tag-start end-marker)) |
| 674 | (setq parse-end (semantic-overlay-end | 674 | (setq parse-end (overlay-end |
| 675 | (car changes)))) | 675 | (car changes)))) |
| 676 | (semantic-edits-assert-valid-region) | 676 | (semantic-edits-assert-valid-region) |
| 677 | ) | 677 | ) |
| @@ -690,7 +690,7 @@ This function is for internal use by `semantic-edits-incremental-parser'." | |||
| 690 | ;; list of tags. Only possible if END | 690 | ;; list of tags. Only possible if END |
| 691 | ;; already matches the end of that tag. | 691 | ;; already matches the end of that tag. |
| 692 | (setq parse-end | 692 | (setq parse-end |
| 693 | (semantic-overlay-end (car changes))))) | 693 | (overlay-end (car changes))))) |
| 694 | (semantic-edits-assert-valid-region) | 694 | (semantic-edits-assert-valid-region) |
| 695 | )) | 695 | )) |
| 696 | 696 | ||
| @@ -700,7 +700,7 @@ This function is for internal use by `semantic-edits-incremental-parser'." | |||
| 700 | )) | 700 | )) |
| 701 | ;; Is this change inside the previous parse group? | 701 | ;; Is this change inside the previous parse group? |
| 702 | ;; We already checked start. | 702 | ;; We already checked start. |
| 703 | ((< (semantic-overlay-end (car changes)) parse-end) | 703 | ((< (overlay-end (car changes)) parse-end) |
| 704 | (setq last-cond "in bounds") | 704 | (setq last-cond "in bounds") |
| 705 | nil) | 705 | nil) |
| 706 | ;; This change extends the current parse group. | 706 | ;; This change extends the current parse group. |
| @@ -947,9 +947,9 @@ When this routine returns, OLDTAG is raw, and the data will be | |||
| 947 | lost if not transferred into NEWTAG." | 947 | lost if not transferred into NEWTAG." |
| 948 | (let* ((oo (semantic-tag-overlay oldtag)) | 948 | (let* ((oo (semantic-tag-overlay oldtag)) |
| 949 | (o (semantic-tag-overlay newtag)) | 949 | (o (semantic-tag-overlay newtag)) |
| 950 | (oo-props (semantic-overlay-properties oo))) | 950 | (oo-props (overlay-properties oo))) |
| 951 | (while oo-props | 951 | (while oo-props |
| 952 | (semantic-overlay-put o (car oo-props) (car (cdr oo-props))) | 952 | (overlay-put o (car oo-props) (car (cdr oo-props))) |
| 953 | (setq oo-props (cdr (cdr oo-props))) | 953 | (setq oo-props (cdr (cdr oo-props))) |
| 954 | ) | 954 | ) |
| 955 | ;; Free the old overlay(s) | 955 | ;; Free the old overlay(s) |
| @@ -963,7 +963,7 @@ lost if not transferred into NEWTAG." | |||
| 963 | ;; OLDTAG is now pointing to NEWTAG, but the NEWTAG | 963 | ;; OLDTAG is now pointing to NEWTAG, but the NEWTAG |
| 964 | ;; cell is about to be abandoned. Here we update our overlay | 964 | ;; cell is about to be abandoned. Here we update our overlay |
| 965 | ;; to point at the updated state of the world. | 965 | ;; to point at the updated state of the world. |
| 966 | (semantic-overlay-put o 'semantic oldtag) | 966 | (overlay-put o 'semantic oldtag) |
| 967 | )) | 967 | )) |
| 968 | 968 | ||
| 969 | (add-hook 'semantic-before-toplevel-cache-flush-hook | 969 | (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." | |||
| 70 | (set-buffer (marker-buffer positionormarker)) | 70 | (set-buffer (marker-buffer positionormarker)) |
| 71 | (if (bufferp buffer) | 71 | (if (bufferp buffer) |
| 72 | (set-buffer buffer)))) | 72 | (set-buffer buffer)))) |
| 73 | (let ((ol (semantic-overlays-at (or positionormarker (point)))) | 73 | (let ((ol (overlays-at (or positionormarker (point)))) |
| 74 | (ret nil)) | 74 | (ret nil)) |
| 75 | (while ol | 75 | (while ol |
| 76 | (let ((tmp (semantic-overlay-get (car ol) 'semantic))) | 76 | (let ((tmp (overlay-get (car ol) 'semantic))) |
| 77 | (when (and tmp | 77 | (when (and tmp |
| 78 | ;; We don't need with-position because no tag w/out | 78 | ;; We don't need with-position because no tag w/out |
| 79 | ;; a position could exist in an overlay. | 79 | ;; a position could exist in an overlay. |
| @@ -90,10 +90,10 @@ Uses overlays to determine position. | |||
| 90 | Optional BUFFER argument specifies the buffer to use." | 90 | Optional BUFFER argument specifies the buffer to use." |
| 91 | (save-excursion | 91 | (save-excursion |
| 92 | (if buffer (set-buffer buffer)) | 92 | (if buffer (set-buffer buffer)) |
| 93 | (let ((ol (semantic-overlays-in start end)) | 93 | (let ((ol (overlays-in start end)) |
| 94 | (ret nil)) | 94 | (ret nil)) |
| 95 | (while ol | 95 | (while ol |
| 96 | (let ((tmp (semantic-overlay-get (car ol) 'semantic))) | 96 | (let ((tmp (overlay-get (car ol) 'semantic))) |
| 97 | (when (and tmp | 97 | (when (and tmp |
| 98 | ;; See above about position | 98 | ;; See above about position |
| 99 | (semantic-tag-p tmp)) | 99 | (semantic-tag-p tmp)) |
| @@ -112,22 +112,22 @@ not the current tag." | |||
| 112 | (if (not start) (setq start (point))) | 112 | (if (not start) (setq start (point))) |
| 113 | (let ((os start) (ol nil)) | 113 | (let ((os start) (ol nil)) |
| 114 | (while (and os (< os (point-max)) (not ol)) | 114 | (while (and os (< os (point-max)) (not ol)) |
| 115 | (setq os (semantic-overlay-next-change os)) | 115 | (setq os (next-overlay-change os)) |
| 116 | (when os | 116 | (when os |
| 117 | ;; Get overlays at position | 117 | ;; Get overlays at position |
| 118 | (setq ol (semantic-overlays-at os)) | 118 | (setq ol (overlays-at os)) |
| 119 | ;; find the overlay that belongs to semantic | 119 | ;; find the overlay that belongs to semantic |
| 120 | ;; and starts at the found position. | 120 | ;; and starts at the found position. |
| 121 | (while (and ol (listp ol)) | 121 | (while (and ol (listp ol)) |
| 122 | (if (and (semantic-overlay-get (car ol) 'semantic) | 122 | (if (and (overlay-get (car ol) 'semantic) |
| 123 | (semantic-tag-p | 123 | (semantic-tag-p |
| 124 | (semantic-overlay-get (car ol) 'semantic)) | 124 | (overlay-get (car ol) 'semantic)) |
| 125 | (= (semantic-overlay-start (car ol)) os)) | 125 | (= (overlay-start (car ol)) os)) |
| 126 | (setq ol (car ol))) | 126 | (setq ol (car ol))) |
| 127 | (when (listp ol) (setq ol (cdr ol)))))) | 127 | (when (listp ol) (setq ol (cdr ol)))))) |
| 128 | ;; convert ol to a tag | 128 | ;; convert ol to a tag |
| 129 | (when (and ol (semantic-tag-p (semantic-overlay-get ol 'semantic))) | 129 | (when (and ol (semantic-tag-p (overlay-get ol 'semantic))) |
| 130 | (semantic-overlay-get ol 'semantic))))) | 130 | (overlay-get ol 'semantic))))) |
| 131 | 131 | ||
| 132 | ;;;###autoload | 132 | ;;;###autoload |
| 133 | (defun semantic-find-tag-by-overlay-prev (&optional start buffer) | 133 | (defun semantic-find-tag-by-overlay-prev (&optional start buffer) |
| @@ -139,25 +139,25 @@ not the current tag." | |||
| 139 | (if (not start) (setq start (point))) | 139 | (if (not start) (setq start (point))) |
| 140 | (let ((os start) (ol nil)) | 140 | (let ((os start) (ol nil)) |
| 141 | (while (and os (> os (point-min)) (not ol)) | 141 | (while (and os (> os (point-min)) (not ol)) |
| 142 | (setq os (semantic-overlay-previous-change os)) | 142 | (setq os (previous-overlay-change os)) |
| 143 | (when os | 143 | (when os |
| 144 | ;; Get overlays at position | 144 | ;; Get overlays at position |
| 145 | (setq ol (semantic-overlays-at (1- os))) | 145 | (setq ol (overlays-at (1- os))) |
| 146 | ;; find the overlay that belongs to semantic | 146 | ;; find the overlay that belongs to semantic |
| 147 | ;; and ENDS at the found position. | 147 | ;; and ENDS at the found position. |
| 148 | ;; | 148 | ;; |
| 149 | ;; Use end because we are going backward. | 149 | ;; Use end because we are going backward. |
| 150 | (while (and ol (listp ol)) | 150 | (while (and ol (listp ol)) |
| 151 | (if (and (semantic-overlay-get (car ol) 'semantic) | 151 | (if (and (overlay-get (car ol) 'semantic) |
| 152 | (semantic-tag-p | 152 | (semantic-tag-p |
| 153 | (semantic-overlay-get (car ol) 'semantic)) | 153 | (overlay-get (car ol) 'semantic)) |
| 154 | (= (semantic-overlay-end (car ol)) os)) | 154 | (= (overlay-end (car ol)) os)) |
| 155 | (setq ol (car ol))) | 155 | (setq ol (car ol))) |
| 156 | (when (listp ol) (setq ol (cdr ol)))))) | 156 | (when (listp ol) (setq ol (cdr ol)))))) |
| 157 | ;; convert ol to a tag | 157 | ;; convert ol to a tag |
| 158 | (when (and ol | 158 | (when (and ol |
| 159 | (semantic-tag-p (semantic-overlay-get ol 'semantic))) | 159 | (semantic-tag-p (overlay-get ol 'semantic))) |
| 160 | (semantic-overlay-get ol 'semantic))))) | 160 | (overlay-get ol 'semantic))))) |
| 161 | 161 | ||
| 162 | ;;;###autoload | 162 | ;;;###autoload |
| 163 | (defun semantic-find-tag-parent-by-overlay (tag) | 163 | (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 @@ | |||
| 76 | 76 | ||
| 77 | (defun semantic-delete-overlay-maybe (overlay) | 77 | (defun semantic-delete-overlay-maybe (overlay) |
| 78 | "Delete OVERLAY if it is a semantic token overlay." | 78 | "Delete OVERLAY if it is a semantic token overlay." |
| 79 | (if (semantic-overlay-get overlay 'semantic) | 79 | (if (overlay-get overlay 'semantic) |
| 80 | (semantic-overlay-delete overlay))) | 80 | (delete-overlay overlay))) |
| 81 | 81 | ||
| 82 | ;;; Menu Item compatibility | 82 | ;;; Menu Item compatibility |
| 83 | ;; | 83 | ;; |
| @@ -104,10 +104,10 @@ Possible Lifespans are: | |||
| 104 | (or (memq lifespan '(end-of-command exit-cache-zone)) | 104 | (or (memq lifespan '(end-of-command exit-cache-zone)) |
| 105 | (error "semantic-cache-data-to-buffer: Unknown LIFESPAN: %s" | 105 | (error "semantic-cache-data-to-buffer: Unknown LIFESPAN: %s" |
| 106 | lifespan)) | 106 | lifespan)) |
| 107 | (let ((o (semantic-make-overlay start end buffer))) | 107 | (let ((o (make-overlay start end buffer))) |
| 108 | (semantic-overlay-put o 'cache-name name) | 108 | (overlay-put o 'cache-name name) |
| 109 | (semantic-overlay-put o 'cached-value value) | 109 | (overlay-put o 'cached-value value) |
| 110 | (semantic-overlay-put o 'lifespan lifespan) | 110 | (overlay-put o 'lifespan lifespan) |
| 111 | (setq semantic-cache-data-overlays | 111 | (setq semantic-cache-data-overlays |
| 112 | (cons o semantic-cache-data-overlays)) | 112 | (cons o semantic-cache-data-overlays)) |
| 113 | ;;(message "Adding to cache: %s" o) | 113 | ;;(message "Adding to cache: %s" o) |
| @@ -121,14 +121,14 @@ Remove self from `post-command-hook' if it is empty." | |||
| 121 | (oldcache semantic-cache-data-overlays)) | 121 | (oldcache semantic-cache-data-overlays)) |
| 122 | (while oldcache | 122 | (while oldcache |
| 123 | (let* ((o (car oldcache)) | 123 | (let* ((o (car oldcache)) |
| 124 | (life (semantic-overlay-get o 'lifespan)) | 124 | (life (overlay-get o 'lifespan)) |
| 125 | ) | 125 | ) |
| 126 | (if (or (eq life 'end-of-command) | 126 | (if (or (eq life 'end-of-command) |
| 127 | (and (eq life 'exit-cache-zone) | 127 | (and (eq life 'exit-cache-zone) |
| 128 | (not (member o (semantic-overlays-at (point)))))) | 128 | (not (member o (overlays-at (point)))))) |
| 129 | (progn | 129 | (progn |
| 130 | ;;(message "Removing from cache: %s" o) | 130 | ;;(message "Removing from cache: %s" o) |
| 131 | (semantic-overlay-delete o) | 131 | (delete-overlay o) |
| 132 | ) | 132 | ) |
| 133 | (setq newcache (cons o newcache)))) | 133 | (setq newcache (cons o newcache)))) |
| 134 | (setq oldcache (cdr oldcache))) | 134 | (setq oldcache (cdr oldcache))) |
| @@ -143,14 +143,14 @@ Remove self from `post-command-hook' if it is empty." | |||
| 143 | "Get cached data with NAME from optional POINT." | 143 | "Get cached data with NAME from optional POINT." |
| 144 | (save-excursion | 144 | (save-excursion |
| 145 | (if point (goto-char point)) | 145 | (if point (goto-char point)) |
| 146 | (let ((o (semantic-overlays-at (point))) | 146 | (let ((o (overlays-at (point))) |
| 147 | (ans nil)) | 147 | (ans nil)) |
| 148 | (while (and (not ans) o) | 148 | (while (and (not ans) o) |
| 149 | (if (equal (semantic-overlay-get (car o) 'cache-name) name) | 149 | (if (equal (overlay-get (car o) 'cache-name) name) |
| 150 | (setq ans (car o)) | 150 | (setq ans (car o)) |
| 151 | (setq o (cdr o)))) | 151 | (setq o (cdr o)))) |
| 152 | (when ans | 152 | (when ans |
| 153 | (semantic-overlay-get ans 'cached-value))))) | 153 | (overlay-get ans 'cached-value))))) |
| 154 | 154 | ||
| 155 | (defun semantic-test-data-cache () | 155 | (defun semantic-test-data-cache () |
| 156 | "Test the data cache." | 156 | "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." | |||
| 1292 | (semantic-edits-os overlay) | 1292 | (semantic-edits-os overlay) |
| 1293 | (semantic-edits-oe overlay))))) | 1293 | (semantic-edits-oe overlay))))) |
| 1294 | (if (semantic-tag-of-class-p outer 'nonterminal) | 1294 | (if (semantic-tag-of-class-p outer 'nonterminal) |
| 1295 | (semantic-overlay-move overlay | 1295 | (move-overlay overlay |
| 1296 | (semantic-tag-start outer) | 1296 | (semantic-tag-start outer) |
| 1297 | (semantic-tag-end outer))))) | 1297 | (semantic-tag-end outer))))) |
| 1298 | 1298 | ||
| 1299 | (define-derived-mode semantic-grammar-mode | 1299 | (define-derived-mode semantic-grammar-mode |
| 1300 | fundamental-mode "Semantic Grammar Framework" | 1300 | 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." | |||
| 849 | ;; just the stable version. | 849 | ;; just the stable version. |
| 850 | (pulse-flag nil) | 850 | (pulse-flag nil) |
| 851 | ) | 851 | ) |
| 852 | (cond ((semantic-overlay-p region) | 852 | (cond ((overlayp region) |
| 853 | (with-current-buffer (semantic-overlay-buffer region) | 853 | (with-current-buffer (overlay-buffer region) |
| 854 | (save-excursion | 854 | (save-excursion |
| 855 | (goto-char (semantic-overlay-start region)) | 855 | (goto-char (overlay-start region)) |
| 856 | (when (pos-visible-in-window-p | 856 | (when (pos-visible-in-window-p |
| 857 | (point) (get-buffer-window (current-buffer) 'visible)) | 857 | (point) (get-buffer-window (current-buffer) 'visible)) |
| 858 | (if (< (semantic-overlay-end region) (point-at-eol)) | 858 | (if (< (overlay-end region) (point-at-eol)) |
| 859 | (pulse-momentary-highlight-overlay | 859 | (pulse-momentary-highlight-overlay |
| 860 | region semantic-idle-symbol-highlight-face) | 860 | region semantic-idle-symbol-highlight-face) |
| 861 | ;; Not the same | 861 | ;; Not the same |
| 862 | (pulse-momentary-highlight-region | 862 | (pulse-momentary-highlight-region |
| 863 | (semantic-overlay-start region) | 863 | (overlay-start region) |
| 864 | (point-at-eol) | 864 | (point-at-eol) |
| 865 | semantic-idle-symbol-highlight-face)))) | 865 | semantic-idle-symbol-highlight-face)))) |
| 866 | )) | 866 | )) |
| @@ -1074,7 +1074,7 @@ be called." | |||
| 1074 | (let ((old-window (selected-window)) | 1074 | (let ((old-window (selected-window)) |
| 1075 | (window (semantic-event-window event))) | 1075 | (window (semantic-event-window event))) |
| 1076 | (select-window window t) | 1076 | (select-window window t) |
| 1077 | (semantic-popup-menu semantic-idle-breadcrumbs-popup-menu) | 1077 | (popup-menu semantic-idle-breadcrumbs-popup-menu) |
| 1078 | (select-window old-window))) | 1078 | (select-window old-window))) |
| 1079 | 1079 | ||
| 1080 | (defmacro semantic-idle-breadcrumbs--tag-function (function) | 1080 | (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 | |||
| 155 | If TAG doesn't have an overlay, and instead as a vector of positions, | 155 | If TAG doesn't have an overlay, and instead as a vector of positions, |
| 156 | concoct a combination of file name, and position." | 156 | concoct a combination of file name, and position." |
| 157 | (let ((o (semantic-tag-overlay tag))) | 157 | (let ((o (semantic-tag-overlay tag))) |
| 158 | (if (not (semantic-overlay-p o)) | 158 | (if (not (overlayp o)) |
| 159 | (let ((v (make-vector 3 nil))) | 159 | (let ((v (make-vector 3 nil))) |
| 160 | (aset v 0 semantic-imenu-directory-current-file) | 160 | (aset v 0 semantic-imenu-directory-current-file) |
| 161 | (aset v 1 (aref o 0)) | 161 | (aset v 1 (aref o 0)) |
| @@ -170,9 +170,9 @@ Used to override function `imenu-default-goto-function' so that | |||
| 170 | we can continue to use overlays to maintain the current position. | 170 | we can continue to use overlays to maintain the current position. |
| 171 | Optional argument REST is some extra stuff." | 171 | Optional argument REST is some extra stuff." |
| 172 | (require 'pulse) | 172 | (require 'pulse) |
| 173 | (if (semantic-overlay-p position) | 173 | (if (overlayp position) |
| 174 | (let ((os (semantic-overlay-start position)) | 174 | (let ((os (overlay-start position)) |
| 175 | (ob (semantic-overlay-buffer position))) | 175 | (ob (overlay-buffer position))) |
| 176 | (if os | 176 | (if os |
| 177 | (progn | 177 | (progn |
| 178 | (if (not (eq ob (current-buffer))) | 178 | (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." | |||
| 1092 | ;; the originating buffer we are parsing. We need to do this every time | 1092 | ;; the originating buffer we are parsing. We need to do this every time |
| 1093 | ;; since the state changes. | 1093 | ;; since the state changes. |
| 1094 | (dolist (V important-vars) | 1094 | (dolist (V important-vars) |
| 1095 | (set V (semantic-buffer-local-value V origbuff))) | 1095 | (set V (buffer-local-value V origbuff))) |
| 1096 | (insert text) | 1096 | (insert text) |
| 1097 | (goto-char (point-min)) | 1097 | (goto-char (point-min)) |
| 1098 | 1098 | ||
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." | |||
| 686 | "Highlight the lexical TOKEN. | 686 | "Highlight the lexical TOKEN. |
| 687 | TOKEN is a lexical token with a START And END position. | 687 | TOKEN is a lexical token with a START And END position. |
| 688 | Return the overlay." | 688 | Return the overlay." |
| 689 | (let ((o (semantic-make-overlay (semantic-lex-token-start token) | 689 | (let ((o (make-overlay (semantic-lex-token-start token) |
| 690 | (semantic-lex-token-end token)))) | 690 | (semantic-lex-token-end token)))) |
| 691 | (semantic-overlay-put o 'face 'highlight) | 691 | (overlay-put o 'face 'highlight) |
| 692 | o)) | 692 | o)) |
| 693 | 693 | ||
| 694 | ;;; Lexical analyzer creation | 694 | ;;; Lexical analyzer creation |
| @@ -752,11 +752,11 @@ a LOCAL option.") | |||
| 752 | (progn | 752 | (progn |
| 753 | (when token | 753 | (when token |
| 754 | (setq o (semantic-lex-highlight-token token))) | 754 | (setq o (semantic-lex-highlight-token token))) |
| 755 | (semantic-read-event | 755 | (read-event |
| 756 | (format "%S :: Depth: %d :: SPC - continue" token semantic-lex-current-depth)) | 756 | (format "%S :: Depth: %d :: SPC - continue" token semantic-lex-current-depth)) |
| 757 | ) | 757 | ) |
| 758 | (when o | 758 | (when o |
| 759 | (semantic-overlay-delete o)))))) | 759 | (delete-overlay o)))))) |
| 760 | 760 | ||
| 761 | (defmacro define-lex (name doc &rest analyzers) | 761 | (defmacro define-lex (name doc &rest analyzers) |
| 762 | "Create a new lexical analyzer with NAME. | 762 | "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." | |||
| 148 | "Return the tag before POS or one of its parent where to step." | 148 | "Return the tag before POS or one of its parent where to step." |
| 149 | (let (ol tag) | 149 | (let (ol tag) |
| 150 | (while (and pos (> pos (point-min)) (not tag)) | 150 | (while (and pos (> pos (point-min)) (not tag)) |
| 151 | (setq pos (semantic-overlay-previous-change pos)) | 151 | (setq pos (previous-overlay-change pos)) |
| 152 | (when pos | 152 | (when pos |
| 153 | ;; Get overlays at position | 153 | ;; Get overlays at position |
| 154 | (setq ol (semantic-overlays-at pos)) | 154 | (setq ol (overlays-at pos)) |
| 155 | ;; find the overlay that belongs to semantic | 155 | ;; find the overlay that belongs to semantic |
| 156 | ;; and STARTS or ENDS at the found position. | 156 | ;; and STARTS or ENDS at the found position. |
| 157 | (while (and ol (not tag)) | 157 | (while (and ol (not tag)) |
| 158 | (setq tag (semantic-overlay-get (car ol) 'semantic)) | 158 | (setq tag (overlay-get (car ol) 'semantic)) |
| 159 | (unless (and tag (semantic-tag-p tag) | 159 | (unless (and tag (semantic-tag-p tag) |
| 160 | (or (= (semantic-tag-start tag) pos) | 160 | (or (= (semantic-tag-start tag) pos) |
| 161 | (= (semantic-tag-end tag) pos))) | 161 | (= (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." | |||
| 379 | Hits are the line of code from the buffer, not the tag summar or file lines." | 379 | Hits are the line of code from the buffer, not the tag summar or file lines." |
| 380 | (save-excursion | 380 | (save-excursion |
| 381 | (end-of-line) | 381 | (end-of-line) |
| 382 | (let* ((ol (car (semantic-overlays-at (1- (point)))))) ;; trust this for now | 382 | (let* ((ol (car (overlays-at (1- (point)))))) ;; trust this for now |
| 383 | (when ol (semantic-overlay-get ol 'line))))) | 383 | (when ol (overlay-get ol 'line))))) |
| 384 | 384 | ||
| 385 | 385 | ||
| 386 | ;;; Keyboard Macros on a Hit | 386 | ;;; Keyboard Macros on a Hit |
| @@ -398,9 +398,9 @@ cursor to the beginning of that symbol, then record a macro as if | |||
| 398 | searchfor)) | 398 | searchfor)) |
| 399 | (ol (save-excursion | 399 | (ol (save-excursion |
| 400 | (end-of-line) | 400 | (end-of-line) |
| 401 | (car (semantic-overlays-at (1- (point)))))) | 401 | (car (overlays-at (1- (point)))))) |
| 402 | (tag (when ol (semantic-overlay-get ol 'tag))) | 402 | (tag (when ol (overlay-get ol 'tag))) |
| 403 | (line (when ol (semantic-overlay-get ol 'line)))) | 403 | (line (when ol (overlay-get ol 'line)))) |
| 404 | (when (not line) | 404 | (when (not line) |
| 405 | (error "Cannot create macro on a non-hit line")) | 405 | (error "Cannot create macro on a non-hit line")) |
| 406 | ;; Go there, and do something useful. | 406 | ;; Go there, and do something useful. |
| @@ -468,9 +468,9 @@ Return the number of occurrences FUNCTION was operated upon." | |||
| 468 | (goto-char (point-min)) | 468 | (goto-char (point-min)) |
| 469 | (while (not (eobp)) | 469 | (while (not (eobp)) |
| 470 | ;; Is this line a "hit" line? | 470 | ;; Is this line a "hit" line? |
| 471 | (let* ((ol (car (semantic-overlays-at (1- (point))))) ;; trust this for now | 471 | (let* ((ol (car (overlays-at (1- (point))))) ;; trust this for now |
| 472 | (tag (when ol (semantic-overlay-get ol 'tag))) | 472 | (tag (when ol (overlay-get ol 'tag))) |
| 473 | (line (when ol (semantic-overlay-get ol 'line)))) | 473 | (line (when ol (overlay-get ol 'line)))) |
| 474 | (when line | 474 | (when line |
| 475 | ;; The "line" means we have an open hit. | 475 | ;; The "line" means we have an open hit. |
| 476 | (with-current-buffer (semantic-tag-buffer tag) | 476 | (with-current-buffer (semantic-tag-buffer tag) |
| @@ -493,8 +493,8 @@ Return the number of occurrences FUNCTION was operated upon." | |||
| 493 | (goto-char (point-min)) | 493 | (goto-char (point-min)) |
| 494 | (while (re-search-forward "\\[-\\]" nil t) | 494 | (while (re-search-forward "\\[-\\]" nil t) |
| 495 | (end-of-line) | 495 | (end-of-line) |
| 496 | (let* ((ol (car (semantic-overlays-at (1- (point))))) ;; trust this for now | 496 | (let* ((ol (car (overlays-at (1- (point))))) ;; trust this for now |
| 497 | (tag (when ol (semantic-overlay-get ol 'tag)))) | 497 | (tag (when ol (overlay-get ol 'tag)))) |
| 498 | ;; If there is a tag, then close/open it. | 498 | ;; If there is a tag, then close/open it. |
| 499 | (when tag | 499 | (when tag |
| 500 | (semantic-symref-list-toggle-showing) | 500 | (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." | |||
| 148 | (defsubst semantic-tag-start (tag) | 148 | (defsubst semantic-tag-start (tag) |
| 149 | "Return the start location of TAG." | 149 | "Return the start location of TAG." |
| 150 | (let ((o (semantic-tag-overlay tag))) | 150 | (let ((o (semantic-tag-overlay tag))) |
| 151 | (if (semantic-overlay-p o) | 151 | (if (overlayp o) |
| 152 | (semantic-overlay-start o) | 152 | (overlay-start o) |
| 153 | (aref o 0)))) | 153 | (aref o 0)))) |
| 154 | 154 | ||
| 155 | (defsubst semantic-tag-end (tag) | 155 | (defsubst semantic-tag-end (tag) |
| 156 | "Return the end location of TAG." | 156 | "Return the end location of TAG." |
| 157 | (let ((o (semantic-tag-overlay tag))) | 157 | (let ((o (semantic-tag-overlay tag))) |
| 158 | (if (semantic-overlay-p o) | 158 | (if (overlayp o) |
| 159 | (semantic-overlay-end o) | 159 | (overlay-end o) |
| 160 | (aref o 1)))) | 160 | (aref o 1)))) |
| 161 | 161 | ||
| 162 | (defsubst semantic-tag-bounds (tag) | 162 | (defsubst semantic-tag-bounds (tag) |
| @@ -167,8 +167,8 @@ That function is for internal use only." | |||
| 167 | (defun semantic-tag-set-bounds (tag start end) | 167 | (defun semantic-tag-set-bounds (tag start end) |
| 168 | "In TAG, set the START and END location of data it describes." | 168 | "In TAG, set the START and END location of data it describes." |
| 169 | (let ((o (semantic-tag-overlay tag))) | 169 | (let ((o (semantic-tag-overlay tag))) |
| 170 | (if (semantic-overlay-p o) | 170 | (if (overlayp o) |
| 171 | (semantic-overlay-move o start end) | 171 | (move-overlay o start end) |
| 172 | (semantic--tag-set-overlay tag (vector start end))))) | 172 | (semantic--tag-set-overlay tag (vector start end))))) |
| 173 | 173 | ||
| 174 | (defun semantic-tag-in-buffer-p (tag) | 174 | (defun semantic-tag-in-buffer-p (tag) |
| @@ -176,9 +176,9 @@ That function is for internal use only." | |||
| 176 | If a tag is not in a buffer, return nil." | 176 | If a tag is not in a buffer, return nil." |
| 177 | (let ((o (semantic-tag-overlay tag))) | 177 | (let ((o (semantic-tag-overlay tag))) |
| 178 | ;; TAG is currently linked to a buffer, return it. | 178 | ;; TAG is currently linked to a buffer, return it. |
| 179 | (when (and (semantic-overlay-p o) | 179 | (when (and (overlayp o) |
| 180 | (semantic-overlay-live-p o)) | 180 | (overlay-buffer o)) |
| 181 | (semantic-overlay-buffer o)))) | 181 | (overlay-buffer o)))) |
| 182 | 182 | ||
| 183 | (defsubst semantic--tag-get-property (tag property) | 183 | (defsubst semantic--tag-get-property (tag property) |
| 184 | "From TAG, extract the value of PROPERTY. | 184 | "From TAG, extract the value of PROPERTY. |
| @@ -344,8 +344,8 @@ struct or union." | |||
| 344 | "Return non-nil if TAG has positional information." | 344 | "Return non-nil if TAG has positional information." |
| 345 | (and (semantic-tag-p tag) | 345 | (and (semantic-tag-p tag) |
| 346 | (let ((o (semantic-tag-overlay tag))) | 346 | (let ((o (semantic-tag-overlay tag))) |
| 347 | (or (and (semantic-overlay-p o) | 347 | (or (and (overlayp o) |
| 348 | (semantic-overlay-live-p o)) | 348 | (overlay-buffer o)) |
| 349 | (arrayp o))))) | 349 | (arrayp o))))) |
| 350 | 350 | ||
| 351 | (defun semantic-equivalent-tag-p (tag1 tag2) | 351 | (defun semantic-equivalent-tag-p (tag1 tag2) |
| @@ -647,7 +647,7 @@ This runs the tag hook `unlink-copy-hook'." | |||
| 647 | 647 | ||
| 648 | ;; Call the unlink-copy hook. This should tell tools that | 648 | ;; Call the unlink-copy hook. This should tell tools that |
| 649 | ;; this tag is not part of any buffer. | 649 | ;; this tag is not part of any buffer. |
| 650 | (when (semantic-overlay-p (semantic-tag-overlay tag)) | 650 | (when (overlayp (semantic-tag-overlay tag)) |
| 651 | (semantic--tag-run-hooks copy 'unlink-copy-hook)) | 651 | (semantic--tag-run-hooks copy 'unlink-copy-hook)) |
| 652 | ) | 652 | ) |
| 653 | copy)) | 653 | copy)) |
| @@ -1114,11 +1114,11 @@ This function is for internal use only." | |||
| 1114 | This function is for internal use only." | 1114 | This function is for internal use only." |
| 1115 | (when (semantic-tag-p tag) | 1115 | (when (semantic-tag-p tag) |
| 1116 | (let ((o (semantic-tag-overlay tag))) | 1116 | (let ((o (semantic-tag-overlay tag))) |
| 1117 | (when (semantic-overlay-p o) | 1117 | (when (overlayp o) |
| 1118 | (semantic--tag-set-overlay | 1118 | (semantic--tag-set-overlay |
| 1119 | tag (vector (semantic-overlay-start o) | 1119 | tag (vector (overlay-start o) |
| 1120 | (semantic-overlay-end o))) | 1120 | (overlay-end o))) |
| 1121 | (semantic-overlay-delete o)) | 1121 | (delete-overlay o)) |
| 1122 | ;; Look for a link hook on TAG. | 1122 | ;; Look for a link hook on TAG. |
| 1123 | (semantic--tag-run-hooks tag 'unlink-hook) | 1123 | (semantic--tag-run-hooks tag 'unlink-hook) |
| 1124 | ;; Fix the sub-tags which contain overlays. | 1124 | ;; Fix the sub-tags which contain overlays. |
| @@ -1136,10 +1136,9 @@ This function is for internal use only." | |||
| 1136 | (when (semantic-tag-p tag) | 1136 | (when (semantic-tag-p tag) |
| 1137 | (let ((o (semantic-tag-overlay tag))) | 1137 | (let ((o (semantic-tag-overlay tag))) |
| 1138 | (when (and (vectorp o) (= (length o) 2)) | 1138 | (when (and (vectorp o) (= (length o) 2)) |
| 1139 | (setq o (semantic-make-overlay (aref o 0) (aref o 1) | 1139 | (setq o (make-overlay (aref o 0) (aref o 1) (current-buffer))) |
| 1140 | (current-buffer))) | ||
| 1141 | (semantic--tag-set-overlay tag o) | 1140 | (semantic--tag-set-overlay tag o) |
| 1142 | (semantic-overlay-put o 'semantic tag) | 1141 | (overlay-put o 'semantic tag) |
| 1143 | ;; Clear the :filename property | 1142 | ;; Clear the :filename property |
| 1144 | (semantic--tag-put-property tag :filename nil)) | 1143 | (semantic--tag-put-property tag :filename nil)) |
| 1145 | ;; Look for a link hook on TAG. | 1144 | ;; 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." | |||
| 194 | "Function set into `semantic-edits-new-change-hook'. | 194 | "Function set into `semantic-edits-new-change-hook'. |
| 195 | Argument OVERLAY is the overlay created to mark the change. | 195 | Argument OVERLAY is the overlay created to mark the change. |
| 196 | This function will set the face property on this overlay." | 196 | This function will set the face property on this overlay." |
| 197 | (semantic-overlay-put overlay 'face 'semantic-highlight-edits-face)) | 197 | (overlay-put overlay 'face 'semantic-highlight-edits-face)) |
| 198 | 198 | ||
| 199 | (defvar semantic-highlight-edits-mode-map | 199 | (defvar semantic-highlight-edits-mode-map |
| 200 | (let ((km (make-sparse-keymap))) | 200 | (let ((km (make-sparse-keymap))) |
| @@ -260,11 +260,11 @@ The face is used in `semantic-show-unmatched-syntax-mode'." | |||
| 260 | 260 | ||
| 261 | (defsubst semantic-unmatched-syntax-overlay-p (overlay) | 261 | (defsubst semantic-unmatched-syntax-overlay-p (overlay) |
| 262 | "Return non-nil if OVERLAY is an unmatched syntax one." | 262 | "Return non-nil if OVERLAY is an unmatched syntax one." |
| 263 | (eq (semantic-overlay-get overlay 'semantic) 'unmatched)) | 263 | (eq (overlay-get overlay 'semantic) 'unmatched)) |
| 264 | 264 | ||
| 265 | (defun semantic-showing-unmatched-syntax-p () | 265 | (defun semantic-showing-unmatched-syntax-p () |
| 266 | "Return non-nil if an unmatched syntax overlay was found in buffer." | 266 | "Return non-nil if an unmatched syntax overlay was found in buffer." |
| 267 | (let ((ol (semantic-overlays-in (point-min) (point-max))) | 267 | (let ((ol (overlays-in (point-min) (point-max))) |
| 268 | found) | 268 | found) |
| 269 | (while (and ol (not found)) | 269 | (while (and ol (not found)) |
| 270 | (setq found (semantic-unmatched-syntax-overlay-p (car ol)) | 270 | (setq found (semantic-unmatched-syntax-overlay-p (car ol)) |
| @@ -275,13 +275,13 @@ The face is used in `semantic-show-unmatched-syntax-mode'." | |||
| 275 | "Fetch a list of unmatched lexical tokens from the current buffer. | 275 | "Fetch a list of unmatched lexical tokens from the current buffer. |
| 276 | Uses the overlays which have accurate bounds, and rebuilds what was | 276 | Uses the overlays which have accurate bounds, and rebuilds what was |
| 277 | originally passed in." | 277 | originally passed in." |
| 278 | (let ((ol (semantic-overlays-in (point-min) (point-max))) | 278 | (let ((ol (overlays-in (point-min) (point-max))) |
| 279 | (ustc nil)) | 279 | (ustc nil)) |
| 280 | (while ol | 280 | (while ol |
| 281 | (if (semantic-unmatched-syntax-overlay-p (car ol)) | 281 | (if (semantic-unmatched-syntax-overlay-p (car ol)) |
| 282 | (setq ustc (cons (cons 'thing | 282 | (setq ustc (cons (cons 'thing |
| 283 | (cons (semantic-overlay-start (car ol)) | 283 | (cons (overlay-start (car ol)) |
| 284 | (semantic-overlay-end (car ol)))) | 284 | (overlay-end (car ol)))) |
| 285 | ustc))) | 285 | ustc))) |
| 286 | (setq ol (cdr ol))) | 286 | (setq ol (cdr ol))) |
| 287 | (nreverse ustc)) | 287 | (nreverse ustc)) |
| @@ -289,10 +289,10 @@ originally passed in." | |||
| 289 | 289 | ||
| 290 | (defun semantic-clean-unmatched-syntax-in-region (beg end) | 290 | (defun semantic-clean-unmatched-syntax-in-region (beg end) |
| 291 | "Remove all unmatched syntax overlays between BEG and END." | 291 | "Remove all unmatched syntax overlays between BEG and END." |
| 292 | (let ((ol (semantic-overlays-in beg end))) | 292 | (let ((ol (overlays-in beg end))) |
| 293 | (while ol | 293 | (while ol |
| 294 | (if (semantic-unmatched-syntax-overlay-p (car ol)) | 294 | (if (semantic-unmatched-syntax-overlay-p (car ol)) |
| 295 | (semantic-overlay-delete (car ol))) | 295 | (delete-overlay (car ol))) |
| 296 | (setq ol (cdr ol))))) | 296 | (setq ol (cdr ol))))) |
| 297 | 297 | ||
| 298 | (defsubst semantic-clean-unmatched-syntax-in-buffer () | 298 | (defsubst semantic-clean-unmatched-syntax-in-buffer () |
| @@ -317,10 +317,10 @@ This will highlight elements in SYNTAX as unmatched syntax." | |||
| 317 | (if syntax | 317 | (if syntax |
| 318 | (let (o) | 318 | (let (o) |
| 319 | (while syntax | 319 | (while syntax |
| 320 | (setq o (semantic-make-overlay (semantic-lex-token-start (car syntax)) | 320 | (setq o (make-overlay (semantic-lex-token-start (car syntax)) |
| 321 | (semantic-lex-token-end (car syntax)))) | 321 | (semantic-lex-token-end (car syntax)))) |
| 322 | (semantic-overlay-put o 'semantic 'unmatched) | 322 | (overlay-put o 'semantic 'unmatched) |
| 323 | (semantic-overlay-put o 'face 'semantic-unmatched-syntax-face) | 323 | (overlay-put o 'face 'semantic-unmatched-syntax-face) |
| 324 | (setq syntax (cdr syntax)))) | 324 | (setq syntax (cdr syntax)))) |
| 325 | )) | 325 | )) |
| 326 | 326 | ||
| @@ -331,10 +331,10 @@ Do not search past BOUND if non-nil." | |||
| 331 | (goto-char point) | 331 | (goto-char point) |
| 332 | (let ((os point) (ol nil)) | 332 | (let ((os point) (ol nil)) |
| 333 | (while (and os (< os (or bound (point-max))) (not ol)) | 333 | (while (and os (< os (or bound (point-max))) (not ol)) |
| 334 | (setq os (semantic-overlay-next-change os)) | 334 | (setq os (next-overlay-change os)) |
| 335 | (when os | 335 | (when os |
| 336 | ;; Get overlays at position | 336 | ;; Get overlays at position |
| 337 | (setq ol (semantic-overlays-at os)) | 337 | (setq ol (overlays-at os)) |
| 338 | ;; find the overlay that belongs to semantic | 338 | ;; find the overlay that belongs to semantic |
| 339 | ;; and starts at the found position. | 339 | ;; and starts at the found position. |
| 340 | (while (and ol (listp ol)) | 340 | (while (and ol (listp ol)) |
| @@ -398,7 +398,7 @@ non-nil if the minor mode is enabled. | |||
| 398 | (interactive) | 398 | (interactive) |
| 399 | (let ((o (semantic-next-unmatched-syntax (point)))) | 399 | (let ((o (semantic-next-unmatched-syntax (point)))) |
| 400 | (if o | 400 | (if o |
| 401 | (goto-char (semantic-overlay-start o))))) | 401 | (goto-char (overlay-start o))))) |
| 402 | 402 | ||
| 403 | 403 | ||
| 404 | ;;;; | 404 | ;;;; |
| @@ -892,7 +892,7 @@ Argument EVENT describes the event that caused this function to be called." | |||
| 892 | ;(goto-char (window-start win)) | 892 | ;(goto-char (window-start win)) |
| 893 | (mouse-set-point event) | 893 | (mouse-set-point event) |
| 894 | (sit-for 0) | 894 | (sit-for 0) |
| 895 | (semantic-popup-menu semantic-highlight-func-popup-menu) | 895 | (popup-menu semantic-highlight-func-popup-menu) |
| 896 | ) | 896 | ) |
| 897 | (select-window startwin))) | 897 | (select-window startwin))) |
| 898 | 898 | ||
| @@ -946,19 +946,19 @@ If the current tag for this buffer is different from the last time this | |||
| 946 | function was called, move the overlay." | 946 | function was called, move the overlay." |
| 947 | (when (and (not (minibufferp)) | 947 | (when (and (not (minibufferp)) |
| 948 | (or (not semantic-highlight-func-ct-overlay) | 948 | (or (not semantic-highlight-func-ct-overlay) |
| 949 | (eq (semantic-overlay-buffer | 949 | (eq (overlay-buffer |
| 950 | semantic-highlight-func-ct-overlay) | 950 | semantic-highlight-func-ct-overlay) |
| 951 | (current-buffer)))) | 951 | (current-buffer)))) |
| 952 | (let* ((tag (semantic-stickyfunc-tag-to-stick)) | 952 | (let* ((tag (semantic-stickyfunc-tag-to-stick)) |
| 953 | (ol semantic-highlight-func-ct-overlay)) | 953 | (ol semantic-highlight-func-ct-overlay)) |
| 954 | (when (not ol) | 954 | (when (not ol) |
| 955 | ;; No overlay in this buffer. Make one. | 955 | ;; No overlay in this buffer. Make one. |
| 956 | (setq ol (semantic-make-overlay (point-min) (point-min) | 956 | (setq ol (make-overlay (point-min) (point-min) |
| 957 | (current-buffer) t nil)) | 957 | (current-buffer) t nil)) |
| 958 | (semantic-overlay-put ol 'highlight-func t) | 958 | (overlay-put ol 'highlight-func t) |
| 959 | (semantic-overlay-put ol 'face 'semantic-highlight-func-current-tag-face) | 959 | (overlay-put ol 'face 'semantic-highlight-func-current-tag-face) |
| 960 | (semantic-overlay-put ol 'keymap semantic-highlight-func-mode-map) | 960 | (overlay-put ol 'keymap semantic-highlight-func-mode-map) |
| 961 | (semantic-overlay-put ol 'help-echo | 961 | (overlay-put ol 'help-echo |
| 962 | "Current Function : mouse-3 - Context menu") | 962 | "Current Function : mouse-3 - Context menu") |
| 963 | (setq semantic-highlight-func-ct-overlay ol) | 963 | (setq semantic-highlight-func-ct-overlay ol) |
| 964 | ) | 964 | ) |
| @@ -967,20 +967,16 @@ function was called, move the overlay." | |||
| 967 | (if (or (not tag) disable) | 967 | (if (or (not tag) disable) |
| 968 | ;; No tag, make the overlay go away. | 968 | ;; No tag, make the overlay go away. |
| 969 | (progn | 969 | (progn |
| 970 | (semantic-overlay-put ol 'tag nil) | 970 | (overlay-put ol 'tag nil) |
| 971 | (semantic-overlay-move ol (point-min) (point-min) (current-buffer)) | 971 | (move-overlay ol (point-min) (point-min) (current-buffer))) |
| 972 | ) | ||
| 973 | 972 | ||
| 974 | ;; We have a tag, if it is the same, do nothing. | 973 | ;; We have a tag, if it is the same, do nothing. |
| 975 | (unless (eq (semantic-overlay-get ol 'tag) tag) | 974 | (unless (eq (overlay-get ol 'tag) tag) |
| 976 | (save-excursion | 975 | (save-excursion |
| 977 | (goto-char (semantic-tag-start tag)) | 976 | (goto-char (semantic-tag-start tag)) |
| 978 | (search-forward (semantic-tag-name tag) nil t) | 977 | (search-forward (semantic-tag-name tag) nil t) |
| 979 | (semantic-overlay-put ol 'tag tag) | 978 | (overlay-put ol 'tag tag) |
| 980 | (semantic-overlay-move ol (point-at-bol) (point-at-eol)) | 979 | (move-overlay ol (point-at-bol) (point-at-eol))))))) |
| 981 | ) | ||
| 982 | ) | ||
| 983 | ))) | ||
| 984 | nil) | 980 | nil) |
| 985 | 981 | ||
| 986 | (semantic-add-minor-mode 'semantic-highlight-func-mode | 982 | (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." | |||
| 328 | (if (semantic-tag-p tok) | 328 | (if (semantic-tag-p tok) |
| 329 | (if (semantic-tag-with-position-p tok) | 329 | (if (semantic-tag-with-position-p tok) |
| 330 | (let ((o (semantic-tag-overlay tok))) | 330 | (let ((o (semantic-tag-overlay tok))) |
| 331 | (if (and (semantic-overlay-p o) | 331 | (if (and (overlayp o) |
| 332 | (not (semantic-overlay-live-p o))) | 332 | (not (overlay-buffer o))) |
| 333 | (let ((debug-on-error t)) | 333 | (let ((debug-on-error t)) |
| 334 | (error "Tag %s is invalid!" (semantic-tag-name tok))) | 334 | (error "Tag %s is invalid!" (semantic-tag-name tok))) |
| 335 | ;; else, tag is OK. | 335 | ;; else, tag is OK. |
| @@ -348,7 +348,7 @@ NOTFIRST indicates that this was not the first call in the recursive use." | |||
| 348 | (interactive) | 348 | (interactive) |
| 349 | (if (and (not cache) (not over) (not notfirst)) | 349 | (if (and (not cache) (not over) (not notfirst)) |
| 350 | (setq cache semantic--buffer-cache | 350 | (setq cache semantic--buffer-cache |
| 351 | over (semantic-overlays-in (point-min) (point-max)))) | 351 | over (overlays-in (point-min) (point-max)))) |
| 352 | (while cache | 352 | (while cache |
| 353 | (let ((chil (semantic-tag-components-with-overlays (car cache)))) | 353 | (let ((chil (semantic-tag-components-with-overlays (car cache)))) |
| 354 | (if (not (memq (semantic-tag-overlay (car cache)) over)) | 354 | (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." | |||
| 361 | ;; Strip out all overlays which aren't semantic overlays | 361 | ;; Strip out all overlays which aren't semantic overlays |
| 362 | (let ((o nil)) | 362 | (let ((o nil)) |
| 363 | (while over | 363 | (while over |
| 364 | (when (and (semantic-overlay-get (car over) 'semantic) | 364 | (when (and (overlay-get (car over) 'semantic) |
| 365 | (not (eq (semantic-overlay-get (car over) 'semantic) | 365 | (not (eq (overlay-get (car over) 'semantic) |
| 366 | 'unmatched))) | 366 | 'unmatched))) |
| 367 | (setq o (cons (car over) o))) | 367 | (setq o (cons (car over) o))) |
| 368 | (setq over (cdr over))) | 368 | (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." | |||
| 68 | (when (or (not (slot-boundp f 'overlay)) (not (oref f overlay))) | 68 | (when (or (not (slot-boundp f 'overlay)) (not (oref f overlay))) |
| 69 | (error "Field test: Overlay info not created for field")) | 69 | (error "Field test: Overlay info not created for field")) |
| 70 | 70 | ||
| 71 | (when (and (overlay-p (oref f overlay)) | 71 | (when (and (overlayp (oref f overlay)) |
| 72 | (not (overlay-get (oref f overlay) 'srecode-init-only))) | 72 | (not (overlay-get (oref f overlay) 'srecode-init-only))) |
| 73 | (error "Field creation overlay is not tagged w/ init flag")) | 73 | (error "Field creation overlay is not tagged w/ init flag")) |
| 74 | 74 | ||
| 75 | (srecode-overlaid-activate f) | 75 | (srecode-overlaid-activate f) |
| 76 | 76 | ||
| 77 | (when (or (not (overlay-p (oref f overlay))) | 77 | (when (or (not (overlayp (oref f overlay))) |
| 78 | (overlay-get (oref f overlay) 'srecode-init-only)) | 78 | (overlay-get (oref f overlay) 'srecode-init-only)) |
| 79 | (error "New field overlay not created during activation")) | 79 | (error "New field overlay not created during activation")) |
| 80 | 80 | ||