Subject: bug#16708: 24.3.50; font-lock nadvice mechanism

From: Nicolas Richard <[email-masked]>
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.