Skip to content
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

Possible to add classes within an emacs mode? #71

Open
tanimislam opened this issue Jun 4, 2017 · 3 comments
Open

Possible to add classes within an emacs mode? #71

tanimislam opened this issue Jun 4, 2017 · 3 comments

Comments

@tanimislam
Copy link

No description provided.

@tanimislam tanimislam changed the title Possibly.e Possible to add classes within an emacs mode? Jun 4, 2017
@tanimislam
Copy link
Author

In mmm-mode, can one define new classes within the emacs lisp file that defines a new custom mode rather than in the initializion file? That way, would I have to use the mmm-add-mode-ext-class function, or would I use other mmm-add functions?

@tanimislam tanimislam reopened this Jun 4, 2017
@purcell
Copy link
Collaborator

purcell commented Jun 4, 2017

Yes, this is possible. But mmm-mode settings do not generally belong with the definition of a major mode, because mmm-mode's purpose is exactly to tie multiple major modes together. Do you have a concrete example to ask about?

@tanimislam
Copy link
Author

Yes, in my case I would like to (at a high level) include major modes in simple code blocks with the beginning and ending syntax (like c_code...end_c_code) in my custom emacs mode. I spoke with Jason Blevins and he mentioned copying from org-mode (at a relatively low level) to define code blocks in markdown documents. However, I am not an emacs guru, so I cannot extract the bits of his code that can do this bit of functionality.

For reference, this is his blog article about using mmm-mode to initially define code blocks within markdown documents.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants