Skip to content

Commit

Permalink
Merge pull request #571 from emacs-php/fix/run-style-hooks
Browse files Browse the repository at this point in the history
Fix call run-hooks in set-style
  • Loading branch information
zonuexe authored Sep 16, 2019
2 parents 15c78fb + 381c5f4 commit 9d8160b
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions php-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -1042,12 +1042,11 @@ After setting the stylevars run hooks according to STYLENAME
(if (eq (symbol-value 'php-style-delete-trailing-whitespace) t)
(add-hook 'before-save-hook 'delete-trailing-whitespace nil t)
(remove-hook 'before-save-hook 'delete-trailing-whitespace t))
(cond ((eq stylename "pear") (run-hooks 'php-mode-pear-hook))
((eq stylename "drupal") (run-hooks 'php-mode-drupal-hook))
((eq stylename "wordpress") (run-hooks 'php-mode-wordpress-hook))
((eq stylename "symfony2") (run-hooks 'php-mode-symfony2-hook))
((eq stylename "psr2") (run-hooks 'php-mode-psr2-hook))))

(cond ((equal stylename "pear") (run-hooks 'php-mode-pear-hook))
((equal stylename "drupal") (run-hooks 'php-mode-drupal-hook))
((equal stylename "wordpress") (run-hooks 'php-mode-wordpress-hook))
((equal stylename "symfony2") (run-hooks 'php-mode-symfony2-hook))
((equal stylename "psr2") (run-hooks 'php-mode-psr2-hook))))
(put 'php-set-style 'interactive-form (interactive-form 'c-set-style))

(defun php-mode--disable-delay-set-style (&rest args)
Expand Down

0 comments on commit 9d8160b

Please sign in to comment.