File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -289,16 +289,20 @@ a more user friendly representation of SPEC-FORM."
289
289
(defun cider-browse-spec--next-spec ()
290
290
" Move to the next spec in the buffer."
291
291
(interactive )
292
- (goto-char (next-single-property-change (point ) 'spec-name ))
293
- (unless (get-text-property (point ) 'spec-name )
294
- (goto-char (next-single-property-change (point ) 'spec-name ))))
292
+ (when-let ((pos (next-single-property-change (point ) 'spec-name )))
293
+ (if (get-text-property (point ) 'spec-name )
294
+ (when-let ((next-pos (next-single-property-change pos 'spec-name )))
295
+ (goto-char next-pos))
296
+ (goto-char pos))))
295
297
296
298
(defun cider-browse-spec--prev-spec ()
297
299
" Move to the previous spec in the buffer."
298
300
(interactive )
299
- (goto-char (previous-single-property-change (point ) 'spec-name ))
300
- (unless (get-text-property (point ) 'spec-name )
301
- (goto-char (previous-single-property-change (point ) 'spec-name ))))
301
+ (when-let ((pos (previous-single-property-change (point ) 'spec-name )))
302
+ (if (get-text-property (point ) 'spec-name )
303
+ (when-let ((prev-pos (previous-single-property-change pos 'spec-name )))
304
+ (goto-char prev-pos))
305
+ (goto-char pos))))
302
306
303
307
(defun cider-browse-spec--print-curr-spec-example ()
304
308
" Generate and print an example of the current spec."
You can’t perform that action at this time.
0 commit comments