aboutsummaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorPaul Eggert2015-08-14 15:50:35 -0700
committerPaul Eggert2015-08-14 15:55:57 -0700
commit244c801689d2f7a80480d83cd7d092d4762ebe08 (patch)
tree6a07abc8b26966002de304b3546f3ccbebb2c865 /etc
parent293775f10555f7da7e61ed8dbdb78d72f30f7e2d (diff)
downloademacs-244c801689d2f7a80480d83cd7d092d4762ebe08.tar.gz
emacs-244c801689d2f7a80480d83cd7d092d4762ebe08.zip
Extend ‘format’ to translate curved quotes
This is a followup to the recent doc string change, and deals with diagnostics and the like. This patch is more conservative than the doc string change, in that the behavior of ‘format’ changes only if its first arg contains curved quotes and the user prefers straight or grave quotes. (Come to think of it, perhaps we should be similarly conservative with doc strings too, but that can wait.) The upside of this conservatism is that existing usage is almost surely unaffected. The downside is that we'll eventually have to change Emacs's format strings to use curved quotes in places where the user might want curved quotes, but that's a simple and mechanical translation that I'm willing to do later. (Bug#21222) * doc/lispref/help.texi (Keys in Documentation): Move description of text-quoting-style from here ... * doc/lispref/strings.texi (Formatting Strings): ... to here, and describe new behavior of ‘format’. * etc/NEWS: Describe new behavior. * lisp/calc/calc-help.el (calc-describe-thing): * lisp/emacs-lisp/derived.el (derived-mode-make-docstring): * lisp/info.el (Info-find-index-name): Use ‘concat’ rather than ‘format’ to avoid misinterpretation of recently-added curved quotes. * src/doc.c (uLSQM0, uLSQM1, uLSQM2, uRSQM0, uRSQM1, uRSQM2): Move from here ... * src/lisp.h: ... to here. * src/doc.c (text_quoting_style): New function. (Fsubstitute_command_keys): Use it. * src/editfns.c (Fformat): Implement new behavior. * src/lisp.h (enum text_quoting_style): New enum.
Diffstat (limited to 'etc')
-rw-r--r--etc/NEWS25
1 files changed, 17 insertions, 8 deletions
diff --git a/etc/NEWS b/etc/NEWS
index 3ec16f54458..f131981647d 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -895,16 +895,25 @@ denied" instead of "permission denied". The old behavior was problematic
895in languages like German where downcasing rules depend on grammar. 895in languages like German where downcasing rules depend on grammar.
896 896
897+++ 897+++
898** ‘format’ now replaces curved single quotes.
899That is, it replaces strings' curved single quotes (also known as
900curly quotes) as per the value of the new custom variable
901‘text-quoting-style’: ‘curve’ means replace curved quotes with
902themselves ‘like this’, ‘straight’ means use straight apostrophes
903'like this', ‘grave’ means use grave accent and apostrophe `like
904this', and nil (default) means use curved quotes if displayable and
905grave accent and apostrophe otherwise. Because it now may be used
906in many contexts where it's a no-op, ‘format’ is no longer required to
907create a string, and may return its first argument if the argument
908already has the correct value.
909
910+++
898** substitute-command-keys now replaces quotes. 911** substitute-command-keys now replaces quotes.
899That is, it converts documentation strings' quoting style as per the 912That is, it converts documentation strings' quoting style as per the
900value of the new custom variable ‘text-quoting-style’: ‘curve’ means 913value of ‘text-quoting-style’ as described above. Doc strings in
901use curved quotes (also known as curly quotes) ‘like this’, ‘straight’ 914source code can use either curved quotes or grave accent and
902means use straight apostrophes 'like this', ‘grave’ means use grave 915apostrophe. As before, isolated apostrophes and characters preceded
903accent and apostrophe `like this', and nil (default) means use curved 916by \= are output as-is.
904quotes if displayable and grave accent and apostrophe otherwise. Doc
905strings in source code can use either curved quotes or grave accent
906and apostrophe. As before, isolated apostrophes and characters
907preceded by \= are output as-is.
908 917
909+++ 918+++
910** The character classes [:alpha:] and [:alnum:] in regular expressions 919** The character classes [:alpha:] and [:alnum:] in regular expressions