rept 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/init.yaml +1 -1
- data/rakefile +1 -9
- data/tools/rept-mode.el +135 -0
- metadata +2 -1
data/lib/init.yaml
CHANGED
data/rakefile
CHANGED
@@ -8,7 +8,7 @@ require 'rubygems'
|
|
8
8
|
$init = YamlText.new(File.join(File.dirname(__FILE__), 'lib/init.yaml'))
|
9
9
|
|
10
10
|
# �p�b�P�[�W�t�@�C�����X�g
|
11
|
-
PKG_FILES = FileList["rakefile", "bin/*", "lib/*", "sample/*/*/*", "test/*"]
|
11
|
+
PKG_FILES = FileList["rakefile", "bin/*", "lib/*", "tools/*", "sample/*/*/*", "test/*"]
|
12
12
|
|
13
13
|
def cp_with_mkdir(src, dst)
|
14
14
|
dirname = File::dirname(dst)
|
@@ -16,14 +16,6 @@ def cp_with_mkdir(src, dst)
|
|
16
16
|
cp src, dst
|
17
17
|
end
|
18
18
|
|
19
|
-
# sourceforge���̃��|�W�g���ɃR�s�[
|
20
|
-
desc "copy rept/ to rept-sourceforge/"
|
21
|
-
task :publish do
|
22
|
-
PKG_FILES.each do |src|
|
23
|
-
cp_with_mkdir src, '../rept-sourceforge/' + src
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
19
|
# ���j�b�g�e�X�g���s
|
28
20
|
Rake::TestTask.new do |t|
|
29
21
|
t.libs << File.expand_path('lib')
|
data/tools/rept-mode.el
ADDED
@@ -0,0 +1,135 @@
|
|
1
|
+
;;; rept-mode.el --- Major mode for editing rept files
|
2
|
+
|
3
|
+
;; Copyright (C) 2009 ongaeshi
|
4
|
+
|
5
|
+
;; Author: ongaeshi
|
6
|
+
;;
|
7
|
+
;; Keywords: rept
|
8
|
+
;; Version: 0.0.1
|
9
|
+
|
10
|
+
;; This file is not part of Emacs
|
11
|
+
|
12
|
+
;; This file is free software; you can redistribute it and/or modify
|
13
|
+
;; it under the terms of the GNU General Public License as published by
|
14
|
+
;; the Free Software Foundation; either version 2, or (at your option)
|
15
|
+
;; any later version.
|
16
|
+
|
17
|
+
;; This file is distributed in the hope that it will be useful,
|
18
|
+
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
19
|
+
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
20
|
+
;; GNU General Public License for more details.
|
21
|
+
|
22
|
+
;; You should have received a copy of the GNU General Public License
|
23
|
+
;; along with GNU Emacs; see the file COPYING. If not, write to
|
24
|
+
;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
25
|
+
;; Boston, MA 02111-1307, USA.
|
26
|
+
|
27
|
+
;;; Commentary:
|
28
|
+
|
29
|
+
;; This is a major mode for editing files in the REPT
|
30
|
+
;; and useful REPT functions.
|
31
|
+
|
32
|
+
;;; Installation:
|
33
|
+
|
34
|
+
;; To install, just drop this file into a directory in your
|
35
|
+
;; `load-path' and (optionally) byte-compile it.
|
36
|
+
;;
|
37
|
+
;; To automatically handle files ending in '.rept', add something like:
|
38
|
+
;;
|
39
|
+
;; (require 'rept-mode)
|
40
|
+
;; (add-to-list 'auto-mode-alist '("\\.rept$" . rept-mode))
|
41
|
+
;; (setq rept-program-file "~/rept/bin/rept.rb")
|
42
|
+
;;
|
43
|
+
;; to your .emacs file.
|
44
|
+
;;
|
45
|
+
|
46
|
+
;;; Code:
|
47
|
+
|
48
|
+
|
49
|
+
;; User definable variables
|
50
|
+
|
51
|
+
(defface rept-header-face
|
52
|
+
'((((class color) (min-colors 88) (background light))
|
53
|
+
:background "grey85")
|
54
|
+
(((class color) (min-colors 88) (background dark))
|
55
|
+
:background "grey45")
|
56
|
+
(((class color) (background light))
|
57
|
+
:foreground "blue1" :weight bold)
|
58
|
+
(((class color) (background dark))
|
59
|
+
:foreground "green" :weight bold)
|
60
|
+
(t :weight bold))
|
61
|
+
"rept-header-face"
|
62
|
+
:group 'rept-mode)
|
63
|
+
|
64
|
+
(defvar rept-header-face 'rept-header-face)
|
65
|
+
|
66
|
+
|
67
|
+
;; Constants
|
68
|
+
|
69
|
+
(defconst rept-mode-version
|
70
|
+
"0.0.1"
|
71
|
+
"Version of `rept-mode.'")
|
72
|
+
|
73
|
+
|
74
|
+
;; Mode setup
|
75
|
+
|
76
|
+
(easy-mmode-defmap rept-mode-map
|
77
|
+
'(("\C-c\C-c" . rept-exec)
|
78
|
+
("\C-c\C-u" . rept-undo)
|
79
|
+
)
|
80
|
+
"Keymap used in `rept-mode' buffers.")
|
81
|
+
|
82
|
+
(define-derived-mode rept-mode fundamental-mode "Rept"
|
83
|
+
"Simple mode to edit REPT.
|
84
|
+
|
85
|
+
\\{rept-mode-map}"
|
86
|
+
(set (make-local-variable 'font-lock-defaults) rept-font-lock-defaults))
|
87
|
+
|
88
|
+
|
89
|
+
;; Font-lock support
|
90
|
+
|
91
|
+
(setq rept-font-lock-keywords
|
92
|
+
'(("^Args:" . rept-header-face)
|
93
|
+
("^Index:" . rept-header-face)
|
94
|
+
("^-->" . font-lock-string-face)
|
95
|
+
("ReptName[0-9]+" . (0 font-lock-keyword-face t t))
|
96
|
+
("reptName[0-9]+" . (0 font-lock-keyword-face t t))
|
97
|
+
("reptname[0-9]+" . (0 font-lock-keyword-face t t))
|
98
|
+
("REPTNAME[0-9]+" . (0 font-lock-keyword-face t t))
|
99
|
+
("rept_name[0-9]+" . (0 font-lock-keyword-face t t))
|
100
|
+
))
|
101
|
+
|
102
|
+
(setq rept-font-lock-defaults
|
103
|
+
'(rept-font-lock-keywords t nil nil nil))
|
104
|
+
|
105
|
+
|
106
|
+
;; Functions
|
107
|
+
|
108
|
+
(defvar rept-program-file
|
109
|
+
nil
|
110
|
+
"")
|
111
|
+
|
112
|
+
(defun rept-common (rept-file command-list option)
|
113
|
+
(compilation-start (concat rept-program-file " " option " " (expand-file-name rept-file) " " command-list)))
|
114
|
+
|
115
|
+
(defun rept-exec (rept-file command-list)
|
116
|
+
(interactive
|
117
|
+
(list (read-file-name (concat "[exec] Rept File(" (file-name-nondirectory (buffer-file-name)) ") : "))
|
118
|
+
(read-string "Rept Command: ")))
|
119
|
+
(rept-common rept-file command-list ""))
|
120
|
+
|
121
|
+
(defun rept-undo (rept-file command-list)
|
122
|
+
(interactive
|
123
|
+
(list (read-file-name (concat "[undo] Rept File(" (file-name-nondirectory (buffer-file-name)) ") : "))
|
124
|
+
(read-string "Rept Command: ")))
|
125
|
+
(rept-common rept-file command-list "-u -f"))
|
126
|
+
|
127
|
+
(defun rept-mode-version ()
|
128
|
+
"Diplay version of `rept-mode'."
|
129
|
+
(interactive)
|
130
|
+
(message "rept-mode %s" rept-mode-version)
|
131
|
+
rept-mode-version)
|
132
|
+
|
133
|
+
(provide 'rept-mode)
|
134
|
+
|
135
|
+
;;; rept-mode.el ends here
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rept
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ongaeshi
|
@@ -35,6 +35,7 @@ files:
|
|
35
35
|
- lib/rept4diff.rb
|
36
36
|
- lib/rept4diff.yaml
|
37
37
|
- lib/yamltext.rb
|
38
|
+
- tools/rept-mode.el
|
38
39
|
- sample/c++/addclass/addclass.rept
|
39
40
|
- sample/c++/addclass/makefile
|
40
41
|
- sample/c++/advance/advance.rept
|