sensorflo / adoc-mode

A major-mode for editing AsciiDoc files in Emacs
https://github.com/sensorflo/adoc-mode/wiki
76 stars 41 forks source link

Turn on adoc-mode automatically #7

Closed yasuyk closed 10 years ago

yasuyk commented 11 years ago

This commit ensures that users who have installed adoc-mode from a Marmalade or MELPA package will be able to automatically turn on adoc-mode when visiting asciidoc or adoc fies without explicitly requiring the library first.

sensorflo commented 10 years ago

Hi yasuyk

Thank you for your contribution. adoc-mode does not modify auto-mode-alist on purpose, since the default file extension for asciidoc files is .txt (according to the asciidoc faq http://www.methods.co.nz/asciidoc/faq.html#_what_is_the_preferred_file_name_extension_for_asciidoc_files), and that is a too often used file extension as I think it is apropriate to associate with adoc-mode by default. The file extensions in your commit, .adoc and .asciidoc, are, again according to the faq and also to my knowledge, in no way kind of a standard, so adoc-mode does add them to the auto-mode-alist either by the default. I think here it is better to leave it up to the user, if he wants to add adoc-mode to auto-mode-alist, and if yes, with what file extension. adoc-mode's wiki explains that here (https://github.com/sensorflo/adoc-mode/wiki#possible-steps-after-installation) to the user.

Cheers

Flo

yasuyk commented 10 years ago

I understand. Thank you for telling me the about default file extension for asciidoc files. :-)