Skip to content

Commit

Permalink
Remove php-mode-disable-c-mode-hook custom variable
Browse files Browse the repository at this point in the history
  • Loading branch information
zonuexe committed Dec 17, 2023
1 parent 31dff0e commit de19a90
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 20 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@ All notable changes of the PHP Mode 1.19.1 release series are documented in this

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

### Removed

* Remove `php-mode-disable-c-mode-hook` custom variable and `php-mode-neutralize-cc-mode-effect` function ([#775])
* `php-mode` no longer inherits `c-mode`, so this variable won't work.

[#772]: https://github.com/emacs-php/php-mode/pull/772
[#775]: https://github.com/emacs-php/php-mode/pull/775

## [1.25.1] - 2023-11-24

Expand Down
20 changes: 0 additions & 20 deletions lisp/php-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -292,13 +292,6 @@ In that case set to `NIL'."
:tag "PHP Mode Enable Backup Style Variables"
:type 'boolean)

(define-obsolete-variable-alias 'php-mode-disable-parent-mode-hooks 'php-mode-disable-c-mode-hook "1.21.0")
(defcustom php-mode-disable-c-mode-hook t
"When set to `T', do not run hooks of parent modes (`java-mode', `c-mode')."
:tag "PHP Mode Disable C Mode Hook"
:type 'boolean)
(make-obsolete-variable 'php-mode-disable-c-mode-hook nil "1.24.2")

(defcustom php-mode-enable-project-local-variable t
"When set to `T', apply project local variable to buffer local variable."
:tag "PHP Mode Enable Project Local Variable"
Expand Down Expand Up @@ -1132,13 +1125,6 @@ After setting the stylevars run hook `php-mode-STYLENAME-hook'."
(php-project-apply-local-variables)
(remove-hook 'hack-local-variables-hook #'php-mode-set-local-variable-delay))

(defun php-mode-neutralize-cc-mode-effect ()
"Reset PHP-irrelevant variables set by Cc Mode initialization."
(setq-local c-mode-hook nil)
(setq-local java-mode-hook nil)
(remove-hook 'flymake-diagnostic-functions 'flymake-cc t)
t)

(defvar php-mode-syntax-table
(let ((table (make-syntax-table)))
(c-populate-syntax-table table)
Expand All @@ -1162,12 +1148,6 @@ After setting the stylevars run hook `php-mode-STYLENAME-hook'."
(unless (string= php-mode-cc-version c-version)
(php-mode-debug-reinstall nil))

(if php-mode-disable-c-mode-hook
(php-mode-neutralize-cc-mode-effect)
(display-warning 'php-mode
"`php-mode-disable-c-mode-hook' will be removed. Do not depends on this variable."
:warning))

(c-initialize-cc-mode t)
(setq abbrev-mode t)

Expand Down

0 comments on commit de19a90

Please sign in to comment.