public
Description: Rinari Is Not A Rails IDE
Homepage: http://rinari.rubyforge.org
Clone URL: git://github.com/technomancy/rinari.git
Headers for ruby-compilation and ruby-mode.
technomancy (author)
Wed Oct 01 10:32:29 -0700 2008
commit  48cea90855b374e13e25441fb0694116e1b3ae67
tree    891b610408d0a87b057947291e60478d8fbc5dcf
parent  7bcb9d78007677ced2ea0a195d77c71d859a21ba
...
2
3
4
 
 
 
 
 
 
 
5
6
7
...
34
35
36
37
 
 
38
39
40
41
42
43
44
45
46
47
...
54
55
56
57
58
 
59
60
61
...
123
124
125
 
126
127
128
...
171
172
173
174
175
 
 
 
 
 
176
177
178
179
...
2
3
4
5
6
7
8
9
10
11
12
13
14
...
41
42
43
 
44
45
46
47
48
49
50
51
 
52
53
54
...
61
62
63
 
 
64
65
66
67
...
129
130
131
132
133
134
135
...
178
179
180
 
 
181
182
183
184
185
186
187
188
189
0
@@ -2,6 +2,13 @@
0
 
0
 ;; Copyright (C) 2008 Eric Schulte
0
 
0
+;; Author: Eric Schulte
0
+;; URL: http://www.emacswiki.org/cgi-bin/emacs/ruby-compilation.el
0
+;; Version: 0.5
0
+;; Created: 2008-08-23
0
+;; Keywords: test convenience
0
+;; Package-Requires: (("ruby-mode") ("inf-ruby"))
0
+
0
 ;;; License:
0
 
0
 ;; This program is free software; you can redistribute it and/or modify
0
@@ -34,14 +41,14 @@
0
 ;;; TODO:
0
 
0
 ;; Clean up function names so they use a common prefix.
0
-;; "p" doesn't work at the end of the compilation buffer
0
+;; "p" doesn't work at the end of the compilation buffer.
0
+;; Package it up with dependencies for ELPA.
0
 
0
 ;;; Code:
0
 
0
 (require 'ansi-color)
0
 (require 'pcmpl-rake)
0
 (require 'compile)
0
-(require 'ruby-mode)
0
 (require 'inf-ruby)
0
 (require 'which-func)
0
 
0
@@ -54,8 +61,7 @@
0
   "a version of `compilation-error-regexp-alist' to be used in
0
   rails logs (should be used with `make-local-variable')")
0
 
0
-(defvar ruby-compilation-executable
0
- "ruby"
0
+(defvar ruby-compilation-executable "ruby"
0
   "What bin to use to launch the tests. Override if you use JRuby etc.")
0
 
0
 (defun ruby-run-w/compilation (cmd)
0
@@ -123,6 +129,7 @@
0
 
0
 (defun ruby-compilation-insertion-filter (proc string)
0
   "Insert text to buffer stripping ansi color codes"
0
+ ;; Can we use ansi-color-apply-on-region instead?
0
   (with-current-buffer (process-buffer proc)
0
     (let ((moving (= (point) (process-mark proc))))
0
       (save-excursion
0
@@ -171,8 +178,11 @@ compilation buffer."
0
   " Ruby:Comp"
0
   ruby-compilation-minor-mode-map)
0
 
0
-(define-key ruby-mode-map (kbd "C-x t") 'ruby-compile-this-buffer)
0
-(define-key ruby-mode-map (kbd "C-x C-t") 'ruby-compile-this-test)
0
+;; So we can invoke it easily.
0
+(eval-after-load 'ruby-mode
0
+ '(progn
0
+ (define-key ruby-mode-map (kbd "C-x t") 'ruby-compile-this-buffer)
0
+ (define-key ruby-mode-map (kbd "C-x C-t") 'ruby-compile-this-test)))
0
 
0
 (provide 'ruby-compilation)
0
 ;;; ruby-compilation.el ends here
0
\ No newline at end of file
...
3
4
5
 
6
7
 
 
8
9
10
...
14
15
16
17
18
19
20
...
1381
1382
1383
 
 
 
 
 
 
 
 
 
 
 
1384
1385
1386
1387
...
3
4
5
6
7
 
8
9
10
11
12
...
16
17
18
 
19
20
21
...
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
0
@@ -3,8 +3,10 @@
0
 ;; Copyright (C) 1994-2008 Yukihiro Matsumoto, Nobuyoshi Nakada
0
 
0
 ;; Authors: Yukihiro Matsumoto, Nobuyoshi Nakada
0
+;; URL: http://www.emacswiki.org/cgi-bin/wiki/RubyMode
0
 ;; Created: Fri Feb 4 14:49:13 JST 1994
0
-;; Keywords: languages
0
+;; Keywords: languages ruby
0
+;; Version: 1.0
0
 
0
 ;; This file is not yet part of GNU Emacs.
0
 
0
@@ -14,7 +16,6 @@
0
 
0
 ;;; Todo:
0
 
0
-;; set auto-mode-alist and interpreter-mode-alist with autoload?
0
 ;; various docstrings labelled below with TODOs
0
 
0
 ;;; Code:
0
@@ -1381,6 +1382,17 @@ See `font-lock-syntax-table'.")
0
    )
0
   "Additional expressions to highlight in ruby mode.")
0
 
0
+;; Invoke ruby-mode when appropriate
0
+
0
+;;;###autoload
0
+(add-to-list 'auto-mode-alist '("\\.rb$" . ruby-mode))
0
+
0
+;;;###autoload
0
+(add-to-list 'interpreter-mode-alist '("ruby" . ruby-mode))
0
+(add-to-list 'interpreter-mode-alist '("rbx" . ruby-mode))
0
+(add-to-list 'interpreter-mode-alist '("jruby" . ruby-mode))
0
+(add-to-list 'interpreter-mode-alist '("ruby1.9" . ruby-mode))
0
+(add-to-list 'interpreter-mode-alist '("ruby1.8" . ruby-mode))
0
 
0
 (provide 'ruby-mode)
0
 ;;; ruby-mode.el ends here
0
\ No newline at end of file

Comments

    No one has commented yet.