summaryrefslogtreecommitdiff
path: root/lisp/cedet/ede
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2015-10-09 15:55:31 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2015-10-09 15:55:31 -0400
commitb40d703e8706a00b33e5f54eb2ffa3b42130a9ff (patch)
treea4ddcac298324ed731441e3f38f43cf84f382242 /lisp/cedet/ede
parent69b3238af2c6884d4ebbdb03603804e61fd45eba (diff)
downloademacs-b40d703e8706a00b33e5f54eb2ffa3b42130a9ff.tar.gz
emacs-b40d703e8706a00b33e5f54eb2ffa3b42130a9ff.tar.bz2
emacs-b40d703e8706a00b33e5f54eb2ffa3b42130a9ff.zip
* lisp/cedet/ede: Silence some compiler warnings
* lisp/cedet/ede.el: Require cl-lib. Silence some compiler warnings. (ede-menu-obj-of-class-p): Use cl-some rather than `eval'. (ede-apply-object-keymap, ede-reset-all-buffers) (ede-auto-add-to-target): Use dolist. (ede-new, ede-flush-deleted-projects, ede-global-list-sanity-check): Use field names rather than initarg names in `oref'. (ede-load-project-file): Remove unused var `file'. (ede-map-any-target-p): Use cl-some rather than ede-map-targets. (ede-set): Remove unused var `a'. * lisp/cedet/ede/emacs.el: Silence some compiler warnings. (ede-project-autoload): Avoid the old-style "name" argument. (ede-emacs-find-matching-target): Use field names rather than initarg names in `oref'. * lisp/cedet/ede/linux.el: Silence some compiler warnings. (ede-linux-load, ede-project-autoload): Avoid the old-style "name" argument. (ede-linux-find-matching-target): Use field names rather than initarg names in `oref'.
Diffstat (limited to 'lisp/cedet/ede')
-rw-r--r--lisp/cedet/ede/emacs.el28
-rw-r--r--lisp/cedet/ede/linux.el29
-rw-r--r--lisp/cedet/ede/pconf.el4
3 files changed, 30 insertions, 31 deletions
diff --git a/lisp/cedet/ede/emacs.el b/lisp/cedet/ede/emacs.el
index ca58810cdd6..c3caf98bc61 100644
--- a/lisp/cedet/ede/emacs.el
+++ b/lisp/cedet/ede/emacs.el
@@ -41,7 +41,7 @@
;; @TODO - get rid of this. Stuck in loaddefs right now.
-(defun ede-emacs-project-root (&optional dir)
+(defun ede-emacs-project-root (&optional _dir)
"Get the root directory for DIR."
nil)
@@ -99,7 +99,7 @@ m4_define(\\[SXEM4CS_BETA_VERSION\\], \\[\\([0-9]+\\)\\])")
"Project Type for the Emacs source code."
:method-invocation-order :depth-first)
-(defun ede-emacs-load (dir &optional rootproj)
+(defun ede-emacs-load (dir &optional _rootproj)
"Return an Emacs Project object if there is a match.
Return nil if there isn't one.
Argument DIR is the directory it is created for.
@@ -116,14 +116,14 @@ ROOTPROJ is nil, since there is only one project."
;;;###autoload
(ede-add-project-autoload
- (ede-project-autoload "emacs"
- :name "EMACS ROOT"
- :file 'ede/emacs
- :proj-file "src/emacs.c"
- :load-type 'ede-emacs-load
- :class-sym 'ede-emacs-project
- :new-p nil
- :safe-p t)
+ (make-instance 'ede-project-autoload
+ :name "EMACS ROOT"
+ :file 'ede/emacs
+ :proj-file "src/emacs.c"
+ :load-type 'ede-emacs-load
+ :class-sym 'ede-emacs-project
+ :new-p nil
+ :safe-p t)
'unique)
(defclass ede-emacs-target-c (ede-target)
@@ -142,7 +142,7 @@ All directories need at least one target.")
All directories need at least one target.")
(cl-defmethod initialize-instance ((this ede-emacs-project)
- &rest fields)
+ &rest _fields)
"Make sure the targets slot is bound."
(cl-call-next-method)
(unless (slot-boundp this 'targets)
@@ -151,7 +151,7 @@ All directories need at least one target.")
;;; File Stuff
;;
(cl-defmethod ede-project-root-directory ((this ede-emacs-project)
- &optional file)
+ &optional _file)
"Return the root for THIS Emacs project with file."
(ede-up-directory (file-name-directory (oref this file))))
@@ -160,7 +160,7 @@ All directories need at least one target.")
this)
(cl-defmethod ede-find-subproject-for-directory ((proj ede-emacs-project)
- dir)
+ _dir)
"Return PROJ, for handling all subdirs below DIR."
proj)
@@ -171,7 +171,7 @@ All directories need at least one target.")
(let ((match nil))
(dolist (T targets)
(when (and (object-of-class-p T class)
- (string= (oref T :path) dir))
+ (string= (oref T path) dir))
(setq match T)
))
match))
diff --git a/lisp/cedet/ede/linux.el b/lisp/cedet/ede/linux.el
index 6887d387070..edfa3640bd4 100644
--- a/lisp/cedet/ede/linux.el
+++ b/lisp/cedet/ede/linux.el
@@ -189,7 +189,7 @@ until Linux is built for the first time."
(cons bdir "include/generated/uapi"))))
;;;###autoload
-(defun ede-linux-load (dir &optional rootproj)
+(defun ede-linux-load (dir &optional _rootproj)
"Return an Linux Project object if there is a match.
Return nil if there isn't one.
Argument DIR is the directory it is created for.
@@ -198,8 +198,7 @@ ROOTPROJ is nil, since there is only one project."
(let* ((bdir (ede-linux--get-build-directory dir))
(arch (ede-linux--get-architecture dir bdir))
(include-path (ede-linux--include-path dir bdir arch)))
- (ede-linux-project
- "Linux"
+ (make-instance 'ede-linux-project
:name "Linux"
:version (ede-linux-version dir)
:directory (file-name-as-directory dir)
@@ -211,14 +210,14 @@ ROOTPROJ is nil, since there is only one project."
;;;###autoload
(ede-add-project-autoload
- (ede-project-autoload "linux"
- :name "LINUX ROOT"
- :file 'ede/linux
- :proj-file "scripts/ver_linux"
- :load-type 'ede-linux-load
- :class-sym 'ede-linux-project
- :new-p nil
- :safe-p t)
+ (make-instance 'ede-project-autoload
+ :name "LINUX ROOT"
+ :file 'ede/linux
+ :proj-file "scripts/ver_linux"
+ :load-type 'ede-linux-load
+ :class-sym 'ede-linux-project
+ :new-p nil
+ :safe-p t)
'unique)
(defclass ede-linux-target-c (ede-target)
@@ -232,7 +231,7 @@ All directories need at least one target.")
All directories need at least one target.")
(cl-defmethod initialize-instance ((this ede-linux-project)
- &rest fields)
+ &rest _fields)
"Make sure the targets slot is bound."
(cl-call-next-method)
(unless (slot-boundp this 'targets)
@@ -241,7 +240,7 @@ All directories need at least one target.")
;;; File Stuff
;;
(cl-defmethod ede-project-root-directory ((this ede-linux-project)
- &optional file)
+ &optional _file)
"Return the root for THIS Linux project with file."
(ede-up-directory (file-name-directory (oref this file))))
@@ -250,7 +249,7 @@ All directories need at least one target.")
this)
(cl-defmethod ede-find-subproject-for-directory ((proj ede-linux-project)
- dir)
+ _dir)
"Return PROJ, for handling all subdirs below DIR."
proj)
@@ -261,7 +260,7 @@ All directories need at least one target.")
(let ((match nil))
(dolist (T targets)
(when (and (object-of-class-p T class)
- (string= (oref T :path) dir))
+ (string= (oref T path) dir))
(setq match T)
))
match))
diff --git a/lisp/cedet/ede/pconf.el b/lisp/cedet/ede/pconf.el
index a8310870745..664e91da2e9 100644
--- a/lisp/cedet/ede/pconf.el
+++ b/lisp/cedet/ede/pconf.el
@@ -93,11 +93,11 @@ don't do it. A value of nil means to just do it.")
(ede-map-all-subprojects
this
(lambda (sp)
- (ede-map-targets sp 'ede-proj-flush-autoconf)))
+ (ede-map-targets sp #'ede-proj-flush-autoconf)))
(ede-map-all-subprojects
this
(lambda (sp)
- (ede-map-targets this 'ede-proj-tweak-autoconf)))
+ (ede-map-targets this #'ede-proj-tweak-autoconf)))
;; Now save
(save-buffer)
(setq postcmd "autoreconf -f -i;")