How can I override emacs function with my own implementation for a specific mode? example/reference would be great
Thanks
This seems like an odd thing to want to do, but you could do it by advising the function, I suppose. Example:
(defadvice * (around ultimate-answer activate)
(if (and (eq major-mode 'html-mode) (equal (ad-get-args 0) '(6 9)))
(setq ad-return-value 42)
ad-do-it))
After evaluating this advice, the *
function will return 42 if it is given the two arguments 6 and 9, but only in html-mode.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With