1

I have installed paredit & need to turnoff smartparens. I checked this answer and I have added

(advice-add #'smartparens-mode :before-until (lambda (&rest args) t))

to my prelude starter kit. Now when I restart emacs I get this error

Symbol's function definition is void: advice-add

To ensure normal operation, you should investigate and remove the cause of the error in your initialization file.  Start Emacs with the `--debug-init' option to view a complete error backtrace.

When i run emacs with

emacs --debug-init

I dont get any errors or backtrace. It starts normally & everything is working fine.

But when i start emacs directly same error occurs. Can someone tell me how to debug this?

Update: my emacs config.

  • 2
    Which version of Emacs are you on? (If you're not sure, check by doing M-x emacs-version.) advice-add is part of the new advice system introduced in Emacs 24.4, so if you're on Emacs 24.3 or older, you can't use it. – itsjeyd Jan 16 '15 at 8:02
  • Just checked that. I am using 24.4.1 – ChillarAnand Jan 16 '15 at 9:16
  • How about (before using advice-add)?: (require 'advice) – lawlist Jan 16 '15 at 22:49
  • 1
    Do you have the library advice.el and inside it do you have the function advice-add? M-x find-library RET advice RET – lawlist Jan 17 '15 at 16:18
  • 1
    Where did you get your emacs? You should not have to download advice.el, it is part of emacs. – Jordon Biondo Jan 19 '15 at 14:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.