Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
cython
Commits
aafed7a4
Commit
aafed7a4
authored
Jun 29, 2013
by
Ivan Andrus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made compile-command customizable
parent
367e0740
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
3 deletions
+15
-3
Tools/cython-mode.el
Tools/cython-mode.el
+15
-3
No files found.
Tools/cython-mode.el
View file @
aafed7a4
...
...
@@ -30,8 +30,7 @@
(
compile
compile-command
)
(
set
(
make-local-variable
'cython-buffer
)
cy-buffer
)
(
add-to-list
(
make-local-variable
'compilation-finish-functions
)
'cython-compilation-finish
)))
)
'cython-compilation-finish
))))
(
defun
cython-compilation-finish
(
buffer
how
)
"Called when Cython compilation finishes."
...
...
@@ -63,6 +62,19 @@
1
font-lock-function-name-face
))
"Additional font lock keywords for Cython mode."
)
;;;###autoload
(
defgroup
cython
nil
"Major mode for editing and compiling Cython files"
:group
'languages
:prefix
"cython-"
:link
'
(
url-link
:tag
"Homepage"
"http://cython.org"
))
;;;###autoload
(
defcustom
cython-default-compile-format
"cython -a %s"
"Format for the default command to compile a Cython file.
It will be passed to `format' with `buffer-file-name' as the only other argument."
:group
'cython
:type
'string
)
;;;###autoload
(
define-derived-mode
cython-mode
python-mode
"Cython"
"Major mode for Cython development, derived from Python mode.
...
...
@@ -71,7 +83,7 @@
(
setcar
font-lock-defaults
(
append
python-font-lock-keywords
cython-font-lock-keywords
))
(
set
(
make-local-variable
'compile-command
)
(
concat
"cython -a "
buffer-file-name
))
(
format
cython-default-compile-format
(
shell-quote-argument
buffer-file-name
)
))
(
add-to-list
(
make-local-variable
'compilation-finish-functions
)
'cython-compilation-finish
)
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment