(defun patch-for-leading-space () "This is a patch to remove leading space, to solve the bug with never ending loop with Web-mode in web-mode-markup-indentation-origin" (evil-normal-state) (evil-goto-first-line) (kill-line) (delete-backward-char 1) (evil-goto-line) ) (defsubst my/patch-for-web-mode () (if (eq major-mode 'web-mode) (patch-for-leading-space) ) )