Skip to content

Instantly share code, notes, and snippets.

@magnars
Created January 24, 2012 19:05
Show Gist options
  • Save magnars/1671918 to your computer and use it in GitHub Desktop.
Save magnars/1671918 to your computer and use it in GitHub Desktop.
Advice ignored
(defadvice yank-pop (around yank-pop-unsupported-advice)
"yank-pop isn't supported with multiple cursors"
(progn
(message "yank-pop-advice ho!")
(if multiple-cursors-mode
(error "yank-pop isn't supported with multiple cursors")
ad-do-it)))
@magnars
Copy link
Author

magnars commented Jan 25, 2012

The trick is to add activate in the around sexp, like this:

(defadvice yank-pop (around yank-pop-unsupported-advice activate)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment