diff options
| author | Vibhav Pant | 2020-08-21 14:04:35 +0530 |
|---|---|---|
| committer | Vibhav Pant | 2020-08-21 14:04:35 +0530 |
| commit | f0f8d7b82492e741950c363a03b886965c91b1b0 (patch) | |
| tree | 19b716830b1ebabc0d7d75949c4e6800c0f104ad /lisp/cedet | |
| parent | 9e64a087c4d167e7ec1c4e22bea3e6af53b563de (diff) | |
| parent | c818c29771d3cb51875643b2f6c894073e429dd2 (diff) | |
| download | emacs-feature/native-comp-macos-fixes.tar.gz emacs-feature/native-comp-macos-fixes.zip | |
Merge branch 'feature/native-comp' into feature/native-comp-macos-fixesfeature/native-comp-macos-fixes
Diffstat (limited to 'lisp/cedet')
| -rw-r--r-- | lisp/cedet/ede/make.el | 24 | ||||
| -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 |
4 files changed, 16 insertions, 55 deletions
diff --git a/lisp/cedet/ede/make.el b/lisp/cedet/ede/make.el index ecce3e7105b..140e7387a68 100644 --- a/lisp/cedet/ede/make.el +++ b/lisp/cedet/ede/make.el | |||
| @@ -32,29 +32,15 @@ | |||
| 32 | 32 | ||
| 33 | (declare-function inversion-check-version "inversion") | 33 | (declare-function inversion-check-version "inversion") |
| 34 | 34 | ||
| 35 | (if (fboundp 'locate-file) | 35 | (defsubst ede--find-executable (exec) |
| 36 | (defsubst ede--find-executable (exec) | 36 | "Return an expanded file name for a program EXEC on the exec path." |
| 37 | "Return an expanded file name for a program EXEC on the exec path." | 37 | (declare (obsolete locate-file "28.1")) |
| 38 | (locate-file exec exec-path)) | 38 | (locate-file exec exec-path)) |
| 39 | |||
| 40 | ;; Else, older version of Emacs. | ||
| 41 | |||
| 42 | (defsubst ede--find-executable (exec) | ||
| 43 | "Return an expanded file name for a program EXEC on the exec path." | ||
| 44 | (let ((p exec-path) | ||
| 45 | (found nil)) | ||
| 46 | (while (and p (not found)) | ||
| 47 | (let ((f (expand-file-name exec (car p)))) | ||
| 48 | (if (file-exists-p f) | ||
| 49 | (setq found f))) | ||
| 50 | (setq p (cdr p))) | ||
| 51 | found)) | ||
| 52 | ) | ||
| 53 | 39 | ||
| 54 | (defvar ede-make-min-version "3.0" | 40 | (defvar ede-make-min-version "3.0" |
| 55 | "Minimum version of GNU make required.") | 41 | "Minimum version of GNU make required.") |
| 56 | 42 | ||
| 57 | (defcustom ede-make-command (cond ((ede--find-executable "gmake") | 43 | (defcustom ede-make-command (cond ((executable-find "gmake") |
| 58 | "gmake") | 44 | "gmake") |
| 59 | (t "make")) ;; What to do? | 45 | (t "make")) ;; What to do? |
| 60 | "The MAKE command to use for EDE when compiling. | 46 | "The MAKE command to use for EDE when compiling. |
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 @@ | |||
| 46 | (declare-function c-forward-conditional "cc-cmds") | 46 | (declare-function c-forward-conditional "cc-cmds") |
| 47 | (declare-function ede-system-include-path "ede") | 47 | (declare-function ede-system-include-path "ede") |
| 48 | 48 | ||
| 49 | ;;; Compatibility | ||
| 50 | ;; | ||
| 51 | (eval-when-compile (require 'cc-mode)) | 49 | (eval-when-compile (require 'cc-mode)) |
| 52 | 50 | ||
| 53 | (if (fboundp 'c-end-of-macro) | 51 | (define-obsolete-function-alias 'semantic-c-end-of-macro |
| 54 | (eval-and-compile | 52 | #'c-end-of-macro "28.1") |
| 55 | (defalias 'semantic-c-end-of-macro 'c-end-of-macro)) | ||
| 56 | ;; From cc-mode 5.30 | ||
| 57 | (defun semantic-c-end-of-macro () | ||
| 58 | "Go to the end of a preprocessor directive. | ||
| 59 | More accurately, move point to the end of the closest following line | ||
| 60 | that doesn't end with a line continuation backslash. | ||
| 61 | |||
| 62 | This function does not do any hidden buffer changes." | ||
| 63 | (while (progn | ||
| 64 | (end-of-line) | ||
| 65 | (when (and (eq (char-before) ?\\) | ||
| 66 | (not (eobp))) | ||
| 67 | (forward-char) | ||
| 68 | t)))) | ||
| 69 | ) | ||
| 70 | 53 | ||
| 71 | ;;; Code: | 54 | ;;; Code: |
| 72 | (with-suppressed-warnings ((obsolete define-child-mode)) | 55 | (with-suppressed-warnings ((obsolete define-child-mode)) |
| @@ -266,7 +249,7 @@ Return the defined symbol as a special spp lex token." | |||
| 266 | (semantic-lex-analyzer #'semantic-cpp-lexer) | 249 | (semantic-lex-analyzer #'semantic-cpp-lexer) |
| 267 | (raw-stream | 250 | (raw-stream |
| 268 | (semantic-lex-spp-stream-for-macro (save-excursion | 251 | (semantic-lex-spp-stream-for-macro (save-excursion |
| 269 | (semantic-c-end-of-macro) | 252 | (c-end-of-macro) |
| 270 | ;; HACK - If there's a C comment after | 253 | ;; HACK - If there's a C comment after |
| 271 | ;; the macro, do not parse it. | 254 | ;; the macro, do not parse it. |
| 272 | (if (looking-back "/\\*.*" beginning-of-define) | 255 | (if (looking-back "/\\*.*" beginning-of-define) |
| @@ -590,7 +573,7 @@ case, we must skip it since it is the ELSE part." | |||
| 590 | (define-lex-regex-analyzer semantic-lex-c-macrobits | 573 | (define-lex-regex-analyzer semantic-lex-c-macrobits |
| 591 | "Ignore various forms of #if/#else/#endif conditionals." | 574 | "Ignore various forms of #if/#else/#endif conditionals." |
| 592 | "^\\s-*#\\s-*\\(if\\(n?def\\)?\\|endif\\|elif\\|else\\)" | 575 | "^\\s-*#\\s-*\\(if\\(n?def\\)?\\|endif\\|elif\\|else\\)" |
| 593 | (semantic-c-end-of-macro) | 576 | (c-end-of-macro) |
| 594 | (setq semantic-lex-end-point (point)) | 577 | (setq semantic-lex-end-point (point)) |
| 595 | nil) | 578 | nil) |
| 596 | 579 | ||
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'." | |||
| 183 | ;; | 183 | ;; |
| 184 | ;; methods for finding files on a provided path. | 184 | ;; methods for finding files on a provided path. |
| 185 | (defmacro semantic--dependency-find-file-on-path (file path) | 185 | (defmacro semantic--dependency-find-file-on-path (file path) |
| 186 | (if (fboundp 'locate-file) | 186 | (declare (obsolete locate-file "28.1")) |
| 187 | `(locate-file ,file ,path) | 187 | `(locate-file ,file ,path)) |
| 188 | `(let ((p ,path) | ||
| 189 | (found nil)) | ||
| 190 | (while (and p (not found)) | ||
| 191 | (let ((f (expand-file-name ,file (car p)))) | ||
| 192 | (if (file-exists-p f) | ||
| 193 | (setq found f))) | ||
| 194 | (setq p (cdr p))) | ||
| 195 | found))) | ||
| 196 | 188 | ||
| 197 | (defvar ede-minor-mode) | 189 | (defvar ede-minor-mode) |
| 198 | (defvar ede-object) | 190 | (defvar ede-object) |
| @@ -216,11 +208,11 @@ provided mode, not from the current major mode." | |||
| 216 | (when (file-exists-p file) | 208 | (when (file-exists-p file) |
| 217 | (setq found file)) | 209 | (setq found file)) |
| 218 | (when (and (not found) (not systemp)) | 210 | (when (and (not found) (not systemp)) |
| 219 | (setq found (semantic--dependency-find-file-on-path file locp))) | 211 | (setq found (locate-file file locp))) |
| 220 | (when (and (not found) edesys) | 212 | (when (and (not found) edesys) |
| 221 | (setq found (semantic--dependency-find-file-on-path file edesys))) | 213 | (setq found (locate-file file edesys))) |
| 222 | (when (not found) | 214 | (when (not found) |
| 223 | (setq found (semantic--dependency-find-file-on-path file sysp))) | 215 | (setq found (locate-file file sysp))) |
| 224 | (if found (expand-file-name found)))) | 216 | (if found (expand-file-name found)))) |
| 225 | 217 | ||
| 226 | 218 | ||
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 @@ | |||
| 70 | (require 'semantic) | 70 | (require 'semantic) |
| 71 | (require 'semantic/lex) | 71 | (require 'semantic/lex) |
| 72 | 72 | ||
| 73 | (declare-function semantic-c-end-of-macro "semantic/bovine/c") | 73 | (declare-function c-end-of-macro "cc-engine") |
| 74 | 74 | ||
| 75 | ;;; Code: | 75 | ;;; Code: |
| 76 | (defvar semantic-lex-spp-macro-symbol-obarray nil | 76 | (defvar semantic-lex-spp-macro-symbol-obarray nil |
| @@ -946,7 +946,7 @@ by another macro." | |||
| 946 | (save-excursion | 946 | (save-excursion |
| 947 | (let ((start (match-beginning 0)) | 947 | (let ((start (match-beginning 0)) |
| 948 | (end (match-end 0)) | 948 | (end (match-end 0)) |
| 949 | (peom (save-excursion (semantic-c-end-of-macro) (point)))) | 949 | (peom (save-excursion (c-end-of-macro) (point)))) |
| 950 | (condition-case nil | 950 | (condition-case nil |
| 951 | (progn | 951 | (progn |
| 952 | ;; This will throw an error if no closing paren can be found. | 952 | ;; This will throw an error if no closing paren can be found. |