aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeo Liu2011-01-28 16:42:11 -0500
committerChong Yidong2011-01-28 16:42:11 -0500
commitb1ea593c8121821485fdc758a30efdf03bb63168 (patch)
treecf627656a45157cd1d137c4d9995785ed6fff39e
parent40e22d80ae027f2a833be444d95bce832b68e54c (diff)
downloademacs-b1ea593c8121821485fdc758a30efdf03bb63168.tar.gz
emacs-b1ea593c8121821485fdc758a30efdf03bb63168.zip
Fix help-mode highlighting of advice warning (Bug#6304).
* emacs-lisp/advice.el (ad-make-advised-docstring): Don't apply highlighting to the "this function is advisted" message. * help-mode.el (help-mode-finish): Apply highlighting here, to avoid clobbering by substitute-command-keys (Bug#6304).
-rw-r--r--lisp/ChangeLog8
-rw-r--r--lisp/emacs-lisp/advice.el4
-rw-r--r--lisp/help-mode.el9
3 files changed, 18 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 272c1359008..ff99d22303f 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,11 @@
12011-01-28 Leo <sdl.web@gmail.com>
2
3 * emacs-lisp/advice.el (ad-make-advised-docstring): Don't apply
4 highlighting to the "this function is advisted" message.
5
6 * help-mode.el (help-mode-finish): Apply highlighting here, to
7 avoid clobbering by substitute-command-keys (Bug#6304).
8
12011-01-28 Chong Yidong <cyd@stupidchicken.com> 92011-01-28 Chong Yidong <cyd@stupidchicken.com>
2 10
3 * woman.el (woman0-roff-buffer): Process roff escape sequences 11 * woman.el (woman0-roff-buffer): Process roff escape sequences
diff --git a/lisp/emacs-lisp/advice.el b/lisp/emacs-lisp/advice.el
index a1a3c3e5f93..915a726ae11 100644
--- a/lisp/emacs-lisp/advice.el
+++ b/lisp/emacs-lisp/advice.el
@@ -3007,9 +3007,7 @@ in any of these classes."
3007 (setq usage (if (null usage) t (setq origdoc (cdr usage)) (car usage))) 3007 (setq usage (if (null usage) t (setq origdoc (cdr usage)) (car usage)))
3008 (if origdoc (setq paragraphs (list origdoc))) 3008 (if origdoc (setq paragraphs (list origdoc)))
3009 (unless (eq style 'plain) 3009 (unless (eq style 'plain)
3010 (push (propertize (concat "This " origtype " is advised.") 3010 (push (concat "This " origtype " is advised.") paragraphs))
3011 'face 'font-lock-warning-face)
3012 paragraphs))
3013 (ad-dolist (class ad-advice-classes) 3011 (ad-dolist (class ad-advice-classes)
3014 (ad-dolist (advice (ad-get-enabled-advices function class)) 3012 (ad-dolist (advice (ad-get-enabled-advices function class))
3015 (setq advice-docstring 3013 (setq advice-docstring
diff --git a/lisp/help-mode.el b/lisp/help-mode.el
index cafd7d07fde..826145d7af0 100644
--- a/lisp/help-mode.el
+++ b/lisp/help-mode.el
@@ -325,6 +325,15 @@ Commands:
325 ;; View mode's read-only status of existing *Help* buffer is lost 325 ;; View mode's read-only status of existing *Help* buffer is lost
326 ;; by with-output-to-temp-buffer. 326 ;; by with-output-to-temp-buffer.
327 (toggle-read-only 1) 327 (toggle-read-only 1)
328
329 (save-excursion
330 (goto-char (point-min))
331 (let ((inhibit-read-only t))
332 (when (re-search-forward "^This \\w+ is advised.$" nil t)
333 (put-text-property (match-beginning 0)
334 (match-end 0)
335 'face 'font-lock-warning-face))))
336
328 (help-make-xrefs (current-buffer)))) 337 (help-make-xrefs (current-buffer))))
329 338
330;; Grokking cross-reference information in doc strings and 339;; Grokking cross-reference information in doc strings and