Skip to content

Commit 07538cd

Browse files
committed
Add php-mode-maybe-hook
1 parent 73e65d4 commit 07538cd

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

php.el

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,12 @@ You can replace \"en\" with your ISO language code."
115115
:type '(alist :key-type regexp :value-type function)
116116
:link '(url-link :tag "web-mode" "http://web-mode.org/")
117117
:link '(url-link :tag "phpt-mode" "https://github.com/emacs-php/phpt-mode"))
118+
119+
(defcustom php-mode-maybe-hook nil
120+
"List of functions to be executed on entry to `php-mode-maybe'."
121+
:group 'php
122+
:tag "PHP Mode Maybe Hook"
123+
:type 'hook)
118124

119125
;;; PHP Keywords
120126
(defconst php-magical-constants
@@ -274,6 +280,7 @@ Look at the `php-executable' variable instead of the constant \"php\" command."
274280
(defun php-mode-maybe ()
275281
"Select PHP mode or other major mode."
276282
(interactive)
283+
(run-hooks php-mode-maybe-hook)
277284
(funcall (php-derivation-major-mode)))
278285

279286
;;;###autoload

0 commit comments

Comments
 (0)