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

phtml suffix seems to be ignored #552

Open
frameworker74 opened this issue Jul 13, 2019 · 1 comment
Open

phtml suffix seems to be ignored #552

frameworker74 opened this issue Jul 13, 2019 · 1 comment

Comments

@frameworker74
Copy link

in php-mode-autoloads.el I've tried to make emacs to be able to regonize .phtml files. But it doesn't with this config:

(autoload 'php-mode "php-mode" "
Major mode for editing PHP code.

\{php-mode-map}

(fn)" t nil)

(add-to-list 'auto-mode-alist '("\.\(?:php[s345]?\|phtml\)\'" . php-mode))

(add-to-list 'auto-mode-alist '("/\.php_cs\(?:\.dist\)?\'" . php-mode-maybe))

In the original version, phtml is bound to the -maybe mode, so I switch the lines but have no luck.

@zonuexe
Copy link
Member

zonuexe commented Jul 15, 2019

@frameworker74 Sorry for the lack of our explanation.

The easy way is to just set a custom variable.

(custom-set-variables
 '(php-html-template-major-mode 'php-mode))

If you do not want to integrate with any template language, you can do this.

(setq php-template-mode-alist nil)

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