summaryrefslogtreecommitdiff
path: root/lisp/progmodes
diff options
context:
space:
mode:
authorMasatake YAMATO <jet@gyve.org>2006-01-11 14:29:44 +0000
committerMasatake YAMATO <jet@gyve.org>2006-01-11 14:29:44 +0000
commit4076cbf66cef35e6682dbdef56eb127d0bb0fdbf (patch)
tree1729334c1e408e8d38de55c6674dd174bd96a626 /lisp/progmodes
parent00b6a079049b0a129759e6d0e0f992ddb3759b2d (diff)
downloademacs-4076cbf66cef35e6682dbdef56eb127d0bb0fdbf.tar.gz
emacs-4076cbf66cef35e6682dbdef56eb127d0bb0fdbf.tar.bz2
emacs-4076cbf66cef35e6682dbdef56eb127d0bb0fdbf.zip
2006-01-06 Masatake YAMATO <jet@gyve.org>
* font-lock.el (cpp-font-lock-keywords): Font lock keywords for C preprocessor forward ported from GNU Emacs 21.2. * progmodes/asm-mode.el (asm-font-lock-keywords): Use `cpp-font-lock-keywords'. * progmodes/ld-script.el (ld-script-font-lock-keywords): Ditto. * progmodes/ld-script.el (auto-mode-alist): Use \\> instead of $ for "\\.ld[s]?".
Diffstat (limited to 'lisp/progmodes')
-rw-r--r--lisp/progmodes/asm-mode.el28
-rw-r--r--lisp/progmodes/ld-script.el19
2 files changed, 25 insertions, 22 deletions
diff --git a/lisp/progmodes/asm-mode.el b/lisp/progmodes/asm-mode.el
index 51d58d7c7a9..44605b1fa9a 100644
--- a/lisp/progmodes/asm-mode.el
+++ b/lisp/progmodes/asm-mode.el
@@ -83,19 +83,21 @@
"Keymap for Asm mode.")
(defconst asm-font-lock-keywords
- '(("^\\(\\(\\sw\\|\\s_\\)+\\)\\>:?[ \t]*\\(\\sw+\\(\\.\\sw+\\)*\\)?"
- (1 font-lock-function-name-face) (3 font-lock-keyword-face nil t))
- ;; label started from ".".
- ("^\\(\\.\\(\\sw\\|\\s_\\)+\\)\\>:"
- 1 font-lock-function-name-face)
- ("^\\((\\sw+)\\)?\\s +\\(\\(\\.?\\sw\\|\\s_\\)+\\(\\.\\sw+\\)*\\)"
- 2 font-lock-keyword-face)
- ;; directive started from ".".
- ("^\\(\\.\\(\\sw\\|\\s_\\)+\\)\\>[^:]?"
- 1 font-lock-keyword-face)
- ;; %register
- ("%\\sw+" . font-lock-variable-name-face))
- "Additional expressions to highlight in Assembler mode.")
+ (append
+ '(("^\\(\\(\\sw\\|\\s_\\)+\\)\\>:?[ \t]*\\(\\sw+\\(\\.\\sw+\\)*\\)?"
+ (1 font-lock-function-name-face) (3 font-lock-keyword-face nil t))
+ ;; label started from ".".
+ ("^\\(\\.\\(\\sw\\|\\s_\\)+\\)\\>:"
+ 1 font-lock-function-name-face)
+ ("^\\((\\sw+)\\)?\\s +\\(\\(\\.?\\sw\\|\\s_\\)+\\(\\.\\sw+\\)*\\)"
+ 2 font-lock-keyword-face)
+ ;; directive started from ".".
+ ("^\\(\\.\\(\\sw\\|\\s_\\)+\\)\\>[^:]?"
+ 1 font-lock-keyword-face)
+ ;; %register
+ ("%\\sw+" . font-lock-variable-name-face))
+ cpp-font-lock-keywords)
+ "Additional expressions to highlight in Assembler mode.")
;;;###autoload
(defun asm-mode ()
diff --git a/lisp/progmodes/ld-script.el b/lisp/progmodes/ld-script.el
index 99477b73c63..4dbbe0faa18 100644
--- a/lisp/progmodes/ld-script.el
+++ b/lisp/progmodes/ld-script.el
@@ -114,18 +114,19 @@
"Builtin functions of GNU ld script.")
(defvar ld-script-font-lock-keywords
- `((,(regexp-opt ld-script-keywords 'words)
- 1 font-lock-keyword-face)
- (,(regexp-opt ld-script-builtins 'words)
- 1 font-lock-builtin-face)
- ("/DISCARD/" . font-lock-warning-face)
- ("##\\|#[^#\n]+$" . font-lock-preprocessor-face)
- ("\\W\\(\\.\\)\\W" 1 ld-script-location-counter-face)
- )
+ (append
+ `((,(regexp-opt ld-script-keywords 'words)
+ 1 font-lock-keyword-face)
+ (,(regexp-opt ld-script-builtins 'words)
+ 1 font-lock-builtin-face)
+ ("/DISCARD/" . font-lock-warning-face)
+ ("\\W\\(\\.\\)\\W" 1 ld-script-location-counter-face)
+ )
+ cpp-font-lock-keywords)
"Default font-lock-keywords for `ld-script-mode'.")
;;;###autoload
-(add-to-list 'auto-mode-alist '("\\.ld[s]?\\(\\.in\\)?$" . ld-script-mode))
+(add-to-list 'auto-mode-alist '("\\.ld[s]?\\>" . ld-script-mode))
;;;###autoload
(add-to-list 'auto-mode-alist '("\\.x[bdsru]?[cn]?$" . ld-script-mode))