From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: debug-on-entry question Date: Sun, 19 Jun 2005 17:03:38 +0300 Organization: JURTA Message-ID: <873breo37h.fsf@jurta.org> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1119193260 17123 80.91.229.2 (19 Jun 2005 15:01:00 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 19 Jun 2005 15:01:00 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jun 19 17:00:58 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Dk1Hp-00034a-Le for ged-emacs-devel@m.gmane.org; Sun, 19 Jun 2005 17:00:37 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dk1Nr-0007nS-Ts for ged-emacs-devel@m.gmane.org; Sun, 19 Jun 2005 11:06:51 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Dk1KI-0006Rn-NM for emacs-devel@gnu.org; Sun, 19 Jun 2005 11:03:10 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Dk1KC-0006Oq-F1 for emacs-devel@gnu.org; Sun, 19 Jun 2005 11:03:05 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dk1KA-0006F1-Cj for emacs-devel@gnu.org; Sun, 19 Jun 2005 11:03:02 -0400 Original-Received: from [194.126.101.111] (helo=mail.neti.ee) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Dk12G-0008Nb-77 for emacs-devel@gnu.org; Sun, 19 Jun 2005 10:44:32 -0400 Original-Received: from mail.neti.ee (80-235-34-231-dsl.mus.estpak.ee [80.235.34.231]) by Relayhost2.neti.ee (Postfix) with ESMTP id 100E5214E for ; Sun, 19 Jun 2005 17:42:00 +0300 (EEST) Original-To: emacs-devel@gnu.org In-Reply-To: (Yoni Rabkin Katzenell's message of "Sat, 18 Jun 2005 13:03:31 +0300") User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) X-Virus-Scanned: by amavisd-new-2.2.1 (20041222) (Debian) at neti.ee 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 Xref: news.gmane.org gmane.emacs.devel:39115 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:39115 > Is there an existing function which performs the following? > > (defun debug-on-entry-at-point () > "Perform \\[debug-on-entry] on the function at point." > (let ((fn (function-called-at-point))) > (if fn > (debug-on-entry fn) > (message "No function at point")))) A better way to do this is to change the interactive specification of `debug-on-entry' to call `function-called-at-point'. For post-release: it would be good to rewrite the function `call-interactively' in Lisp which will allow easy modification of reading arguments according to code letters (e.g. in this particular case adding a call to `function-called-at-point' for the code letter `a'). -- Juri Linkov http://www.jurta.org/emacs/