branch: externals/a68-mode
commit 29b924fd43b15816a5a7d581a2c1973479536b3e
Author: Omar Polo <[email protected]>
Commit: Omar Polo <[email protected]>
make comment style customizable
---
a68-mode.el | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/a68-mode.el b/a68-mode.el
index 496f4a59b5..e9458e1049 100644
--- a/a68-mode.el
+++ b/a68-mode.el
@@ -57,6 +57,13 @@
:type 'integer
:safe #'integerp)
+(defcustom a68-comment-style '("#" . "#")
+ "Default comment style used by e.g. `comment-dwim'."
+ :type '(choice (const :tag "#" ("#" . "#"))
+ (const :tag "CO" ("CO" . "CO"))
+ (const :tag "COMMENT" ("COMMENT" . "COMMENT")))
+ :safe #'consp)
+
(defvar a68-mode-hook '()
"Hook run when entering Algol68 mode.")
@@ -218,8 +225,8 @@
:abbrev-table a68-mode-abbrev-table
(setq-local font-lock-defaults '(a68-font-lock-keywords))
(setq-local indent-line-function #'a68-indent-line)
- (setq-local comment-start "#")
- (setq-local comment-end "#")
+ (setq-local comment-start (car a68-comment-style))
+ (setq-local comment-end (cdr a68-comment-style))
(setq-local syntax-propertize-function
(syntax-propertize-rules ((rx (group bow "COMMENT" eow)
(group (*? anychar))