[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 95507dd403: Allow show-paren to show matching parentheses inside
From: |
Lars Ingebrigtsen |
Subject: |
master 95507dd403: Allow show-paren to show matching parentheses inside comments |
Date: |
Mon, 2 May 2022 05:03:03 -0400 (EDT) |
branch: master
commit 95507dd4038ea9c704c155c81759f3fc0c568717
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
Allow show-paren to show matching parentheses inside comments
* lisp/paren.el (show-paren--default): Improve blinking when
inside a comment (bug#5410).
---
lisp/paren.el | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/lisp/paren.el b/lisp/paren.el
index 4e67a4ea4f..4c268dbf77 100644
--- a/lisp/paren.el
+++ b/lisp/paren.el
@@ -225,6 +225,13 @@ It is the default value of `show-paren-data-function'."
(let* ((temp (show-paren--locate-near-paren))
(dir (car temp))
(outside (cdr temp))
+ ;; If we're inside a comment, then we probably want to blink
+ ;; a matching parentheses in the comment. So don't ignore
+ ;; comments in that case.
+ (parse-sexp-ignore-comments
+ (if (ppss-comment-depth (syntax-ppss))
+ nil
+ parse-sexp-ignore-comments))
pos mismatch here-beg here-end)
;;
;; Find the other end of the sexp.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 95507dd403: Allow show-paren to show matching parentheses inside comments,
Lars Ingebrigtsen <=