define a new function for keyboard-quit and highlight clearup
问题 I am pretty new to elisp, and i was trying to define a function to set highlight behavior while searching. The goal is: after i-search , I want to be able to clear the highlight with C-g , but I want the highlight to remain if I press enter. So i defined a function in my init.el as: (defun keyboard-quit-cleanup () "clean up highligh after keyboard quit" (keyboard-quit) (lazy-highlight-cleanup)) (global-set-key (kbd "C-g") '(keyboard-quit-cleanup)) how-ever, it doesn't work. What's wrong here?