]> git.eshelyaron.com Git - emacs.git/commitdiff
(edebug-set-global-break-condition):
authorJuri Linkov <juri@jurta.org>
Sun, 28 Nov 2004 07:57:10 +0000 (07:57 +0000)
committerJuri Linkov <juri@jurta.org>
Sun, 28 Nov 2004 07:57:10 +0000 (07:57 +0000)
Use `read-expression-history'.  Set initial contents only if
`edebug-global-break-condition' is non-nil.  Set histpos to 1
if initial contents is equal to the last history element.
(edebug-set-conditional-breakpoint): Instead of temporarily
prepending the current condition to the history, set initial
contents to the current condition.  Set histpos to 1 if initial
contents is equal to the last history element.

lisp/ChangeLog
lisp/emacs-lisp/edebug.el

index 911c39fd0dff0763714e0214b87b2d7eb1156527..855873638cdd2ab8b3a84bfbb1c5c74736be8cab 100644 (file)
@@ -1,3 +1,20 @@
+2004-11-28  Juri Linkov  <juri@jurta.org>
+
+       * compare-w.el (compare-windows-highlight): Attach each overlay
+       to its window to properly highlight differences while comparing
+       two windows of the same buffer.  Fix arguments.
+       (compare-windows-sync-default-function): Fix arguments of
+       `compare-windows-highlight'.
+
+       * emacs-lisp/edebug.el (edebug-set-global-break-condition):
+       Use `read-expression-history'.  Set initial contents only if
+       `edebug-global-break-condition' is non-nil.  Set histpos to 1
+       if initial contents is equal to the last history element.
+       (edebug-set-conditional-breakpoint): Instead of temporarily
+       prepending the current condition to the history, set initial
+       contents to the current condition.  Set histpos to 1 if initial
+       contents is equal to the last history element.
+
 2004-11-27  Luc Teirlinck  <teirllm@auburn.edu>
 
        * fringe.el (fringe-indicators): Add fake defvar to avoid compiler
index 82894391fae7549f75d0fe08ef8c825161bb32cd..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))
 
 
@@ -4326,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))
@@ -4335,17 +4341,13 @@ 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))
 
 (easy-menu-define edebug-menu edebug-mode-map "Edebug menus" edebug-mode-menus)