GNU bug report logs - #16708
24.3.50; font-lock nadvice mechanism

Previous Next

Package: emacs;

Reported by: Nicolas Richard <theonewiththeevillook <at> yahoo.fr>

Date: Mon, 10 Feb 2014 13:21:02 UTC

Severity: wishlist

Found in version 24.3.50

Done: Noam Postavsky <npostavs <at> users.sourceforge.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 16708 in the body.
You can then email your comments to 16708 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#16708; Package emacs. (Mon, 10 Feb 2014 13:21:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Nicolas Richard <theonewiththeevillook <at> yahoo.fr>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 10 Feb 2014 13:21:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Richard <theonewiththeevillook <at> yahoo.fr>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3.50; font-lock nadvice mechanism
Date: Mon, 10 Feb 2014 14:20:10 +0100
Hi,

I suggest to add `add-function' and `advice-add' (which are used instead
of defadvice at some places) to the font-lock in lisp mode, just as
defadvice is.

Perhaps lisp-imenu-generic-expression should be updated too, I don't
know what it is exactly.

e.g.

diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index db15aea..8fe7095 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -170,7 +170,7 @@ It has `lisp-mode-abbrev-table' as its parent."
                          "ignore-errors" "dotimes" "dolist" "declare"))
               (lisp-errs '("warn" "error" "signal"))
               ;; Elisp constructs.  FIXME: update dynamically from obarray.
-              (el-fdefs '("defadvice" "defalias"
+              (el-fdefs '("defadvice" "add-function" "advice-add" "defalias"
                           "define-derived-mode" "define-minor-mode"
                           "define-generic-mode" "define-global-minor-mode"
                           "define-globalized-minor-mode" "define-skeleton"

-- 
Nico.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16708; Package emacs. (Mon, 10 Feb 2014 16:58:02 GMT) Full text and rfc822 format available.

Message #8 received at 16708 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Nicolas Richard <theonewiththeevillook <at> yahoo.fr>
Cc: 16708 <at> debbugs.gnu.org
Subject: Re: bug#16708: 24.3.50; font-lock nadvice mechanism
Date: Mon, 10 Feb 2014 11:57:23 -0500
> I suggest to add `add-function' and `advice-add' (which are used instead
> of defadvice at some places) to the font-lock in lisp mode, just as
> defadvice is.

It might be OK for advice-add but I'm not sure it makes sense for
add-function.

> Perhaps lisp-imenu-generic-expression should be updated too, I don't
> know what it is exactly.

No, imenu should point to the "definition site", whereas advice-add does
not define a function, it merely modifies it.


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16708; Package emacs. (Mon, 29 Jan 2018 01:27:02 GMT) Full text and rfc822 format available.

Message #11 received at 16708 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> users.sourceforge.net>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Nicolas Richard <theonewiththeevillook <at> yahoo.fr>, 16708 <at> debbugs.gnu.org
Subject: Re: bug#16708: 24.3.50; font-lock nadvice mechanism
Date: Sun, 28 Jan 2018 20:25:58 -0500
close 16708
quit

Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

>> I suggest to add `add-function' and `advice-add' (which are used instead
>> of defadvice at some places) to the font-lock in lisp mode, just as
>> defadvice is.
>
> It might be OK for advice-add but I'm not sure it makes sense for
> add-function.

Well, since we now highlight all macros, add-function is hightlighted,
but advice-add isn't.  I don't think it's worth special casing it.




bug closed, send any further explanations to 16708 <at> debbugs.gnu.org and Nicolas Richard <theonewiththeevillook <at> yahoo.fr> Request was from Noam Postavsky <npostavs <at> users.sourceforge.net> to control <at> debbugs.gnu.org. (Mon, 29 Jan 2018 01:27:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 26 Feb 2018 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 7 years and 176 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.