diff options
| author | Paul Eggert | 2015-08-25 18:46:18 -0700 |
|---|---|---|
| committer | Paul Eggert | 2015-08-25 19:00:21 -0700 |
| commit | bcfe2e0ed5018bf796cbb41465377fa1e38863b8 (patch) | |
| tree | 442098b9e75518448f4c20d28ccdbf2fdd97bf01 | |
| parent | 71781c31a4860e56434643296eaa303ca43386bb (diff) | |
| download | emacs-bcfe2e0ed5018bf796cbb41465377fa1e38863b8.tar.gz emacs-bcfe2e0ed5018bf796cbb41465377fa1e38863b8.zip | |
Fix customization of text-quoting-style
* lisp/cus-edit.el (custom-guess-type, custom-variable-documentation):
* lisp/wid-edit.el (widget-docstring):
Get raw docstring here since it’s cooked later and should not be
cooked twice.
* lisp/cus-edit.el (custom-group-value-create):
Cook the docstring before inserting it.
* lisp/cus-start.el (text-quoting-style): Quote the customization
docstrings according to the new rules. Give curved examples.
| -rw-r--r-- | lisp/cus-edit.el | 6 | ||||
| -rw-r--r-- | lisp/cus-start.el | 8 | ||||
| -rw-r--r-- | lisp/wid-edit.el | 2 |
3 files changed, 7 insertions, 9 deletions
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 8fea5d85f4d..2b5ada19974 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el | |||
| @@ -633,7 +633,7 @@ if that fails, the doc string with `custom-guess-doc-alist'." | |||
| 633 | (setq found (nth 1 current) | 633 | (setq found (nth 1 current) |
| 634 | names nil))) | 634 | names nil))) |
| 635 | (unless found | 635 | (unless found |
| 636 | (let ((doc (documentation-property symbol 'variable-documentation)) | 636 | (let ((doc (documentation-property symbol 'variable-documentation t)) |
| 637 | (docs custom-guess-doc-alist)) | 637 | (docs custom-guess-doc-alist)) |
| 638 | (when doc | 638 | (when doc |
| 639 | (while docs | 639 | (while docs |
| @@ -2457,7 +2457,7 @@ If INITIAL-STRING is non-nil, use that rather than \"Parent groups:\"." | |||
| 2457 | "Return documentation of VARIABLE for use in Custom buffer. | 2457 | "Return documentation of VARIABLE for use in Custom buffer. |
| 2458 | Normally just return the docstring. But if VARIABLE automatically | 2458 | Normally just return the docstring. But if VARIABLE automatically |
| 2459 | becomes buffer local when set, append a message to that effect." | 2459 | becomes buffer local when set, append a message to that effect." |
| 2460 | (format "%s%s" (documentation-property variable 'variable-documentation) | 2460 | (format "%s%s" (documentation-property variable 'variable-documentation t) |
| 2461 | (if (and (local-variable-if-set-p variable) | 2461 | (if (and (local-variable-if-set-p variable) |
| 2462 | (or (not (local-variable-p variable)) | 2462 | (or (not (local-variable-p variable)) |
| 2463 | (with-temp-buffer | 2463 | (with-temp-buffer |
| @@ -3995,7 +3995,7 @@ If GROUPS-ONLY is non-nil, return only those members that are groups." | |||
| 3995 | (members (custom-group-members symbol | 3995 | (members (custom-group-members symbol |
| 3996 | (and (eq custom-buffer-style 'tree) | 3996 | (and (eq custom-buffer-style 'tree) |
| 3997 | custom-browse-only-groups))) | 3997 | custom-browse-only-groups))) |
| 3998 | (doc (widget-docstring widget))) | 3998 | (doc (substitute-command-keys (widget-docstring widget)))) |
| 3999 | (cond ((and (eq custom-buffer-style 'tree) | 3999 | (cond ((and (eq custom-buffer-style 'tree) |
| 4000 | (eq state 'hidden) | 4000 | (eq state 'hidden) |
| 4001 | (or members (custom-unloaded-widget-p widget))) | 4001 | (or members (custom-unloaded-widget-p widget))) |
diff --git a/lisp/cus-start.el b/lisp/cus-start.el index daa95d1cb9d..2b9cc094f95 100644 --- a/lisp/cus-start.el +++ b/lisp/cus-start.el | |||
| @@ -224,11 +224,9 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of | |||
| 224 | (text-quoting-style | 224 | (text-quoting-style |
| 225 | help | 225 | help |
| 226 | (choice | 226 | (choice |
| 227 | (const :tag "Quote with curved single quotes" curve) | 227 | (const :tag "Quote with curved single quotes \\=‘like this\\=’" curve) |
| 228 | (const :tag "Quote with straight apostrophes 'like this'" | 228 | (const :tag "Quote with straight apostrophes \\='like this\\='" straight) |
| 229 | straight) | 229 | (const :tag "Quote with grave accent and apostrophe \\=`like this\\='" grave) |
| 230 | (const :tag "Quote with grave accent and apostrophe `like this'" | ||
| 231 | grave) | ||
| 232 | (const :tag "Use curved quotes if displayable, grave accent and apostrophe otherwise" nil)) | 230 | (const :tag "Use curved quotes if displayable, grave accent and apostrophe otherwise" nil)) |
| 233 | "25.1") | 231 | "25.1") |
| 234 | ;; dosfns.c | 232 | ;; dosfns.c |
diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el index e98ac18fc5e..0c8f4af58e1 100644 --- a/lisp/wid-edit.el +++ b/lisp/wid-edit.el | |||
| @@ -1676,7 +1676,7 @@ as the argument to `documentation-property'." | |||
| 1676 | (cond ((functionp doc-prop) | 1676 | (cond ((functionp doc-prop) |
| 1677 | (funcall doc-prop value)) | 1677 | (funcall doc-prop value)) |
| 1678 | ((symbolp doc-prop) | 1678 | ((symbolp doc-prop) |
| 1679 | (documentation-property value doc-prop))))))) | 1679 | (documentation-property value doc-prop t))))))) |
| 1680 | (when (and (stringp doc) (> (length doc) 0)) | 1680 | (when (and (stringp doc) (> (length doc) 0)) |
| 1681 | ;; Remove any redundant `*' in the beginning. | 1681 | ;; Remove any redundant `*' in the beginning. |
| 1682 | (when (eq (aref doc 0) ?*) | 1682 | (when (eq (aref doc 0) ?*) |