Blame emacs-modula2.patch
|
Dan Čermák |
49615a |
From 462ca0654d2aa2a2b6506f2e9a1a9ceb8e683cad Mon Sep 17 00:00:00 2001
|
|
Dan Čermák |
49615a |
From: Gregory Heytings <gregory@heytings.org>
|
|
Dan Čermák |
49615a |
Date: Sun, 25 Apr 2021 10:33:48 +0000
|
|
Dan Čermák |
49615a |
Subject: [PATCH] Fix infloop in Modula-2 mode
|
|
Dan Čermák |
49615a |
|
|
Dan Čermák |
49615a |
* lisp/progmodes/modula2.el (m2-smie-refine-colon): Stop looping when
|
|
Dan Čermák |
49615a |
point does not move with forward-sexp (Bug#48011)
|
|
Dan Čermák |
49615a |
---
|
|
Dan Čermák |
49615a |
lisp/progmodes/modula2.el | 5 ++++-
|
|
Dan Čermák |
49615a |
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
Dan Čermák |
49615a |
|
|
Dan Čermák |
49615a |
diff --git a/lisp/progmodes/modula2.el b/lisp/progmodes/modula2.el
|
|
Dan Čermák |
49615a |
index 2a0374aa81..5756d91831 100644
|
|
Dan Čermák |
49615a |
--- a/lisp/progmodes/modula2.el
|
|
Dan Čermák |
49615a |
+++ b/lisp/progmodes/modula2.el
|
|
Dan Čermák |
49615a |
@@ -201,7 +201,10 @@ m2-smie-refine-colon
|
|
Dan Čermák |
49615a |
((zerop (length tok))
|
|
Dan Čermák |
49615a |
(let ((forward-sexp-function nil))
|
|
Dan Čermák |
49615a |
(condition-case nil
|
|
Dan Čermák |
49615a |
- (forward-sexp -1)
|
|
Dan Čermák |
49615a |
+ (let ((p (point)))
|
|
Dan Čermák |
49615a |
+ (forward-sexp -1)
|
|
Dan Čermák |
49615a |
+ (if (= p (point))
|
|
Dan Čermák |
49615a |
+ (setq res ":")))
|
|
Dan Čermák |
49615a |
(scan-error (setq res ":")))))
|
|
Dan Čermák |
49615a |
((member tok '("|" "OF" "..")) (setq res ":-case"))
|
|
Dan Čermák |
49615a |
((member tok '(":" "END" ";" "BEGIN" "VAR" "RECORD" "PROCEDURE"))
|
|
Dan Čermák |
49615a |
--
|
|
Dan Čermák |
49615a |
2.30.2
|
|
Dan Čermák |
49615a |
|