]> code.delx.au - gnu-emacs/commitdiff
Fix customization of text-quoting-style
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 26 Aug 2015 01:46:18 +0000 (18:46 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 26 Aug 2015 02:00:21 +0000 (19:00 -0700)
* 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.

lisp/cus-edit.el
lisp/cus-start.el
lisp/wid-edit.el

index 8fea5d85f4dd511c1b3abc0f43f6da3752c79ba0..2b5ada19974bd9c44f9f6c86933a07a71ae51f46 100644 (file)
@@ -633,7 +633,7 @@ if that fails, the doc string with `custom-guess-doc-alist'."
        (setq found (nth 1 current)
              names nil)))
     (unless found
-      (let ((doc (documentation-property symbol 'variable-documentation))
+      (let ((doc (documentation-property symbol 'variable-documentation t))
            (docs custom-guess-doc-alist))
        (when doc
          (while docs
@@ -2457,7 +2457,7 @@ If INITIAL-STRING is non-nil, use that rather than \"Parent groups:\"."
   "Return documentation of VARIABLE for use in Custom buffer.
 Normally just return the docstring.  But if VARIABLE automatically
 becomes buffer local when set, append a message to that effect."
-  (format "%s%s" (documentation-property variable 'variable-documentation)
+  (format "%s%s" (documentation-property variable 'variable-documentation t)
          (if (and (local-variable-if-set-p variable)
                   (or (not (local-variable-p variable))
                       (with-temp-buffer
@@ -3995,7 +3995,7 @@ If GROUPS-ONLY is non-nil, return only those members that are groups."
         (members (custom-group-members symbol
                                        (and (eq custom-buffer-style 'tree)
                                             custom-browse-only-groups)))
-        (doc (widget-docstring widget)))
+        (doc (substitute-command-keys (widget-docstring widget))))
     (cond ((and (eq custom-buffer-style 'tree)
                (eq state 'hidden)
                (or members (custom-unloaded-widget-p widget)))
index daa95d1cb9d08dccaed34af0f38aa4ed60014932..2b9cc094f9582325afcfaa3bbea0ee6f41784301 100644 (file)
@@ -224,11 +224,9 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of
             (text-quoting-style
               help
               (choice
-               (const :tag "Quote with curved single quotes" curve)
-               (const :tag "Quote with straight apostrophes 'like this'"
-                      straight)
-               (const :tag "Quote with grave accent and apostrophe `like this'"
-                      grave)
+               (const :tag "Quote with curved single quotes \\=‘like this\\=’" curve)
+               (const :tag "Quote with straight apostrophes \\='like this\\='" straight)
+               (const :tag "Quote with grave accent and apostrophe \\=`like this\\='" grave)
                (const :tag "Use curved quotes if displayable, grave accent and apostrophe otherwise" nil))
               "25.1")
              ;; dosfns.c
index e98ac18fc5e908985680d272947f4b0808954267..0c8f4af58e11f05c293bb669ec7d53cfd6b86556 100644 (file)
@@ -1676,7 +1676,7 @@ as the argument to `documentation-property'."
                   (cond ((functionp doc-prop)
                          (funcall doc-prop value))
                         ((symbolp doc-prop)
-                         (documentation-property value doc-prop)))))))
+                         (documentation-property value doc-prop t)))))))
     (when (and (stringp doc) (> (length doc) 0))
       ;; Remove any redundant `*' in the beginning.
       (when (eq (aref doc 0) ?*)