comparison lisp/cus-edit.el @ 18367:f4682a047be1

(custom-magic-value-create): In `links' style, don't indent the member groups. (custom-group-value-create): Likewise.
author Richard M. Stallman <rms@gnu.org>
date Sat, 21 Jun 1997 18:20:23 +0000
parents 01666331d10f
children 14b3e7eb6a17
comparison
equal deleted inserted replaced
18366:2aaa07c43738 18367:f4682a047be1
1320 (match-string 2 text)))) 1320 (match-string 2 text))))
1321 (when (and custom-magic-show 1321 (when (and custom-magic-show
1322 (or (not hidden) 1322 (or (not hidden)
1323 (memq category custom-magic-show-hidden))) 1323 (memq category custom-magic-show-hidden)))
1324 (insert " ") 1324 (insert " ")
1325 (when (eq category 'group) 1325 (when (and (eq category 'group)
1326 (not (and (eq custom-buffer-style 'links)
1327 (> (widget-get parent :custom-level) 1))))
1326 (insert-char ?\ (* custom-buffer-indent 1328 (insert-char ?\ (* custom-buffer-indent
1327 (widget-get parent :custom-level)))) 1329 (widget-get parent :custom-level))))
1328 (push (widget-create-child-and-convert 1330 (push (widget-create-child-and-convert
1329 widget 'choice-item 1331 widget 'choice-item
1330 :help-echo "Change the state of this item." 1332 :help-echo "Change the state of this item."
1339 (insert text) 1341 (insert text)
1340 (insert (symbol-name state))) 1342 (insert (symbol-name state)))
1341 (when lisp 1343 (when lisp
1342 (insert " (lisp)")) 1344 (insert " (lisp)"))
1343 (insert "\n")) 1345 (insert "\n"))
1344 (when (eq category 'group) 1346 (when (and (eq category 'group)
1347 (not (and (eq custom-buffer-style 'links)
1348 (> (widget-get parent :custom-level) 1))))
1345 (insert-char ?\ (* custom-buffer-indent 1349 (insert-char ?\ (* custom-buffer-indent
1346 (widget-get parent :custom-level)))) 1350 (widget-get parent :custom-level))))
1347 (when custom-magic-show-button 1351 (when custom-magic-show-button
1348 (when custom-magic-show 1352 (when custom-magic-show
1349 (let ((indent (widget-get parent :indent))) 1353 (let ((indent (widget-get parent :indent)))
2465 (widget-put widget :children (reverse children))) 2469 (widget-put widget :children (reverse children)))
2466 (message "Creating group...done"))) 2470 (message "Creating group...done")))
2467 ;; Nested style. 2471 ;; Nested style.
2468 ((eq state 'hidden) 2472 ((eq state 'hidden)
2469 ;; Create level indicator. 2473 ;; Create level indicator.
2470 (insert-char ?\ (* custom-buffer-indent (1- level))) 2474 (unless (eq custom-buffer-style 'links)
2471 (insert "-- ") 2475 (insert-char ?\ (* custom-buffer-indent (1- level)))
2476 (insert "-- "))
2472 ;; Create tag. 2477 ;; Create tag.
2473 (let ((begin (point))) 2478 (let ((begin (point)))
2474 (insert tag) 2479 (insert tag)
2475 (widget-specify-sample widget begin (point))) 2480 (widget-specify-sample widget begin (point)))
2476 (insert " group: ") 2481 (insert " group: ")
2494 (widget-put widget :custom-magic magic) 2499 (widget-put widget :custom-magic magic)
2495 (push magic buttons)) 2500 (push magic buttons))
2496 ;; Update buttons. 2501 ;; Update buttons.
2497 (widget-put widget :buttons buttons) 2502 (widget-put widget :buttons buttons)
2498 ;; Insert documentation. 2503 ;; Insert documentation.
2504 (if (and (eq custom-buffer-style 'links) (> level 1))
2505 (widget-put widget :documentation-indent 0))
2499 (widget-default-format-handler widget ?h)) 2506 (widget-default-format-handler widget ?h))
2500 ;; Nested style. 2507 ;; Nested style.
2501 (t ;Visible. 2508 (t ;Visible.
2502 ;; Create level indicator. 2509 ;; Create level indicator.
2503 (insert-char ?\ (* custom-buffer-indent (1- level))) 2510 (insert-char ?\ (* custom-buffer-indent (1- level)))