all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#23867: 25.1.50; Doc string containing `\N'
@ 2016-06-29  9:44 Tino Calancha
  2016-06-29  9:52 ` Andreas Schwab
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Tino Calancha @ 2016-06-29  9:44 UTC (permalink / raw)
  To: 23867


After commit
de7d5f36e0f3261a7300fa3a3d87ae3b758b8a73
a doc string cannot contain `\N'.  It should be
written `\\N'.

For instance:
emacs -Q
;; create a file foo.el with contents:

(defun foo ()
   "Test characters allowed in doc strings.
The following char is not allowed: `\N'
You need to double the slash."
   (interactive)
   (message "Test for doc strings"))

;; Load the file:
;; invalid-read-syntax Expected opening brace after \N

I saw 3rd party code with doc strings containing `\N'.
Should that 3rd party code update to `\\N'?
Or is OK to allow doc strings with `\N'?


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
diff --git a/src/lread.c b/src/lread.c
index 5c47f78..7643d49 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -2390,6 +2390,8 @@ read_escape (Lisp_Object readcharfun, bool stringp)
        /* Named character.  */
        {
          c = READCHAR;
+        if (c == '\'')
+          return c;
          if (c != '{')
            invalid_syntax ("Expected opening brace after \\N");
          char name[UNICODE_CHARACTER_NAME_LENGTH_BOUND + 1];


GNU Emacs 25.1.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.20.6) of 
2016-06-29
Repository revision: 4a2a1eba09e5bbc37b853733708feae17f1425f5






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

end of thread, other threads:[~2016-07-06 15:35 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-29  9:44 bug#23867: 25.1.50; Doc string containing `\N' Tino Calancha
2016-06-29  9:52 ` Andreas Schwab
2016-06-29 10:01   ` Tino Calancha
2016-06-29 14:00     ` Drew Adams
2016-06-29 14:15       ` Andreas Schwab
2016-06-29 14:44       ` Noam Postavsky
2016-07-04 16:43 ` Glenn Morris
2016-07-06 14:56 ` Paul Eggert
2016-07-06 15:35   ` Glenn Morris

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.