From 9ee911ce318ad701c024b151d8b625e9311bf945 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Sun, 10 Dec 2023 22:06:54 +0100 Subject: [PATCH] Mark `;#@` as :safe for asm-comment-char * lisp/progmodes/asm-mode.el (asm--safe-comment-char-p): New function that returns true for characters #, @, and ;. (asm-comment-char): Use new function as :safe predicate. --- lisp/progmodes/asm-mode.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lisp/progmodes/asm-mode.el b/lisp/progmodes/asm-mode.el index 0f5af9803a5..efe9982feab 100644 --- a/lisp/progmodes/asm-mode.el +++ b/lisp/progmodes/asm-mode.el @@ -1,6 +1,6 @@ ;;; asm-mode.el --- mode for editing assembler code -*- lexical-binding: t; -*- -;; Copyright (C) 1991, 2001-2023 Free Software Foundation, Inc. +;; Copyright (C) 1991-2023 Free Software Foundation, Inc. ;; Author: Eric S. Raymond ;; Maintainer: emacs-devel@gnu.org @@ -52,9 +52,13 @@ :link '(custom-group-link :tag "Font Lock Faces group" font-lock-faces) :group 'languages) +(defun asm--safe-comment-char-p (char) + (memq char '(?\; ?# ?@))) + (defcustom asm-comment-char ?\; "The `comment-start' character assumed by Asm mode." - :type 'character) + :type 'character + :safe #'asm--safe-comment-char-p) (defvar asm-mode-syntax-table (let ((st (make-syntax-table))) -- 2.39.2