By default, my Emacs opens config.php in conf-mode. It looks like conf-mode uses a set of regular expressions to match the filename, but I can't figure out how to make it open in php-mode.
Any idea?
By default, my Emacs opens config.php in conf-mode. It looks like conf-mode uses a set of regular expressions to match the filename, but I can't figure out how to make it open in php-mode.
Any idea?
You can add an entry specifically for config.php into auto-mode-alist, as follows:
(add-to-list 'auto-mode-alist (cons (rx bos "config.php" eos) 'php-mode))
(Where bos and eos are shortcuts for string-start and string-end, abbreviated from Beginning/End Of String.)