emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[nongnu] elpa/haskell-mode 705d04d9fb 01/24: Make {-# and #-} not be par


From: ELPA Syncer
Subject: [nongnu] elpa/haskell-mode 705d04d9fb 01/24: Make {-# and #-} not be paragraph boundaries
Date: Tue, 1 Nov 2022 22:58:51 -0400 (EDT)

branch: elpa/haskell-mode
commit 705d04d9fba0b4d632ad8d9f260754701c1ffa4d
Author: Jan Path <jan@jpath.de>
Commit: Jan Path <jan@jpath.de>

    Make {-# and #-} not be paragraph boundaries
    
    {- and -} are recognised as paragraph boundaries. While this makes a lot
    of sense, it does not make sense to also recognise {-# and #-} as
    paragraph boundaries.
---
 haskell-mode.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/haskell-mode.el b/haskell-mode.el
index 29530f515e..c93348c6dd 100644
--- a/haskell-mode.el
+++ b/haskell-mode.el
@@ -793,8 +793,8 @@ Minor modes that work well with `haskell-mode':
     (error "haskell-mode requires at least Emacs 24.3"))
 
   ;; paragraph-{start,separate} should treat comments as paragraphs as well.
-  (setq-local paragraph-start (concat " *{-\\| *-- |\\|" page-delimiter))
-  (setq-local paragraph-separate (concat " *$\\| *\\({-\\|-}\\) *$\\|" 
page-delimiter))
+  (setq-local paragraph-start (concat " *{-\\([^#]\\|$\\)\\| *-- |\\|" 
page-delimiter))
+  (setq-local paragraph-separate (concat " *$\\| 
*\\({-\\([^#]\\|$\\)\\|\\([^#]\\|^\\)-}\\) *$\\|" page-delimiter))
   (setq-local fill-paragraph-function 'haskell-fill-paragraph)
   ;; (setq-local adaptive-fill-function 'haskell-adaptive-fill)
   (setq-local comment-start "-- ")



reply via email to

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