diff options
| author | Stefan Monnier | 2015-10-09 15:55:31 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2015-10-09 15:55:31 -0400 |
| commit | b40d703e8706a00b33e5f54eb2ffa3b42130a9ff (patch) | |
| tree | a4ddcac298324ed731441e3f38f43cf84f382242 /lisp | |
| parent | 69b3238af2c6884d4ebbdb03603804e61fd45eba (diff) | |
| download | emacs-b40d703e8706a00b33e5f54eb2ffa3b42130a9ff.tar.gz 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')
| -rw-r--r-- | lisp/cedet/ede.el | 117 | ||||
| -rw-r--r-- | lisp/cedet/ede/emacs.el | 28 | ||||
| -rw-r--r-- | lisp/cedet/ede/linux.el | 29 | ||||
| -rw-r--r-- | lisp/cedet/ede/pconf.el | 4 |
4 files changed, 84 insertions, 94 deletions
diff --git a/lisp/cedet/ede.el b/lisp/cedet/ede.el index 27d7abe540e..76ec3567c63 100644 --- a/lisp/cedet/ede.el +++ b/lisp/cedet/ede.el | |||
| @@ -40,6 +40,7 @@ | |||
| 40 | ;; (global-ede-mode t) | 40 | ;; (global-ede-mode t) |
| 41 | 41 | ||
| 42 | (require 'cedet) | 42 | (require 'cedet) |
| 43 | (require 'cl-lib) | ||
| 43 | (require 'eieio) | 44 | (require 'eieio) |
| 44 | (require 'cl-generic) | 45 | (require 'cl-generic) |
| 45 | (require 'eieio-speedbar) | 46 | (require 'eieio-speedbar) |
| @@ -259,10 +260,10 @@ Argument LIST-O-O is the list of objects to choose from." | |||
| 259 | (defun ede-menu-obj-of-class-p (class) | 260 | (defun ede-menu-obj-of-class-p (class) |
| 260 | "Return non-nil if some member of `ede-object' is a child of CLASS." | 261 | "Return non-nil if some member of `ede-object' is a child of CLASS." |
| 261 | (if (listp ede-object) | 262 | (if (listp ede-object) |
| 262 | (eval (cons 'or (mapcar (lambda (o) (obj-of-class-p o class)) ede-object))) | 263 | (cl-some (lambda (o) (obj-of-class-p o class)) ede-object) |
| 263 | (obj-of-class-p ede-object class))) | 264 | (obj-of-class-p ede-object class))) |
| 264 | 265 | ||
| 265 | (defun ede-build-forms-menu (menu-def) | 266 | (defun ede-build-forms-menu (_menu-def) |
| 266 | "Create a sub menu for building different parts of an EDE system. | 267 | "Create a sub menu for building different parts of an EDE system. |
| 267 | Argument MENU-DEF is the menu definition to use." | 268 | Argument MENU-DEF is the menu definition to use." |
| 268 | (easy-menu-filter-return | 269 | (easy-menu-filter-return |
| @@ -306,7 +307,7 @@ Argument MENU-DEF is the menu definition to use." | |||
| 306 | (append newmenu (list [ "Make distribution" ede-make-dist t ])) | 307 | (append newmenu (list [ "Make distribution" ede-make-dist t ])) |
| 307 | ))))) | 308 | ))))) |
| 308 | 309 | ||
| 309 | (defun ede-target-forms-menu (menu-def) | 310 | (defun ede-target-forms-menu (_menu-def) |
| 310 | "Create a target MENU-DEF based on the object belonging to this buffer." | 311 | "Create a target MENU-DEF based on the object belonging to this buffer." |
| 311 | (easy-menu-filter-return | 312 | (easy-menu-filter-return |
| 312 | (easy-menu-create-menu | 313 | (easy-menu-create-menu |
| @@ -327,7 +328,7 @@ Argument MENU-DEF is the menu definition to use." | |||
| 327 | ;; This is bad, but I'm not sure what else to do. | 328 | ;; This is bad, but I'm not sure what else to do. |
| 328 | (oref (car obj) menu))))))))) | 329 | (oref (car obj) menu))))))))) |
| 329 | 330 | ||
| 330 | (defun ede-project-forms-menu (menu-def) | 331 | (defun ede-project-forms-menu (_menu-def) |
| 331 | "Create a target MENU-DEF based on the object belonging to this buffer." | 332 | "Create a target MENU-DEF based on the object belonging to this buffer." |
| 332 | (easy-menu-filter-return | 333 | (easy-menu-filter-return |
| 333 | (easy-menu-create-menu | 334 | (easy-menu-create-menu |
| @@ -353,7 +354,7 @@ Argument MENU-DEF is the menu definition to use." | |||
| 353 | menu) | 354 | menu) |
| 354 | ))))) | 355 | ))))) |
| 355 | 356 | ||
| 356 | (defun ede-configuration-forms-menu (menu-def) | 357 | (defun ede-configuration-forms-menu (_menu-def) |
| 357 | "Create a submenu for selecting the default configuration for this project. | 358 | "Create a submenu for selecting the default configuration for this project. |
| 358 | The current default is in the current object's CONFIGURATION-DEFAULT slot. | 359 | The current default is in the current object's CONFIGURATION-DEFAULT slot. |
| 359 | All possible configurations are in CONFIGURATIONS. | 360 | All possible configurations are in CONFIGURATIONS. |
| @@ -388,7 +389,7 @@ but can also be used interactively." | |||
| 388 | (eieio-object-name (ede-current-project)) | 389 | (eieio-object-name (ede-current-project)) |
| 389 | newconfig)) | 390 | newconfig)) |
| 390 | 391 | ||
| 391 | (defun ede-customize-forms-menu (menu-def) | 392 | (defun ede-customize-forms-menu (_menu-def) |
| 392 | "Create a menu of the project, and targets that can be customized. | 393 | "Create a menu of the project, and targets that can be customized. |
| 393 | Argument MENU-DEF is the definition of the current menu." | 394 | Argument MENU-DEF is the definition of the current menu." |
| 394 | (easy-menu-filter-return | 395 | (easy-menu-filter-return |
| @@ -411,7 +412,7 @@ Argument MENU-DEF is the definition of the current menu." | |||
| 411 | targ))))))) | 412 | targ))))))) |
| 412 | 413 | ||
| 413 | 414 | ||
| 414 | (defun ede-apply-object-keymap (&optional default) | 415 | (defun ede-apply-object-keymap (&optional _default) |
| 415 | "Add target specific keybindings into the local map. | 416 | "Add target specific keybindings into the local map. |
| 416 | Optional argument DEFAULT indicates if this should be set to the default | 417 | Optional argument DEFAULT indicates if this should be set to the default |
| 417 | version of the keymap." | 418 | version of the keymap." |
| @@ -419,14 +420,13 @@ version of the keymap." | |||
| 419 | (proj ede-object-project)) | 420 | (proj ede-object-project)) |
| 420 | (condition-case nil | 421 | (condition-case nil |
| 421 | (let ((keys (ede-object-keybindings object))) | 422 | (let ((keys (ede-object-keybindings object))) |
| 422 | ;; Add keys for the project to whatever is in the current object | 423 | (dolist (key |
| 423 | ;; so long as it isn't the same. | 424 | ;; Add keys for the project to whatever is in the current |
| 424 | (when (not (eq object proj)) | 425 | ;; object so long as it isn't the same. |
| 425 | (setq keys (append keys (ede-object-keybindings proj)))) | 426 | (if (eq object proj) |
| 426 | (while keys | 427 | keys |
| 427 | (local-set-key (concat "\C-c." (car (car keys))) | 428 | (append keys (ede-object-keybindings proj)))) |
| 428 | (cdr (car keys))) | 429 | (local-set-key (concat "\C-c." (car key)) (cdr key)))) |
| 429 | (setq keys (cdr keys)))) | ||
| 430 | (error nil)))) | 430 | (error nil)))) |
| 431 | 431 | ||
| 432 | ;;; Menu building methods for building | 432 | ;;; Menu building methods for building |
| @@ -550,19 +550,15 @@ Sets buffer local variables for EDE." | |||
| 550 | (defun ede-reset-all-buffers () | 550 | (defun ede-reset-all-buffers () |
| 551 | "Reset all the buffers due to change in EDE." | 551 | "Reset all the buffers due to change in EDE." |
| 552 | (interactive) | 552 | (interactive) |
| 553 | (let ((b (buffer-list))) | 553 | (dolist (b (buffer-list)) |
| 554 | (while b | 554 | (when (buffer-file-name b) |
| 555 | (when (buffer-file-name (car b)) | 555 | (with-current-buffer b |
| 556 | (with-current-buffer (car b) | 556 | ;; Reset all state variables |
| 557 | ;; Reset all state variables | 557 | (setq ede-object nil |
| 558 | (setq ede-object nil | 558 | ede-object-project nil |
| 559 | ede-object-project nil | 559 | ede-object-root-project nil) |
| 560 | ede-object-root-project nil) | 560 | ;; Now re-initialize this buffer. |
| 561 | ;; Now re-initialize this buffer. | 561 | (ede-initialize-state-current-buffer))))) |
| 562 | (ede-initialize-state-current-buffer) | ||
| 563 | ) | ||
| 564 | ) | ||
| 565 | (setq b (cdr b))))) | ||
| 566 | 562 | ||
| 567 | ;;;###autoload | 563 | ;;;###autoload |
| 568 | (define-minor-mode global-ede-mode | 564 | (define-minor-mode global-ede-mode |
| @@ -626,13 +622,10 @@ of objects with the `ede-want-file-p' method." | |||
| 626 | (if (or (eq ede-auto-add-method 'never) | 622 | (if (or (eq ede-auto-add-method 'never) |
| 627 | (ede-ignore-file (buffer-file-name))) | 623 | (ede-ignore-file (buffer-file-name))) |
| 628 | nil | 624 | nil |
| 629 | (let (wants desires) | 625 | (let (desires) |
| 630 | ;; Find all the objects. | 626 | (dolist (want (oref (ede-current-project) targets));Find all the objects. |
| 631 | (setq wants (oref (ede-current-project) targets)) | 627 | (if (ede-want-file-p want (buffer-file-name)) |
| 632 | (while wants | 628 | (push want desires))) |
| 633 | (if (ede-want-file-p (car wants) (buffer-file-name)) | ||
| 634 | (setq desires (cons (car wants) desires))) | ||
| 635 | (setq wants (cdr wants))) | ||
| 636 | (if desires | 629 | (if desires |
| 637 | (cond ((or (eq ede-auto-add-method 'ask) | 630 | (cond ((or (eq ede-auto-add-method 'ask) |
| 638 | (and (eq ede-auto-add-method 'multi-ask) | 631 | (and (eq ede-auto-add-method 'multi-ask) |
| @@ -754,7 +747,7 @@ Optional argument NAME is the name to give this project." | |||
| 754 | (r nil)) | 747 | (r nil)) |
| 755 | (while l | 748 | (while l |
| 756 | (if cs | 749 | (if cs |
| 757 | (if (eq (oref (car l) :class-sym) | 750 | (if (eq (oref (car l) class-sym) |
| 758 | cs) | 751 | cs) |
| 759 | (setq r (cons (car l) r))) | 752 | (setq r (cons (car l) r))) |
| 760 | (if (oref (car l) new-p) | 753 | (if (oref (car l) new-p) |
| @@ -804,7 +797,7 @@ Optional argument NAME is the name to give this project." | |||
| 804 | )) | 797 | )) |
| 805 | (inits (oref obj initializers))) | 798 | (inits (oref obj initializers))) |
| 806 | ;; Force the name to match for new objects. | 799 | ;; Force the name to match for new objects. |
| 807 | (eieio-object-set-name-string nobj (oref nobj :name)) | 800 | (eieio-object-set-name-string nobj (oref nobj name)) |
| 808 | ;; Handle init args. | 801 | ;; Handle init args. |
| 809 | (while inits | 802 | (while inits |
| 810 | (eieio-oset nobj (car inits) (car (cdr inits))) | 803 | (eieio-oset nobj (car inits) (car (cdr inits))) |
| @@ -858,7 +851,7 @@ Different projects accept different arguments ARGS. | |||
| 858 | Typically you can specify NAME, target TYPE, and AUTOADD, where AUTOADD is | 851 | Typically you can specify NAME, target TYPE, and AUTOADD, where AUTOADD is |
| 859 | a string \"y\" or \"n\", which answers the y/n question done interactively." | 852 | a string \"y\" or \"n\", which answers the y/n question done interactively." |
| 860 | (interactive) | 853 | (interactive) |
| 861 | (apply 'project-new-target (ede-current-project) args) | 854 | (apply #'project-new-target (ede-current-project) args) |
| 862 | (when (and buffer-file-name | 855 | (when (and buffer-file-name |
| 863 | (not (file-directory-p buffer-file-name))) | 856 | (not (file-directory-p buffer-file-name))) |
| 864 | (setq ede-object nil) | 857 | (setq ede-object nil) |
| @@ -1004,21 +997,21 @@ Argument PROMPT is the prompt to use when querying the user for a target." | |||
| 1004 | "Make sure placeholder THIS is replaced with the real thing, and pass through." | 997 | "Make sure placeholder THIS is replaced with the real thing, and pass through." |
| 1005 | (project-add-file this file)) | 998 | (project-add-file this file)) |
| 1006 | 999 | ||
| 1007 | (cl-defmethod project-add-file ((ot ede-target) file) | 1000 | (cl-defmethod project-add-file ((ot ede-target) _file) |
| 1008 | "Add the current buffer into project project target OT. | 1001 | "Add the current buffer into project project target OT. |
| 1009 | Argument FILE is the file to add." | 1002 | Argument FILE is the file to add." |
| 1010 | (error "add-file not supported by %s" (eieio-object-name ot))) | 1003 | (error "add-file not supported by %s" (eieio-object-name ot))) |
| 1011 | 1004 | ||
| 1012 | (cl-defmethod project-remove-file ((ot ede-target) fnnd) | 1005 | (cl-defmethod project-remove-file ((ot ede-target) _fnnd) |
| 1013 | "Remove the current buffer from project target OT. | 1006 | "Remove the current buffer from project target OT. |
| 1014 | Argument FNND is an argument." | 1007 | Argument FNND is an argument." |
| 1015 | (error "remove-file not supported by %s" (eieio-object-name ot))) | 1008 | (error "remove-file not supported by %s" (eieio-object-name ot))) |
| 1016 | 1009 | ||
| 1017 | (cl-defmethod project-edit-file-target ((ot ede-target)) | 1010 | (cl-defmethod project-edit-file-target ((_ot ede-target)) |
| 1018 | "Edit the target OT associated with this file." | 1011 | "Edit the target OT associated with this file." |
| 1019 | (find-file (oref (ede-current-project) file))) | 1012 | (find-file (oref (ede-current-project) file))) |
| 1020 | 1013 | ||
| 1021 | (cl-defmethod project-new-target ((proj ede-project) &rest args) | 1014 | (cl-defmethod project-new-target ((proj ede-project) &rest _args) |
| 1022 | "Create a new target. It is up to the project PROJ to get the name." | 1015 | "Create a new target. It is up to the project PROJ to get the name." |
| 1023 | (error "new-target not supported by %s" (eieio-object-name proj))) | 1016 | (error "new-target not supported by %s" (eieio-object-name proj))) |
| 1024 | 1017 | ||
| @@ -1030,12 +1023,12 @@ Argument FNND is an argument." | |||
| 1030 | "Delete the current target OT from its parent project." | 1023 | "Delete the current target OT from its parent project." |
| 1031 | (error "add-file not supported by %s" (eieio-object-name ot))) | 1024 | (error "add-file not supported by %s" (eieio-object-name ot))) |
| 1032 | 1025 | ||
| 1033 | (cl-defmethod project-compile-project ((obj ede-project) &optional command) | 1026 | (cl-defmethod project-compile-project ((obj ede-project) &optional _command) |
| 1034 | "Compile the entire current project OBJ. | 1027 | "Compile the entire current project OBJ. |
| 1035 | Argument COMMAND is the command to use when compiling." | 1028 | Argument COMMAND is the command to use when compiling." |
| 1036 | (error "compile-project not supported by %s" (eieio-object-name obj))) | 1029 | (error "compile-project not supported by %s" (eieio-object-name obj))) |
| 1037 | 1030 | ||
| 1038 | (cl-defmethod project-compile-target ((obj ede-target) &optional command) | 1031 | (cl-defmethod project-compile-target ((obj ede-target) &optional _command) |
| 1039 | "Compile the current target OBJ. | 1032 | "Compile the current target OBJ. |
| 1040 | Argument COMMAND is the command to use for compiling the target." | 1033 | Argument COMMAND is the command to use for compiling the target." |
| 1041 | (error "compile-target not supported by %s" (eieio-object-name obj))) | 1034 | (error "compile-target not supported by %s" (eieio-object-name obj))) |
| @@ -1095,7 +1088,7 @@ Flush the dead projects from the project cache." | |||
| 1095 | (interactive) | 1088 | (interactive) |
| 1096 | (let ((dead nil)) | 1089 | (let ((dead nil)) |
| 1097 | (dolist (P ede-projects) | 1090 | (dolist (P ede-projects) |
| 1098 | (when (not (file-exists-p (oref P :file))) | 1091 | (when (not (file-exists-p (oref P file))) |
| 1099 | (add-to-list 'dead P))) | 1092 | (add-to-list 'dead P))) |
| 1100 | (dolist (D dead) | 1093 | (dolist (D dead) |
| 1101 | (ede-delete-project-from-global-list D)) | 1094 | (ede-delete-project-from-global-list D)) |
| @@ -1108,9 +1101,9 @@ Flush the dead projects from the project cache." | |||
| 1108 | (interactive) | 1101 | (interactive) |
| 1109 | (let ((scanned nil)) | 1102 | (let ((scanned nil)) |
| 1110 | (dolist (P ede-projects) | 1103 | (dolist (P ede-projects) |
| 1111 | (if (member (oref P :directory) scanned) | 1104 | (if (member (oref P directory) scanned) |
| 1112 | (error "Duplicate project (by dir) found in %s!" (oref P :directory)) | 1105 | (error "Duplicate project (by dir) found in %s!" (oref P directory)) |
| 1113 | (push (oref P :directory) scanned))) | 1106 | (push (oref P directory) scanned))) |
| 1114 | (unless ede--disable-inode | 1107 | (unless ede--disable-inode |
| 1115 | (setq scanned nil) | 1108 | (setq scanned nil) |
| 1116 | (dolist (P ede-projects) | 1109 | (dolist (P ede-projects) |
| @@ -1135,8 +1128,7 @@ Optional ROOTRETURN will return the root project for DIR." | |||
| 1135 | 1128 | ||
| 1136 | ;; Do the load | 1129 | ;; Do the load |
| 1137 | ;;(message "EDE LOAD : %S" file) | 1130 | ;;(message "EDE LOAD : %S" file) |
| 1138 | (let* ((file dir) | 1131 | (let* ((path (file-name-as-directory (expand-file-name dir))) |
| 1139 | (path (file-name-as-directory (expand-file-name dir))) | ||
| 1140 | (detect (or detectin (ede-directory-project-cons path))) | 1132 | (detect (or detectin (ede-directory-project-cons path))) |
| 1141 | (autoloader nil) | 1133 | (autoloader nil) |
| 1142 | (toppath nil) | 1134 | (toppath nil) |
| @@ -1302,7 +1294,7 @@ could become slow in time." | |||
| 1302 | Handles complex path issues." | 1294 | Handles complex path issues." |
| 1303 | (member (ede-convert-path this (buffer-file-name buffer)) source)) | 1295 | (member (ede-convert-path this (buffer-file-name buffer)) source)) |
| 1304 | 1296 | ||
| 1305 | (cl-defmethod ede-buffer-mine ((this ede-project) buffer) | 1297 | (cl-defmethod ede-buffer-mine ((_this ede-project) _buffer) |
| 1306 | "Return non-nil if object THIS lays claim to the file in BUFFER." | 1298 | "Return non-nil if object THIS lays claim to the file in BUFFER." |
| 1307 | nil) | 1299 | nil) |
| 1308 | 1300 | ||
| @@ -1375,7 +1367,7 @@ See also `ede-map-all-subprojects'." | |||
| 1375 | "For object THIS, execute PROC on THIS and all subprojects. | 1367 | "For object THIS, execute PROC on THIS and all subprojects. |
| 1376 | This function also applies PROC to sub-sub projects. | 1368 | This function also applies PROC to sub-sub projects. |
| 1377 | See also `ede-map-subprojects'." | 1369 | See also `ede-map-subprojects'." |
| 1378 | (apply 'append | 1370 | (apply #'append |
| 1379 | (list (funcall allproc this)) | 1371 | (list (funcall allproc this)) |
| 1380 | (ede-map-subprojects | 1372 | (ede-map-subprojects |
| 1381 | this | 1373 | this |
| @@ -1392,7 +1384,7 @@ See also `ede-map-subprojects'." | |||
| 1392 | (cl-defmethod ede-map-any-target-p ((this ede-project) proc) | 1384 | (cl-defmethod ede-map-any-target-p ((this ede-project) proc) |
| 1393 | "For project THIS, map PROC to all targets and return if any non-nil. | 1385 | "For project THIS, map PROC to all targets and return if any non-nil. |
| 1394 | Return the first non-nil value returned by PROC." | 1386 | Return the first non-nil value returned by PROC." |
| 1395 | (eval (cons 'or (ede-map-targets this proc)))) | 1387 | (cl-some proc (oref this targets))) |
| 1396 | 1388 | ||
| 1397 | 1389 | ||
| 1398 | ;;; Some language specific methods. | 1390 | ;;; Some language specific methods. |
| @@ -1401,15 +1393,15 @@ Return the first non-nil value returned by PROC." | |||
| 1401 | ;; configuring items for Semantic. | 1393 | ;; configuring items for Semantic. |
| 1402 | 1394 | ||
| 1403 | ;; Generic paths | 1395 | ;; Generic paths |
| 1404 | (cl-defmethod ede-system-include-path ((this ede-project)) | 1396 | (cl-defmethod ede-system-include-path ((_this ede-project)) |
| 1405 | "Get the system include path used by project THIS." | 1397 | "Get the system include path used by project THIS." |
| 1406 | nil) | 1398 | nil) |
| 1407 | 1399 | ||
| 1408 | (cl-defmethod ede-system-include-path ((this ede-target)) | 1400 | (cl-defmethod ede-system-include-path ((_this ede-target)) |
| 1409 | "Get the system include path used by project THIS." | 1401 | "Get the system include path used by project THIS." |
| 1410 | nil) | 1402 | nil) |
| 1411 | 1403 | ||
| 1412 | (cl-defmethod ede-source-paths ((this ede-project) mode) | 1404 | (cl-defmethod ede-source-paths ((_this ede-project) _mode) |
| 1413 | "Get the base to all source trees in the current project for MODE. | 1405 | "Get the base to all source trees in the current project for MODE. |
| 1414 | For example, <root>/src for sources of c/c++, Java, etc, | 1406 | For example, <root>/src for sources of c/c++, Java, etc, |
| 1415 | and <root>/doc for doc sources." | 1407 | and <root>/doc for doc sources." |
| @@ -1437,20 +1429,20 @@ and <root>/doc for doc sources." | |||
| 1437 | (message "Choosing preprocessor syms for project %s" | 1429 | (message "Choosing preprocessor syms for project %s" |
| 1438 | (eieio-object-name (car objs))))))) | 1430 | (eieio-object-name (car objs))))))) |
| 1439 | 1431 | ||
| 1440 | (cl-defmethod ede-system-include-path ((this ede-project)) | 1432 | (cl-defmethod ede-system-include-path ((_this ede-project)) |
| 1441 | "Get the system include path used by project THIS." | 1433 | "Get the system include path used by project THIS." |
| 1442 | nil) | 1434 | nil) |
| 1443 | 1435 | ||
| 1444 | (cl-defmethod ede-preprocessor-map ((this ede-project)) | 1436 | (cl-defmethod ede-preprocessor-map ((_this ede-project)) |
| 1445 | "Get the pre-processor map for project THIS." | 1437 | "Get the pre-processor map for project THIS." |
| 1446 | nil) | 1438 | nil) |
| 1447 | 1439 | ||
| 1448 | (cl-defmethod ede-preprocessor-map ((this ede-target)) | 1440 | (cl-defmethod ede-preprocessor-map ((_this ede-target)) |
| 1449 | "Get the pre-processor map for project THIS." | 1441 | "Get the pre-processor map for project THIS." |
| 1450 | nil) | 1442 | nil) |
| 1451 | 1443 | ||
| 1452 | ;; Java | 1444 | ;; Java |
| 1453 | (cl-defmethod ede-java-classpath ((this ede-project)) | 1445 | (cl-defmethod ede-java-classpath ((_this ede-project)) |
| 1454 | "Return the classpath for this project." | 1446 | "Return the classpath for this project." |
| 1455 | ;; @TODO - Can JDEE add something here? | 1447 | ;; @TODO - Can JDEE add something here? |
| 1456 | nil) | 1448 | nil) |
| @@ -1463,8 +1455,7 @@ and <root>/doc for doc sources." | |||
| 1463 | If VARIABLE is not project local, just use set. Optional argument PROJ | 1455 | If VARIABLE is not project local, just use set. Optional argument PROJ |
| 1464 | is the project to use, instead of `ede-current-project'." | 1456 | is the project to use, instead of `ede-current-project'." |
| 1465 | (interactive "sVariable: \nxExpression: ") | 1457 | (interactive "sVariable: \nxExpression: ") |
| 1466 | (let ((p (or proj (ede-toplevel))) | 1458 | (let ((p (or proj (ede-toplevel)))) |
| 1467 | a) | ||
| 1468 | ;; Make the change | 1459 | ;; Make the change |
| 1469 | (ede-make-project-local-variable variable p) | 1460 | (ede-make-project-local-variable variable p) |
| 1470 | (ede-set-project-local-variable variable value p) | 1461 | (ede-set-project-local-variable variable value p) |
| @@ -1514,7 +1505,7 @@ It does not apply the value to buffers." | |||
| 1514 | (make-local-variable (car v)) | 1505 | (make-local-variable (car v)) |
| 1515 | (set (car v) (cdr v))))) | 1506 | (set (car v) (cdr v))))) |
| 1516 | 1507 | ||
| 1517 | (cl-defmethod ede-commit-local-variables ((proj ede-project)) | 1508 | (cl-defmethod ede-commit-local-variables ((_proj ede-project)) |
| 1518 | "Commit change to local variables in PROJ." | 1509 | "Commit change to local variables in PROJ." |
| 1519 | nil) | 1510 | nil) |
| 1520 | 1511 | ||
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 @@ | |||
| 41 | 41 | ||
| 42 | ;; @TODO - get rid of this. Stuck in loaddefs right now. | 42 | ;; @TODO - get rid of this. Stuck in loaddefs right now. |
| 43 | 43 | ||
| 44 | (defun ede-emacs-project-root (&optional dir) | 44 | (defun ede-emacs-project-root (&optional _dir) |
| 45 | "Get the root directory for DIR." | 45 | "Get the root directory for DIR." |
| 46 | nil) | 46 | nil) |
| 47 | 47 | ||
| @@ -99,7 +99,7 @@ m4_define(\\[SXEM4CS_BETA_VERSION\\], \\[\\([0-9]+\\)\\])") | |||
| 99 | "Project Type for the Emacs source code." | 99 | "Project Type for the Emacs source code." |
| 100 | :method-invocation-order :depth-first) | 100 | :method-invocation-order :depth-first) |
| 101 | 101 | ||
| 102 | (defun ede-emacs-load (dir &optional rootproj) | 102 | (defun ede-emacs-load (dir &optional _rootproj) |
| 103 | "Return an Emacs Project object if there is a match. | 103 | "Return an Emacs Project object if there is a match. |
| 104 | Return nil if there isn't one. | 104 | Return nil if there isn't one. |
| 105 | Argument DIR is the directory it is created for. | 105 | Argument DIR is the directory it is created for. |
| @@ -116,14 +116,14 @@ ROOTPROJ is nil, since there is only one project." | |||
| 116 | 116 | ||
| 117 | ;;;###autoload | 117 | ;;;###autoload |
| 118 | (ede-add-project-autoload | 118 | (ede-add-project-autoload |
| 119 | (ede-project-autoload "emacs" | 119 | (make-instance 'ede-project-autoload |
| 120 | :name "EMACS ROOT" | 120 | :name "EMACS ROOT" |
| 121 | :file 'ede/emacs | 121 | :file 'ede/emacs |
| 122 | :proj-file "src/emacs.c" | 122 | :proj-file "src/emacs.c" |
| 123 | :load-type 'ede-emacs-load | 123 | :load-type 'ede-emacs-load |
| 124 | :class-sym 'ede-emacs-project | 124 | :class-sym 'ede-emacs-project |
| 125 | :new-p nil | 125 | :new-p nil |
| 126 | :safe-p t) | 126 | :safe-p t) |
| 127 | 'unique) | 127 | 'unique) |
| 128 | 128 | ||
| 129 | (defclass ede-emacs-target-c (ede-target) | 129 | (defclass ede-emacs-target-c (ede-target) |
| @@ -142,7 +142,7 @@ All directories need at least one target.") | |||
| 142 | All directories need at least one target.") | 142 | All directories need at least one target.") |
| 143 | 143 | ||
| 144 | (cl-defmethod initialize-instance ((this ede-emacs-project) | 144 | (cl-defmethod initialize-instance ((this ede-emacs-project) |
| 145 | &rest fields) | 145 | &rest _fields) |
| 146 | "Make sure the targets slot is bound." | 146 | "Make sure the targets slot is bound." |
| 147 | (cl-call-next-method) | 147 | (cl-call-next-method) |
| 148 | (unless (slot-boundp this 'targets) | 148 | (unless (slot-boundp this 'targets) |
| @@ -151,7 +151,7 @@ All directories need at least one target.") | |||
| 151 | ;;; File Stuff | 151 | ;;; File Stuff |
| 152 | ;; | 152 | ;; |
| 153 | (cl-defmethod ede-project-root-directory ((this ede-emacs-project) | 153 | (cl-defmethod ede-project-root-directory ((this ede-emacs-project) |
| 154 | &optional file) | 154 | &optional _file) |
| 155 | "Return the root for THIS Emacs project with file." | 155 | "Return the root for THIS Emacs project with file." |
| 156 | (ede-up-directory (file-name-directory (oref this file)))) | 156 | (ede-up-directory (file-name-directory (oref this file)))) |
| 157 | 157 | ||
| @@ -160,7 +160,7 @@ All directories need at least one target.") | |||
| 160 | this) | 160 | this) |
| 161 | 161 | ||
| 162 | (cl-defmethod ede-find-subproject-for-directory ((proj ede-emacs-project) | 162 | (cl-defmethod ede-find-subproject-for-directory ((proj ede-emacs-project) |
| 163 | dir) | 163 | _dir) |
| 164 | "Return PROJ, for handling all subdirs below DIR." | 164 | "Return PROJ, for handling all subdirs below DIR." |
| 165 | proj) | 165 | proj) |
| 166 | 166 | ||
| @@ -171,7 +171,7 @@ All directories need at least one target.") | |||
| 171 | (let ((match nil)) | 171 | (let ((match nil)) |
| 172 | (dolist (T targets) | 172 | (dolist (T targets) |
| 173 | (when (and (object-of-class-p T class) | 173 | (when (and (object-of-class-p T class) |
| 174 | (string= (oref T :path) dir)) | 174 | (string= (oref T path) dir)) |
| 175 | (setq match T) | 175 | (setq match T) |
| 176 | )) | 176 | )) |
| 177 | match)) | 177 | 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." | |||
| 189 | (cons bdir "include/generated/uapi")))) | 189 | (cons bdir "include/generated/uapi")))) |
| 190 | 190 | ||
| 191 | ;;;###autoload | 191 | ;;;###autoload |
| 192 | (defun ede-linux-load (dir &optional rootproj) | 192 | (defun ede-linux-load (dir &optional _rootproj) |
| 193 | "Return an Linux Project object if there is a match. | 193 | "Return an Linux Project object if there is a match. |
| 194 | Return nil if there isn't one. | 194 | Return nil if there isn't one. |
| 195 | Argument DIR is the directory it is created for. | 195 | Argument DIR is the directory it is created for. |
| @@ -198,8 +198,7 @@ ROOTPROJ is nil, since there is only one project." | |||
| 198 | (let* ((bdir (ede-linux--get-build-directory dir)) | 198 | (let* ((bdir (ede-linux--get-build-directory dir)) |
| 199 | (arch (ede-linux--get-architecture dir bdir)) | 199 | (arch (ede-linux--get-architecture dir bdir)) |
| 200 | (include-path (ede-linux--include-path dir bdir arch))) | 200 | (include-path (ede-linux--include-path dir bdir arch))) |
| 201 | (ede-linux-project | 201 | (make-instance 'ede-linux-project |
| 202 | "Linux" | ||
| 203 | :name "Linux" | 202 | :name "Linux" |
| 204 | :version (ede-linux-version dir) | 203 | :version (ede-linux-version dir) |
| 205 | :directory (file-name-as-directory dir) | 204 | :directory (file-name-as-directory dir) |
| @@ -211,14 +210,14 @@ ROOTPROJ is nil, since there is only one project." | |||
| 211 | 210 | ||
| 212 | ;;;###autoload | 211 | ;;;###autoload |
| 213 | (ede-add-project-autoload | 212 | (ede-add-project-autoload |
| 214 | (ede-project-autoload "linux" | 213 | (make-instance 'ede-project-autoload |
| 215 | :name "LINUX ROOT" | 214 | :name "LINUX ROOT" |
| 216 | :file 'ede/linux | 215 | :file 'ede/linux |
| 217 | :proj-file "scripts/ver_linux" | 216 | :proj-file "scripts/ver_linux" |
| 218 | :load-type 'ede-linux-load | 217 | :load-type 'ede-linux-load |
| 219 | :class-sym 'ede-linux-project | 218 | :class-sym 'ede-linux-project |
| 220 | :new-p nil | 219 | :new-p nil |
| 221 | :safe-p t) | 220 | :safe-p t) |
| 222 | 'unique) | 221 | 'unique) |
| 223 | 222 | ||
| 224 | (defclass ede-linux-target-c (ede-target) | 223 | (defclass ede-linux-target-c (ede-target) |
| @@ -232,7 +231,7 @@ All directories need at least one target.") | |||
| 232 | All directories need at least one target.") | 231 | All directories need at least one target.") |
| 233 | 232 | ||
| 234 | (cl-defmethod initialize-instance ((this ede-linux-project) | 233 | (cl-defmethod initialize-instance ((this ede-linux-project) |
| 235 | &rest fields) | 234 | &rest _fields) |
| 236 | "Make sure the targets slot is bound." | 235 | "Make sure the targets slot is bound." |
| 237 | (cl-call-next-method) | 236 | (cl-call-next-method) |
| 238 | (unless (slot-boundp this 'targets) | 237 | (unless (slot-boundp this 'targets) |
| @@ -241,7 +240,7 @@ All directories need at least one target.") | |||
| 241 | ;;; File Stuff | 240 | ;;; File Stuff |
| 242 | ;; | 241 | ;; |
| 243 | (cl-defmethod ede-project-root-directory ((this ede-linux-project) | 242 | (cl-defmethod ede-project-root-directory ((this ede-linux-project) |
| 244 | &optional file) | 243 | &optional _file) |
| 245 | "Return the root for THIS Linux project with file." | 244 | "Return the root for THIS Linux project with file." |
| 246 | (ede-up-directory (file-name-directory (oref this file)))) | 245 | (ede-up-directory (file-name-directory (oref this file)))) |
| 247 | 246 | ||
| @@ -250,7 +249,7 @@ All directories need at least one target.") | |||
| 250 | this) | 249 | this) |
| 251 | 250 | ||
| 252 | (cl-defmethod ede-find-subproject-for-directory ((proj ede-linux-project) | 251 | (cl-defmethod ede-find-subproject-for-directory ((proj ede-linux-project) |
| 253 | dir) | 252 | _dir) |
| 254 | "Return PROJ, for handling all subdirs below DIR." | 253 | "Return PROJ, for handling all subdirs below DIR." |
| 255 | proj) | 254 | proj) |
| 256 | 255 | ||
| @@ -261,7 +260,7 @@ All directories need at least one target.") | |||
| 261 | (let ((match nil)) | 260 | (let ((match nil)) |
| 262 | (dolist (T targets) | 261 | (dolist (T targets) |
| 263 | (when (and (object-of-class-p T class) | 262 | (when (and (object-of-class-p T class) |
| 264 | (string= (oref T :path) dir)) | 263 | (string= (oref T path) dir)) |
| 265 | (setq match T) | 264 | (setq match T) |
| 266 | )) | 265 | )) |
| 267 | match)) | 266 | 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.") | |||
| 93 | (ede-map-all-subprojects | 93 | (ede-map-all-subprojects |
| 94 | this | 94 | this |
| 95 | (lambda (sp) | 95 | (lambda (sp) |
| 96 | (ede-map-targets sp 'ede-proj-flush-autoconf))) | 96 | (ede-map-targets sp #'ede-proj-flush-autoconf))) |
| 97 | (ede-map-all-subprojects | 97 | (ede-map-all-subprojects |
| 98 | this | 98 | this |
| 99 | (lambda (sp) | 99 | (lambda (sp) |
| 100 | (ede-map-targets this 'ede-proj-tweak-autoconf))) | 100 | (ede-map-targets this #'ede-proj-tweak-autoconf))) |
| 101 | ;; Now save | 101 | ;; Now save |
| 102 | (save-buffer) | 102 | (save-buffer) |
| 103 | (setq postcmd "autoreconf -f -i;") | 103 | (setq postcmd "autoreconf -f -i;") |