I wrote settings in the init.el
(require 'web-mode)
(add-to-list 'auto-mode-alist '("\.php\'" . web-mode))
(defun my-web-mode-hook ()
(setq web-mode-block-padding 0)
)
(add-hook 'web-mode-hook 'my-web-mode-hook)
When a php file is opened in Emacs, it opens as web-mode
, but the web-mode-block-padding
setting is ignored.
Running M-x web-mode
in that state will activate the web-mode-block-padding
setting.
- Why is the hook content not reflected in web-mode immediately after opening Emacs?
- What can we do to reflect this from the beginning?
Emacs version is GNU Emacs 29.3
I am not familiar with init.el and do not know how to deal with this.
New contributor
coeurl is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
3