unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Leo <sdl.web@gmail.com>
To: 6304@debbugs.gnu.org
Cc: "Johan Bockgård" <bojohan@gnu.org>
Subject: bug#6304: 23.2; [PATCH] advising yank
Date: Sat, 22 Jan 2011 11:50:37 +0800	[thread overview]
Message-ID: <m1zkqt61gy.fsf@cam.ac.uk> (raw)
In-Reply-To: <m1bpbyxypu.fsf@cam.ac.uk>

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))))
 \f
 ;; Grokking cross-reference information in doc strings and
-- 
1.7.4.rc1






  parent reply	other threads:[~2011-01-22  3:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-29 20:03 bug#6304: 23.2; advising yank Leo
     [not found] ` <871vcuck79.fsf@gnu.org>
2010-05-30  5:57   ` Leo
2011-01-22  3:50 ` Leo [this message]
2011-01-28 21:42   ` bug#6304: 23.2; [PATCH] " Chong Yidong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m1zkqt61gy.fsf@cam.ac.uk \
    --to=sdl.web@gmail.com \
    --cc=6304@debbugs.gnu.org \
    --cc=bojohan@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).