[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/emacs-lisp/edebug.el [lexbind]
From: |
Miles Bader |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/emacs-lisp/edebug.el [lexbind] |
Date: |
Tue, 14 Oct 2003 19:32:25 -0400 |
Index: emacs/lisp/emacs-lisp/edebug.el
diff -c emacs/lisp/emacs-lisp/edebug.el:3.53.2.1
emacs/lisp/emacs-lisp/edebug.el:3.53.2.2
*** emacs/lisp/emacs-lisp/edebug.el:3.53.2.1 Fri Apr 4 01:20:16 2003
--- emacs/lisp/emacs-lisp/edebug.el Tue Oct 14 19:32:21 2003
***************
*** 1,6 ****
;;; edebug.el --- a source-level debugger for Emacs Lisp
! ;; Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 97, 1999, 2000, 2001
;; Free Software Foundation, Inc.
;; Author: Daniel LaLiberte <address@hidden>
--- 1,6 ----
;;; edebug.el --- a source-level debugger for Emacs Lisp
! ;; Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 97, 1999, 2000, 01, 2003
;; Free Software Foundation, Inc.
;; Author: Daniel LaLiberte <address@hidden>
***************
*** 302,308 ****
"Return a list of windows, in order of `next-window'."
;; This doesn't work for epoch.
(let (window-list)
! (walk-windows (lambda (w) (setq window-list (cons w window-list))))
(nreverse window-list)))
;; Not used.
--- 302,308 ----
"Return a list of windows, in order of `next-window'."
;; This doesn't work for epoch.
(let (window-list)
! (walk-windows (lambda (w) (push w window-list)))
(nreverse window-list)))
;; Not used.
***************
*** 322,338 ****
(setq object (edebug-lookup-function object))
(if (and (listp object)
(eq 'macro (car object))
! (edebug-functionp (cdr object)))
! object))
!
! (defun edebug-functionp (object)
! "Returns the function named by OBJECT, or nil if it is not a function."
! (setq object (edebug-lookup-function object))
! (if (or (subrp object)
! (byte-code-function-p object)
! (and (listp object)
! (eq (car object) 'lambda)
! (listp (car (cdr object)))))
object))
(defun edebug-sort-alist (alist function)
--- 322,328 ----
(setq object (edebug-lookup-function object))
(if (and (listp object)
(eq 'macro (car object))
! (functionp (cdr object)))
object))
(defun edebug-sort-alist (alist function)
***************
*** 397,418 ****
(let (list)
(walk-windows (lambda (w)
(unless (eq w (selected-window))
! (setq list (cons (cons (window-buffer w)
! (window-point w))
! list)))))
list))
(defun edebug-set-buffer-points (buffer-points)
;; Restore the buffer-points created by edebug-get-displayed-buffer-points.
! (let ((current-buffer (current-buffer)))
! (mapcar (function (lambda (buf-point)
! (if (buffer-name (car buf-point)) ; still exists
! (progn
! (set-buffer (car buf-point))
! (goto-char (cdr buf-point))))))
! buffer-points)
! (set-buffer current-buffer)))
(defun edebug-current-windows (which-windows)
;; Get either a full window configuration or some window information.
--- 387,406 ----
(let (list)
(walk-windows (lambda (w)
(unless (eq w (selected-window))
! (push (cons (window-buffer w)
! (window-point w))
! list))))
list))
(defun edebug-set-buffer-points (buffer-points)
;; Restore the buffer-points created by edebug-get-displayed-buffer-points.
! (save-current-buffer
! (mapcar (lambda (buf-point)
! (when (buffer-live-p (car buf-point))
! (set-buffer (car buf-point))
! (goto-char (cdr buf-point))))
! buffer-points)))
(defun edebug-current-windows (which-windows)
;; Get either a full window configuration or some window information.
***************
*** 822,831 ****
;; Ignore the last created offset pair.
(setcdr edebug-current-offset (cdr (cdr edebug-current-offset))))
- (def-edebug-spec edebug-storing-offsets (form body))
- (put 'edebug-storing-offsets 'lisp-indent-hook 1)
-
(defmacro edebug-storing-offsets (point &rest body)
`(unwind-protect
(progn
(edebug-store-before-offset ,point)
--- 810,817 ----
;; Ignore the last created offset pair.
(setcdr edebug-current-offset (cdr (cdr edebug-current-offset))))
(defmacro edebug-storing-offsets (point &rest body)
+ (declare (debug (form body)) (indent 1))
`(unwind-protect
(progn
(edebug-store-before-offset ,point)
***************
*** 849,863 ****
))
(defun edebug-read-storing-offsets (stream)
! (let ((class (edebug-next-token-class))
! func
! edebug-read-dotted-list) ; see edebug-store-after-offset
(edebug-storing-offsets (point)
! (if (setq func (assq class edebug-read-alist))
! (funcall (cdr func) stream)
! ;; anything else, just read it.
! (edebug-original-read stream))
! )))
(defun edebug-read-symbol (stream)
(edebug-original-read stream))
--- 835,847 ----
))
(defun edebug-read-storing-offsets (stream)
! (let (edebug-read-dotted-list) ; see edebug-store-after-offset
(edebug-storing-offsets (point)
! (funcall
! (or (cdr (assq (edebug-next-token-class) edebug-read-alist))
! ;; anything else, just read it.
! 'edebug-original-read)
! stream))))
(defun edebug-read-symbol (stream)
(edebug-original-read stream))
***************
*** 869,893 ****
;; Turn 'thing into (quote thing)
(forward-char 1)
(list
! (edebug-storing-offsets (point) 'quote)
(edebug-read-storing-offsets stream)))
(defun edebug-read-backquote (stream)
;; Turn `thing into (\` thing)
! (let ((opoint (point)))
! (forward-char 1)
! ;; Generate the same structure of offsets we would have
! ;; if the resulting list appeared verbatim in the input text.
! (edebug-storing-offsets opoint
! (list
! (edebug-storing-offsets opoint '\`)
! (edebug-read-storing-offsets stream)))))
!
! (defvar edebug-read-backquote-new nil
! "Non-nil if reading the inside of a new-style backquote with no parens
around it.
! Value of nil means reading the inside of an old-style backquote construct
! which is surrounded by an extra set of parentheses.
! This controls how we read comma constructs.")
(defun edebug-read-comma (stream)
;; Turn ,thing into (\, thing). Handle ,@ and ,. also.
--- 853,872 ----
;; Turn 'thing into (quote thing)
(forward-char 1)
(list
! (edebug-storing-offsets (1- (point)) 'quote)
(edebug-read-storing-offsets stream)))
+ (defvar edebug-read-backquote-level 0
+ "If non-zero, we're in a new-style backquote.
+ It should never be negative. This controls how we read comma constructs.")
+
(defun edebug-read-backquote (stream)
;; Turn `thing into (\` thing)
! (forward-char 1)
! (list
! (edebug-storing-offsets (1- (point)) '\`)
! (let ((edebug-read-backquote-level (1+ edebug-read-backquote-level)))
! (edebug-read-storing-offsets stream))))
(defun edebug-read-comma (stream)
;; Turn ,thing into (\, thing). Handle ,@ and ,. also.
***************
*** 902,912 ****
(forward-char 1)))
;; Generate the same structure of offsets we would have
;; if the resulting list appeared verbatim in the input text.
! (if edebug-read-backquote-new
! (list
! (edebug-storing-offsets opoint symbol)
! (edebug-read-storing-offsets stream))
! (edebug-storing-offsets opoint symbol)))))
(defun edebug-read-function (stream)
;; Turn #'thing into (function thing)
--- 881,892 ----
(forward-char 1)))
;; Generate the same structure of offsets we would have
;; if the resulting list appeared verbatim in the input text.
! (if (zerop edebug-read-backquote-level)
! (edebug-storing-offsets opoint symbol)
! (list
! (edebug-storing-offsets opoint symbol)
! (let ((edebug-read-backquote-level (1- edebug-read-backquote-level)))
! (edebug-read-storing-offsets stream)))))))
(defun edebug-read-function (stream)
;; Turn #'thing into (function thing)
***************
*** 914,924 ****
(cond ((eq ?\' (following-char))
(forward-char 1)
(list
! (edebug-storing-offsets (point)
(if (featurep 'cl) 'function* 'function))
(edebug-read-storing-offsets stream)))
((memq (following-char) '(?: ?B ?O ?X ?b ?o ?x ?1 ?2 ?3 ?4 ?5 ?6
! ?7 ?8 ?9 ?0))
(backward-char 1)
(edebug-original-read stream))
(t (edebug-syntax-error "Bad char after #"))))
--- 894,904 ----
(cond ((eq ?\' (following-char))
(forward-char 1)
(list
! (edebug-storing-offsets (- (point) 2)
(if (featurep 'cl) 'function* 'function))
(edebug-read-storing-offsets stream)))
((memq (following-char) '(?: ?B ?O ?X ?b ?o ?x ?1 ?2 ?3 ?4 ?5 ?6
! ?7 ?8 ?9 ?0))
(backward-char 1)
(edebug-original-read stream))
(t (edebug-syntax-error "Bad char after #"))))
***************
*** 928,945 ****
(prog1
(let ((elements))
(while (not (memq (edebug-next-token-class) '(rparen dot)))
! (if (eq (edebug-next-token-class) 'backquote)
! (let ((edebug-read-backquote-new (not (null elements)))
! (opoint (point)))
! (if edebug-read-backquote-new
! (setq elements (cons (edebug-read-backquote stream)
elements))
! (forward-char 1) ; Skip backquote.
! ;; Call edebug-storing-offsets here so that we
! ;; produce the same offsets we would have had
! ;; if the backquote were an ordinary symbol.
! (setq elements (cons (edebug-storing-offsets opoint '\`)
! elements))))
! (setq elements (cons (edebug-read-storing-offsets stream)
elements))))
(setq elements (nreverse elements))
(if (eq 'dot (edebug-next-token-class))
(let (dotted-form)
--- 908,924 ----
(prog1
(let ((elements))
(while (not (memq (edebug-next-token-class) '(rparen dot)))
! (if (and (eq (edebug-next-token-class) 'backquote)
! (null elements)
! (zerop edebug-read-backquote-level))
! (progn
! ;; Old style backquote.
! (forward-char 1) ; Skip backquote.
! ;; Call edebug-storing-offsets here so that we
! ;; produce the same offsets we would have had
! ;; if the backquote were an ordinary symbol.
! (push (edebug-storing-offsets (1- (point)) '\`) elements))
! (push (edebug-read-storing-offsets stream) elements)))
(setq elements (nreverse elements))
(if (eq 'dot (edebug-next-token-class))
(let (dotted-form)
***************
*** 959,965 ****
(prog1
(let ((elements))
(while (not (eq 'rbracket (edebug-next-token-class)))
! (setq elements (cons (edebug-read-storing-offsets stream) elements)))
(apply 'vector (nreverse elements)))
(forward-char 1) ; skip \]
))
--- 938,944 ----
(prog1
(let ((elements))
(while (not (eq 'rbracket (edebug-next-token-class)))
! (push (edebug-read-storing-offsets stream) elements))
(apply 'vector (nreverse elements)))
(forward-char 1) ; skip \]
))
***************
*** 981,987 ****
(setcdr cursor offsets)
cursor)
! '(defun edebug-copy-cursor (cursor)
;; Copy the cursor using the same object and offsets.
(cons (car cursor) (cdr cursor)))
--- 960,966 ----
(setcdr cursor offsets)
cursor)
! (defun edebug-copy-cursor (cursor)
;; Copy the cursor using the same object and offsets.
(cons (car cursor) (cdr cursor)))
***************
*** 1484,1495 ****
(edebug-set-cursor cursor (edebug-cursor-expressions cursor)
(cdr (edebug-cursor-offsets cursor)))
(cond
- ((null head) nil) ; () is legal.
-
((symbolp head)
(cond
! ((null head)
! (edebug-syntax-error "nil head"))
((eq head 'interactive-p)
;; Special case: replace (interactive-p) with variable
(setq edebug-def-interactive 'check-it)
--- 1463,1471 ----
(edebug-set-cursor cursor (edebug-cursor-expressions cursor)
(cdr (edebug-cursor-offsets cursor)))
(cond
((symbolp head)
(cond
! ((null head) nil) ; () is legal.
((eq head 'interactive-p)
;; Special case: replace (interactive-p) with variable
(setq edebug-def-interactive 'check-it)
***************
*** 1500,1513 ****
head (edebug-move-cursor cursor))))))
((consp head)
! (if (and (listp head) (eq (car head) ',))
(edebug-match cursor '(("," def-form) body))
;; Process anonymous function and args.
;; This assumes no anonymous macros.
(edebug-match-specs cursor '(lambda-expr body) 'edebug-match-specs)))
(t (edebug-syntax-error
! "Head of list form must be a symbol or lambda expression.")))
))
;;; Matching of specs.
--- 1476,1494 ----
head (edebug-move-cursor cursor))))))
((consp head)
! (if (eq (car head) ',)
! ;; The head of a form should normally be a symbol or a lambda
! ;; expression but it can also be an unquote form to be filled
! ;; before evaluation. We evaluate the arguments anyway, on the
! ;; assumption that the unquote form will place a proper function
! ;; name (rather than a macro name).
(edebug-match cursor '(("," def-form) body))
;; Process anonymous function and args.
;; This assumes no anonymous macros.
(edebug-match-specs cursor '(lambda-expr body) 'edebug-match-specs)))
(t (edebug-syntax-error
! "Head of list form must be a symbol or lambda expression")))
))
;;; Matching of specs.
***************
*** 1993,2009 ****
[&optional ("interactive" interactive)]
def-body))
(def-edebug-spec defmacro
! (&define name lambda-list def-body))
! (def-edebug-spec define-derived-mode
! (&define name symbolp stringp [&optional stringp] def-body))
! (def-edebug-spec define-minor-mode
! (&define name stringp
! [&optional sexp sexp &or consp symbolp]
! [&rest [keywordp sexp]]
! def-body))
! ;; This plain doesn't work ;-( -sm
! ;; (def-edebug-spec define-skeleton
! ;; (&define name stringp def-body))
(def-edebug-spec arglist lambda-list) ;; deprecated - use lambda-list.
--- 1974,1980 ----
[&optional ("interactive" interactive)]
def-body))
(def-edebug-spec defmacro
! (&define name lambda-list [&optional ("declare" &rest sexp)] def-body))
(def-edebug-spec arglist lambda-list) ;; deprecated - use lambda-list.
***************
*** 2069,2075 ****
(def-edebug-spec backquote-form
(&or
([&or "," ",@"] &or ("quote" backquote-form) form)
! (backquote-form &rest backquote-form)
;; If you use dotted forms in backquotes, replace the previous line
;; with the following. This takes quite a bit more stack space, however.
;; (backquote-form . [&or nil backquote-form])
--- 2040,2053 ----
(def-edebug-spec backquote-form
(&or
([&or "," ",@"] &or ("quote" backquote-form) form)
! ;; The simple version:
! ;; (backquote-form &rest backquote-form)
! ;; doesn't handle (a . ,b). The straightforward fix:
! ;; (backquote-form . [&or nil backquote-form])
! ;; uses up too much stack space.
! ;; Note that `(foo . ,@bar) is not legal, so we don't need to handle it.
! (backquote-form [&rest [¬ ","] backquote-form]
! . [&or nil backquote-form])
;; If you use dotted forms in backquotes, replace the previous line
;; with the following. This takes quite a bit more stack space, however.
;; (backquote-form . [&or nil backquote-form])
***************
*** 2105,2125 ****
(def-edebug-spec save-selected-window t)
(def-edebug-spec save-current-buffer t)
- (def-edebug-spec save-match-data t)
- (def-edebug-spec with-output-to-string t)
- (def-edebug-spec with-current-buffer t)
- (def-edebug-spec combine-after-change-calls t)
(def-edebug-spec delay-mode-hooks t)
(def-edebug-spec with-temp-file t)
- (def-edebug-spec with-temp-buffer t)
(def-edebug-spec with-temp-message t)
(def-edebug-spec with-syntax-table t)
- (def-edebug-spec dolist ((symbolp form &rest form) &rest form))
- (def-edebug-spec dotimes ((symbolp form &rest form) &rest form))
(def-edebug-spec push (form sexp))
(def-edebug-spec pop (sexp))
- (def-edebug-spec unless t)
- (def-edebug-spec when t)
;; Anything else?
--- 2083,2094 ----
***************
*** 2272,2279 ****
;; Save the outside value of executing macro. (here??)
(edebug-outside-executing-macro executing-kbd-macro)
! (edebug-outside-pre-command-hook pre-command-hook)
! (edebug-outside-post-command-hook post-command-hook))
(unwind-protect
(let (;; Don't keep reading from an executing kbd macro
;; within edebug unless edebug-continue-kbd-macro is
--- 2241,2250 ----
;; Save the outside value of executing macro. (here??)
(edebug-outside-executing-macro executing-kbd-macro)
! (edebug-outside-pre-command-hook
! (edebug-var-status 'pre-command-hook))
! (edebug-outside-post-command-hook
! (edebug-var-status 'post-command-hook)))
(unwind-protect
(let (;; Don't keep reading from an executing kbd macro
;; within edebug unless edebug-continue-kbd-macro is
***************
*** 2298,2307 ****
edebug-next-execution-mode nil)
(edebug-enter edebug-function edebug-args edebug-body))
;; Reset global variables in case outside value was changed.
! (setq executing-kbd-macro edebug-outside-executing-macro
! pre-command-hook edebug-outside-pre-command-hook
! post-command-hook edebug-outside-post-command-hook
! )))
(let* ((edebug-data (get edebug-function 'edebug))
(edebug-def-mark (car edebug-data)) ; mark at def start
--- 2269,2279 ----
edebug-next-execution-mode nil)
(edebug-enter edebug-function edebug-args edebug-body))
;; Reset global variables in case outside value was changed.
! (setq executing-kbd-macro edebug-outside-executing-macro)
! (edebug-restore-status
! 'post-command-hook edebug-outside-post-command-hook)
! (edebug-restore-status
! 'pre-command-hook edebug-outside-pre-command-hook)))
(let* ((edebug-data (get edebug-function 'edebug))
(edebug-def-mark (car edebug-data)) ; mark at def start
***************
*** 2322,2327 ****
--- 2294,2323 ----
(funcall edebug-body))
)))
+ (defun edebug-var-status (var)
+ "Return a cons cell describing the status of VAR's current binding.
+ The purpose of this function is so you can properly undo
+ subsequent changes to the same binding, by passing the status
+ cons cell to `edebug-restore-status'. The status cons cell
+ has the form (LOCUS . VALUE), where LOCUS can be a buffer
+ \(for a buffer-local binding), a frame (for a frame-local binding),
+ or nil (if the default binding is current)."
+ (cons (variable-binding-locus var)
+ (symbol-value var)))
+
+ (defun edebug-restore-status (var status)
+ "Reset VAR based on STATUS.
+ STATUS should be a list you got from `edebug-var-status'."
+ (let ((locus (car status))
+ (value (cdr status)))
+ (cond ((bufferp locus)
+ (if (buffer-live-p locus)
+ (with-current-buffer locus
+ (set var value))))
+ ((framep locus)
+ (modify-frame-parameters locus (list (cons var value))))
+ (t
+ (set var value)))))
(defun edebug-enter-trace (edebug-body)
(let ((edebug-stack-depth (1+ edebug-stack-depth))
***************
*** 3542,3549 ****
(executing-kbd-macro edebug-outside-executing-macro)
(defining-kbd-macro edebug-outside-defining-kbd-macro)
! (pre-command-hook edebug-outside-pre-command-hook)
! (post-command-hook edebug-outside-post-command-hook)
;; See edebug-display
(overlay-arrow-position edebug-outside-o-a-p)
--- 3538,3546 ----
(executing-kbd-macro edebug-outside-executing-macro)
(defining-kbd-macro edebug-outside-defining-kbd-macro)
! ;; Get the values out of the saved statuses.
! (pre-command-hook (cdr edebug-outside-pre-command-hook))
! (post-command-hook (cdr edebug-outside-post-command-hook))
;; See edebug-display
(overlay-arrow-position edebug-outside-o-a-p)
***************
*** 3583,3595 ****
edebug-outside-executing-macro executing-kbd-macro
edebug-outside-defining-kbd-macro defining-kbd-macro
- edebug-outside-pre-command-hook pre-command-hook
- edebug-outside-post-command-hook post-command-hook
edebug-outside-o-a-p overlay-arrow-position
edebug-outside-o-a-s overlay-arrow-string
edebug-outside-c-i-e-a cursor-in-echo-area
! ))) ; let
))
(defvar cl-debug-env nil) ;; defined in cl; non-nil when lexical env used.
--- 3580,3597 ----
edebug-outside-executing-macro executing-kbd-macro
edebug-outside-defining-kbd-macro defining-kbd-macro
edebug-outside-o-a-p overlay-arrow-position
edebug-outside-o-a-s overlay-arrow-string
edebug-outside-c-i-e-a cursor-in-echo-area
! )
!
! ;; Restore the outside saved values; don't alter
! ;; the outside binding loci.
! (setcdr edebug-outside-pre-command-hook pre-command-hook)
! (setcdr edebug-outside-post-command-hook post-command-hook)
!
! )) ; let
))
(defvar cl-debug-env nil) ;; defined in cl; non-nil when lexical env used.
***************
*** 3707,3720 ****
(edebug-safe-prin1-to-string (car values)))))
(defun edebug-eval-last-sexp ()
! "Evaluate sexp before point in the outside environment;
! print value in minibuffer."
(interactive)
(edebug-eval-expression (edebug-last-sexp)))
(defun edebug-eval-print-last-sexp ()
! "Evaluate sexp before point in the outside environment;
! print value into current buffer."
(interactive)
(let* ((edebug-form (edebug-last-sexp))
(edebug-result-string
--- 3709,3721 ----
(edebug-safe-prin1-to-string (car values)))))
(defun edebug-eval-last-sexp ()
! "Evaluate sexp before point in the outside environment; value in
minibuffer."
(interactive)
(edebug-eval-expression (edebug-last-sexp)))
(defun edebug-eval-print-last-sexp ()
! "Evaluate sexp before point in the outside environment; insert the value.
! This prints the value into current buffer."
(interactive)
(let* ((edebug-form (edebug-last-sexp))
(edebug-result-string
***************
*** 3729,3810 ****
;;; Edebug Minor Mode
! ;; Global GUD bindings for all emacs-lisp-mode buffers.
! (define-key emacs-lisp-mode-map "\C-x\C-a\C-s" 'edebug-step-mode)
! (define-key emacs-lisp-mode-map "\C-x\C-a\C-n" 'edebug-next-mode)
! (define-key emacs-lisp-mode-map "\C-x\C-a\C-c" 'edebug-go-mode)
! (define-key emacs-lisp-mode-map "\C-x\C-a\C-l" 'edebug-where)
! (defvar edebug-mode-map nil)
! (if edebug-mode-map
! nil
! (progn
! (setq edebug-mode-map (copy-keymap emacs-lisp-mode-map))
;; control
! (define-key edebug-mode-map " " 'edebug-step-mode)
! (define-key edebug-mode-map "n" 'edebug-next-mode)
! (define-key edebug-mode-map "g" 'edebug-go-mode)
! (define-key edebug-mode-map "G" 'edebug-Go-nonstop-mode)
! (define-key edebug-mode-map "t" 'edebug-trace-mode)
! (define-key edebug-mode-map "T" 'edebug-Trace-fast-mode)
! (define-key edebug-mode-map "c" 'edebug-continue-mode)
! (define-key edebug-mode-map "C" 'edebug-Continue-fast-mode)
!
! ;;(define-key edebug-mode-map "f" 'edebug-forward) not implemented
! (define-key edebug-mode-map "f" 'edebug-forward-sexp)
! (define-key edebug-mode-map "h" 'edebug-goto-here)
!
! (define-key edebug-mode-map "I" 'edebug-instrument-callee)
! (define-key edebug-mode-map "i" 'edebug-step-in)
! (define-key edebug-mode-map "o" 'edebug-step-out)
;; quitting and stopping
! (define-key edebug-mode-map "q" 'top-level)
! (define-key edebug-mode-map "Q" 'edebug-top-level-nonstop)
! (define-key edebug-mode-map "a" 'abort-recursive-edit)
! (define-key edebug-mode-map "S" 'edebug-stop)
;; breakpoints
! (define-key edebug-mode-map "b" 'edebug-set-breakpoint)
! (define-key edebug-mode-map "u" 'edebug-unset-breakpoint)
! (define-key edebug-mode-map "B" 'edebug-next-breakpoint)
! (define-key edebug-mode-map "x" 'edebug-set-conditional-breakpoint)
! (define-key edebug-mode-map "X" 'edebug-set-global-break-condition)
;; evaluation
! (define-key edebug-mode-map "r" 'edebug-previous-result)
! (define-key edebug-mode-map "e" 'edebug-eval-expression)
! (define-key edebug-mode-map "\C-x\C-e" 'edebug-eval-last-sexp)
! (define-key edebug-mode-map "E" 'edebug-visit-eval-list)
;; views
! (define-key edebug-mode-map "w" 'edebug-where)
! (define-key edebug-mode-map "v" 'edebug-view-outside) ;; maybe obsolete??
! (define-key edebug-mode-map "p" 'edebug-bounce-point)
! (define-key edebug-mode-map "P" 'edebug-view-outside) ;; same as v
! (define-key edebug-mode-map "W" 'edebug-toggle-save-windows)
;; misc
! (define-key edebug-mode-map "?" 'edebug-help)
! (define-key edebug-mode-map "d" 'edebug-backtrace)
! (define-key edebug-mode-map "-" 'negative-argument)
;; statistics
! (define-key edebug-mode-map "=" 'edebug-temp-display-freq-count)
;; GUD bindings
! (define-key edebug-mode-map "\C-c\C-s" 'edebug-step-mode)
! (define-key edebug-mode-map "\C-c\C-n" 'edebug-next-mode)
! (define-key edebug-mode-map "\C-c\C-c" 'edebug-go-mode)
!
! (define-key edebug-mode-map "\C-x " 'edebug-set-breakpoint)
! (define-key edebug-mode-map "\C-c\C-d" 'edebug-unset-breakpoint)
! (define-key edebug-mode-map "\C-c\C-t"
! (function (lambda () (edebug-set-breakpoint t))))
! (define-key edebug-mode-map "\C-c\C-l" 'edebug-where)
! ))
;; Autoloading these global bindings doesn't make sense because
;; they cannot be used anyway unless Edebug is already loaded and active.
--- 3730,3811 ----
;;; Edebug Minor Mode
! (defvar gud-inhibit-global-bindings
! "*Non-nil means don't do global rebindings of C-x C-a subcommands.")
+ ;; Global GUD bindings for all emacs-lisp-mode buffers.
+ (unless gud-inhibit-global-bindings
+ (define-key emacs-lisp-mode-map "\C-x\C-a\C-s" 'edebug-step-mode)
+ (define-key emacs-lisp-mode-map "\C-x\C-a\C-n" 'edebug-next-mode)
+ (define-key emacs-lisp-mode-map "\C-x\C-a\C-c" 'edebug-go-mode)
+ (define-key emacs-lisp-mode-map "\C-x\C-a\C-l" 'edebug-where))
! (defvar edebug-mode-map
! (let ((map (copy-keymap emacs-lisp-mode-map)))
;; control
! (define-key map " " 'edebug-step-mode)
! (define-key map "n" 'edebug-next-mode)
! (define-key map "g" 'edebug-go-mode)
! (define-key map "G" 'edebug-Go-nonstop-mode)
! (define-key map "t" 'edebug-trace-mode)
! (define-key map "T" 'edebug-Trace-fast-mode)
! (define-key map "c" 'edebug-continue-mode)
! (define-key map "C" 'edebug-Continue-fast-mode)
!
! ;;(define-key map "f" 'edebug-forward) not implemented
! (define-key map "f" 'edebug-forward-sexp)
! (define-key map "h" 'edebug-goto-here)
!
! (define-key map "I" 'edebug-instrument-callee)
! (define-key map "i" 'edebug-step-in)
! (define-key map "o" 'edebug-step-out)
;; quitting and stopping
! (define-key map "q" 'top-level)
! (define-key map "Q" 'edebug-top-level-nonstop)
! (define-key map "a" 'abort-recursive-edit)
! (define-key map "S" 'edebug-stop)
;; breakpoints
! (define-key map "b" 'edebug-set-breakpoint)
! (define-key map "u" 'edebug-unset-breakpoint)
! (define-key map "B" 'edebug-next-breakpoint)
! (define-key map "x" 'edebug-set-conditional-breakpoint)
! (define-key map "X" 'edebug-set-global-break-condition)
;; evaluation
! (define-key map "r" 'edebug-previous-result)
! (define-key map "e" 'edebug-eval-expression)
! (define-key map "\C-x\C-e" 'edebug-eval-last-sexp)
! (define-key map "E" 'edebug-visit-eval-list)
;; views
! (define-key map "w" 'edebug-where)
! (define-key map "v" 'edebug-view-outside) ;; maybe obsolete??
! (define-key map "p" 'edebug-bounce-point)
! (define-key map "P" 'edebug-view-outside) ;; same as v
! (define-key map "W" 'edebug-toggle-save-windows)
;; misc
! (define-key map "?" 'edebug-help)
! (define-key map "d" 'edebug-backtrace)
! (define-key map "-" 'negative-argument)
;; statistics
! (define-key map "=" 'edebug-temp-display-freq-count)
;; GUD bindings
! (define-key map "\C-c\C-s" 'edebug-step-mode)
! (define-key map "\C-c\C-n" 'edebug-next-mode)
! (define-key map "\C-c\C-c" 'edebug-go-mode)
!
! (define-key map "\C-x " 'edebug-set-breakpoint)
! (define-key map "\C-c\C-d" 'edebug-unset-breakpoint)
! (define-key map "\C-c\C-t"
! (lambda () (interactive) (edebug-set-breakpoint t)))
! (define-key map "\C-c\C-l" 'edebug-where)
! map))
;; Autoloading these global bindings doesn't make sense because
;; they cannot be used anyway unless Edebug is already loaded and active.
***************
*** 3812,3853 ****
(defvar global-edebug-prefix "\^XX"
"Prefix key for global edebug commands, available from any buffer.")
! (defvar global-edebug-map nil
! "Global map of edebug commands, available from any buffer.")
! (if global-edebug-map
! nil
! (setq global-edebug-map (make-sparse-keymap))
! (global-unset-key global-edebug-prefix)
! (global-set-key global-edebug-prefix global-edebug-map)
! (define-key global-edebug-map " " 'edebug-step-mode)
! (define-key global-edebug-map "g" 'edebug-go-mode)
! (define-key global-edebug-map "G" 'edebug-Go-nonstop-mode)
! (define-key global-edebug-map "t" 'edebug-trace-mode)
! (define-key global-edebug-map "T" 'edebug-Trace-fast-mode)
! (define-key global-edebug-map "c" 'edebug-continue-mode)
! (define-key global-edebug-map "C" 'edebug-Continue-fast-mode)
!
! ;; breakpoints
! (define-key global-edebug-map "b" 'edebug-set-breakpoint)
! (define-key global-edebug-map "u" 'edebug-unset-breakpoint)
! (define-key global-edebug-map "x" 'edebug-set-conditional-breakpoint)
! (define-key global-edebug-map "X" 'edebug-set-global-break-condition)
!
! ;; views
! (define-key global-edebug-map "w" 'edebug-where)
! (define-key global-edebug-map "W" 'edebug-toggle-save-windows)
!
! ;; quitting
! (define-key global-edebug-map "q" 'top-level)
! (define-key global-edebug-map "Q" 'edebug-top-level-nonstop)
! (define-key global-edebug-map "a" 'abort-recursive-edit)
- ;; statistics
- (define-key global-edebug-map "=" 'edebug-display-freq-count)
- )
(defun edebug-help ()
(interactive)
--- 3813,3852 ----
(defvar global-edebug-prefix "\^XX"
"Prefix key for global edebug commands, available from any buffer.")
! (defvar global-edebug-map
! (let ((map (make-sparse-keymap)))
! (define-key map " " 'edebug-step-mode)
! (define-key map "g" 'edebug-go-mode)
! (define-key map "G" 'edebug-Go-nonstop-mode)
! (define-key map "t" 'edebug-trace-mode)
! (define-key map "T" 'edebug-Trace-fast-mode)
! (define-key map "c" 'edebug-continue-mode)
! (define-key map "C" 'edebug-Continue-fast-mode)
! ;; breakpoints
! (define-key map "b" 'edebug-set-breakpoint)
! (define-key map "u" 'edebug-unset-breakpoint)
! (define-key map "x" 'edebug-set-conditional-breakpoint)
! (define-key map "X" 'edebug-set-global-break-condition)
! ;; views
! (define-key map "w" 'edebug-where)
! (define-key map "W" 'edebug-toggle-save-windows)
!
! ;; quitting
! (define-key map "q" 'top-level)
! (define-key map "Q" 'edebug-top-level-nonstop)
! (define-key map "a" 'abort-recursive-edit)
!
! ;; statistics
! (define-key map "=" 'edebug-display-freq-count)
! map)
! "Global map of edebug commands, available from any buffer.")
!
! (global-unset-key global-edebug-prefix)
! (global-set-key global-edebug-prefix global-edebug-map)
(defun edebug-help ()
(interactive)
***************
*** 4451,4454 ****
--- 4450,4454 ----
(provide 'edebug)
+ ;;; arch-tag: 19c8d05c-4554-426e-ac72-e0fa1fcb0808
;;; edebug.el ends here
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/emacs-lisp/edebug.el [lexbind],
Miles Bader <=