File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -418,6 +418,11 @@ This function may interfere with other hooks and other behaviors.
418418In that case set to `NIL' ."
419419 :type 'boolean )
420420
421+ (defcustom php-mode-disable-parent-mode-hooks t
422+ " When set to `T' , do not run hooks of parent modes (`java-mode' , `c-mode' )."
423+ :type 'boolean
424+ :group 'php-mode )
425+
421426(defun php-mode-version ()
422427 " Display string describing the version of PHP Mode."
423428 (interactive )
@@ -1258,7 +1263,9 @@ After setting the stylevars run hooks according to STYLENAME
12581263 " Major mode for editing PHP code.
12591264
12601265\\ {php-mode-map}"
1261-
1266+ (when php-mode-disable-parent-mode-hooks
1267+ (setq-local c-mode-hook nil )
1268+ (setq-local java-mode-hook nil ))
12621269 (c-initialize-cc-mode t )
12631270 (c-init-language-vars php-mode)
12641271 (c-common-init 'php-mode )
@@ -1334,7 +1341,6 @@ After setting the stylevars run hooks according to STYLENAME
13341341 (save-excursion
13351342 (php-syntax-propertize-function (point-min ) (point-max ))))))
13361343
1337-
13381344(declare-function semantic-create-imenu-index " semantic/imenu" (&optional stream))
13391345
13401346(defvar-mode-local php-mode imenu-create-index-function
You can’t perform that action at this time.
0 commit comments