projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
86e4d77
)
Fix infloop in Modula-2 mode
author
Gregory Heytings
<gregory@heytings.org>
Tue, 25 May 2021 04:18:29 +0000
(06:18 +0200)
committer
Lars Ingebrigtsen
<larsi@gnus.org>
Tue, 25 May 2021 04:18:29 +0000
(06:18 +0200)
* lisp/progmodes/modula2.el (m2-smie-refine-colon): Stop looping
when point does not move with forward-sexp (Bug#48011).
lisp/progmodes/modula2.el
patch
|
blob
|
history
diff --git
a/lisp/progmodes/modula2.el
b/lisp/progmodes/modula2.el
index 2a0374aa8184772f19e5271b056296aca9f6f596..a8d644dba0ec43d31d77ce4bd56b26b18bb0222d 100644
(file)
--- a/
lisp/progmodes/modula2.el
+++ b/
lisp/progmodes/modula2.el
@@
-201,7
+201,10
@@
((zerop (length tok))
(let ((forward-sexp-function nil))
(condition-case nil
- (forward-sexp -1)
+ (let ((p (point)))
+ (forward-sexp -1)
+ (when (= p (point))
+ (setq res ":")))
(scan-error (setq res ":")))))
((member tok '("|" "OF" "..")) (setq res ":-case"))
((member tok '(":" "END" ";" "BEGIN" "VAR" "RECORD" "PROCEDURE"))