From 03bfcc684f2746395d1da628488a987090a56d10 Mon Sep 17 00:00:00 2001 From: Nicholas Harrison Date: Wed, 18 Oct 2023 23:02:39 +1100 Subject: [PATCH 1/3] dynamic-completion-table -> completion-table-dynamic --- rosemacs/rosemacs.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rosemacs/rosemacs.el b/rosemacs/rosemacs.el index 6bcb027..9a4e0b6 100644 --- a/rosemacs/rosemacs.el +++ b/rosemacs/rosemacs.el @@ -392,13 +392,13 @@ (cl-subseq word (1+ index))) word))) -(setq topic-completor (dynamic-completion-table +(setq topic-completor (completion-table-dynamic (lambda (str) (rosemacs-bsearch str ros-all-topics)))) -(setq node-completor (dynamic-completion-table +(setq node-completor (completion-table-dynamic (lambda (str) (rosemacs-bsearch str rosemacs/nodes-vec)))) (setq ros-package-completor ;; Longer because it has to deal with the case of PACKAGE/PATH-PREFIX in addition to PACKAGE-PREFIX - (dynamic-completion-table + (completion-table-dynamic (lambda (str) (unless ros-packages (ros-load-package-locations)) (cl-multiple-value-bind (package dir-prefix dir-suffix) (parse-ros-file-prefix str) From 69045991b7705d7f10a36fe5c754c82d2427253e Mon Sep 17 00:00:00 2001 From: Nicholas Harrison Date: Wed, 18 Oct 2023 23:39:02 +1100 Subject: [PATCH 2/3] (return) -> (cl-return) --- rosemacs/rosemacs.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rosemacs/rosemacs.el b/rosemacs/rosemacs.el index 9a4e0b6..b466772 100644 --- a/rosemacs/rosemacs.el +++ b/rosemacs/rosemacs.el @@ -847,7 +847,7 @@ parameter." (let ((current-nodes nil)) (while (re-search-forward "^\\/\\(.*\\)$" nil t) (when (> (match-end 0) finish) - (return)) + (cl-return)) (push (match-string 1) current-nodes)) (let ((sorted-nodes (cl-sort current-nodes 'string<))) (cl-destructuring-bind (added deleted) @@ -1392,7 +1392,7 @@ else if not published yet, return the number -1, else return nil" (if pos (let ((str (match-string 1))) (push str ros-run-exec-paths)) - (return))))))) + (cl-return))))))) (cl-sort (cl-map 'vector 'extract-exec-name ros-run-exec-paths) 'string<))) (defun ros-package-file-full-path (pkg file) From bfa969bc8b416abcd6308c49e82ac98e94d590fe Mon Sep 17 00:00:00 2001 From: Nicholas Harrison Date: Thu, 19 Oct 2023 21:53:28 +1100 Subject: [PATCH 3/3] assert -> cl-assert --- rosemacs/rosemacs.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rosemacs/rosemacs.el b/rosemacs/rosemacs.el index b466772..51e791e 100644 --- a/rosemacs/rosemacs.el +++ b/rosemacs/rosemacs.el @@ -1625,10 +1625,10 @@ With prefix arg, allows editing rosmake command before starting." (defun ros-launch-current () (interactive) (let ((path (buffer-file-name))) - (assert (and path (string-match ".*\\/\\([^\\/]*\.launch\\)" path))) + (cl-assert (and path (string-match ".*\\/\\([^\\/]*\.launch\\)" path))) (let* ((filename (match-string 1 path)) (pkg (ros-package-for-path path))) - (assert (and pkg filename)) + (cl-assert (and pkg filename)) (let ((name (format "roslaunch:%s/%s" pkg filename))) (if (rosemacs/contains-running-process name) (switch-to-buffer (get-buffer name))