Skip to content

Commit 942073a

Browse files
authored
Merge pull request emacs-php#775 from emacs-php/remove/php-mode-disable-c-mode-hook
Remove php-mode-disable-c-mode-hook custom variable
2 parents 31dff0e + de19a90 commit 942073a

File tree

2 files changed

+6
-20
lines changed

2 files changed

+6
-20
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,13 @@ All notable changes of the PHP Mode 1.19.1 release series are documented in this
1313

1414
* Make `php-mode` inherit from `php-base-mode` instead of `c-mode` ([#772])
1515

16+
### Removed
17+
18+
* Remove `php-mode-disable-c-mode-hook` custom variable and `php-mode-neutralize-cc-mode-effect` function ([#775])
19+
* `php-mode` no longer inherits `c-mode`, so this variable won't work.
20+
1621
[#772]: https://github.com/emacs-php/php-mode/pull/772
22+
[#775]: https://github.com/emacs-php/php-mode/pull/775
1723

1824
## [1.25.1] - 2023-11-24
1925

lisp/php-mode.el

-20
Original file line numberDiff line numberDiff line change
@@ -292,13 +292,6 @@ In that case set to `NIL'."
292292
:tag "PHP Mode Enable Backup Style Variables"
293293
:type 'boolean)
294294

295-
(define-obsolete-variable-alias 'php-mode-disable-parent-mode-hooks 'php-mode-disable-c-mode-hook "1.21.0")
296-
(defcustom php-mode-disable-c-mode-hook t
297-
"When set to `T', do not run hooks of parent modes (`java-mode', `c-mode')."
298-
:tag "PHP Mode Disable C Mode Hook"
299-
:type 'boolean)
300-
(make-obsolete-variable 'php-mode-disable-c-mode-hook nil "1.24.2")
301-
302295
(defcustom php-mode-enable-project-local-variable t
303296
"When set to `T', apply project local variable to buffer local variable."
304297
:tag "PHP Mode Enable Project Local Variable"
@@ -1132,13 +1125,6 @@ After setting the stylevars run hook `php-mode-STYLENAME-hook'."
11321125
(php-project-apply-local-variables)
11331126
(remove-hook 'hack-local-variables-hook #'php-mode-set-local-variable-delay))
11341127

1135-
(defun php-mode-neutralize-cc-mode-effect ()
1136-
"Reset PHP-irrelevant variables set by Cc Mode initialization."
1137-
(setq-local c-mode-hook nil)
1138-
(setq-local java-mode-hook nil)
1139-
(remove-hook 'flymake-diagnostic-functions 'flymake-cc t)
1140-
t)
1141-
11421128
(defvar php-mode-syntax-table
11431129
(let ((table (make-syntax-table)))
11441130
(c-populate-syntax-table table)
@@ -1162,12 +1148,6 @@ After setting the stylevars run hook `php-mode-STYLENAME-hook'."
11621148
(unless (string= php-mode-cc-version c-version)
11631149
(php-mode-debug-reinstall nil))
11641150

1165-
(if php-mode-disable-c-mode-hook
1166-
(php-mode-neutralize-cc-mode-effect)
1167-
(display-warning 'php-mode
1168-
"`php-mode-disable-c-mode-hook' will be removed. Do not depends on this variable."
1169-
:warning))
1170-
11711151
(c-initialize-cc-mode t)
11721152
(setq abbrev-mode t)
11731153

0 commit comments

Comments
 (0)