File tree Expand file tree Collapse file tree 2 files changed +5
-18
lines changed
Expand file tree Collapse file tree 2 files changed +5
-18
lines changed Original file line number Diff line number Diff line change @@ -271,7 +271,8 @@ an error."
271271style from Drupal."
272272 (dolist (mode '(pear wordpress symfony2))
273273 ; ; the file written to has no significance, only the buffer
274- (let ((tmp-filename (concat (make-temp-name temporary-file-directory) " .php" )))
274+ (let ((tmp-filename (concat (make-temp-name temporary-file-directory) " .php" ))
275+ (auto-mode-alist '((" \\ .php\\ '" . php-mode))))
275276 (with-php-mode-test (" issue-53.php" )
276277 (search-forward " return $this->bar;" )
277278 (should (equal (list " before-write-file" mode nil )
Original file line number Diff line number Diff line change @@ -1600,23 +1600,9 @@ The output will appear in the buffer *PHP*."
16001600(ad-activate 'fixup-whitespace )
16011601
16021602;;;### autoload
1603- (add-to-list 'auto-mode-alist
1604- (cons
1605- (eval-when-compile
1606- (rx (or
1607- ; ; File name extensions (ex. "*.php", "*.phtml")
1608- (: " ."
1609- (or (: " php" (? (in " s345t" )))
1610- " amk"
1611- " phtml" ))
1612- ; ; Full file names (ex. "/Makefile", "/Amkfile")
1613- (: " /"
1614- (or " Amkfile"
1615- " .php_cs"
1616- " .php_cs.dist" )))
1617- string-end))
1618- 'php-mode )
1619- t )
1603+ (progn
1604+ (add-to-list 'auto-mode-alist '(" \\ .\\ (?:php[s345]?\\ |phtml\\ )\\ '" . php-mode-maybe))
1605+ (add-to-list 'auto-mode-alist '(" \\ .php_cs\\ (?:\\ .dist\\ )?\\ '" . php-mode)))
16201606
16211607(provide 'php-mode )
16221608; ;; php-mode.el ends here
You can’t perform that action at this time.
0 commit comments