Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove php-mode-disable-c-mode-hook custom variable #775

Merged
merged 1 commit into from
Dec 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading