-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds emacs mode for carbon #4874
base: trunk
Are you sure you want to change the base?
Conversation
Tested by opening examples/ and core/. As the language is flushed out more, we can add more but deriving from c-mode works for now. Going to roughly design it similar to cuda-mode.el on emacswiki. Also adds elisp to license pre-commit hook
EMACS_MODULES=$HOME/.emacs.d/lisp | ||
|
||
# Next line enforces that we run this test within the same directory. | ||
cp ./carbon-mode.el $EMACS_MODULES |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't do the right thing if the directory doesn't exist.
cp ./carbon-mode.el $EMACS_MODULES | |
mkdir -p $EMACS_MODULES | |
cp ./carbon-mode.el $EMACS_MODULES/ |
# Next line enforces that we run this test within the same directory. | ||
cp ./carbon-mode.el $EMACS_MODULES | ||
|
||
emacs --eval "(require 'carbon-mode)" ../../examples/sieve.carbon -f carbon-mode & |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get an "emacs: standard input is not a tty" error here.
Also, it doesn't make sense to put this in the background:
emacs --eval "(require 'carbon-mode)" ../../examples/sieve.carbon -f carbon-mode & | |
emacs --eval "(require 'carbon-mode)" ../../examples/sieve.carbon -f carbon-mode |
2. add to config | ||
|
||
```emacs-lisp | ||
(require 'carbon-mode) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These instructions assume that (push "~/.emacs.d/lisp" load-path)
is in your .emacs
file, and so should instruct people to add it if it is not already there.
Tested by opening examples/ and core/.
As the language is flushed out more, we can add more but deriving from cc-mode works for now.
Also adds elisp to license pre-commit hook.