From abd19e78b1a2337eefa48eba88b8decfc7517172 Mon Sep 17 00:00:00 2001 From: Rob Sargent Date: Sat, 12 Feb 2022 00:50:48 -0700 Subject: [PATCH 1/2] emacs-28(snap) complains unendingly about "for" having null value --- jdee-jdk-manager.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jdee-jdk-manager.el b/jdee-jdk-manager.el index 28c947f..c93d089 100644 --- a/jdee-jdk-manager.el +++ b/jdee-jdk-manager.el @@ -96,7 +96,7 @@ by the current project." (list (quote radio-button-choice) ))) - (loop for jdk in val do + (loop-for-each jdk in val do (setq type (append From 5e663f21f23d327c335e3274fa9bf60c33833684 Mon Sep 17 00:00:00 2001 From: Rob Sargent Date: Sat, 12 Feb 2022 01:05:38 -0700 Subject: [PATCH 2/2] (emacs28) jdee doesn't know of a "loop for" --- jdee-classpath.el | 2 +- jdee-db.el | 12 ++++++------ jdee-files.el | 4 ++-- jdee-gen.el | 6 +++--- jdee-import.el | 2 +- jdee-jdb.el | 2 +- jdee-open-source.el | 2 +- jdee-parse.el | 12 ++++++------ jdee-plugins.el | 4 ++-- jdee-project-file.el | 2 +- jdee-run.el | 4 ++-- 11 files changed, 26 insertions(+), 26 deletions(-) diff --git a/jdee-classpath.el b/jdee-classpath.el index ce16e7d..8e633dd 100644 --- a/jdee-classpath.el +++ b/jdee-classpath.el @@ -60,7 +60,7 @@ zip files in those directories, excepting those specified by existing paths are already normalized." (if jdee-expand-classpath-p (let (paths) - (loop for path in classpath do + (loop-for-each path in classpath do (if (and (file-exists-p path) (file-directory-p path) diff --git a/jdee-db.el b/jdee-db.el index 23525b6..ff7b155 100644 --- a/jdee-db.el +++ b/jdee-db.el @@ -560,7 +560,7 @@ to the active face." (defun jdee-db-set-all-breakpoints-specified () "Changes the face of all breakpoints to `jdee-db-spec-breakpoint-face' and sets the status of all breakpoints to `specified'." - (loop for bp-assoc in jdee-db-breakpoints do + (loop-for-each bp-assoc in jdee-db-breakpoints do (let* ((bp (cdr bp-assoc)) (marker (oref bp marker))) (oset bp status 'specified) @@ -691,7 +691,7 @@ particular breakpoint and to select breakpoints to be clear." (jdee-db-find-breakpoint-by-id assoc-x)) jdee-db-bp-list)) (jdee-db-exec-cmd debugger bp-cmd)) - (loop for bp-assoc in jdee-db-bp-list do + (loop-for-each bp-assoc in jdee-db-bp-list do (let ((bp (jdee-db-find-breakpoint-by-id bp-assoc))) (jdee-db-delete-breakpoint bp)))))) @@ -728,7 +728,7 @@ particular breakpoint and to select breakpoints to be clear." in the current buffer to nil." (when (eq major-mode 'jdee-mode) (let ((file (buffer-file-name))) - (loop for bp-assoc in jdee-db-breakpoints do + (loop-for-each bp-assoc in jdee-db-breakpoints do (let ((bp (cdr bp-assoc))) (when (string= (oref bp file) file) (oset bp line (jdee-db-breakpoint-get-line bp)) @@ -740,7 +740,7 @@ in the current buffer to nil." "Highlights all breakpoints in the current buffer if not already highlighted." (save-excursion - (loop for bp-assoc in jdee-db-breakpoints do + (loop-for-each bp-assoc in jdee-db-breakpoints do (let* ((bp (cdr bp-assoc)) (file (buffer-file-name)) (line (oref bp line)) @@ -1203,7 +1203,7 @@ ready to accept the next command." (response output) (last-cmd (oref this last-cmd))) - (loop for listener in listeners do + (loop-for-each listener in listeners do (setq output (jdee-db-listener-filter-output listener output))) @@ -1917,7 +1917,7 @@ in the current buffer." (lambda (assoc-x) (cdr assoc-x)) jdee-db-breakpoints)) (jdee-db-exec-cmd debugger bp-cmd)) - (loop for bp-assoc in jdee-db-breakpoints do + (loop-for-each bp-assoc in jdee-db-breakpoints do (let ((bp (cdr bp-assoc))) (jdee-db-delete-breakpoint bp)))))) diff --git a/jdee-files.el b/jdee-files.el index e6388b8..d50b329 100644 --- a/jdee-files.el +++ b/jdee-files.el @@ -168,7 +168,7 @@ a list of matching files or directories which are interpolated into the sourcepa "Get all the files in DIR, and any subdirectories of DIR, whose names match INCLUDE-REGEXP." (let (files) - (loop for file in (directory-files dir) do + (loop-for-each file in (directory-files dir) do (if (not (member file '("." ".."))) (let ((file (concat dir "/" file))) (if (file-directory-p file) @@ -189,7 +189,7 @@ root names match EXCLUDE-REGEXPS. Return the files normalized against SYMBOL." (let ((file-name (file-name-nondirectory file-path))) (catch 'match - (loop for regexp in exclude-regexps do + (loop-for-each regexp in exclude-regexps do (if (string-match regexp file-name) (throw 'match t)))))) (jdee-directory-files-recurs dir include-regexp)))) diff --git a/jdee-gen.el b/jdee-gen.el index d395035..53692f2 100644 --- a/jdee-gen.el +++ b/jdee-gen.el @@ -3872,7 +3872,7 @@ Returns t, if the template has been inserted, otherwise nil." (defun jdee-gen-load-abbrev-templates () "Defines jdee-mode abbrevs for the control flow templates." - (loop for template in jdee-gen-abbrev-templates do + (loop-for-each template in jdee-gen-abbrev-templates do (let ((abbrev (car template))) (define-abbrev local-abbrev-table @@ -3898,12 +3898,12 @@ Returns t, if the template has been inserted, otherwise nil." (erase-buffer) (insert "public class Test {\n\n}") (backward-char 2) - (loop for flags in '((t . t) (t . nil) (nil . t) (nil . nil)) do + (loop-for-each flags in '((t . t) (t . nil) (nil . t) (nil . nil)) do (let ((jdee-gen-k&r (car flags)) (jdee-gen-comments (cdr flags))) (insert (format "/**** jdee-gen-comments: %S jdee-gen-k&r: %S ****/\n\n" jdee-gen-comments jdee-gen-k&r)) - (loop for abbrev in + (loop-for-each abbrev in '(("if" (clause . "true")) ("else") ("ife" (clause . "true")) diff --git a/jdee-import.el b/jdee-import.el index 743d32f..2913ea1 100644 --- a/jdee-import.el +++ b/jdee-import.el @@ -409,7 +409,7 @@ inserts the selected import in the buffer." (deactivate-mark) (if exclude (setq new-imports (jdee-import-exclude-imports new-imports))) - (loop for new-import in new-imports do + (loop-for-each new-import in new-imports do (when (> (length new-import) 0) ;; added to avoid insert empty import statements. (insert (concat "import " new-import ";\n")) (message "Imported %s" new-import))) diff --git a/jdee-jdb.el b/jdee-jdb.el index b99212f..96db392 100644 --- a/jdee-jdb.el +++ b/jdee-jdb.el @@ -716,7 +716,7 @@ expression at poing") (defmethod jdee-jdb-set-breakpoint-listener ((this jdee-jdb-breakpoint-listener) output) "Listens for set breakpoint messages." (let ((msgs (split-string output "\n"))) - (loop for msg in msgs do + (loop-for-each msg in msgs do (if (and (string-match "^.*Set .*breakpoint \\(.*\\):\\([0-9]+\\)" msg) diff --git a/jdee-open-source.el b/jdee-open-source.el index 738582f..d74e121 100644 --- a/jdee-open-source.el +++ b/jdee-open-source.el @@ -436,7 +436,7 @@ If CLASS is found in an archive, set both ".java")) (package (jdee-parse-get-package-from-name outer-class))) (catch 'found - (loop for path in (jdee-expand-wildcards-and-normalize jdee-sourcepath 'jdee-sourcepath) do + (loop-for-each path in (jdee-expand-wildcards-and-normalize jdee-sourcepath 'jdee-sourcepath) do (let* ((pkg-path (subst-char-in-string ?. ?/ package)) (pkg-dir (expand-file-name pkg-path path)) (file-path (expand-file-name file pkg-dir))) diff --git a/jdee-parse.el b/jdee-parse.el index 9c2be67..2a7b19a 100644 --- a/jdee-parse.el +++ b/jdee-parse.el @@ -954,11 +954,11 @@ otherwise nil." (class-methods (semantic-brute-find-tag-by-class 'function class-parts))) ;; Is point in a method of a subclass of this class? - (loop for subclass in class-subclasses do + (loop-for-each subclass in class-subclasses do (jdee-parse--search-class subclass pos)) ;; Is point in any of the methods of this class? - (loop for method in class-methods do + (loop-for-each method in class-methods do (let* ((method-name (semantic-tag-name method)) (method-start (semantic-tag-start method)) (method-end (semantic-tag-end method))) @@ -975,7 +975,7 @@ in a method; otherwise, nil." (tokens (semantic-fetch-tags)) (classes (semantic-brute-find-tag-by-class 'type tokens))) (catch 'found - (loop for class in classes + (loop-for-each class in classes do (jdee-parse--search-class class pos))))) (defclass jdee-parse-method-map (jdee-avl-tree) @@ -995,11 +995,11 @@ in a method; otherwise, nil." (class-methods (semantic-brute-find-tag-by-class 'function class-parts))) ;; Add methods of subclasses - (loop for subclass in class-subclasses do + (loop-for-each subclass in class-subclasses do (jdee-parse--add-methods method-map subclass)) ;; Add methods of this class? - (loop for method in class-methods do + (loop-for-each method in class-methods do (let* ((method-name (semantic-tag-name method)) (method-start (semantic-tag-start method)) (method-end (semantic-tag-end method))) @@ -1019,7 +1019,7 @@ in a method; otherwise, nil." (let* ((tokens (semantic-fetch-tags)) (classes (semantic-brute-find-tag-by-class 'type tokens))) - (loop for class in classes do + (loop-for-each class in classes do (jdee-parse--add-methods this class)))) (defmethod jdee-parse-method-map-get-method-at ((this jdee-parse-method-map) &optional pos) diff --git a/jdee-plugins.el b/jdee-plugins.el index 3e5f6ab..4f44972 100644 --- a/jdee-plugins.el +++ b/jdee-plugins.el @@ -116,7 +116,7 @@ This function loads jdee-PLUGIN.el." "Get the plugin directories and jar files to include in the Beanshell classpath." (let ((plugins (oref-default 'jdee-plugin plugins)) classpath) - (loop for plugin in plugins do + (loop-for-each plugin in plugins do (setq classpath (append classpath (oref plugin bsh-cp)))) classpath)) @@ -141,7 +141,7 @@ jar program is on the system path." (insert "JDEE Plugin Installation Log") (pop-to-buffer buf) (cd jdee-plugins-directory) - (loop for zip-file in zip-files do + (loop-for-each zip-file in zip-files do (let ((result (shell-command-to-string (concat "jar xvf " zip-file)))) diff --git a/jdee-project-file.el b/jdee-project-file.el index 8efdb4f..4903e5c 100644 --- a/jdee-project-file.el +++ b/jdee-project-file.el @@ -146,7 +146,7 @@ Emacs startup values." (if prj-files (progn (jdee-set-variables-init-value) - (loop for file in prj-files do + (loop-for-each file in prj-files do (setq jdee-loading-project-file file) (jdee-log-msg "jdee-load-project-file: Loading %s" file) ;; reset project file version diff --git a/jdee-run.el b/jdee-run.el index 8efb1b9..6c43976 100644 --- a/jdee-run.el +++ b/jdee-run.el @@ -1045,7 +1045,7 @@ to a debugger." ((listp jdee-run-option-enable-assertions) (if (car jdee-run-option-enable-assertions) (setq args '("-ea:..."))) - (loop for location in (cdr jdee-run-option-enable-assertions) do + (loop-for-each location in (cdr jdee-run-option-enable-assertions) do (let ((type (car location)) (name (cdr location))) (if (string= type "package") @@ -1072,7 +1072,7 @@ to a debugger." ((listp jdee-run-option-disable-assertions) (if (car jdee-run-option-disable-assertions) (setq args '("-da:..."))) - (loop for location in (cdr jdee-run-option-disable-assertions) do + (loop-for-each location in (cdr jdee-run-option-disable-assertions) do (let ((type (car location)) (name (cdr location))) (if (string= type "package")