all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: bruce.connor.am@gmail.com, emacs-devel <emacs-devel@gnu.org>
Cc: emacs-diffs@gnu.org
Subject: Re: [Emacs-diffs] master 1ba0149 1/2: Fix curved quotes in a few places
Date: Mon, 15 Jun 2015 12:43:30 -0700	[thread overview]
Message-ID: <557F2AE2.6050106@cs.ucla.edu> (raw)
In-Reply-To: <CAAdUY-Ke9MUKyrJcjkk2LCuPo5G9ifJWYMV-a3gSY+16jwZ4Ug@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 260 bytes --]

Artur Malabarba wrote:

> I think this regexp-quote was used in case “parent” contains special
> characters, but now it's also quoting the [`'] part (which I think is
> an accident).

Thanks for catching that.  I installed the attached to fix it.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Fix-quoting-when-making-derived-mode-docstring.patch --]
[-- Type: text/x-diff; name="0001-Fix-quoting-when-making-derived-mode-docstring.patch", Size: 1361 bytes --]

From 9c7c31b96e9cec4454d33eacc070577ad5541d66 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Mon, 15 Jun 2015 12:40:32 -0700
Subject: [PATCH] Fix quoting when making derived mode docstring

* lisp/emacs-lisp/derived.el (derived-mode-make-docstring):
Nest regexp-quote inside format, not the reverse.
Problem reported by Artur Malabarba in:
http://lists.gnu.org/archive/html/emacs-devel/2015-06/msg00206.html
---
 lisp/emacs-lisp/derived.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/lisp/emacs-lisp/derived.el b/lisp/emacs-lisp/derived.el
index 75bd325..52ff2aa 100644
--- a/lisp/emacs-lisp/derived.el
+++ b/lisp/emacs-lisp/derived.el
@@ -331,9 +331,10 @@ which more-or-less shadow%s %s's corresponding table%s."
 			"\n\nThis mode "
 		      (concat
 		       "\n\nIn addition to any hooks its parent mode "
-		       (if (string-match (regexp-quote (format "[`‘]%s['’]"
-                                                               parent))
-					 docstring) nil
+		       (if (string-match (format "[`‘]%s['’]"
+                                                 (regexp-quote parent))
+					 docstring)
+                           nil
 			 (format "`%s' " parent))
 		       "might have run,\nthis mode "))
 		    (format "runs the hook `%s'" hook)
-- 
2.1.0


      reply	other threads:[~2015-06-15 19:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20150605065454.27644.60231@vcs.savannah.gnu.org>
     [not found] ` <E1Z0lWq-0007Ct-N6@vcs.savannah.gnu.org>
2015-06-15 15:18   ` master 1ba0149 1/2: Fix curved quotes in a few places Artur Malabarba
2015-06-15 19:43     ` Paul Eggert [this message]

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

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

  git send-email \
    --in-reply-to=557F2AE2.6050106@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=bruce.connor.am@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=emacs-diffs@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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.