Hot answers tagged

3

(advice-add #'undo-tree :filter-return #'undo-tree-advice-history-save-file-name) This advises the function undo-tree, whereas the defadvice form advises undo-tree-make-history-save-file-name. The equivalent advice-add would be (advice-add 'undo-tree-make-history-save-file-name :filter-return #'undo-tree-advice-history-save-file-name)


2

This is because and is not a function (it is a special form). Note that C-h f and tells you "and is a special form in `C source code'." apply must be used with a function. The manual says: ‘apply’ returns the result of calling FUNCTION. As with ‘funcall’, FUNCTION must either be a Lisp function or a primitive function; special forms and macros do not ...


Only top voted, non community-wiki answers of a minimum length are eligible