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.

Chillar Anand
  • 4,042
  • 1
  • 23
  • 52
  • 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](http://emacs.stackexchange.com/q/3079/504), so if you're on Emacs 24.3 or older, you can't use it. – itsjeyd Jan 16 '15 at 08:02
  • Just checked that. I am using `24.4.1` – Chillar Anand Jan 16 '15 at 09:16
  • How about (before using `advice-add`)?: `(require 'advice)` – lawlist Jan 16 '15 at 22:49
  • @lawlist that's also not working :( – Chillar Anand Jan 17 '15 at 14:24
  • 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
  • i dont have that. downloaded & added it to my .emacs.d, its working now :D – Chillar Anand Jan 18 '15 at 12: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
  • @JordonBiondo from this `ppa:cassou/emacs`. I have installed emacs on 2 systems using same ppa. Just found that one of it has advice.el. Other doesn't have it. May be i have messed it somewhere? – Chillar Anand Jan 20 '15 at 05:33
  • @ChillarAnand This PPA does not provide Emacs 24.4. Are you _sure_ that you really have 24.4? Alternatively, use `defadvice` instead. –  Jul 29 '15 at 14:10

0 Answers0