From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Xue Fuqiao Newsgroups: gmane.emacs.bugs Subject: bug#13777: [patch] Add toolbars for Edebug and debugger-mode Date: Thu, 21 Feb 2013 18:49:13 +0800 Organization: The Church of Emacs Message-ID: <20130221184913.101bd49379994f15f3156829@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1361443794 778 80.91.229.3 (21 Feb 2013 10:49:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 21 Feb 2013 10:49:54 +0000 (UTC) To: 13777@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Feb 21 11:50:16 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1U8TjA-0003UY-Ev for geb-bug-gnu-emacs@m.gmane.org; Thu, 21 Feb 2013 11:50:12 +0100 Original-Received: from localhost ([::1]:37819 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U8Tiq-0003yN-9G for geb-bug-gnu-emacs@m.gmane.org; Thu, 21 Feb 2013 05:49:52 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:52023) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U8Til-0003xK-QZ for bug-gnu-emacs@gnu.org; Thu, 21 Feb 2013 05:49:50 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U8Tik-0004JF-DL for bug-gnu-emacs@gnu.org; Thu, 21 Feb 2013 05:49:47 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:36011) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U8Tik-0004JB-Ag for bug-gnu-emacs@gnu.org; Thu, 21 Feb 2013 05:49:46 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1U8Tjx-0004S6-QV for bug-gnu-emacs@gnu.org; Thu, 21 Feb 2013 05:51:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Xue Fuqiao Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 21 Feb 2013 10:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 13777 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.136144385717102 (code B ref -1); Thu, 21 Feb 2013 10:51:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 21 Feb 2013 10:50:57 +0000 Original-Received: from localhost ([127.0.0.1]:41475 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U8Tjs-0004Rm-Dp for submit@debbugs.gnu.org; Thu, 21 Feb 2013 05:50:56 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:40602) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U8Tjp-0004Rd-Fy for submit@debbugs.gnu.org; Thu, 21 Feb 2013 05:50:54 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U8TiW-0004EA-UK for submit@debbugs.gnu.org; Thu, 21 Feb 2013 05:49:37 -0500 Original-Received: from lists.gnu.org ([208.118.235.17]:47263) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U8TiW-0004Dq-R5 for submit@debbugs.gnu.org; Thu, 21 Feb 2013 05:49:32 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:51921) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U8TiR-0003rh-0N for bug-gnu-emacs@gnu.org; Thu, 21 Feb 2013 05:49:32 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U8TiK-00044w-Dm for bug-gnu-emacs@gnu.org; Thu, 21 Feb 2013 05:49:26 -0500 Original-Received: from mail-pa0-f53.google.com ([209.85.220.53]:35209) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U8TiK-00044n-4U for bug-gnu-emacs@gnu.org; Thu, 21 Feb 2013 05:49:20 -0500 Original-Received: by mail-pa0-f53.google.com with SMTP id bg4so4627499pad.40 for ; Thu, 21 Feb 2013 02:49:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:date:from:to:subject:message-id:organization:x-mailer :mime-version:content-type:content-transfer-encoding; bh=GHI71aTd676OQaY0Kqihz/iW0me09thHRx87VINqsME=; b=VAx3/ng3UUic+jDglfLQceeXOdnyV/1WV39wIwJl55bxBpyKKh/jhh602OZHA0p0Lb kuT2D16JwB4aYLkI8hoKF17yGvJtkDl0J4uKoy+O5YpH1kZi0KbFaGet9EBbDtwmb4kc KDiDFa0PI8IaK6tvMxr/5qaFiFpnJbSL46WP1n7dBqCHY1jsVfuQgaw6xfVg18ojf34y zYkJe4P2fDhgITI5Bvp1+nlWy6dZXX1XwksyBHvdHA77bjmYBGS/Ll0iutaOAA6gcgOd 3R4n/9Oh3YUfPirKm1czm0fR0jt7rbPh+yH8bx79TkH2VTzTIB5E6HMjmOqo0EQ+vv66 45tA== X-Received: by 10.68.191.9 with SMTP id gu9mr54313878pbc.23.1361443759130; Thu, 21 Feb 2013 02:49:19 -0800 (PST) Original-Received: from Emacs ([123.114.124.215]) by mx.google.com with ESMTPS id x2sm114628969paw.8.2013.02.21.02.49.16 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 21 Feb 2013 02:49:18 -0800 (PST) X-Mailer: Sylpheed 3.2.0 (GTK+ 2.24.13; x86_64-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:71589 Archived-At: The following patch adds toolbars for Edebug and debugger-mode: *** trunk/etc/TODO.orig 2013-02-10 19:50:32.740492000 +0800 --- trunk/etc/TODO 2013-02-21 18:37:30.696132043 +0800 *************** not have one at the moment and probably *** 52,60 **** ** Check if all items on the mode-line have a suitable tooltip for all modes. - ** edebug and debugger-mode should have a toolbar. - It can use the same icons as gud. - ** Check what minor modes don't use define-minor-mode and convert them to use it. --- 52,57 ---- *** trunk/lisp/emacs-lisp/edebug.el.orig 2013-02-03 09:46:50.383143000 +0800 --- trunk/lisp/emacs-lisp/edebug.el 2013-02-21 18:10:30.220096536 +0800 *************** be installed in `emacs-lisp-mode-map'.") *** 3727,3732 **** --- 3727,3745 ---- (define-key map "\C-c\C-l" 'edebug-where) map)) + (defvar edebug-tool-bar-map + (let ((map (make-sparse-keymap))) + (dolist (x '((edebug-set-breakpoint . "gud/break") + (edebug-unset-breakpoint . "gud/remove") + (edebug-go-mode . "gud/go") + (edebug-stop . "gud/stop") + (edebug-continue-mode . "gud/cont") + (edebug-next-mode . "gud/next") + (edebug-step-mode . "gud/step")) + map) + (tool-bar-local-item-from-menu + (car x) (cdr x) map edebug-mode-map)))) + ;; Autoloading these global bindings doesn't make sense because ;; they cannot be used anyway unless Edebug is already loaded and active. *************** Options: *** 3811,3817 **** ;; exit to top level, because the edebug command loop can't usefully ;; continue running in such a case. (add-hook 'kill-buffer-hook 'edebug-kill-buffer nil t) ! (use-local-map edebug-mode-map)) (defun edebug-kill-buffer () "Used on `kill-buffer-hook' when Edebug is operating in a buffer of Lisp code." --- 3824,3831 ---- ;; exit to top level, because the edebug command loop can't usefully ;; continue running in such a case. (add-hook 'kill-buffer-hook 'edebug-kill-buffer nil t) ! (use-local-map edebug-mode-map) ! (set (make-local-variable 'tool-bar-map) edebug-tool-bar-map)) (defun edebug-kill-buffer () "Used on `kill-buffer-hook' when Edebug is operating in a buffer of Lisp code." *** trunk/lisp/emacs-lisp/debug.el.orig 2013-02-21 18:46:46.462887964 +0800 --- trunk/lisp/emacs-lisp/debug.el 2013-02-21 18:32:39.786689513 +0800 *************** Applies to the frame whose line point is *** 702,707 **** --- 702,715 ---- :help "Proceed, stepping through subexpressions of this expression")) map)) + (defvar debugger-tool-bar-map + (let ((map (make-sparse-keymap))) + (dolist (x '((debugger-continue . "gud/cont") + (debugger-step-through . "gud/step")) + map) + (tool-bar-local-item-from-menu + (car x) (cdr x) map debugger-mode-map)))) + (put 'debugger-mode 'mode-class 'special) (defun debugger-mode () *************** Complete list of commands: *** 725,730 **** --- 733,739 ---- (setq truncate-lines t) (set-syntax-table emacs-lisp-mode-syntax-table) (use-local-map debugger-mode-map) + (set (make-local-variable 'tool-bar-map) debugger-tool-bar-map) (run-mode-hooks 'debugger-mode-hook)) (defcustom debugger-record-buffer "*Debugger-record*" *** trunk/lisp/ChangeLog.orig 2013-02-17 22:42:17.309803000 +0800 --- trunk/lisp/ChangeLog 2013-02-21 18:36:47.851919598 +0800 *************** *** 1,3 **** --- 1,9 ---- + 2013-02-21 Xue Fuqiao + + * emacs-lisp/debug.el: Add a toolbar for debugger-mode. + + * emacs-lisp/edebug.el (edebug-mode): Add a toolbar. + 2013-02-17 Glenn Morris * menu-bar.el (menu-bar-tools-menu): Fix case of EDE entry. -- Best regards, Xue Fuqiao. http://www.emacswiki.org/emacs/XueFuqiao