[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/racket-mode 8ea73be120 2/3: style: Consistently use _ for
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/racket-mode 8ea73be120 2/3: style: Consistently use _ for condition-case "don't care" var |
Date: |
Thu, 11 Jan 2024 11:42:39 -0500 (EST) |
branch: elpa/racket-mode
commit 8ea73be120d6b3a91059f15008ca01e31753a9e3
Author: Greg Hendershott <git@greghendershott.com>
Commit: Greg Hendershott <git@greghendershott.com>
style: Consistently use _ for condition-case "don't care" var
As opposed to using variously () or nil.
---
racket-collection.el | 2 +-
racket-common.el | 6 +++---
racket-complete.el | 6 +++---
racket-edit.el | 6 +++---
racket-eldoc.el | 2 +-
racket-font-lock.el | 2 +-
racket-imenu.el | 2 +-
racket-indent.el | 4 ++--
racket-repl.el | 2 +-
racket-visit.el | 4 ++--
10 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/racket-collection.el b/racket-collection.el
index 49affe712b..04015be0df 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 72f449648b..59b61ac3b7 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 9ab89d14b9..cc8dd2509f 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 29b92477f3..9a28af02c7 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 a49537e607..7c418c2893 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 7003f174fb..15215a23ab 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 a48add5357..9d1911a560 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 87e0e35c8f..dd344ee834 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 9b03946af6..d34b275c76 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 669dcd698d..9dc032ca28 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)