diff options
| author | Lars Ingebrigtsen | 2019-06-17 15:51:43 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2019-06-17 15:51:43 +0200 |
| commit | 44a086e5ccb920bb5a310079130ce1eaabdfe4ce (patch) | |
| tree | 065cbccf80679a34c2c696ed183b874e8c52566b | |
| parent | c0b322e33c3e6d782da596ae91f3916d7195c12e (diff) | |
| download | emacs-44a086e5ccb920bb5a310079130ce1eaabdfe4ce.tar.gz emacs-44a086e5ccb920bb5a310079130ce1eaabdfe4ce.zip | |
Declare unknown slots to silence the compiler
* lisp/cedet/ede/config.el (classpath): Declare slot.
(ede-java-classpath): Revert previous hack.
* lisp/cedet/srecode/srt-mode.el (key): Declare slot.
(srecode-macro-help): Revert previous hack.
(srecode-parse-this-macro): Ditto.
| -rw-r--r-- | lisp/cedet/ede/config.el | 5 | ||||
| -rw-r--r-- | lisp/cedet/srecode/srt-mode.el | 9 |
2 files changed, 6 insertions, 8 deletions
diff --git a/lisp/cedet/ede/config.el b/lisp/cedet/ede/config.el index eb46be7a693..c8bf7f33bae 100644 --- a/lisp/cedet/ede/config.el +++ b/lisp/cedet/ede/config.el | |||
| @@ -406,13 +406,14 @@ java class path.") | |||
| 406 | () | 406 | () |
| 407 | "Class to mix into a project to support java.") | 407 | "Class to mix into a project to support java.") |
| 408 | 408 | ||
| 409 | (eieio-declare-slots classpath) | ||
| 410 | |||
| 409 | (cl-defmethod ede-java-classpath ((proj ede-project-with-config-java)) | 411 | (cl-defmethod ede-java-classpath ((proj ede-project-with-config-java)) |
| 410 | "Return the classpath for this project." | 412 | "Return the classpath for this project." |
| 411 | ;; The `classpath' slot only exists in the Java parts of cedet, and | 413 | ;; The `classpath' slot only exists in the Java parts of cedet, and |
| 412 | ;; those have not been merged into Emacs. Suppress the warning | 414 | ;; those have not been merged into Emacs. Suppress the warning |
| 413 | ;; about the unknown slot by using `intern'. | 415 | ;; about the unknown slot by using `intern'. |
| 414 | (slot-value (ede-config-get-configuration proj) | 416 | (oref (ede-config-get-configuration proj) classpath)) |
| 415 | (intern "classpath" obarray))) | ||
| 416 | 417 | ||
| 417 | ;; Local variables: | 418 | ;; Local variables: |
| 418 | ;; generated-autoload-file: "loaddefs.el" | 419 | ;; generated-autoload-file: "loaddefs.el" |
diff --git a/lisp/cedet/srecode/srt-mode.el b/lisp/cedet/srecode/srt-mode.el index 0179929e7a9..5e7c7c111a3 100644 --- a/lisp/cedet/srecode/srt-mode.el +++ b/lisp/cedet/srecode/srt-mode.el | |||
| @@ -229,6 +229,7 @@ we can tell font lock about them.") | |||
| 229 | (insert ee)))) | 229 | (insert ee)))) |
| 230 | ) | 230 | ) |
| 231 | 231 | ||
| 232 | (eieio-declare-slots key) | ||
| 232 | 233 | ||
| 233 | (defun srecode-macro-help () | 234 | (defun srecode-macro-help () |
| 234 | "Provide help for working with macros in a template." | 235 | "Provide help for working with macros in a template." |
| @@ -247,9 +248,7 @@ we can tell font lock about them.") | |||
| 247 | (let* ((C (car chl)) | 248 | (let* ((C (car chl)) |
| 248 | (name (symbol-name C)) | 249 | (name (symbol-name C)) |
| 249 | (key (when (slot-exists-p C 'key) | 250 | (key (when (slot-exists-p C 'key) |
| 250 | ;; This avoids a compilation warning, but we | 251 | (oref C key))) |
| 251 | ;; know that 'key exists here. | ||
| 252 | (slot-value C (intern "key" obarray)))) | ||
| 253 | (showexample t)) | 252 | (showexample t)) |
| 254 | (setq chl (cdr chl)) | 253 | (setq chl (cdr chl)) |
| 255 | (setq chl (append (eieio-class-children C) chl)) | 254 | (setq chl (append (eieio-class-children C) chl)) |
| @@ -512,9 +511,7 @@ section or ? for an ask variable." | |||
| 512 | ":") | 511 | ":") |
| 513 | nil))) | 512 | nil))) |
| 514 | (key (when (slot-exists-p inserter 'key) | 513 | (key (when (slot-exists-p inserter 'key) |
| 515 | ;; This avoids a compilation warning, but we | 514 | (oref inserter key)))) |
| 516 | ;; know that 'key exists here. | ||
| 517 | (slot-value inserter (intern "key" obarray))))) | ||
| 518 | (cond ((null key) | 515 | (cond ((null key) |
| 519 | ;; A plain variable | 516 | ;; A plain variable |
| 520 | (cons nil base)) | 517 | (cons nil base)) |