I am defining a new mode in emacs, but I want to have the same syntax highlighting as Org mode. How can I do this?

  • Do you want to define a new mode based on orgmode? In that case you can use (define-derived-mode my-new-mode org-mode "My New Mode" "Docstring" ...). – Tobias Nov 20 at 18:00
  • If you only want to set font-lock-keywords you can use the function org-set-font-lock-defaults to set org-font-lock-keywords and font-lock-defaults buffer-locally. – Tobias Nov 20 at 18:07

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.