Remove some compat code from ede/make.el and semantic/dep.el

* lisp/cedet/ede/make.el (ede--find-executable): Make obsolete.
(ede-make-command): Adjust caller.

* lisp/cedet/semantic/dep.el
(semantic--dependency-find-file-on-path): Make obsolete.
(semantic-dependency-find-file-on-path): Adjust callers.
This commit is contained in:
Lars Ingebrigtsen 2020-08-18 12:08:11 +02:00
parent 033f98efc3
commit 9384674aa3
2 changed files with 10 additions and 32 deletions

View file

@ -32,29 +32,15 @@
(declare-function inversion-check-version "inversion")
(if (fboundp 'locate-file)
(defsubst ede--find-executable (exec)
"Return an expanded file name for a program EXEC on the exec path."
(locate-file exec exec-path))
;; Else, older version of Emacs.
(defsubst ede--find-executable (exec)
"Return an expanded file name for a program EXEC on the exec path."
(let ((p exec-path)
(found nil))
(while (and p (not found))
(let ((f (expand-file-name exec (car p))))
(if (file-exists-p f)
(setq found f)))
(setq p (cdr p)))
found))
)
(defsubst ede--find-executable (exec)
"Return an expanded file name for a program EXEC on the exec path."
(declare (obsolete locate-file "28.1"))
(locate-file exec exec-path))
(defvar ede-make-min-version "3.0"
"Minimum version of GNU make required.")
(defcustom ede-make-command (cond ((ede--find-executable "gmake")
(defcustom ede-make-command (cond ((executable-find "gmake")
"gmake")
(t "make")) ;; What to do?
"The MAKE command to use for EDE when compiling.

View file

@ -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))))