/[emacs]/emacs/lisp/emacs-lisp/edebug.el
ViewVC logotype

Diff of /emacs/lisp/emacs-lisp/edebug.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3.51 by monnier, Tue Oct 30 03:31:32 2001 UTC revision 3.52 by monnier, Sat Nov 17 00:51:55 2001 UTC
# Line 593  or if an error occurs, leave point after Line 593  or if an error occurs, leave point after
593    
594  (make-variable-buffer-local 'edebug-form-data)  (make-variable-buffer-local 'edebug-form-data)
595    
596  (defconst edebug-form-data nil)  (defvar edebug-form-data nil)
597  ;; A list of entries associating symbols with buffer regions.  ;; A list of entries associating symbols with buffer regions.
598  ;; This is an automatic buffer local variable.  Each entry looks like:  ;; This is an automatic buffer local variable.  Each entry looks like:
599  ;; @code{(@var{symbol} @var{begin-marker} @var{end-marker}).  The markers  ;; @code{(@var{symbol} @var{begin-marker} @var{end-marker}).  The markers
# Line 680  or if an error occurs, leave point after Line 680  or if an error occurs, leave point after
680  (defconst edebug-read-syntax-table  (defconst edebug-read-syntax-table
681    ;; Lookup table for significant characters indicating the class of the    ;; Lookup table for significant characters indicating the class of the
682    ;; token that follows.  This is not a \"real\" syntax table.    ;; token that follows.  This is not a \"real\" syntax table.
683    (let ((table (make-vector 256 'symbol))    (let ((table (make-char-table 'syntax-table 'symbol))
684          (i 0))          (i 0))
685      (while (< i ?!)      (while (< i ?!)
686        (aset table i 'space)        (aset table i 'space)
# Line 753  or if an error occurs, leave point after Line 753  or if an error occurs, leave point after
753  ;; or for structures that have elements: (before <subexpressions> . after)  ;; or for structures that have elements: (before <subexpressions> . after)
754  ;; where the <subexpressions> are the offset structures for subexpressions  ;; where the <subexpressions> are the offset structures for subexpressions
755  ;; including the head of a list.  ;; including the head of a list.
756  (defconst edebug-offsets nil)  (defvar edebug-offsets nil)
757    
758  ;; Stack of offset structures in reverse order of the nesting.  ;; Stack of offset structures in reverse order of the nesting.
759  ;; This is used to get back to previous levels.  ;; This is used to get back to previous levels.
760  (defconst edebug-offsets-stack nil)  (defvar edebug-offsets-stack nil)
761  (defconst edebug-current-offset nil) ; Top of the stack, for convenience.  (defvar edebug-current-offset nil) ; Top of the stack, for convenience.
762    
763  ;; We must store whether we just read a list with a dotted form that  ;; We must store whether we just read a list with a dotted form that
764  ;; is itself a list.  This structure will be condensed, so the offsets  ;; is itself a list.  This structure will be condensed, so the offsets
765  ;; must also be condensed.  ;; must also be condensed.
766  (defconst edebug-read-dotted-list nil)  (defvar edebug-read-dotted-list nil)
767    
768  (defsubst edebug-initialize-offsets ()  (defsubst edebug-initialize-offsets ()
769    ;; Reinitialize offset recording.    ;; Reinitialize offset recording.
# Line 1063  This controls how we read comma construc Line 1063  This controls how we read comma construc
1063  (defvar edebug-&rest)  (defvar edebug-&rest)
1064  (defvar edebug-gate nil) ;; whether no-match forces an error.  (defvar edebug-gate nil) ;; whether no-match forces an error.
1065    
1066  (defconst edebug-def-name nil) ; name of definition, used by interactive-form  (defvar edebug-def-name nil) ; name of definition, used by interactive-form
1067  (defconst edebug-old-def-name nil) ; previous name of containing definition.  (defvar edebug-old-def-name nil) ; previous name of containing definition.
1068    
1069  (defconst edebug-error-point nil)  (defvar edebug-error-point nil)
1070  (defconst edebug-best-error nil)  (defvar edebug-best-error nil)
1071    
1072    
1073  (defun edebug-read-and-maybe-wrap-form ()  (defun edebug-read-and-maybe-wrap-form ()
# Line 2853  MSG is printed after `::::} '." Line 2853  MSG is printed after `::::} '."
2853                ;; others??                ;; others??
2854                )                )
2855    
           (if (fboundp 'zmacs-deactivate-region);; for lemacs  
               (zmacs-deactivate-region))  
2856            (if (and (eq edebug-execution-mode 'go)            (if (and (eq edebug-execution-mode 'go)
2857                     (not (memq edebug-arg-mode '(after error))))                     (not (memq edebug-arg-mode '(after error))))
2858                (message "Break"))                (message "Break"))
# Line 4328  With prefix argument, make it a temporar Line 4326  With prefix argument, make it a temporar
4326    
4327  ;; Epoch specific code was in a separate file: edebug-epoch.el.  ;; Epoch specific code was in a separate file: edebug-epoch.el.
4328    
4329  ;; The byte-compiler will complain about changes in number of arguments  (easy-menu-define edebug-menu edebug-mode-map "Edebug menus" edebug-mode-menus)
 ;; to functions like mark and read-from-minibuffer.  These warnings  
 ;; may be ignored because the right call should always be made.  
4330    
4331    (if (display-popup-menus-p) (x-popup-menu nil edebug-menu))
 (defun edebug-lemacs-specific ()  
   
   ;; We need to bind zmacs-regions to nil around all calls to `mark' and  
   ;; `mark-marker' but don't bind it to nil before entering a recursive edit,  
   ;; that is, don't interfere with the binding the user might see while  
   ;; executing a command.  
   
   (defvar zmacs-regions)  
     
   (defun edebug-mark ()  
     (let ((zmacs-regions nil))  
       (mark)))  
   
   (defun edebug-window-live-p (window)  
     "Return non-nil if WINDOW is visible."  
     (get-window-with-predicate (lambda (w) (eq w window))))  
   
   (defun edebug-mark-marker ()  
     (let ((zmacs-regions nil));; for lemacs  
       (mark-marker)))  
   
   ;; no read-expression-history  
   (defun edebug-set-conditional-breakpoint (arg condition)  
     "Set a conditional breakpoint at nearest sexp.  
 The condition is evaluated in the outside context.  
 With prefix argument, make it a temporary breakpoint."  
     ;; (interactive "P\nxCondition: ")  
     (interactive  
      (list  
       current-prefix-arg  
       ;; Edit previous condition as follows, but it is cumbersome:  
       (let ((edebug-stop-point (edebug-find-stop-point)))  
         (if edebug-stop-point  
             (let* ((edebug-def-name (car edebug-stop-point))  
                    (index (cdr edebug-stop-point))  
                    (edebug-data (get edebug-def-name 'edebug))  
                    (edebug-breakpoints (car (cdr edebug-data)))  
                    (edebug-break-data (assq index edebug-breakpoints))  
                    (edebug-break-condition (car (cdr edebug-break-data))))  
               (read-minibuffer  
                (format "Condition in %s: " edebug-def-name)  
                (if edebug-break-condition  
                    (format "%s" edebug-break-condition)  
                  (format ""))))))))  
     (edebug-modify-breakpoint t condition arg))  
   
   (defun edebug-eval-expression (edebug-expr)  
     "Evaluate an expression in the outside environment.    
 If interactive, prompt for the expression.  
 Print result in minibuffer."  
     (interactive "xEval: ")  
     (princ  
      (edebug-outside-excursion  
       (setq values (cons (edebug-eval edebug-expr) values))  
       (edebug-safe-prin1-to-string (car values)))))  
   
   (defun edebug-mode-menu (event)  
     (interactive "@event")  
     (popup-menu edebug-mode-menus))  
   
   (define-key edebug-mode-map 'button3 'edebug-mode-menu)  
   )  
   
 (cond  
  ((string-match "Lucid" emacs-version) ;; Lucid Emacs  
   (edebug-lemacs-specific))  
  (t  
   
   (easy-menu-define edebug-menu edebug-mode-map "Edebug menus" edebug-mode-menus)  
   
   (if (display-popup-menus-p)  
       (x-popup-menu nil (lookup-key edebug-mode-map [menu-bar Edebug])))))  
4332    
4333  ;;; Byte-compiler  ;;; Byte-compiler
4334    

Legend:
Removed from v.3.51  
changed lines
  Added in v.3.52

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26