unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#16708: 24.3.50; font-lock nadvice mechanism
@ 2014-02-10 13:20 Nicolas Richard
  2014-02-10 16:57 ` Stefan Monnier
  0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Richard @ 2014-02-10 13:20 UTC (permalink / raw)
  To: 16708

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.





^ permalink raw reply related	[flat|nested] 3+ messages in thread

* bug#16708: 24.3.50; font-lock nadvice mechanism
  2014-02-10 13:20 bug#16708: 24.3.50; font-lock nadvice mechanism Nicolas Richard
@ 2014-02-10 16:57 ` Stefan Monnier
  2018-01-29  1:25   ` Noam Postavsky
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier @ 2014-02-10 16:57 UTC (permalink / raw)
  To: Nicolas Richard; +Cc: 16708

> 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





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#16708: 24.3.50; font-lock nadvice mechanism
  2014-02-10 16:57 ` Stefan Monnier
@ 2018-01-29  1:25   ` Noam Postavsky
  0 siblings, 0 replies; 3+ messages in thread
From: Noam Postavsky @ 2018-01-29  1:25 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Nicolas Richard, 16708

close 16708
quit

Stefan Monnier <monnier@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.





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-01-29  1:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-10 13:20 bug#16708: 24.3.50; font-lock nadvice mechanism Nicolas Richard
2014-02-10 16:57 ` Stefan Monnier
2018-01-29  1:25   ` Noam Postavsky

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).