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

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

[elpa] externals/sml-mode 9f85a5d 27/45: * sml-mode/sml-mode.el (sml-smi


From: Stefan Monnier
Subject: [elpa] externals/sml-mode 9f85a5d 27/45: * sml-mode/sml-mode.el (sml-smie-rules): Work around Emacs-24.3 bug.
Date: Tue, 1 Dec 2020 10:01:41 -0500 (EST)

branch: externals/sml-mode
commit 9f85a5d9942b73220b575d39dab88d7a04ca055f
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>

    * sml-mode/sml-mode.el (sml-smie-rules): Work around Emacs-24.3 bug.
---
 sml-mode.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sml-mode.el b/sml-mode.el
index 4cca127..c353420 100644
--- a/sml-mode.el
+++ b/sml-mode.el
@@ -532,8 +532,9 @@ Regexp match data 0 points to the chars."
      (if (and (smie-rule-parent-p "val") (smie-rule-next-p "fn")) -3))
     (`(:before . "=>") (if (smie-rule-parent-p "fn") 3))
     (`(:before . "of") 1)
-    ;; In case the language is extended to allow a | directly after of.
-    (`(:before . ,(and `"|" (guard (smie-rule-prev-p "of")))) 1)
+    ;; FIXME: pcase in Emacs<24.4 bumps into a bug if we do this:
+    ;;(`(:before . ,(and `"|" (guard (smie-rule-prev-p "of")))) 1)
+    (`(:before . "|") (if (smie-rule-prev-p "of") 1 (smie-rule-separator 
kind)))
     (`(:before . ,(or `"|" `"d|" `";" `",")) (smie-rule-separator kind))
     ;; Treat purely syntactic block-constructs as being part of their parent,
     ;; when the opening statement is hanging.



reply via email to

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