From 566d54d984fc8903f8c89b82522c8b4fcf75ba3d Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 27 Dec 2019 13:32:24 -0500 Subject: [PATCH] Disable continue-comments-on-RET in ess-r-mode & coq-mode Fixes #2081, #2233 --- modules/lang/coq/config.el | 10 +++++++--- modules/lang/ess/config.el | 5 +++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/modules/lang/coq/config.el b/modules/lang/coq/config.el index 86cd6ee0b1c..b44b5861281 100644 --- a/modules/lang/coq/config.el +++ b/modules/lang/coq/config.el @@ -14,9 +14,13 @@ ;;;###package coq -;; Doom syncs other indent variables with `tab-width'; we trust major modes to -;; set it -- which most of them do -- but coq-mode doesn't, so... -(setq-hook! 'coq-mode-hook tab-width proof-indent) +(setq-hook! 'coq-mode-hook + ;; Doom syncs other indent variables with `tab-width'; we trust major modes to + ;; set it -- which most of them do -- but coq-mode doesn't, so... + tab-width proof-indent + ;; HACK Fix #2081: Doom continues comments on RET, but coq-mode doesn't have a + ;; sane `comment-line-break-function', so... + comment-line-break-function nil) ;; We've replaced coq-mode abbrevs with yasnippet snippets (in the snippets ;; library included with Doom). diff --git a/modules/lang/ess/config.el b/modules/lang/ess/config.el index 381a87bf58f..2d9c2eb9850 100644 --- a/modules/lang/ess/config.el +++ b/modules/lang/ess/config.el @@ -28,6 +28,11 @@ (set-eval-handler! 'ess-help-mode #'ess-eval-region-and-go) (set-eval-handler! 'ess-r-help-mode #'ess-eval-region-and-go) + (setq-hook! 'ess-r-mode-hook + ;; HACK Fix #2233: Doom continues comments on RET, but ess-r-mode doesn't + ;; have a sane `comment-line-break-function', so... + comment-line-break-function nil) + (map! (:after ess-help :map ess-help-mode-map :n "q" #'kill-current-buffer