comparison lisp/cus-edit.el @ 46580:2c25b46baf82

(custom-variable-value-create): Say "Show Value", not just "Show". Also "Hide Value". Output a newline before the doc string. (custom-face-value-create): Say "Show Face" and "Hide Face".
author Richard M. Stallman <rms@gnu.org>
date Sat, 20 Jul 2002 22:14:36 +0000
parents ccaa90ab16a3
children 59fc9e6fd3e8
comparison
equal deleted inserted replaced
46579:e07579b3efcc 46580:2c25b46baf82
2118 :parent widget) 2118 :parent widget)
2119 buttons) 2119 buttons)
2120 (push (widget-create-child-and-convert 2120 (push (widget-create-child-and-convert
2121 widget 'visibility 2121 widget 'visibility
2122 :help-echo "Show the value of this option." 2122 :help-echo "Show the value of this option."
2123 :off "Show Value"
2123 :action 'custom-toggle-parent 2124 :action 'custom-toggle-parent
2124 nil) 2125 nil)
2125 buttons)) 2126 buttons))
2126 ((memq form '(lisp mismatch)) 2127 ((memq form '(lisp mismatch))
2127 ;; In lisp mode edit the saved value when possible. 2128 ;; In lisp mode edit the saved value when possible.
2135 (custom-quote (widget-get conv :value)))))) 2136 (custom-quote (widget-get conv :value))))))
2136 (insert (symbol-name symbol) ": ") 2137 (insert (symbol-name symbol) ": ")
2137 (push (widget-create-child-and-convert 2138 (push (widget-create-child-and-convert
2138 widget 'visibility 2139 widget 'visibility
2139 :help-echo "Hide the value of this option." 2140 :help-echo "Hide the value of this option."
2141 :on "Hide Value"
2142 :off "Show Value"
2140 :action 'custom-toggle-parent 2143 :action 'custom-toggle-parent
2141 t) 2144 t)
2142 buttons) 2145 buttons)
2143 (insert " ") 2146 (insert " ")
2144 (push (widget-create-child-and-convert 2147 (push (widget-create-child-and-convert
2169 buttons) 2172 buttons)
2170 (insert " ") 2173 (insert " ")
2171 (push (widget-create-child-and-convert 2174 (push (widget-create-child-and-convert
2172 widget 'visibility 2175 widget 'visibility
2173 :help-echo "Hide the value of this option." 2176 :help-echo "Hide the value of this option."
2177 :on "Hide Value"
2178 :off "Show Value"
2174 :action 'custom-toggle-parent 2179 :action 'custom-toggle-parent
2175 t) 2180 t)
2176 buttons) 2181 buttons)
2177 (push (widget-create-child-and-convert 2182 (push (widget-create-child-and-convert
2178 widget type 2183 widget type
2191 ;; before the call to `widget-default-format-handler'. Otherwise, I 2196 ;; before the call to `widget-default-format-handler'. Otherwise, I
2192 ;; loose my current `buttons'. This function shouldn't be called like 2197 ;; loose my current `buttons'. This function shouldn't be called like
2193 ;; this anyway. The doc string widget should be added like the others. 2198 ;; this anyway. The doc string widget should be added like the others.
2194 ;; --dv 2199 ;; --dv
2195 (widget-put widget :buttons buttons) 2200 (widget-put widget :buttons buttons)
2201 (insert "\n")
2196 ;; Insert documentation. 2202 ;; Insert documentation.
2197 (widget-default-format-handler widget ?h) 2203 (widget-default-format-handler widget ?h)
2198 2204
2199 ;; The comment field 2205 ;; The comment field
2200 (unless (eq state 'hidden) 2206 (unless (eq state 'hidden)
2781 ;; Visibility. 2787 ;; Visibility.
2782 (insert " ") 2788 (insert " ")
2783 (push (widget-create-child-and-convert 2789 (push (widget-create-child-and-convert
2784 widget 'visibility 2790 widget 'visibility
2785 :help-echo "Hide or show this face." 2791 :help-echo "Hide or show this face."
2792 :on "Hide Face"
2793 :off "Show Face"
2786 :action 'custom-toggle-parent 2794 :action 'custom-toggle-parent
2787 (not (eq state 'hidden))) 2795 (not (eq state 'hidden)))
2788 buttons) 2796 buttons)
2789 ;; Magic. 2797 ;; Magic.
2790 (insert "\n") 2798 (insert "\n")