Emacs 24.4 made an incompatible change to
interpreter-mode-alist, treating its members now as regular expressions and no longer as simple strings (http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=1af4c2203ce7954c089133234ba80e6272ce9458). I want to replace:
(add-to-list 'interpreter-mode-alist ;; Match php, php-3, php5, php7, php5.5, php-7.0.1, etc. (cons "php\\(?:-?\\(?:\\.[0-9]+\\)*\\)?" 'php-mode))
(which works fine with Emacs 24.4 and newer) with compatibility code that, depending on the version of Emacs, adds either a regular expression or strings.
What is the preferred way to test if the Emacs version in use is 24.4 or newer?
(if (version< emacs-version "24.4") …)?