Skip to content

Adding to auto-mode-alist in user-config does not work #3919

@joefiorini

Description

@joefiorini

Description

Using (add-to-list 'auto-mode-alist '("\\.blah\\'" . conf-mode)) does not apply conf-mode when opening a file ending in extension .blah.

Reproduction Steps

Most recently reproduced on a fresh checkout of master, with a brand new .spacemacs.d/init.el. Add:

(add-to-list 'auto-mode-alist '("\\.blah\\'" . conf-mode))

to the user-config section of .spacemacs.d/init.el. I then created a file called diddy.blah to a test directory.

Expected behavior

Looking up major-mode in C-h v shows the value is conf-mode

Actual behavior

Value of major-mode is Fundamental.

Note: I ran into this issue trying to set .js files to react-mode automatically. In troubleshooting I found this seems to be a more general problem and reproduced using the example above on a fresh installation of master. On Gitter.im @TheBB could not reproduce this, so I'm curious if this is something with my machine or an issue with Spacemacs.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions