File tree Expand file tree Collapse file tree 1 file changed +18
-4
lines changed Expand file tree Collapse file tree 1 file changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -553,10 +553,24 @@ property."
553
553
(when (and (not (bobp ))
554
554
(get-text-property (1- (point )) 'cider-block-dynamic-font-lock ))
555
555
(ignore-errors (beginning-of-defun )))
556
- (ignore-errors
557
- (cider--parse-and-apply-locals
558
- end (unless (bobp )
559
- (get-text-property (1- (point )) 'cider-locals )))))))
556
+ (let ((locals-above (unless (bobp )
557
+ (get-text-property (1- (point )) 'cider-locals ))))
558
+ (save-excursion
559
+ ; ; If there are locals above the current sexp, reapply them to the
560
+ ; ; current sexp.
561
+ (when (and locals-above
562
+ (condition-case nil
563
+ (progn (up-list ) t )
564
+ (scan-error nil )))
565
+ (add-text-properties beg (point ) `(cider-locals , locals-above )))
566
+ ; ; Extend the region being font-locked to include whole sexps.
567
+ (goto-char end)
568
+ (when (condition-case nil
569
+ (progn (up-list ) t )
570
+ (scan-error nil ))
571
+ (setq end (max end (point )))))
572
+ (ignore-errors
573
+ (cider--parse-and-apply-locals end locals-above))))))
560
574
(apply func beg end rest)))
561
575
562
576
You can’t perform that action at this time.
0 commit comments