emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 9384674 7/9: Remove some compat code from ede/make.el and semanti


From: Lars Ingebrigtsen
Subject: master 9384674 7/9: Remove some compat code from ede/make.el and semantic/dep.el
Date: Tue, 18 Aug 2020 06:12:38 -0400 (EDT)

branch: master
commit 9384674aa31c27719aa55a9440ff59b721f0dd75
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    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.
---
 lisp/cedet/ede/make.el     | 24 +++++-------------------
 lisp/cedet/semantic/dep.el | 18 +++++-------------
 2 files changed, 10 insertions(+), 32 deletions(-)

diff --git a/lisp/cedet/ede/make.el b/lisp/cedet/ede/make.el
index ecce3e7..140e738 100644
--- a/lisp/cedet/ede/make.el
+++ b/lisp/cedet/ede/make.el
@@ -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.
diff --git a/lisp/cedet/semantic/dep.el b/lisp/cedet/semantic/dep.el
index 47afa25..60ab603 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))))
 
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]