Discussion:
setting a major mode's configuration variables according to file suffix
(too old to reply)
Julius Dittmar
2017-09-04 18:51:00 UTC
Permalink
Hi,

I would like to set up two different sets of configuration variables for
the same major mode (org-mode in this case), and have emacs choose which
one is appropriate by the file suffix.

How can that be done?

I'm new to configuring emacs. Any hints, including pointers to the
appropriate sections of a documentation, are welcome.

Thanks in advance,

Julius
Michael Heerdegen
2017-09-05 08:40:18 UTC
Permalink
Post by Julius Dittmar
I would like to set up two different sets of configuration variables
for the same major mode (org-mode in this case), and have emacs choose
which one is appropriate by the file suffix.
How can that be done?
You can use `define-derived-mode' to derive modes with different
personal settings from a given major-mode. Just put all of your
settings in the BODY of the definition.

For file associations, just change `auto-mode-alist' accordingly to use
your derived mode(s) for the suffixes you want.

Do you need any help with the details?


Michael.
Julius Dittmar
2017-09-05 17:57:19 UTC
Permalink
Hi Michael,

thanks for the pointers. I'll try myself first, and come back with new
questions as needed. Might take some days though.

Julius

Loading...