-
|
It is usual for me to run a function taking fixed arguments with hooks, like (add-hook 'evil-insert-state-entry-hook '(lambda () (hl-line-mode 1)))This is not bad, but I think the Can |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
Yes, these are equivalent: (add-hook 'evil-insert-state-entry-hook (lambda () (hl-line-mode 1)))
(add-hook 'evil-insert-state-entry-hook (##hl-line-mode 1))Enjoy! (note lambdas are self-quoting, so there is no need to put a quote sign out front) |
Beta Was this translation helpful? Give feedback.
-
|
Great! Thanks a lot. I think this macro should be built-in in elisp. The readability is increased a lot! |
Beta Was this translation helpful? Give feedback.
Yes, these are equivalent:
Enjoy!
(note lambdas are self-quoting, so there is no need to put a quote sign out front)