Index: lisp/emacs-lisp/advice.el =================================================================== RCS file: /sources/emacs/emacs/lisp/emacs-lisp/advice.el,v retrieving revision 1.49 diff -B -w -c -r1.49 advice.el *** lisp/emacs-lisp/advice.el 21 Jan 2007 02:44:24 -0000 1.49 --- lisp/emacs-lisp/advice.el 8 Mar 2007 18:04:43 -0000 *************** *** 2278,2284 **** "Read a complete function/class/name specification from minibuffer. The list of read symbols will be returned. The optional PROMPT will be used to prompt for the function." ! (let* ((function (ad-read-advised-function prompt)) (class (ad-read-advice-class function)) (name (ad-read-advice-name function class))) (list function class name))) --- 2278,2288 ---- "Read a complete function/class/name specification from minibuffer. The list of read symbols will be returned. The optional PROMPT will be used to prompt for the function." ! (let* ((predicate (lambda (fun) ! (ad-dolist (class ad-advice-classes) ! (if (ad-get-advice-info-field fun class) ! (ad-do-return t))))) ! (function (ad-read-advised-function prompt predicate)) (class (ad-read-advice-class function)) (name (ad-read-advice-name function class))) (list function class name))) Index: lisp/ChangeLog =================================================================== RCS file: /sources/emacs/emacs/lisp/ChangeLog,v retrieving revision 1.10783 diff -C0 -r1.10783 ChangeLog *** lisp/ChangeLog 7 Mar 2007 12:50:23 -0000 1.10783 --- lisp/ChangeLog 8 Mar 2007 18:05:05 -0000 *************** *** 0 **** --- 1,6 ---- + 2007-03-08 Michaël Cadilhac + + * emacs-lisp/advice.el (ad-read-advice-specification): Check that the + default value taken by `ad-read-advised-function' has non-empty + classes. +