File tree 2 files changed +5
-18
lines changed
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 @@ -1562,23 +1562,9 @@ The output will appear in the buffer *PHP*."
1562
1562
(ad-activate 'fixup-whitespace )
1563
1563
1564
1564
;;;### autoload
1565
- (add-to-list 'auto-mode-alist
1566
- (cons
1567
- (eval-when-compile
1568
- (rx (or
1569
- ; ; File name extensions (ex. "*.php", "*.phtml")
1570
- (: " ."
1571
- (or (: " php" (? (in " s345t" )))
1572
- " amk"
1573
- " phtml" ))
1574
- ; ; Full file names (ex. "/Makefile", "/Amkfile")
1575
- (: " /"
1576
- (or " Amkfile"
1577
- " .php_cs"
1578
- " .php_cs.dist" )))
1579
- string-end))
1580
- 'php-mode )
1581
- t )
1565
+ (progn
1566
+ (add-to-list 'auto-mode-alist '(" \\ .\\ (?:php[s345]?\\ |phtml\\ )\\ '" . php-mode-maybe))
1567
+ (add-to-list 'auto-mode-alist '(" \\ .php_cs\\ (?:\\ .dist\\ )?\\ '" . php-mode)))
1582
1568
1583
1569
(provide 'php-mode )
1584
1570
; ;; php-mode.el ends here
You can’t perform that action at this time.
0 commit comments