+2001-10-31 Sam Steingold <sds@gnu.org>
+
+ * emacs-lisp/debug.el (debugger-make-xrefs): New function.
+ (debugger-setup-buffer): Call it.
+ (debugger-mode-map): Bind RET and mouse-2.
+
2001-10-31 Pavel Jan\e,Bm\e(Bk <Pavel@Janik.cz>
* startup.el: Document command line option --no-window-system
(prin1 (if (eq (car debugger-args) 'nil)
(cdr debugger-args) debugger-args)
(current-buffer))
- (insert ?\n))))
+ (insert ?\n)))
+ (debugger-make-xrefs))
+
+(defun debugger-make-xrefs (&optional buffer)
+ "Create cross-references in the debugger buffer."
+ (interactive "b")
+ (save-excursion
+ (set-buffer (or buffer (current-buffer)))
+ (goto-char (point-min))
+ (let ((buffer-read-only nil))
+ (while (re-search-forward "^[* ] (?\\(\\(\\sw\\|\\s_\\)+\\)" nil t)
+ (let* ((sym (intern-soft (match-string 1)))
+ (file (symbol-file sym)))
+ (when file (help-xref-button 1 'help-function-def sym file)))))))
\f
(defun debugger-step-through ()
"Proceed, stepping through subexpressions of this expression.
(debugger-env-macro (eval-expression exp)))
\f
(defvar debugger-mode-map nil)
-(if debugger-mode-map
- nil
+(unless debugger-mode-map
(let ((loop ? ))
(setq debugger-mode-map (make-keymap))
(suppress-keymap debugger-mode-map)
(define-key debugger-mode-map "e" 'debugger-eval-expression)
(define-key debugger-mode-map " " 'next-line)
(define-key debugger-mode-map "R" 'debugger-record-expression)
+ (define-key debugger-mode-map [RET] 'help-follow)
+ (define-key debugger-mode-map [mouse-2] 'push-button)
))