Article View: gnu.emacs.bug
Article #1229cancel-debug-on-entry fails for macros
From: Hal Peterson
Date: Sun, 04 Dec 1988 17:56
Date: Sun, 04 Dec 1988 17:56
45 lines
1956 bytes
1956 bytes
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
Technical Details
Message-ID:
<8812041756.AA08644@earth.cray.com>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!watmath!uunet!tut.cis.ohio-state.edu!earth.cray.com!hrpShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watmath!uunet!tut.cis.ohio-state.edu!earth.cray.com!hrp From: hrp@earth.cray.com (Hal Peterson) Newsgroups: gnu.emacs.bug Subject: cancel-debug-on-entry fails for macros Message-ID: <8812041756.AA08644@earth.cray.com> Date: 4 Dec 88 17:56:37 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 45