Skip to content

Commit 816fef1

Browse files
mpenetbrson
authored andcommitted
---
yaml --- r: 23161 b: refs/heads/master c: 88918bb h: refs/heads/master i: 23159: 8aa870c v: v3
1 parent b38d5b5 commit 816fef1

File tree

3 files changed

+22
-7
lines changed

3 files changed

+22
-7
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 1f52ddfe9ebd64891f14ec17efa8e2a014f8a439
2+
refs/heads/master: 88918bbefb813745a53fc6043112751611c6d8de
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
55
refs/heads/try: ffbe0e0e00374358b789b0037bcb3a577cd218be

trunk/src/etc/emacs/cm-mode.el

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
;; Wrapper for CodeMirror-style emacs modes. Highlighting is done by
2-
;; running a stateful parser (with first-class state object) over the
3-
;; buffer, line by line, using the output to add 'face properties, and
4-
;; storing the parser state at the end of each line. Indentation is
5-
;; done based on the parser state at the start of the line.
1+
;;; cm-mode.el --- Wrapper for CodeMirror-style emacs modes
2+
3+
;; Version: 0.1.0
4+
5+
;; Highlighting is done by running a stateful parser (with first-class
6+
;; state object) over the buffer, line by line, using the output to
7+
;; add 'face properties, and storing the parser state at the end of
8+
;; each line. Indentation is done based on the parser state at the
9+
;; start of the line.
610

711
(eval-when-compile (require 'cl))
812

@@ -163,7 +167,7 @@
163167
(cm-schedule-work 0.05)))))
164168

165169
(defun cm-do-some-work ()
166-
(save-excursion
170+
(save-excursion
167171
(condition-case cnd (cm-do-some-work-inner)
168172
(error (print cnd) (error cnd)))))
169173

@@ -174,6 +178,7 @@
174178

175179
;; Entry function
176180

181+
;;;###autoload
177182
(defun cm-mode (mode)
178183
(set (make-local-variable 'cm-cur-mode) mode)
179184
(set (make-local-variable 'cm-worklist) (list (copy-marker 1)))
@@ -184,3 +189,5 @@
184189
(cm-schedule-work 0.05))
185190

186191
(provide 'cm-mode)
192+
193+
;;; <name>.el ends here

trunk/src/etc/emacs/rust-mode.el

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
;;; rust-mode.el --- A major emacs mode for editing Rust source code
2+
3+
;; Version: 0.1.0
4+
;; Package-Requires: ((cm-mode "0.1.0"))
5+
16
(require 'cm-mode)
27
(require 'cc-mode)
38

@@ -277,6 +282,7 @@
277282
((eq (rust-context-align cx) t) (+ (rust-context-column cx) (if closing -1 0)))
278283
(t (+ base (if closing 0 unit)))))))
279284

285+
;;;###autoload
280286
(define-derived-mode rust-mode fundamental-mode "Rust"
281287
"Major mode for editing Rust source files."
282288
(set-syntax-table rust-syntax-table)
@@ -293,3 +299,5 @@
293299
(define-key rust-mode-map "{" 'rust-electric-brace)
294300

295301
(provide 'rust-mode)
302+
303+
;;; rust-mode.el ends here

0 commit comments

Comments
 (0)