branch: externals/a68-mode
commit 289e880ef11928f7f6d06c64a466647912b60d7b
Author: Jose E. Marchesi <jose.march...@oracle.com>
Commit: Jose E. Marchesi <jose.march...@oracle.com>

    Fix a68--do-auto-stropping
---
 a68-mode.el | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/a68-mode.el b/a68-mode.el
index 0833287eb1..39ab814738 100644
--- a/a68-mode.el
+++ b/a68-mode.el
@@ -435,14 +435,15 @@ into a68--mode-indicants."
             (eq (char-before) ?\n))
     (let (id beginning end)
       (save-excursion
+        (goto-char (- (point) 1))
         (when (looking-back (rx bow (group (any "a-z") (zero-or-more (any 
"a-z0-9_"))))
                             nil t)
           (setq beginning (match-beginning 1))
           (setq end (match-end 1))
-          (setq id (upcase (buffer-substring-no-properties beginning end)))))
-      (when (member id (append a68-std-modes a68-keywords a68--mode-indicants))
-        (goto-char end)
-        (delete-region beginning end)
-        (insert id)))))
+          (setq id (upcase (buffer-substring-no-properties beginning end)))
+          (when (member id (append a68-std-modes a68-keywords 
a68--mode-indicants))
+            (goto-char end)
+            (delete-region beginning end)
+            (insert id)))))))
 
 ;;; a68-mode.el ends here

Reply via email to