From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lute Kamstra Newsgroups: gmane.emacs.devel Subject: debugger-make-xrefs patch. Date: Sun, 13 Mar 2005 22:09:05 +0100 Message-ID: <873buzi77y.fsf@xs4all.nl> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1110749808 30373 80.91.229.2 (13 Mar 2005 21:36:48 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 13 Mar 2005 21:36:48 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Mar 13 22:36:48 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DAalH-0000ZA-6l for ged-emacs-devel@m.gmane.org; Sun, 13 Mar 2005 22:36:36 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DAb0p-0000Mi-IN for ged-emacs-devel@m.gmane.org; Sun, 13 Mar 2005 16:52:39 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DAawa-0006yd-Vt for emacs-devel@gnu.org; Sun, 13 Mar 2005 16:48:17 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DAawU-0006wk-IT for emacs-devel@gnu.org; Sun, 13 Mar 2005 16:48:12 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DAawQ-0006m1-RG for emacs-devel@gnu.org; Sun, 13 Mar 2005 16:48:07 -0500 Original-Received: from [194.109.24.24] (helo=smtp-vbr4.xs4all.nl) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DAaKc-0005Aj-GY for emacs-devel@gnu.org; Sun, 13 Mar 2005 16:09:02 -0500 Original-Received: from pijl (a80-127-67-124.adsl.xs4all.nl [80.127.67.124]) by smtp-vbr4.xs4all.nl (8.12.11/8.12.11) with ESMTP id j2DL91Ni079925 for ; Sun, 13 Mar 2005 22:09:01 +0100 (CET) (envelope-from Lute.Kamstra@xs4all.nl) Original-Received: from lute by pijl with local (Exim 3.36 #1 (Debian)) id 1DAaKf-0000tu-00 for ; Sun, 13 Mar 2005 22:09:05 +0100 Original-To: emacs-devel@gnu.org User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) Original-Lines: 83 X-Virus-Scanned: by XS4ALL Virus Scanner X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org X-MailScanner-To: ged-emacs-devel@m.gmane.org Xref: news.gmane.org gmane.emacs.devel:34552 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:34552 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 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))))