[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Multiple major modes
From: |
Johan Bockgård |
Subject: |
Re: Multiple major modes |
Date: |
Sat, 07 Jul 2007 02:48:20 +0200 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/22.1.50 (gnu/linux) |
Richard Stallman <address@hidden> 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
- Re: Multiple major modes, (continued)
- Re: Multiple major modes, Stephen J. Turnbull, 2007/07/07
- Re: Multiple major modes, Stefan Monnier, 2007/07/06
- RE: Multiple major modes, Drew Adams, 2007/07/06
- Re: Multiple major modes, Richard Stallman, 2007/07/07
- Re: Multiple major modes, Stephen J. Turnbull, 2007/07/07
- Re: Multiple major modes, Richard Stallman, 2007/07/08
- Re: Multiple major modes, Stephen J. Turnbull, 2007/07/09
- Re: Multiple major modes, Richard Stallman, 2007/07/09
- Re: Multiple major modes,
Johan Bockgård <=
Re[2]: Multiple major modes, Eric M. Ludlam, 2007/07/04
Re: Multiple major modes, Richard Stallman, 2007/07/01