From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: bojohan+news@dd.chalmers.se (Johan =?utf-8?Q?Bockg=C3=A5rd?=) Newsgroups: gmane.emacs.devel Subject: Re: Multiple major modes Date: Sat, 07 Jul 2007 02:48:20 +0200 Message-ID: References: <466E7A93.3050705@gmail.com> <466E81AA.3030202@gnu.org> <466E9822.2050508@gmail.com> <466EAB9D.9020408@gnu.org> <466EEA71.2070700@gmail.com> <200706122014.l5CKEKV1021902@projectile.siege-engine.com> <200706190209.l5J29Csr010302@projectile.siege-engine.com> <200706251404.l5PE4dgc011720@projectile.siege-engine.com> <18059.52286.486779.619378@gargle.gargle.HOWL> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1183769324 9982 80.91.229.12 (7 Jul 2007 00:48:44 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 7 Jul 2007 00:48:44 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jul 07 02:48:42 2007 connect(): Connection refused Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1I6yTW-0008Mg-Ph for ged-emacs-devel@m.gmane.org; Sat, 07 Jul 2007 02:48:39 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I6yTW-0006nc-7S for ged-emacs-devel@m.gmane.org; Fri, 06 Jul 2007 20:48:38 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1I6yTT-0006nD-03 for emacs-devel@gnu.org; Fri, 06 Jul 2007 20:48:35 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1I6yTQ-0006n1-ML for emacs-devel@gnu.org; Fri, 06 Jul 2007 20:48:33 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I6yTQ-0006my-JN for emacs-devel@gnu.org; Fri, 06 Jul 2007 20:48:32 -0400 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1I6yTQ-0007HP-4k for emacs-devel@gnu.org; Fri, 06 Jul 2007 20:48:32 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1I6yTK-0004jb-I5 for emacs-devel@gnu.org; Sat, 07 Jul 2007 02:48:26 +0200 Original-Received: from remote5.student.chalmers.se ([129.16.29.83]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 07 Jul 2007 02:48:26 +0200 Original-Received: from bojohan+news by remote5.student.chalmers.se with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 07 Jul 2007 02:48:26 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-Lines: 41 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: remote5.student.chalmers.se Mail-Copies-To: never User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.1.50 (gnu/linux) Cancel-Lock: sha1:qTCBspwcBIbBWgy2J1exBl6c3+U= X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) 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:74422 Archived-At: Richard Stallman writes: > This suggests an idea to me. Maybe Emacs could highlight the function > definition somehow, to indicate that the function has been advised. FWIW, there is already an entry in TODO ** Emacs Lisp mode could put an overlay on the defun for every function that has advice. The overlay could have `after-text' like " [Function has advice]". It might look like (defun foo [Function has advice] (x y) The overlay could also be a button that you could use to view the advice. > That might solve the problem that makes advising bad for debugging. Here's an example where advice can be really confusing: ;; See ad-default-compilation-action (require 'bytecomp) (defun foo (x y) (+ x y)) (defadvice foo (before bar activate) (car x)) (foo 1 2) => Debugger entered--Lisp error: (wrong-type-argument listp 1) foo(1 2) eval((foo 1 2)) eval-last-sexp-1(nil) eval-last-sexp(nil) call-interactively(eval-last-sexp) (If the advice is not compiled "car(1)" is present in the backtrace.) -- Johan Bockgård