all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: master 1ba0149 1/2: Fix curved quotes in a few places
       [not found] ` <E1Z0lWq-0007Ct-N6@vcs.savannah.gnu.org>
@ 2015-06-15 15:18   ` Artur Malabarba
  2015-06-15 19:43     ` [Emacs-diffs] " Paul Eggert
  0 siblings, 1 reply; 2+ messages in thread
From: Artur Malabarba @ 2015-06-15 15:18 UTC (permalink / raw
  To: emacs-devel, Paul Eggert; +Cc: emacs-diffs

> --- a/lisp/emacs-lisp/derived.el
> +++ b/lisp/emacs-lisp/derived.el
> @@ -331,7 +331,8 @@ 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))
> +                      (if (string-match (regexp-quote (format "[`‘]%s['’]"
> +                                                               parent))
>                                          docstring) nil
>                          (format "`%s' " parent))
>                        "might have run,\nthis mode "))

Is this correct?
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).

_______________________________________________
Emacs-diffs mailing list
Emacs-diffs@gnu.org
https://lists.gnu.org/mailman/listinfo/emacs-diffs

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Emacs-diffs] master 1ba0149 1/2: Fix curved quotes in a few places
  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
  0 siblings, 0 replies; 2+ messages in thread
From: Paul Eggert @ 2015-06-15 19:43 UTC (permalink / raw
  To: bruce.connor.am, emacs-devel; +Cc: emacs-diffs

[-- 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-06-15 19:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [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     ` [Emacs-diffs] " Paul Eggert

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.