[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/nasm-mode 42ee760 32/67: Allow to change faces used by nas
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/nasm-mode 42ee760 32/67: Allow to change faces used by nasm-mode |
Date: |
Sun, 29 Aug 2021 11:23:47 -0400 (EDT) |
branch: elpa/nasm-mode
commit 42ee760456bbd5afbb2e8ed2bf119bf4c48ffc86
Author: chapui_s <chapui_s@epitech.eu>
Commit: chapui_s <chapui_s@epitech.eu>
Allow to change faces used by nasm-mode
- Remove -face suffix
Conflicts:
nasm-mode.el
---
nasm-mode.el | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++---------
1 file changed, 53 insertions(+), 9 deletions(-)
diff --git a/nasm-mode.el b/nasm-mode.el
index f48407d..62557f6 100644
--- a/nasm-mode.el
+++ b/nasm-mode.el
@@ -35,10 +35,54 @@
"Options for `nasm-mode'."
:group 'languages)
+(defgroup nasm-mode-faces ()
+ "Faces used by `nasm-mode'."
+ :group 'nasm-mode)
+
(defcustom nasm-basic-offset (default-value 'tab-width)
"Indentation level for `nasm-mode'."
:group 'nasm-mode)
+(defface nasm-registers
+ '((t :inherit (font-lock-variable-name-face)))
+ "Face for registers."
+ :group 'nasm-mode-faces)
+
+(defface nasm-prefix
+ '((t :inherit (font-lock-builtin-face)))
+ "Face for prefix."
+ :group 'nasm-mode-faces)
+
+(defface nasm-types
+ '((t :inherit (font-lock-type-face)))
+ "Face for types."
+ :group 'nasm-mode-faces)
+
+(defface nasm-instructions
+ '((t :inherit (font-lock-builtin-face)))
+ "Face for instructions."
+ :group 'nasm-mode-faces)
+
+(defface nasm-directives
+ '((t :inherit (font-lock-keyword-face)))
+ "Face for directives."
+ :group 'nasm-mode-faces)
+
+(defface nasm-preprocessor
+ '((t :inherit (font-lock-preprocessor-face)))
+ "Face for preprocessor directives."
+ :group 'nasm-mode-faces)
+
+(defface nasm-labels
+ '((t :inherit (font-lock-function-name-face)))
+ "Face for label."
+ :group 'nasm-mode-faces)
+
+(defface nasm-constant
+ '((t :inherit (font-lock-constant-face)))
+ "Face for constant."
+ :group 'nasm-mode-faces)
+
(eval-and-compile
(defconst nasm-registers
'("ah" "al" "ax" "bh" "bl" "bnd0" "bnd1" "bnd2" "bnd3" "bp" "bpl"
@@ -513,15 +557,15 @@
(defconst nasm-font-lock-keywords
`(("\\<\\.[a-zA-Z0-9_$#@~.?]+\\>" . font-lock-type-face)
- (,(nasm--opt nasm-registers) . font-lock-variable-name-face)
- (,(nasm--opt nasm-prefix) . font-lock-builtin-face)
- (,(nasm--opt nasm-types) . font-lock-type-face)
- (,(nasm--opt nasm-instructions) . font-lock-builtin-face)
- (,(nasm--opt nasm-directives) . font-lock-keyword-face)
- (,(nasm--opt nasm-pp-directives) . font-lock-preprocessor-face)
- (,(concat "^\\s-*" nasm-label-regexp) (1 font-lock-function-name-face))
- (,nasm-constant-regexp . font-lock-constant-face))
- "Keywords for `nasm-mode'.")
+ (,(nasm--opt nasm-registers) . 'nasm-registers)
+ (,(nasm--opt nasm-prefix) . 'nasm-prefix)
+ (,(nasm--opt nasm-types) . 'nasm-types)
+ (,(nasm--opt nasm-instructions) . 'nasm-instructions)
+ (,(nasm--opt nasm-directives) . 'nasm-directives)
+ (,(nasm--opt nasm-pp-directives) . 'nasm-preprocessor)
+ (,(concat "^\\s-*" nasm-label-regexp) (1 'nasm-labels))
+ (,nasm-constant-regexp . 'nasm-constant))
+"Keywords for `nasm-mode'.")
(defconst nasm-mode-syntax-table
(let ((table (make-syntax-table)))
- [nongnu] elpa/nasm-mode 3da1454 12/67: Add a docstring to nasm-mode., (continued)
- [nongnu] elpa/nasm-mode 3da1454 12/67: Add a docstring to nasm-mode., ELPA Syncer, 2021/08/29
- [nongnu] elpa/nasm-mode 2a5768a 16/67: Indent commented code differently., ELPA Syncer, 2021/08/29
- [nongnu] elpa/nasm-mode f357905 19/67: Fix up README., ELPA Syncer, 2021/08/29
- [nongnu] elpa/nasm-mode a715d4e 22/67: Use sharp quote in call-interactively., ELPA Syncer, 2021/08/29
- [nongnu] elpa/nasm-mode 9f05280 23/67: Adjust package description., ELPA Syncer, 2021/08/29
- [nongnu] elpa/nasm-mode e641c8a 24/67: Flesh out a little more commentary., ELPA Syncer, 2021/08/29
- [nongnu] elpa/nasm-mode f62c103 25/67: Add preprocessor directives:, ELPA Syncer, 2021/08/29
- [nongnu] elpa/nasm-mode 2940e4f 27/67: Run all regexp-opt at compile time (faster loads)., ELPA Syncer, 2021/08/29
- [nongnu] elpa/nasm-mode 6e208d5 29/67: Indent single-commented lines differently., ELPA Syncer, 2021/08/29
- [nongnu] elpa/nasm-mode e015f41 30/67: Split out types, like word, dword, qword, etc., ELPA Syncer, 2021/08/29
- [nongnu] elpa/nasm-mode 42ee760 32/67: Allow to change faces used by nasm-mode,
ELPA Syncer <=
- [nongnu] elpa/nasm-mode 2259c7d 34/67: Properly distinguish word and symbol constituents., ELPA Syncer, 2021/08/29
- [nongnu] elpa/nasm-mode e978f6e 35/67: Don't use 3-argument <= (requires 24.4)., ELPA Syncer, 2021/08/29
- [nongnu] elpa/nasm-mode d95a12d 45/67: Add section name highlighting back., ELPA Syncer, 2021/08/29
- [nongnu] elpa/nasm-mode 64e450d 54/67: Allow inserting tabs immediately after a mnemonic, ELPA Syncer, 2021/08/29
- [nongnu] elpa/nasm-mode 8ce1831 55/67: Use nasm-basic-offset instead of a literal 8, ELPA Syncer, 2021/08/29
- [nongnu] elpa/nasm-mode e9acee3 09/67: Expand the syntax table for labels., ELPA Syncer, 2021/08/29
- [nongnu] elpa/nasm-mode e53433c 10/67: Better label font lock matching., ELPA Syncer, 2021/08/29
- [nongnu] elpa/nasm-mode 23cb9de 20/67: Add imenu support for macro definitions., ELPA Syncer, 2021/08/29
- [nongnu] elpa/nasm-mode 2c87509 36/67: Correct boundaries in syntax highlighting., ELPA Syncer, 2021/08/29
- [nongnu] elpa/nasm-mode 78818f1 39/67: Remove a few more garbage "instructions.", ELPA Syncer, 2021/08/29