bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#6304: 23.2; [PATCH] advising yank


From: Leo
Subject: bug#6304: 23.2; [PATCH] advising yank
Date: Sat, 22 Jan 2011 11:50:37 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2.91 (Mac OS X 10.6.6)

>From 238f221401cbdafe1df6634cbb69480e2748cced Mon Sep 17 00:00:00 2001
Date: Sat, 22 Jan 2011 11:40:15 +0800
Subject: [PATCH] Fix bug #6304

The text property in the documentation string may be removed by
substitute-command-keys.
---
 lisp/emacs-lisp/advice.el |    4 +---
 lisp/help-mode.el         |    7 +++++++
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/lisp/emacs-lisp/advice.el b/lisp/emacs-lisp/advice.el
index 9267bc8a..02696d9e 100644
--- a/lisp/emacs-lisp/advice.el
+++ b/lisp/emacs-lisp/advice.el
@@ -3007,9 +3007,7 @@ (defun ad-make-advised-docstring (function &optional 
style)
     (setq usage (if (null usage) t (setq origdoc (cdr usage)) (car usage)))
     (if origdoc (setq paragraphs (list origdoc)))
     (unless (eq style 'plain)
-      (push (propertize (concat "This " origtype " is advised.")
-                       'face 'font-lock-warning-face)
-           paragraphs))
+      (push (concat "This " origtype " is advised.") paragraphs))
     (ad-dolist (class ad-advice-classes)
       (ad-dolist (advice (ad-get-enabled-advices function class))
        (setq advice-docstring
diff --git a/lisp/help-mode.el b/lisp/help-mode.el
index f115e425..14ff164e 100644
--- a/lisp/help-mode.el
+++ b/lisp/help-mode.el
@@ -302,6 +302,13 @@ (defun help-mode-finish ()
     ;; View mode's read-only status of existing *Help* buffer is lost
     ;; by with-output-to-temp-buffer.
     (toggle-read-only 1)
+    (save-excursion
+      (goto-char (point-min))
+      (let ((inhibit-read-only t))
+       (when (re-search-forward "^This \\w+ is advised.$" nil t)
+         (put-text-property (match-beginning 0)
+                            (match-end 0)
+                            'face 'font-lock-warning-face))))
     (help-make-xrefs (current-buffer))))
 
 ;; Grokking cross-reference information in doc strings and
-- 
1.7.4.rc1






reply via email to

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