Skip to content

Adds emacs mode for carbon #4874

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

Closed
wants to merge 1 commit into from
Closed

Conversation

samkhn
Copy link
Contributor

@samkhn samkhn commented Jan 31, 2025

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.

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
@github-actions github-actions bot requested a review from zygoloid January 31, 2025 18:14
@github-actions github-actions bot added infrastructure utilities Utilities for working with Carbon code: syntax highlighting, editor plugins, etc. labels Jan 31, 2025
EMACS_MODULES=$HOME/.emacs.d/lisp

# Next line enforces that we run this test within the same directory.
cp ./carbon-mode.el $EMACS_MODULES
Copy link
Contributor

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.

Suggested change
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 &
Copy link
Contributor

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:

Suggested change
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)
Copy link
Contributor

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.

@zygoloid zygoloid removed their request for review February 15, 2025 00:28
@mohamedTbarka

This comment was marked as duplicate.

Copy link

github-actions bot commented Jul 6, 2025

We triage inactive PRs and issues in order to make it easier to find active work. If this PR should remain active, please comment or remove the inactive label.

This PR is labeled inactive because the last activity was over 90 days ago. This PR will be closed and archived after 14 additional days without activity.

@github-actions github-actions bot added the inactive Issues and PRs which have been inactive for at least 90 days. label Jul 6, 2025
Copy link

We triage inactive PRs and issues in order to make it easier to find active work. If this PR should remain active or becomes active again, please reopen it.

This PR was closed and archived because there has been no new activity in the 14 days since the inactive label was added.

@github-actions github-actions bot closed this Jul 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
inactive Issues and PRs which have been inactive for at least 90 days. infrastructure utilities Utilities for working with Carbon code: syntax highlighting, editor plugins, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants