X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/392cf16dd0ee9358f8af0cd0d8048b822456bbeb..cf9a1b693fe26df8fedea0345270b812dbcbd6d3:/lisp/emacs-lisp/edebug.el diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index 0a6e3fed34..91ebda5700 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el @@ -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) ;;; Byte-compiler