[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/dart-mode 9b1c871 001/192: Beginning of dart-mode.
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/dart-mode 9b1c871 001/192: Beginning of dart-mode. |
Date: |
Sun, 29 Aug 2021 11:01:39 -0400 (EDT) |
branch: elpa/dart-mode
commit 9b1c8711b1851294d35451bf0e85d0e8a00f07c6
Author: Nathan Weizenbaum <nweiz@google.com>
Commit: Nathan Weizenbaum <nweiz@google.com>
Beginning of dart-mode.
Currently just works like java-mode.
---
dart-mode.el | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 72 insertions(+)
diff --git a/dart-mode.el b/dart-mode.el
new file mode 100644
index 0000000..1740e91
--- /dev/null
+++ b/dart-mode.el
@@ -0,0 +1,72 @@
+;;; dart-mode.el --- Major mode for editing Dart files
+
+;; Copyright (C) 2011 Google Inc.
+
+;; Author: Nathan Weizenbaum
+;; URL: http://code.google.com/p/dart-mode
+;; Version 0.0
+;; Keywords: language
+
+;;; Commentary:
+
+;; To install, save this on your load path and add the following to
+;; your .emacs file:
+;;
+;; (require 'dart-mode)
+
+;;; Code:
+
+(require 'cc-mode)
+
+(eval-and-compile (c-add-language 'dart-mode 'java-mode))
+
+(defcustom dart-font-lock-extra-types nil
+ "*List of extra types (aside from the type keywords) to recognize in DART
mode.
+Each list item should be a regexp matching a single identifier.")
+
+(defconst dart-font-lock-keywords-1 (c-lang-const c-matchers-1 dart)
+ "Minimal highlighting for Dart mode.")
+
+(defconst dart-font-lock-keywords-2 (c-lang-const c-matchers-2 dart)
+ "Fast normal highlighting for Dart mode.")
+
+(defconst dart-font-lock-keywords-3 (c-lang-const c-matchers-3 dart)
+ "Accurate normal highlighting for Dart mode.")
+
+(defvar dart-font-lock-keywords dart-font-lock-keywords-3
+ "Default expressions to highlight in Dart mode.")
+
+(defvar dart-mode-syntax-table nil
+ "Syntax table used in dart-mode buffers.")
+(unless dart-mode-syntax-table
+ (setq dart-mode-syntax-table
+ (funcall (c-lang-const c-make-mode-syntax-table dart))))
+
+
+;;; Initialization
+
+;;;###autoload (add-to-list 'auto-mode-alist '("\\.dart\\'" . dart-mode))
+
+;;;###autoload
+(defun dart-mode ()
+ "Major mode for editing Dart files.
+
+The hook `c-mode-common-hook' is run with no args at mode
+initialization, then `dart-mode-hook'.
+
+Key bindings:
+\\{dart-mode-map}"
+ (interactive)
+ (kill-all-local-variables)
+ (c-initialize-cc-mode t)
+ (setq major-mode 'dart-mode
+ mode-name "Dart")
+ (c-init-language-vars dart-mode)
+ (c-common-init 'dart-mode)
+ (run-hooks 'c-mode-common-hook)
+ (run-hooks 'dart-mode-hook)
+ (c-update-modeline))
+
+(provide 'dart-mode)
+
+;; dart-mode.el ends here
- [nongnu] elpa/dart-mode 327b9aa 167/192: Use conventions in commentary, docstrings, defvar vs setq, (continued)
- [nongnu] elpa/dart-mode 327b9aa 167/192: Use conventions in commentary, docstrings, defvar vs setq, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 31861e8 173/192: Add mixin keyword, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 28ebbaf 176/192: Update tests, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode ea60ffd 178/192: Move README back to markdown, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode bbeadaa 181/192: Reorganize some keyword fontification, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode d6afa8c 153/192: Fontify identifiers following declared identifiers, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 9b65aae 187/192: Add failing tests for fontification of factories and generic methods, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode a715dc6 177/192: Move license, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode e820b09 155/192: Regex catches dollar signs now, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode e5bd30d 184/192: Avoid false positives, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 9b1c871 001/192: Beginning of dart-mode.,
ELPA Syncer <=
- [nongnu] elpa/dart-mode f86416b 035/192: Handle indentation in constructors with initializer lists., ELPA Syncer, 2021/08/29