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.
418
418
In that case set to `NIL' ."
419
419
:type 'boolean )
420
420
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
+
421
426
(defun php-mode-version ()
422
427
" Display string describing the version of PHP Mode."
423
428
(interactive )
@@ -1258,7 +1263,9 @@ After setting the stylevars run hooks according to STYLENAME
1258
1263
" Major mode for editing PHP code.
1259
1264
1260
1265
\\ {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 ))
1262
1269
(c-initialize-cc-mode t )
1263
1270
(c-init-language-vars php-mode)
1264
1271
(c-common-init 'php-mode )
@@ -1334,7 +1341,6 @@ After setting the stylevars run hooks according to STYLENAME
1334
1341
(save-excursion
1335
1342
(php-syntax-propertize-function (point-min ) (point-max ))))))
1336
1343
1337
-
1338
1344
(declare-function semantic-create-imenu-index " semantic/imenu" (&optional stream))
1339
1345
1340
1346
(defvar-mode-local php-mode imenu-create-index-function
You can’t perform that action at this time.
0 commit comments