comparison lisp/emacs-lisp/debug.el @ 63363:8420228eae66

(cancel-debug-on-entry): Make the empty string argument obsolete.
author Lute Kamstra <lute@gnu.org>
date Mon, 13 Jun 2005 08:13:16 +0000
parents e51dacaad0d0
children cb9b98ba1f83
comparison
equal deleted inserted replaced
63362:8a4e1b582425 63363:8420228eae66
691 function) 691 function)
692 692
693 ;;;###autoload 693 ;;;###autoload
694 (defun cancel-debug-on-entry (&optional function) 694 (defun cancel-debug-on-entry (&optional function)
695 "Undo effect of \\[debug-on-entry] on FUNCTION. 695 "Undo effect of \\[debug-on-entry] on FUNCTION.
696 If argument is nil or an empty string, cancel for all functions. 696 If FUNCTION is nil, cancel debug-on-entry for all functions.
697 When called interactively, prompt for FUNCTION in the minibuffer. 697 When called interactively, prompt for FUNCTION in the minibuffer.
698 To specify a nil argument interactively, exit with an empty minibuffer." 698 To specify a nil argument interactively, exit with an empty minibuffer."
699 (interactive 699 (interactive
700 (list (let ((name 700 (list (let ((name
701 (completing-read "Cancel debug on entry (to function): " 701 (completing-read "Cancel debug on entry (to function): "
702 (mapcar 'symbol-name debug-function-list) 702 (mapcar 'symbol-name debug-function-list)
703 nil t nil))) 703 nil t)))
704 (if name (intern name))))) 704 (when name
705 (if (and function (not (string= function ""))) 705 (unless (string= name "")
706 (intern name))))))
707 (if (and function
708 (not (string= function ""))) ; Pre 22.1 compatibility test.
706 (progn 709 (progn
707 (let ((defn (debug-on-entry-1 function nil))) 710 (let ((defn (debug-on-entry-1 function nil)))
708 (condition-case nil 711 (condition-case nil
709 (when (and (equal (nth 1 defn) '(&rest debug-on-entry-args)) 712 (when (and (equal (nth 1 defn) '(&rest debug-on-entry-args))
710 (eq (car (nth 3 defn)) 'apply)) 713 (eq (car (nth 3 defn)) 'apply))