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

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

[nongnu] elpa/haskell-mode ef3fe51f7c 2/2: Merge pull request #1830 from


From: ELPA Syncer
Subject: [nongnu] elpa/haskell-mode ef3fe51f7c 2/2: Merge pull request #1830 from purcell/patch-4
Date: Thu, 26 Oct 2023 13:00:49 -0400 (EDT)

branch: elpa/haskell-mode
commit ef3fe51f7c207db3c55b9a3a720b3af665d2e606
Merge: d16c68ccdf 2367f66681
Author: Steve Purcell <steve@sanityinc.com>
Commit: GitHub <noreply@github.com>

    Merge pull request #1830 from purcell/patch-4
    
    Apply suggested improvement to tex indentation predicate
---
 haskell-indentation.el | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/haskell-indentation.el b/haskell-indentation.el
index dccedaa20a..4c2525121c 100644
--- a/haskell-indentation.el
+++ b/haskell-indentation.el
@@ -190,11 +190,10 @@ negative ARG.  Handles bird style literate Haskell too."
 (defun haskell-indentation-tex-outside-code-p ()
   "Non-NIL if we are in tex literate mode, but outside of code."
   (and (haskell-indentation-tex-p)
-       (if (save-excursion
-             (re-search-forward "\\(\\\\end\{code\}\\|\\\\begin\{code\}\\)" 
nil t))
-           (cond ((equal "\\end{code}" (match-string-no-properties 0)) nil)
-                 ((equal "\\begin{code}" (match-string-no-properties 0)) t))
-         (save-excursion (re-search-backward "\\\\end\{code\}" nil t)))))
+       (not (and (save-excursion
+                   (re-search-backward "\\\\end{code}\\|\\\\begin{code}\\(\\)"
+                                       nil t))
+                 (match-end 1)))))
 
 (defun haskell-indentation-literate-outside-code-p ()
   "Non-NIL if we are in literate mode, but outside of code."



reply via email to

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