emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Proposed patch: ignore show-paren-mode fails in comments


From: Oleh Krehel
Subject: Proposed patch: ignore show-paren-mode fails in comments
Date: Tue, 08 Sep 2015 16:12:32 +0200

Hi all,

I like to have `show-paren-mode' in my Lisp buffers. However, it will
fail to match the parens in commented multi-line expressions like this
one:

;; =>
;; (0
;;  (1
;;   (2
;;    (3 (4 (5 (6 (7 (8 (9 ()))))))))))

I attach a patch to ignore these failures.

Attachment: 0001-lisp-paren.el-show-paren-default-Ignore-fails-in-com.patch
Description: Text Data

Interestingly, as I pasted the code into this `message-mode' buffer,
`show-paren-mode' doesn't fail any more, since ";;" don't register as
comments any more. Maybe `scan-sexps' could be modified to scan
differently (i.e. ignoring comments) if the starting position is in a
comment. This would be preferable to just ignoring the scan errors like
the attached patch does.

What do you think?

    Oleh

reply via email to

[Prev in Thread] Current Thread [Next in Thread]