]> code.delx.au - gnu-emacs/blobdiff - lisp/emacs-lisp/edebug.el
(inhibit-debug-on-entry): New var.
[gnu-emacs] / lisp / emacs-lisp / edebug.el
index 0a6e3fed349bfe87698eaf384814c6667a6690c0..91ebda570015856e82dd9519d5af0c6f584d1f65 100644 (file)
@@ -3240,9 +3240,15 @@ With prefix argument, make it a temporary breakpoint."
 
 
 (defun edebug-set-global-break-condition (expression)
-  (interactive (list (read-minibuffer
-                     "Global Condition: "
-                     (format "%s" edebug-global-break-condition))))
+  (interactive
+   (list
+    (let ((initial (and edebug-global-break-condition
+                       (format "%s" edebug-global-break-condition))))
+      (read-from-minibuffer
+       "Global Condition: " initial read-expression-map t
+       (if (equal (car read-expression-history) initial)
+          '(read-expression-history . 1)
+        'read-expression-history)))))
   (setq edebug-global-break-condition expression))
 
 
@@ -4315,9 +4321,8 @@ It is removed when you hit any char."
 
 (defalias 'edebug-window-live-p 'window-live-p)
 
-;; Mark takes an argument in Emacs 19.
 (defun edebug-mark ()
-  (mark t))    ;; Does this work for lemacs too?
+  (mark t))
 
 (defun edebug-set-conditional-breakpoint (arg condition)
   "Set a conditional breakpoint at nearest sexp.
@@ -4327,7 +4332,7 @@ With prefix argument, make it a temporary breakpoint."
   (interactive
    (list
     current-prefix-arg
-;; Read condition as follows; getting previous condition is cumbersome:
+    ;; Read condition as follows; getting previous condition is cumbersome:
     (let ((edebug-stop-point (edebug-find-stop-point)))
       (if edebug-stop-point
          (let* ((edebug-def-name (car edebug-stop-point))
@@ -4336,23 +4341,15 @@ With prefix argument, make it a temporary breakpoint."
                 (edebug-breakpoints (car (cdr edebug-data)))
                 (edebug-break-data (assq index edebug-breakpoints))
                 (edebug-break-condition (car (cdr edebug-break-data)))
-                (edebug-expression-history
-                 ;; Prepend the current condition, if any.
-                 (if edebug-break-condition
-                     (cons edebug-break-condition read-expression-history)
-                   read-expression-history)))
-           (prog1
-               (read-from-minibuffer
-                "Condition: " nil read-expression-map t
-                'edebug-expression-history)
-             (setq read-expression-history edebug-expression-history)
-             ))))))
+                (initial (and edebug-break-condition
+                              (format "%s" edebug-break-condition))))
+           (read-from-minibuffer
+            "Condition: " initial read-expression-map t
+            (if (equal (car read-expression-history) initial)
+                '(read-expression-history . 1)
+              'read-expression-history)))))))
   (edebug-modify-breakpoint t condition arg))
 
-;;; The default for all above is Emacs.
-
-;; Epoch specific code was in a separate file: edebug-epoch.el.
-
 (easy-menu-define edebug-menu edebug-mode-map "Edebug menus" edebug-mode-menus)
 \f
 ;;; Byte-compiler