Skip to content

Commit 9d1ba03

Browse files
committed
Revert "Remove interpreter-mode-alist for Emacs 24"
This reverts commit 13b3924.
1 parent f923fd6 commit 9d1ba03

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

lisp/php-mode.el

+6-3
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,12 @@ enabled."
169169
:type 'boolean)
170170

171171
;;;###autoload
172-
(add-to-list 'interpreter-mode-alist
173-
;; Match php, php-3, php5, php7, php5.5, php-7.0.1, etc.
174-
(cons "php\\(?:-?[34578]\\(?:\\.[0-9]+\\)*\\)?" 'php-mode))
172+
(if (version< emacs-version "24.4")
173+
(dolist (i '("php" "php5" "php7"))
174+
(add-to-list 'interpreter-mode-alist (cons i 'php-mode)))
175+
(add-to-list 'interpreter-mode-alist
176+
;; Match php, php-3, php5, php7, php5.5, php-7.0.1, etc.
177+
(cons "php\\(?:-?[3457]\\(?:\\.[0-9]+\\)*\\)?" 'php-mode)))
175178

176179
(defcustom php-mode-hook nil
177180
"List of functions to be executed on entry to `php-mode'."

0 commit comments

Comments
 (0)