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."
271
271
style from Drupal."
272
272
(dolist (mode '(pear wordpress symfony2))
273
273
; ; 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))))
275
276
(with-php-mode-test (" issue-53.php" )
276
277
(search-forward " return $this->bar;" )
277
278
(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*."
1600
1600
(ad-activate 'fixup-whitespace )
1601
1601
1602
1602
;;;### 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)))
1620
1606
1621
1607
(provide 'php-mode )
1622
1608
; ;; php-mode.el ends here
You can’t perform that action at this time.
0 commit comments