aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/cedet
diff options
context:
space:
mode:
authorPaul Eggert2015-06-19 00:35:43 -0700
committerPaul Eggert2015-06-19 00:38:45 -0700
commitc4151ebe15479de4c2e511b068cdf9af6a4576cf (patch)
tree14933519830d5da23b6962cdaff705081eb85313 /lisp/cedet
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 'lisp/cedet')
-rw-r--r--lisp/cedet/mode-local.el18
-rw-r--r--lisp/cedet/srecode/srt-mode.el4
2 files changed, 11 insertions, 11 deletions
diff --git a/lisp/cedet/mode-local.el b/lisp/cedet/mode-local.el
index 35363337aee..3bdc3ea6155 100644
--- a/lisp/cedet/mode-local.el
+++ b/lisp/cedet/mode-local.el
@@ -598,16 +598,15 @@ PROMPT, INITIAL, HIST, and DEFAULT are the same as for `completing-read'."
598(defun overload-docstring-extension (overload) 598(defun overload-docstring-extension (overload)
599 "Return the doc string that augments the description of OVERLOAD." 599 "Return the doc string that augments the description of OVERLOAD."
600 (let ((doc "\n\This function can be overloaded\ 600 (let ((doc "\n\This function can be overloaded\
601 with define-mode-local-override.") 601 with `define-mode-local-override'.")
602 (sym (overload-obsoleted-by overload))) 602 (sym (overload-obsoleted-by overload)))
603 (when sym 603 (when sym
604 (setq doc (format "%s\nIt has made the overload %s obsolete since %s." 604 (setq doc (format "%s\nIt has made the overload `%s' obsolete since %s."
605 doc sym (get sym 'overload-obsoleted-since)))) 605 doc sym (get sym 'overload-obsoleted-since))))
606 (setq sym (overload-that-obsolete overload)) 606 (setq sym (overload-that-obsolete overload))
607 (when sym 607 (when sym
608 (setq doc (format 608 (setq doc (format "%s\nThis overload is obsolete since %s;\nUse `%s' instead."
609 "%s\nThis overload is obsolete since %s;\nuse ‘%s’ instead." 609 doc (get overload 'overload-obsoleted-since) sym)))
610 doc (get overload 'overload-obsoleted-since) sym)))
611 doc)) 610 doc))
612 611
613(defun mode-local-augment-function-help (symbol) 612(defun mode-local-augment-function-help (symbol)
@@ -630,9 +629,10 @@ SYMBOL is a function that can be overridden."
630(defun mode-local-print-binding (symbol) 629(defun mode-local-print-binding (symbol)
631 "Print the SYMBOL binding." 630 "Print the SYMBOL binding."
632 (let ((value (symbol-value symbol))) 631 (let ((value (symbol-value symbol)))
633 (princ (format "\n ‘%s’ value is\n " symbol)) 632 (princ (format (substitute-command-keys "\n ‘%s’ value is\n ")
633 symbol))
634 (if (and value (symbolp value)) 634 (if (and value (symbolp value))
635 (princ (format "‘%s’" value)) 635 (princ (format (substitute-command-keys "‘%s’") value))
636 (let ((pt (point))) 636 (let ((pt (point)))
637 (pp value) 637 (pp value)
638 (save-excursion 638 (save-excursion
@@ -690,7 +690,7 @@ SYMBOL is a function that can be overridden."
690 ) 690 )
691 ((symbolp buffer-or-mode) 691 ((symbolp buffer-or-mode)
692 (setq mode buffer-or-mode) 692 (setq mode buffer-or-mode)
693 (princ (format "‘%s’\n" buffer-or-mode)) 693 (princ (format (substitute-command-keys "‘%s’\n") buffer-or-mode))
694 ) 694 )
695 ((signal 'wrong-type-argument 695 ((signal 'wrong-type-argument
696 (list 'buffer-or-mode buffer-or-mode)))) 696 (list 'buffer-or-mode buffer-or-mode))))
@@ -700,7 +700,7 @@ SYMBOL is a function that can be overridden."
700 (while mode 700 (while mode
701 (setq table (get mode 'mode-local-symbol-table)) 701 (setq table (get mode 'mode-local-symbol-table))
702 (when table 702 (when table
703 (princ (format "\n- From ‘%s’\n" mode)) 703 (princ (format (substitute-command-keys "\n- From ‘%s’\n") mode))
704 (mode-local-print-bindings table)) 704 (mode-local-print-bindings table))
705 (setq mode (get-mode-local-parent mode))))) 705 (setq mode (get-mode-local-parent mode)))))
706 706
diff --git a/lisp/cedet/srecode/srt-mode.el b/lisp/cedet/srecode/srt-mode.el
index fbc56357b1c..48f055561ea 100644
--- a/lisp/cedet/srecode/srt-mode.el
+++ b/lisp/cedet/srecode/srt-mode.el
@@ -258,9 +258,9 @@ we can tell font lock about them.")
258 (when (class-abstract-p C) 258 (when (class-abstract-p C)
259 (throw 'skip nil)) 259 (throw 'skip nil))
260 260
261 (princ "‘") 261 (princ (substitute-command-keys "‘"))
262 (princ name) 262 (princ name)
263 (princ "’") 263 (princ (substitute-command-keys "’"))
264 (when (slot-exists-p C 'key) 264 (when (slot-exists-p C 'key)
265 (when key 265 (when key
266 (princ " - Character Key: ") 266 (princ " - Character Key: ")