[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/bug-hunter 39a9d33 83/95: Indentation
From: |
Stefan Monnier |
Subject: |
[elpa] externals/bug-hunter 39a9d33 83/95: Indentation |
Date: |
Fri, 27 Nov 2020 22:07:01 -0500 (EST) |
branch: externals/bug-hunter
commit 39a9d3335f0a835a3843e2055d7c9f3cc43e6385
Author: Artur Malabarba <bruce.connor.am@gmail.com>
Commit: Artur Malabarba <bruce.connor.am@gmail.com>
Indentation
---
bug-hunter.el | 106 +++++++++++++++++++++++++++++-----------------------------
1 file changed, 53 insertions(+), 53 deletions(-)
diff --git a/bug-hunter.el b/bug-hunter.el
index d852d40..559a5f2 100644
--- a/bug-hunter.el
+++ b/bug-hunter.el
@@ -210,43 +210,43 @@ LINE and COLUMN are the coordinates where EXPRESSION
started in
the file."
(when line
(bug-hunter--report "%S, line %s pos %s:"
- bug-hunter--current-file line column))
+ bug-hunter--current-file line column))
(bug-hunter--report " %s"
- (cl-case (car error)
- (end-of-file
- "There's a missing closing parenthesis, the expression on this line
never ends.")
- (invalid-read-syntax
- (let ((char (cadr error)))
- (if (member char '("]" ")"))
- (concat "There's an extra " char
- " on this position. There's probably a missing "
- (if (string= char ")") "(" "[")
- " before that.")
- (concat "There's a " char
- " on this position, and that is not valid elisp syntax."))))
- (user-aborted
- (let* ((print-level 2)
- (print-length 15)
- (forms (cadr error))
- (size (length forms)))
- (concat "User aborted while testing the following expressions:\n"
- (mapconcat (lambda (x) (bug-hunter--pretty-format x 4))
- (if (< size 16) forms (seq-take forms 7))
- "")
- (when (> size 16)
- (format "\n ... %s omitted expressions ...\n\n"
- (- size 14)))
- (when (> size 16)
- (mapconcat (lambda (x) (bug-hunter--pretty-format x 4))
- (seq-drop forms (- size 7)) "")))))
- (assertion-triggered
- (concat "The assertion returned the following value here:\n"
- (bug-hunter--pretty-format (cadr error) 4)))
- (t (format "The following error was signaled here:\n %S"
- error))))
+ (cl-case (car error)
+ (end-of-file
+ "There's a missing closing parenthesis, the expression on this
line never ends.")
+ (invalid-read-syntax
+ (let ((char (cadr error)))
+ (if (member char '("]" ")"))
+ (concat "There's an extra " char
+ " on this position. There's probably a missing "
+ (if (string= char ")") "(" "[")
+ " before that.")
+ (concat "There's a " char
+ " on this position, and that is not valid elisp
syntax."))))
+ (user-aborted
+ (let* ((print-level 2)
+ (print-length 15)
+ (forms (cadr error))
+ (size (length forms)))
+ (concat "User aborted while testing the following
expressions:\n"
+ (mapconcat (lambda (x) (bug-hunter--pretty-format x
4))
+ (if (< size 16) forms (seq-take forms 7))
+ "")
+ (when (> size 16)
+ (format "\n ... %s omitted expressions ...\n\n"
+ (- size 14)))
+ (when (> size 16)
+ (mapconcat (lambda (x) (bug-hunter--pretty-format x
4))
+ (seq-drop forms (- size 7)) "")))))
+ (assertion-triggered
+ (concat "The assertion returned the following value here:\n"
+ (bug-hunter--pretty-format (cadr error) 4)))
+ (t (format "The following error was signaled here:\n %S"
+ error))))
(when expression
(bug-hunter--report " Caused by the following expression:\n%s"
- (bug-hunter--pretty-format expression 4)))
+ (bug-hunter--pretty-format expression 4)))
(bug-hunter--report "\xc\n")
`[,error ,line ,column ,expression])
@@ -343,16 +343,16 @@ which will be inspected if HEAD doesn't match ASSERTION."
(vector (length safe) ret-val))
(ret-val
(apply #'bug-hunter--bisect
- assertion
- safe
- (bug-hunter--split head)))
+ assertion
+ safe
+ (bug-hunter--split head)))
;; Issue in the tail.
(t (apply #'bug-hunter--bisect
- assertion
- (append safe head)
- ;; If tail has length 1, we already know where the issue is,
- ;; but we still do this to get the return value.
- (bug-hunter--split tail))))))
+ assertion
+ (append safe head)
+ ;; If tail has length 1, we already know where the issue is,
+ ;; but we still do this to get the return value.
+ (bug-hunter--split tail))))))
(defun bug-hunter--bisect-start (forms assertion)
"Run a bisection search on list of FORMS using ASSERTION.
@@ -408,27 +408,27 @@ are evaluated."
((progn (bug-hunter--report "Doing some initial tests...")
(not (bug-hunter--run-and-test expressions assertion)))
(bug-hunter--report-user-error "Test failed.\n%s\n%s"
- (if assertion
- (concat "The assertion returned nil after loading the entire
file.\n"
- bug-hunter--assertion-reminder)
- "No errors signaled after loading the entire file.
+ (if assertion
+ (concat "The assertion returned nil after
loading the entire file.\n"
+ bug-hunter--assertion-reminder)
+ "No errors signaled after loading the entire file.
If you're looking for something that's not an error, use the
interactive hunt instead of the error hunt. If you have some
elisp proficiency, you can also use the assertion hunt, see this
link for some examples:
https://github.com/Bruce-Connor/elisp-bug-hunter")
- (or assertion "")))
+ (or assertion "")))
;; Make sure we're in a forest, not a volcano.
((bug-hunter--run-and-test nil assertion)
(bug-hunter--report-user-error "Test failed.\n%s\n%s"
- (if assertion
- (concat "Assertion returned non-nil even on emacs -Q:"
- bug-hunter--assertion-reminder)
- "Detected a signaled error even on emacs -Q. I'm sorry, but there
+ (if assertion
+ (concat "Assertion returned non-nil even on
emacs -Q:"
+ bug-hunter--assertion-reminder)
+ "Detected a signaled error even on emacs -Q. I'm
sorry, but there
is something seriously wrong with your Emacs installation.
There's nothing more I can do here.")
- (or assertion "")))
+ (or assertion "")))
(t
;; Perform the actual hunt.
@@ -436,7 +436,7 @@ There's nothing more I can do here.")
(let* ((result (bug-hunter--bisect-start expressions assertion)))
(if (not result)
(bug-hunter--report-user-error "No problem was found, despite our
initial tests.\n%s"
- "I have no idea what's going on.")
+ "I have no idea what's going on.")
(let* ((pos (elt result 0))
(ret (elt result 1))
(linecol (when pos (cdr (elt rich-forms pos))))
- [elpa] externals/bug-hunter 0df2a48 53/95: Provide, (continued)
- [elpa] externals/bug-hunter 0df2a48 53/95: Provide, Stefan Monnier, 2020/11/27
- [elpa] externals/bug-hunter da07f04 61/95: minor typo fixes, Stefan Monnier, 2020/11/27
- [elpa] externals/bug-hunter 6c56fc3 80/95: Fix frame -> instance, Stefan Monnier, 2020/11/27
- [elpa] externals/bug-hunter 05aace5 48/95: Invert argument order in report-error, Stefan Monnier, 2020/11/27
- [elpa] externals/bug-hunter e81cfe7 54/95: readme, Stefan Monnier, 2020/11/27
- [elpa] externals/bug-hunter b44c8a3 59/95: Simpler test, Stefan Monnier, 2020/11/27
- [elpa] externals/bug-hunter 42bdc9f 62/95: Fix travis badge, Stefan Monnier, 2020/11/27
- [elpa] externals/bug-hunter 1b529d7 77/95: Screencast, Stefan Monnier, 2020/11/27
- [elpa] externals/bug-hunter bde792a 76/95: Version 0.5, Stefan Monnier, 2020/11/27
- [elpa] externals/bug-hunter a07a7a3 81/95: Better messages, Stefan Monnier, 2020/11/27
- [elpa] externals/bug-hunter 39a9d33 83/95: Indentation,
Stefan Monnier <=
- [elpa] externals/bug-hunter c4d5797 85/95: Update Github username, Stefan Monnier, 2020/11/27
- [elpa] externals/bug-hunter 480b6c1 87/95: Version bump, Stefan Monnier, 2020/11/27
- [elpa] externals/bug-hunter bc623c2 92/95: [Fix #16] Improve the error message when emacs -Q fails, Stefan Monnier, 2020/11/27
- [elpa] externals/bug-hunter 5c99abe 95/95: Fix some quoting problems in doc strings, Stefan Monnier, 2020/11/27
- [elpa] externals/bug-hunter a300e9a 72/95: Add test, Stefan Monnier, 2020/11/27
- [elpa] externals/bug-hunter 17d7343 74/95: Fix test, Stefan Monnier, 2020/11/27
- [elpa] externals/bug-hunter 6e66ec3 78/95: Add missing word in user prompt., Stefan Monnier, 2020/11/27
- [elpa] externals/bug-hunter fbc34db 84/95: [Fix #12] Mention bisecting and debugging in the Readme, Stefan Monnier, 2020/11/27
- [elpa] externals/bug-hunter afb4bb1 86/95: Fix #14 - Explain what to do if you encounter another issue, Stefan Monnier, 2020/11/27
- [elpa] externals/bug-hunter fb5b512 75/95: Better documentation and interactivity, Stefan Monnier, 2020/11/27