summaryrefslogtreecommitdiff
path: root/cider-debug.el
diff options
context:
space:
mode:
authorArtur Malabarba <bruce.connor.am@gmail.com>2015-10-01 01:08:58 +0100
committerArtur Malabarba <bruce.connor.am@gmail.com>2015-10-01 01:08:58 +0100
commit3b7ec7e84fcc1d130c99a187cafedbea8f9ef93a (patch)
tree590c3ed0a39ea92a9dd63bb6b25ab3486c540f4f /cider-debug.el
parenta635452d0344d94a9109385b1e8d7e26b0a4661d (diff)
Fix a corner case in cider--debug-move-point
Diffstat (limited to 'cider-debug.el')
-rw-r--r--cider-debug.el22
1 files changed, 12 insertions, 10 deletions
diff --git a/cider-debug.el b/cider-debug.el
index 1bb3f482..720453a5 100644
--- a/cider-debug.el
+++ b/cider-debug.el
@@ -419,7 +419,7 @@ ID is the id of the message that instrumented CODE."
"Place point on POS in FILE, then navigate into the next sexp.
COORDINATES is a list of integers that specify how to navigate into the
sexp."
- (condition-case nil
+ (condition-case-unless-debug nil
;; Navigate through sexps inside the sexp.
(let ((in-syntax-quote nil))
(while coordinates
@@ -454,15 +454,17 @@ sexp."
(clojure-forward-logical-sexp 1)
(forward-sexp -1)
;; Here a syntax-quote is ending.
- (when (looking-at "~@?")
- (setq in-syntax-quote nil))
- ;; A `~@' is read as the object itself, so we don't pop
- ;; anything.
- (unless (equal "~@" (match-string 0))
- ;; Anything else (including a `~') is read as a `list'
- ;; form inside the `concat', so we need to pop the list
- ;; from the coordinates.
- (pop coordinates)))))
+ (let ((match (when (looking-at "~@?")
+ (match-string 0))))
+ (when match
+ (setq in-syntax-quote nil))
+ ;; A `~@' is read as the object itself, so we don't pop
+ ;; anything.
+ (unless (equal "~@" match)
+ ;; Anything else (including a `~') is read as a `list'
+ ;; form inside the `concat', so we need to pop the list
+ ;; from the coordinates.
+ (pop coordinates))))))
;; If that extra pop was the last coordinate, this represents the
;; entire #(...), so we should move back out.
(backward-up-list)))