[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/tuareg 50309ae 4/8: Enable to turn off the delimiters matc
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/tuareg 50309ae 4/8: Enable to turn off the delimiters matching (show-paren) for comments |
Date: |
Mon, 13 Sep 2021 17:59:59 -0400 (EDT) |
branch: elpa/tuareg
commit 50309aed6931d1e8c07369b4dc382ffaa6d4cd05
Author: Christophe Troestler <Christophe.Troestler@umons.ac.be>
Commit: Christophe Troestler <Christophe.Troestler@umons.ac.be>
Enable to turn off the delimiters matching (show-paren) for comments
---
CHANGES.md | 5 ++++-
README.md | 3 +++
tuareg.el | 14 ++++++++++----
3 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/CHANGES.md b/CHANGES.md
index 6ce6faa..e4990e4 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -5,7 +5,10 @@
Note that <kbd>C-c C-c</kbd> launches the compilation.
* `tuareg-jbuilder`: <kbd>C-c C-c</kbd> launches the compilation.
* Be more subtle in phrase detection.
-* Syntax highlighting improvements: faster; much better highlighting
+* Bogus mismatched parentheses at the end of comment fixed.
+* ⚠ `show-paren-mode`: also highlight comment delimiters. You can
+ turn that off by setting `tuareg-comment-show-paren` to `nil`.
+* Syntax highlighting improvements: much faster; much better highlighting
of function, class, and method arguments (including setting the
`font-lock-multiline` property); `[]` and `::` have the constructor
face; first class module, `type nonrec`, `raise_notrace`, `with
diff --git a/README.md b/README.md
index 2c269bc..c0651c7 100644
--- a/README.md
+++ b/README.md
@@ -138,6 +138,9 @@ Tips & customization
(setq-local comment-style 'multi-line)
(setq-local comment-continue " ")))
+- If you turn on `show-paren-mode`, the delimiters of comments will
+ also be highlighted. If you do not like this behavior, set
+ `tuareg-comment-show-paren` to `nil`.
- Syntax highlighting has 3 levels. You can select the one you prefer
by setting [font-lock-maximum-decoration][] from `0` to `2`. By
diff --git a/tuareg.el b/tuareg.el
index 396107e..6fde528 100644
--- a/tuareg.el
+++ b/tuareg.el
@@ -257,6 +257,11 @@ See `ff-other-file-alist'."
:group 'tuareg
:type '(repeat (list regexp (choice (repeat string) function))))
+(defcustom tuareg-comment-show-paren t
+ "Highlight comment delimiters in `show-paren-mode' if non-nil."
+ :group 'tuareg
+ :type 'boolean)
+
(defcustom tuareg-interactive-scroll-to-bottom-on-output nil
"*Controls when to scroll to the bottom of the interactive buffer
@@ -3120,8 +3125,6 @@ expansion at run-time, if the run-time version of Emacs
does know this macro."
(smie-setup tuareg-smie-grammar #'tuareg-smie-rules
:forward-token #'tuareg-smie-forward-token
:backward-token #'tuareg-smie-backward-token)
- (add-function :around (local 'blink-matching-check-function)
- #'tuareg--blink-matching-check)
(tuareg--eval-when-macrop add-function
(when (boundp 'smie--hanging-eolp-function)
;; FIXME: As its name implies, smie--hanging-eolp-function
@@ -3132,8 +3135,11 @@ expansion at run-time, if the run-time version of Emacs
does know this macro."
(add-hook 'smie-indent-functions #'tuareg-smie--args nil t)
(add-hook 'smie-indent-functions #'tuareg-smie--inside-string nil t)
(setq-local add-log-current-defun-function #'tuareg-current-fun-name)
- (add-function :around (local 'show-paren-data-function)
- #'tuareg--show-paren)
+ (add-function :around (local 'blink-matching-check-function)
+ #'tuareg--blink-matching-check)
+ (when tuareg-comment-show-paren
+ (add-function :around (local 'show-paren-data-function)
+ #'tuareg--show-paren))
(setq prettify-symbols-alist
(if tuareg-prettify-symbols-full
(append tuareg-prettify-symbols-basic-alist
- [nongnu] elpa/tuareg updated (c33222d -> 00faf47), ELPA Syncer, 2021/09/13
- [nongnu] elpa/tuareg c9bbe95 7/8: Better comment delimiter match using `syntax-ppss', ELPA Syncer, 2021/09/13
- [nongnu] elpa/tuareg 0fd9588 1/8: README: mention NonGNU ELPA, ELPA Syncer, 2021/09/13
- [nongnu] elpa/tuareg 9f48840 2/8: README: Remove duplicate bug report URL, ELPA Syncer, 2021/09/13
- [nongnu] elpa/tuareg a156d04 3/8: Faster after comment detection & match comment delimiters, ELPA Syncer, 2021/09/13
- [nongnu] elpa/tuareg 50309ae 4/8: Enable to turn off the delimiters matching (show-paren) for comments,
ELPA Syncer <=
- [nongnu] elpa/tuareg cbe70da 5/8: Remove conditional use of add-function, available on Emacs ≥ 24.4, ELPA Syncer, 2021/09/13
- [nongnu] elpa/tuareg fe10533 6/8: Document recent changes, ELPA Syncer, 2021/09/13
- [nongnu] elpa/tuareg 00faf47 8/8: Use uniform argument names for :around advice, ELPA Syncer, 2021/09/13