diff options
author | David Bremner <david@tethera.net> | 2018-10-20 20:36:56 -0300 |
---|---|---|
committer | David Bremner <david@tethera.net> | 2018-10-20 20:36:56 -0300 |
commit | 248f3987e60a0af50776e711c5afaca9b76e25ec (patch) | |
tree | 9d30250fc69537ed56619b6c93dbd8958152c103 | |
parent | bd3527ffd7bb20cd69d558f89d411fd933c17da0 (diff) |
use syntax-propertize-function for comments
Closes: 737673
-rw-r--r-- | debian-control-mode.el | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/debian-control-mode.el b/debian-control-mode.el index cc8ac5e..a3f4f6a 100644 --- a/debian-control-mode.el +++ b/debian-control-mode.el @@ -160,8 +160,6 @@ (if debian-control-syntax-table () (setq debian-control-syntax-table (make-syntax-table)) - ;; Support # style comments - (modify-syntax-entry ?# "<" debian-control-syntax-table) (modify-syntax-entry ?\n "> " debian-control-syntax-table)) ;; FIXME: As of policy 3.5.6.0, the allowed characters in a field name @@ -242,6 +240,10 @@ (setq comment-start "#" comment-end "") + ;; Support # style comments + (setq-local syntax-propertize-function + (syntax-propertize-rules ("^\\(#\\)" (1 "<")))) + (make-local-variable 'font-lock-defaults) (setq font-lock-defaults '(debian-control-font-lock-keywords |