diff --git a/racket-collection.el b/racket-collection.el index 49affe71..04015be0 100644 --- a/racket-collection.el +++ b/racket-collection.el @@ -161,7 +161,7 @@ at the top, marked with \"->\". candidates or (point-max)." (save-excursion (goto-char (point-min)) - (condition-case () + (condition-case _ (1- (re-search-forward "\n")) (error (point-max))))) diff --git a/racket-common.el b/racket-common.el index 72f44964..59b61ac3 100644 --- a/racket-common.el +++ b/racket-common.el @@ -232,7 +232,7 @@ flavor here." ;; Try to move up to outermost form, but stopping at or before any ;; module form. (while - (condition-case nil + (condition-case _ (let ((prev (point))) (goto-char (scan-lists (point) -1 1)) (if (looking-at racket-module-forms) @@ -249,7 +249,7 @@ flavor here." ;; already at the module level, and just need to move to the ;; previous module-level item. (unless (/= orig (point)) - (condition-case nil (backward-sexp 1) (scan-error nil))) + (condition-case _ (backward-sexp 1) (scan-error nil))) ;; When we moved, also move before any preceding "#;". (when (/= orig (point)) (when-let (sexp-comment-start @@ -318,7 +318,7 @@ Ignores module forms nested (at any depth) in any sort of plain or syntax quoting, because those won't be valid Racket syntax." (save-excursion (let ((xs nil)) - (condition-case () + (condition-case _ (progn (racket--escape-string-or-comment) (while t diff --git a/racket-complete.el b/racket-complete.el index 9ab89d14..cc8dd250 100644 --- a/racket-complete.el +++ b/racket-complete.el @@ -12,7 +12,7 @@ (defun racket--call-with-completion-prefix-positions (proc) (if forward-sexp-function ;not necessarily sexp lang - (condition-case nil + (condition-case _ (save-excursion (let ((beg (progn (forward-sexp -1) (point))) (end (progn (forward-sexp 1) (point)))) @@ -22,7 +22,7 @@ (let ((beg (save-excursion (skip-syntax-backward "^-()>") (point)))) (unless (or (eq beg (point-max)) (member (char-syntax (char-after beg)) '(?\" ?\( ?\)))) - (condition-case nil + (condition-case _ (save-excursion (goto-char beg) (forward-sexp 1) @@ -38,7 +38,7 @@ (racket--escape-string-or-comment) (let ((done nil) (result nil)) - (condition-case () + (condition-case _ (while (not done) (backward-up-list) (when (looking-at-p (rx ?\( (or "require" "#%require"))) diff --git a/racket-edit.el b/racket-edit.el index 29b92477..9a28af02 100644 --- a/racket-edit.el +++ b/racket-edit.el @@ -224,7 +224,7 @@ point." (let ((first-beg nil) (requires nil)) (while - (condition-case nil + (condition-case _ (let ((end (progn (forward-sexp 1) (point))) (beg (progn (forward-sexp -1) (point)))) (unless (equal end (point-max)) @@ -246,7 +246,7 @@ around point. This could be \"(point-min)\" if point is within no module form, meaning the outermost, file module." (save-excursion (racket--escape-string-or-comment) - (condition-case () + (condition-case _ (progn (while (not (racket--looking-at-module-form)) (backward-up-list)) @@ -416,7 +416,7 @@ Only call F when the couple's sexprs are on the same line. When LISTP is true, expects couples to be `[id val]`, else `id val`." (save-excursion - (condition-case () + (condition-case _ (while t (when listp (down-list)) diff --git a/racket-eldoc.el b/racket-eldoc.el index a49537e6..7c418c28 100644 --- a/racket-eldoc.el +++ b/racket-eldoc.el @@ -15,7 +15,7 @@ (and (racket--cmd-open-p) (> (point) (point-min)) (save-excursion - (condition-case nil + (condition-case _ ;; The char-before and looking-at-p checks below are to ;; skip when the sexp is quoted or when its first elem ;; couldn't be a Racket function name. diff --git a/racket-font-lock.el b/racket-font-lock.el index 7003f174..15215a23 100644 --- a/racket-font-lock.el +++ b/racket-font-lock.el @@ -393,7 +393,7 @@ similar, it will already be there." (defun racket--inside-complete-sexp () "Return whether point is inside a complete sexp." - (condition-case () + (condition-case _ (save-excursion (backward-up-list) (forward-sexp 1) t) (error nil))) diff --git a/racket-imenu.el b/racket-imenu.el index a48add53..9d1911a5 100644 --- a/racket-imenu.el +++ b/racket-imenu.el @@ -62,7 +62,7 @@ If sexp at point is a Racket module form create a submenu." (forward-sexp -1))) (defun racket--imenu-goto-start-of-following-sexp () - (condition-case nil + (condition-case _ (progn (forward-sexp 1) (let ((orig (point))) diff --git a/racket-indent.el b/racket-indent.el index 87e0e35c..dd344ee8 100644 --- a/racket-indent.el +++ b/racket-indent.el @@ -198,7 +198,7 @@ need." (let ((indent-point (point)) (state nil)) (racket--escape-string-or-comment) - (condition-case nil (backward-up-list 1) (scan-error nil)) + (condition-case _ (backward-up-list 1) (scan-error nil)) (while (< (point) indent-point) (setq state (parse-partial-sexp (point) indent-point 0))) (let ((strp (racket--ppss-string-p state)) @@ -366,7 +366,7 @@ Any additional, non-distinguished forms get normal indent." (skip-chars-forward " \t\n") (current-column))) (count -1)) - (condition-case nil + (condition-case _ (while (and (<= (point) indent-point) (not (eobp))) (forward-sexp 1) diff --git a/racket-repl.el b/racket-repl.el index 9b03946a..d34b275c 100644 --- a/racket-repl.el +++ b/racket-repl.el @@ -457,7 +457,7 @@ Otherwise send to current-input-port of user program." (defun racket--repl-complete-sexp-p () "Is there at least one complete sexp at REPL prompt?" - (condition-case nil + (condition-case _ (let* ((beg (racket--repl-prompt-mark-end)) (end (save-excursion (goto-char beg) diff --git a/racket-visit.el b/racket-visit.el index 669dcd69..9dc032ca 100644 --- a/racket-visit.el +++ b/racket-visit.el @@ -32,7 +32,7 @@ The returned string has text properties: an index of 0 for `get-text-property'." (when (racket--in-require-form-p) (save-excursion - (condition-case () + (condition-case _ (progn (forward-sexp 1) (backward-sexp 1) @@ -43,7 +43,7 @@ The returned string has text properties: ((and (pred identity) sexp) (let* ((relative-p (stringp sexp)) (multi-in-prefix - (condition-case () + (condition-case _ (progn (backward-up-list 1) (backward-sexp 2)