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

    SUPPER stropping only supports { .. } comments
---
 a68-mode.el | 33 +++++----------------------------
 1 file changed, 5 insertions(+), 28 deletions(-)

diff --git a/a68-mode.el b/a68-mode.el
index 1a40044e51..82bc45ed00 100644
--- a/a68-mode.el
+++ b/a68-mode.el
@@ -106,8 +106,7 @@
 
 (defcustom a68-comment-style-supper "{"
   "Default comment style used by e.g. `comment-dwim'."
-  :type '(choice (const "{")
-                 (const "#"))
+  :type '(choice (const "{"))
   :safe #'consp)
 
 ;;;; Syntax table for the a68-mode.
@@ -294,27 +293,6 @@
                                      'syntax-multiline t)))))
      (point) end)))
 
-(defun a68-syntax-propertize-function-supper (start end)
-  (let ((case-fold-search nil))
-    (goto-char start)
-    (funcall
-     (syntax-propertize-rules
-      ((rx bow (group "n") "ote" eow
-           (*? anychar)
-           bow "eto" (group "n") eow)
-       (1 (when (not (a68-within-string)) (string-to-syntax "< bn")))
-       (2 (when (not (a68-within-string)) (string-to-syntax "> bn")))
-       (0 (ignore (put-text-property (match-beginning 0) (match-end 0)
-                                     'syntax-multiline t))))
-      ((rx (group "#")
-           (*? anychar)
-           (group "#"))
-       (1 (when (not (a68-within-string)) (string-to-syntax "<")))
-       (2 (when (not (a68-within-string)) (string-to-syntax ">")))
-       (0 (ignore (put-text-property (match-beginning 0) (match-end 0)
-                                     'syntax-multiline t)))))
-     (point) end)))
-
 ;;;; Functions to move up and down a procedure.
 
 (defun a68-beginning-of-defun-upper (&optional count)
@@ -1454,8 +1432,7 @@ UPPER stropping version."
     (setq-local beginning-of-defun-function #'a68-beginning-of-defun-supper)
     (setq-local comment-start-skip "{ *")
     (setq-local comment-end-skip "[ \t]*}")
-    (setq-local font-lock-comment-end-skip "}")
-    (setq-local syntax-propertize-function 
#'a68-syntax-propertize-function-supper))
+    (setq-local font-lock-comment-end-skip "}"))
    (t
     ;; UPPER stropping.
     (setq-local comment-start a68-comment-style-upper)
@@ -1466,9 +1443,9 @@ UPPER stropping version."
                 :backward-token #'a68--smie-backward-token-upper)
     (setq-local beginning-of-defun-function #'a68-beginning-of-defun-upper)
     (setq-local comment-start-skip "\\(#\\) *")
-    (setq-local syntax-propertize-function 
#'a68-syntax-propertize-function-upper)))
-  (add-hook 'syntax-propertize-extend-region-functions
-            #'syntax-propertize-multiline 'append 'local))
+    (setq-local syntax-propertize-function 
#'a68-syntax-propertize-function-upper)
+    (add-hook 'syntax-propertize-extend-region-functions
+              #'syntax-propertize-multiline 'append 'local))))
 
 ;;;###autoload
 (add-to-list 'auto-mode-alist '("\\.a68\\'" . a68-mode))

Reply via email to