branch: externals/js2-mode commit b4ede70783526f135de41f116ec8ace3bb9292da Author: Philipp Stephani <p...@google.com> Commit: Philipp Stephani <p...@google.com>
Fix &rest syntax in cl-destructuring-bind. &rest requires an argument. While ‘cl-destructuring-bind’ is somewhat lenient about this, its edebug specification is not, so functions that contain &rest without argument can’t be edebugged. --- js2-mode.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/js2-mode.el b/js2-mode.el index 9c64341..b91d583 100644 --- a/js2-mode.el +++ b/js2-mode.el @@ -7702,7 +7702,8 @@ For instance, processing a nested scope requires a parent function node." (let (result fn parent-qname p elem) (dolist (entry js2-imenu-recorder) ;; function node goes first - (cl-destructuring-bind (current-fn &rest (&whole chain head &rest)) entry + (cl-destructuring-bind + (current-fn &rest (&whole chain head &rest rest)) entry ;; Examine head's defining scope: ;; Pre-processed chain, or top-level/external, keep as-is. (if (or (stringp head) (js2-node-top-level-decl-p head)) @@ -11684,7 +11685,7 @@ highlighting features of `js2-mode'." (let ((inhibit-read-only t)) (erase-buffer) (dolist (err all-errs) - (cl-destructuring-bind ((msg-key beg _end &rest) type line) err + (cl-destructuring-bind ((msg-key beg _end &rest rest) type line) err (insert-text-button (format "line %d: %s" line (js2-get-msg msg-key)) 'face type