emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Highlight advice (was: Multiple major modes)


From: Johan Bockgård
Subject: Highlight advice (was: Multiple major modes)
Date: Tue, 04 Sep 2007 11:03:30 +0200
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1.50 (gnu/linux)

Richard Stallman <address@hidden> writes:

>     > I often do that, but I don't read carefully thru the buffer thaht
>     > `describe-function' displays.  If it said something about advice, I
>     > wouldn't even notice, unless I read carefully thru the buffer to look
>     > for such.  And I am in too much of a hurry to make a practice
>     > of always reading that text carefully.
>
>     Did someone already say "highlight the advice info" in the help buffer?
>
> I have doubts that it will help that much, but it can't hurt.  Would
> someone please implement it?

2007-09-04  Johan Bockgård  <address@hidden>

        * emacs-lisp/advice.el (ad-make-advised-docstring): Highlight note
        in doc string.


Index: lisp/emacs-lisp/advice.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/emacs-lisp/advice.el,v
retrieving revision 1.54
diff -u -r1.54 advice.el
--- lisp/emacs-lisp/advice.el   28 Jul 2007 19:57:22 -0000      1.54
+++ lisp/emacs-lisp/advice.el   4 Sep 2007 08:44:59 -0000
@@ -2996,7 +2996,9 @@
     (setq usage (if (null usage) t (setq origdoc (cdr usage)) (car usage)))
     (if origdoc (setq paragraphs (list origdoc)))
     (unless (eq style 'plain)
-      (push (concat "This " origtype " is advised.") paragraphs))
+      (push (propertize (concat "This " origtype " is advised.")
+                       'face 'font-lock-warning-face)
+           paragraphs))
     (ad-dolist (class ad-advice-classes)
       (ad-dolist (advice (ad-get-enabled-advices function class))
        (setq advice-docstring


-- 
Johan Bockgård





reply via email to

[Prev in Thread] Current Thread [Next in Thread]