Added other brackets, so it works with other languages.

master
Tim Perkins 8 years ago
parent a5eace2396
commit 52a8d36447
  1. 4
      highlight-parentheses.el

@ -109,9 +109,9 @@ This is used to prevent analyzing the same context over and over.")
(save-excursion (save-excursion
(ignore-errors (ignore-errors
(when hl-paren-highlight-adjacent (when hl-paren-highlight-adjacent
(cond ((eq ?\) (preceding-char)) (cond ((memq (preceding-char) '(?\) ?\} ?\]))
(backward-char 1)) (backward-char 1))
((eq ?\( (following-char)) ((memq (following-char) '(?\( ?\{ ?\[))
(forward-char 1)))) (forward-char 1))))
(while (and (setq pos1 (cadr (syntax-ppss pos1))) (while (and (setq pos1 (cadr (syntax-ppss pos1)))
(cdr overlays)) (cdr overlays))

Loading…
Cancel
Save