aboutsummaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorPaul Eggert2015-06-19 00:35:43 -0700
committerPaul Eggert2015-06-19 00:38:45 -0700
commitc4151ebe15479de4c2e511b068cdf9af6a4576cf (patch)
tree14933519830d5da23b6962cdaff705081eb85313 /etc
parentaad7ea32c57c7b9673a8d429524e050dac2d210c (diff)
downloademacs-c4151ebe15479de4c2e511b068cdf9af6a4576cf.tar.gz
emacs-c4151ebe15479de4c2e511b068cdf9af6a4576cf.zip
Improve the optional translation of quotes
Fix several problems with the recently-added custom variable help-quote-translation where the code would quote inconsistently in help buffers. Add support for quoting 'like this', which is common in other GNU programs in ASCII environments. Change help-quote-translation to use more mnemonic values: values are now the initial quoting char, e.g., (setq help-quote-translation ?`) gets the traditional Emacs help-buffer quoting style `like this'. Change the default behavior of substitute-command-keys to match what's done in set-locale-environment, i.e., quote ‘like this’ if displayable, 'like this' otherwise. * doc/lispref/help.texi (Keys in Documentation): Document new behavior of substitute-command-keys, and document help-quote-translation. * doc/lispref/tips.texi (Documentation Tips): Mention the effect of help-quote-translation. * etc/NEWS: Mention new behavior of substitute-command-keys, and merge help-quote-translation news into it. When talking about doc strings, mention new ways to type quotes. * lisp/cedet/mode-local.el (overload-docstring-extension): Revert my recent change to this function, which shouldn't be needed as the result is a doc string. * lisp/cedet/mode-local.el (mode-local-print-binding) (mode-local-describe-bindings-2): * lisp/cedet/srecode/srt-mode.el (srecode-macro-help): * lisp/cus-theme.el (describe-theme-1): * lisp/descr-text.el (describe-text-properties-1, describe-char): * lisp/emacs-lisp/cl-generic.el (cl--generic-describe): * lisp/emacs-lisp/eieio-opt.el (eieio-help-class) (eieio-help-constructor): * lisp/emacs-lisp/package.el (describe-package-1): * lisp/faces.el (describe-face): * lisp/help-fns.el (help-fns--key-bindings) (help-fns--compiler-macro, help-fns--parent-mode) (help-fns--obsolete, help-fns--interactive-only) (describe-function-1, describe-variable): * lisp/help.el (describe-mode): Use substitute-command-keys to ensure a more-consistent quoting style in help buffers. * lisp/cus-start.el (standard): Document new help-quote-translation behavior. * lisp/emacs-lisp/lisp-mode.el (lisp-fdefs): * lisp/help-mode.el (help-xref-symbol-regexp, help-xref-info-regexp) (help-xref-url-regexp): * lisp/international/mule-cmds.el (help-xref-mule-regexp-template): * lisp/wid-edit.el (widget-documentation-link-regexp): Also match 'foo', in case we're in a help buffer generated when help-quote-translation is ?'. * src/doc.c: Include disptab.h, for DISP_CHAR_VECTOR. (LEFT_SINGLE_QUOTATION_MARK, uLSQM0, uLSQM1, uLSQM2, uRSQM0) (uRSQM1, uRSQM2, LSQM, RSQM): New constants. (Fsubstitute_command_keys): Document and implement new behavior. (Vhelp_quote_translation): Document new behavior.
Diffstat (limited to 'etc')
-rw-r--r--etc/NEWS23
1 files changed, 14 insertions, 9 deletions
diff --git a/etc/NEWS b/etc/NEWS
index 1611c7a7926..bab1b41e759 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -845,11 +845,16 @@ when signaling a file error. For example, it now reports "Permission
845denied" instead of "permission denied". The old behavior was problematic 845denied" instead of "permission denied". The old behavior was problematic
846in languages like German where downcasing rules depend on grammar. 846in languages like German where downcasing rules depend on grammar.
847 847
848** (substitute-command-keys "`foo'") now returns "‘foo’". 848** substitute-command-keys now replaces quotes.
849That is, it replaces grave accents by left single quotation marks, and 849That is, it replaces left single quotation marks (‘) by left quotes
850apostrophes that match grave accents by right single quotation marks. 850and right single quotation marks (’) by right quotes. It also
851As before, isolated apostrophes and characters preceded by \= are 851replaces grave accents by left quotes, and apostrophes that match
852output as-is. 852grave accents by right quotes. As before, isolated apostrophes and
853characters preceded by \= are output as-is. Left and right quotes are
854determined by new custom variable ‘help-quote-translation’. ?‘ means
855quote ‘like this’, ?' means quote 'like this', ?` means quote `like
856this', and nil (default) means quote ‘like this’ if displayable and
857'like this' otherwise.
853 858
854+++ 859+++
855** The character classes [:alpha:] and [:alnum:] in regular expressions 860** The character classes [:alpha:] and [:alnum:] in regular expressions
@@ -956,10 +961,10 @@ directory at point.
956** Documentation strings now support quoting with curved single quotes 961** Documentation strings now support quoting with curved single quotes
957‘like-this’ in addition to the old style with grave accent and 962‘like-this’ in addition to the old style with grave accent and
958apostrophe `like-this'. The new style looks better on today's displays. 963apostrophe `like-this'. The new style looks better on today's displays.
959When an old-style string is copied to a help buffer it is converted to 964In the new Electric Quote mode, you can enter curved single quotes
960the new style. 965into documentation by typing ` and '. Outside Electric Quote mode,
961 966you can enter them by typing ‘C-x 8 [’ and ‘C-x 8 ]’, or (if your Alt
962** New option `help-quote-translation'. 967key works) by typing ‘A-[’ and ‘A-]’.
963 968
964+++ 969+++
965** Time-related changes: 970** Time-related changes: