[gnu.emacs.bug] cancel-debug-on-entry fails for macros

hrp@earth.cray.com (Hal Peterson) (12/05/88)

I'm running GNU Emacs version 18.52 on Sun-3s.  Here is a transcript
from my lisp-interaction buffer to demonstrate the problem:

    (defmacro foo (x) (list 'cdr x))
    foo
    (foo '(a b))
    (b)
    (symbol-function 'foo)
    (macro lambda (x) (list (quote cdr) x))
    (debug-on-entry 'foo)
    foo
    (symbol-function 'foo)
    (macro lambda (x) (debug (quote debug)) (list (quote cdr) x))
    (cancel-debug-on-entry 'foo)

This generates a "Wrong number of arguments" error because the
function cancel-debug-on-entry has a misplaced paren.  Following is a
patch with the fix.

--
Hal Peterson / Cray Research / 1440 Northland Dr. / Mendota Hts, MN  55120
hrp@cray.com			bungia!cray!hrp		    (612) 681-3145

============================================================
*** debug.el-dist	Sun Dec  4 11:49:10 1988
--- debug.el	Sun Dec  4 11:49:29 1988
***************
*** 249,255 ****
    (interactive "aCancel debug on entry (to function): ")
    (let ((defn (symbol-function function)))
      (if (eq (car defn) 'macro)
! 	(fset function (cons 'macro (debug-on-entry-1 function (cdr defn)) nil))
        (fset function (debug-on-entry-1 function defn nil))))
    function)
  
--- 249,255 ----
    (interactive "aCancel debug on entry (to function): ")
    (let ((defn (symbol-function function)))
      (if (eq (car defn) 'macro)
! 	(fset function (cons 'macro (debug-on-entry-1 function (cdr defn) nil)))
        (fset function (debug-on-entry-1 function defn nil))))
    function)
  

Compilation finished at Sun Dec  4 11:49:31