unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* debugger-make-xrefs patch.
@ 2005-03-13 21:09 Lute Kamstra
  2005-03-14 17:28 ` Richard Stallman
  0 siblings, 1 reply; 2+ messages in thread
From: Lute Kamstra @ 2005-03-13 21:09 UTC (permalink / raw)


debugger-make-xrefs in lisp/emacs-lisp/debug.el adds a cross reference
to the first symbol name of each line in the debugger's *Backtrace*
buffer (if that symbol name is the name of a function and the lisp
source file in which it was defined can be located).  Lines of frames
that are set to debug on exit are marked with a `*'.
debugger-make-xrefs considers this `*' the first symbol name on the
line and consequently does not add any cross reference.  What about
the following patch to fix this?

Lute.


Index: lisp/ChangeLog
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.7091
diff -c -r1.7091 ChangeLog
*** lisp/ChangeLog	13 Mar 2005 20:54:14 -0000	1.7091
--- lisp/ChangeLog	13 Mar 2005 20:56:17 -0000
***************
*** 5,10 ****
--- 5,12 ----
  	debug-on-exit and we don't have to do it manually.  Set an extra
  	debug-on-exit for macro's.
  	(debugger-setup-buffer): Don't mark the top frame manually.
+ 	(debugger-make-xrefs): Docstring fix.  Ignore a `*' at the
+ 	beginning of a line.
  	
  2005-03-12  Lute Kamstra  <lute@gnu.org>
  
Index: lisp/emacs-lisp/debug.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/emacs-lisp/debug.el,v
retrieving revision 1.76
diff -c -r1.76 debug.el
*** lisp/emacs-lisp/debug.el	13 Mar 2005 20:53:14 -0000	1.76
--- lisp/emacs-lisp/debug.el	13 Mar 2005 20:56:18 -0000
***************
*** 302,308 ****
    (debugger-make-xrefs))
  
  (defun debugger-make-xrefs (&optional buffer)
!   "Attach cross-references to symbol names in the `*Backtrace*' buffer."
    (interactive "b")
    (save-excursion
      (set-buffer (or buffer (current-buffer)))
--- 302,308 ----
    (debugger-make-xrefs))
  
  (defun debugger-make-xrefs (&optional buffer)
!   "Attach cross-references to function names in the `*Backtrace*' buffer."
    (interactive "b")
    (save-excursion
      (set-buffer (or buffer (current-buffer)))
***************
*** 353,358 ****
--- 353,359 ----
        ;; Scan the new part of the backtrace, inserting xrefs.
        (goto-char (point-min))
        (while (progn
+ 	       (goto-char (+ (point) 2))
  	       (skip-syntax-forward "^w_")
  	       (not (eobp)))
  	(let* ((beg (point))
***************
*** 364,371 ****
  	    (goto-char beg)
  	    ;; help-xref-button needs to operate on something matched
  	    ;; by a regexp, so set that up for it.
! 	    (re-search-forward "\\(\\(\\sw\\|\\s_\\)+\\)")
! 	    (help-xref-button 1 'help-function-def sym file)))
  	(forward-line 1))
        (widen))
      (setq debugger-previous-backtrace (buffer-string))))
--- 365,372 ----
  	    (goto-char beg)
  	    ;; help-xref-button needs to operate on something matched
  	    ;; by a regexp, so set that up for it.
! 	    (re-search-forward "\\(\\sw\\|\\s_\\)+")
! 	    (help-xref-button 0 'help-function-def sym file)))
  	(forward-line 1))
        (widen))
      (setq debugger-previous-backtrace (buffer-string))))

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: debugger-make-xrefs patch.
  2005-03-13 21:09 debugger-make-xrefs patch Lute Kamstra
@ 2005-03-14 17:28 ` Richard Stallman
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Stallman @ 2005-03-14 17:28 UTC (permalink / raw)
  Cc: emacs-devel

Thanks for noticing and fixing this bug.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-03-14 17:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-13 21:09 debugger-make-xrefs patch Lute Kamstra
2005-03-14 17:28 ` Richard Stallman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).