* lisp/emacs-lisp/nadvice.el (remove-function): Align with
authorStefan Monnier <monnier@iro.umontreal.ca>
Sun, 17 Nov 2013 23:11:27 +0000 (18:11 -0500)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sun, 17 Nov 2013 23:11:27 +0000 (18:11 -0500)
add-function's behavior.

lisp/ChangeLog
lisp/emacs-lisp/nadvice.el

index f408df7..a749f70 100644 (file)
@@ -1,5 +1,8 @@
 2013-11-17  Stefan Monnier  <monnier@iro.umontreal.ca>
 
+       * emacs-lisp/nadvice.el (remove-function): Align with
+       add-function's behavior.
+
        * progmodes/gdb-mi.el: Avoid backtracking in regexp matcher.
        (gdb--string-regexp): New constant.
        (gdb-tooltip-print, gdb-var-evaluate-expression-handler)
index 576e720..0352164 100644 (file)
@@ -284,7 +284,7 @@ of the piece of advice."
   (cond ((eq 'local (car-safe place))
          (setq place `(advice--buffer-local ,@(cdr place))))
         ((symbolp place)
-         (error "Use (default-value '%S) or (local '%S)" place place)))
+         (setq place `(default-value ',place))))
   (gv-letplace (getter setter) place
     (macroexp-let2 nil new `(advice--remove-function ,getter ,function)
       `(unless (eq ,new ,getter) ,(funcall setter new)))))