i use emacs mode annotate of files (the actual mode not important). it's supplied library , comes compiled lisp code (of course). want modify behavior overriding single function in it. local emacs session. now, copy-paste function library's source file, modify bit, hit eval-last-sexp
. far, good. however, inconsistent results: i'm not sure how emacs handles functions coming .elc
files mixed functions coming source. see own version of function running, original version. confusing (and annoying).
any ideas how can consistently replace lisp function in emacs library without modifying library's source files read-only?
something should trick:
(advice-add 'name-of-func-to-override :override (lambda () (message "does instead now")))
replace name-of-func-to-override
function name , lambda
version.
i suggest looking @ add-function
(and advice-add
) docs :override
may not want.
Comments
Post a Comment