File tree Expand file tree Collapse file tree 1 file changed +13
-17
lines changed
Expand file tree Collapse file tree 1 file changed +13
-17
lines changed Original file line number Diff line number Diff line change @@ -868,13 +868,12 @@ highlighted region)."
868868 (setq docelt (funcall docelt)))
869869 (goto-char listbeg)
870870 (forward-char 1 )
871- (condition-case nil
872- (while (and (> docelt 0 ) (< (point ) startpos)
873- (progn (forward-sexp 1 ) t ))
874- ; ; ignore metadata and type hints
875- (unless (looking-at " [ \n\t ]*\\ (\\ ^[A-Z:].+\\ |\\ ^?{.+\\ )" )
876- (setq docelt (1- docelt))))
877- (error nil ))
871+ (ignore-errors
872+ (while (and (> docelt 0 ) (< (point ) startpos)
873+ (progn (forward-sexp 1 ) t ))
874+ ; ; ignore metadata and type hints
875+ (unless (looking-at " [ \n\t ]*\\ (\\ ^[A-Z:].+\\ |\\ ^?{.+\\ )" )
876+ (setq docelt (1- docelt)))))
878877 (and (zerop docelt) (<= (point ) startpos)
879878 (progn (forward-comment (point-max )) t )
880879 (= (point ) (nth 8 state)))))
@@ -901,20 +900,17 @@ highlighted region)."
901900Note that this means that there is no guarantee of proper font
902901locking in def* forms that are not at top level."
903902 (goto-char point)
904- (condition-case nil
905- (beginning-of-defun )
906- (error nil ))
903+ (ignore-errors
904+ (beginning-of-defun ))
907905
908906 (let ((beg-def (point )))
909907 (when (and (not (= point beg-def))
910908 (looking-at " (def" ))
911- (condition-case nil
912- (progn
913- ; ; move forward as much as possible until failure (or success)
914- (forward-char )
915- (dotimes (_ 4 )
916- (forward-sexp )))
917- (error nil ))
909+ (ignore-errors
910+ ; ; move forward as much as possible until failure (or success)
911+ (forward-char )
912+ (dotimes (_ 4 )
913+ (forward-sexp )))
918914 (cons beg-def (point )))))
919915
920916(defun clojure-font-lock-extend-region-def ()
You can’t perform that action at this time.
0 commit comments