diff options
Diffstat (limited to 'lisp/cedet/semantic')
-rw-r--r-- | lisp/cedet/semantic/bovine/c.el | 25 | ||||
-rw-r--r-- | lisp/cedet/semantic/dep.el | 18 | ||||
-rw-r--r-- | lisp/cedet/semantic/lex-spp.el | 4 |
3 files changed, 11 insertions, 36 deletions
diff --git a/lisp/cedet/semantic/bovine/c.el b/lisp/cedet/semantic/bovine/c.el index 358829a4568..3649d1c2f1f 100644 --- a/lisp/cedet/semantic/bovine/c.el +++ b/lisp/cedet/semantic/bovine/c.el @@ -46,27 +46,10 @@ (declare-function c-forward-conditional "cc-cmds") (declare-function ede-system-include-path "ede") -;;; Compatibility -;; (eval-when-compile (require 'cc-mode)) -(if (fboundp 'c-end-of-macro) - (eval-and-compile - (defalias 'semantic-c-end-of-macro 'c-end-of-macro)) - ;; From cc-mode 5.30 - (defun semantic-c-end-of-macro () - "Go to the end of a preprocessor directive. -More accurately, move point to the end of the closest following line -that doesn't end with a line continuation backslash. - -This function does not do any hidden buffer changes." - (while (progn - (end-of-line) - (when (and (eq (char-before) ?\\) - (not (eobp))) - (forward-char) - t)))) - ) +(define-obsolete-function-alias 'semantic-c-end-of-macro + #'c-end-of-macro "28.1") ;;; Code: (with-suppressed-warnings ((obsolete define-child-mode)) @@ -266,7 +249,7 @@ Return the defined symbol as a special spp lex token." (semantic-lex-analyzer #'semantic-cpp-lexer) (raw-stream (semantic-lex-spp-stream-for-macro (save-excursion - (semantic-c-end-of-macro) + (c-end-of-macro) ;; HACK - If there's a C comment after ;; the macro, do not parse it. (if (looking-back "/\\*.*" beginning-of-define) @@ -590,7 +573,7 @@ case, we must skip it since it is the ELSE part." (define-lex-regex-analyzer semantic-lex-c-macrobits "Ignore various forms of #if/#else/#endif conditionals." "^\\s-*#\\s-*\\(if\\(n?def\\)?\\|endif\\|elif\\|else\\)" - (semantic-c-end-of-macro) + (c-end-of-macro) (setq semantic-lex-end-point (point)) nil) diff --git a/lisp/cedet/semantic/dep.el b/lisp/cedet/semantic/dep.el index 47afa25dd74..60ab6033aec 100644 --- a/lisp/cedet/semantic/dep.el +++ b/lisp/cedet/semantic/dep.el @@ -183,16 +183,8 @@ macro `defcustom-mode-local-semantic-dependency-system-include-path'." ;; ;; methods for finding files on a provided path. (defmacro semantic--dependency-find-file-on-path (file path) - (if (fboundp 'locate-file) - `(locate-file ,file ,path) - `(let ((p ,path) - (found nil)) - (while (and p (not found)) - (let ((f (expand-file-name ,file (car p)))) - (if (file-exists-p f) - (setq found f))) - (setq p (cdr p))) - found))) + (declare (obsolete locate-file "28.1")) + `(locate-file ,file ,path)) (defvar ede-minor-mode) (defvar ede-object) @@ -216,11 +208,11 @@ provided mode, not from the current major mode." (when (file-exists-p file) (setq found file)) (when (and (not found) (not systemp)) - (setq found (semantic--dependency-find-file-on-path file locp))) + (setq found (locate-file file locp))) (when (and (not found) edesys) - (setq found (semantic--dependency-find-file-on-path file edesys))) + (setq found (locate-file file edesys))) (when (not found) - (setq found (semantic--dependency-find-file-on-path file sysp))) + (setq found (locate-file file sysp))) (if found (expand-file-name found)))) diff --git a/lisp/cedet/semantic/lex-spp.el b/lisp/cedet/semantic/lex-spp.el index b8812de05b6..e6e124eb812 100644 --- a/lisp/cedet/semantic/lex-spp.el +++ b/lisp/cedet/semantic/lex-spp.el @@ -70,7 +70,7 @@ (require 'semantic) (require 'semantic/lex) -(declare-function semantic-c-end-of-macro "semantic/bovine/c") +(declare-function c-end-of-macro "cc-engine") ;;; Code: (defvar semantic-lex-spp-macro-symbol-obarray nil @@ -946,7 +946,7 @@ by another macro." (save-excursion (let ((start (match-beginning 0)) (end (match-end 0)) - (peom (save-excursion (semantic-c-end-of-macro) (point)))) + (peom (save-excursion (c-end-of-macro) (point)))) (condition-case nil (progn ;; This will throw an error if no closing paren can be found. |