/[emacs]/emacs/lisp/cus-edit.el
ViewVC logotype

Diff of /emacs/lisp/cus-edit.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.138 by rms, Tue Nov 27 05:25:55 2001 UTC revision 1.139 by rms, Mon Dec 31 20:13:54 2001 UTC
# Line 2459  restoring it to the state of a variable Line 2459  restoring it to the state of a variable
2459    :tag "Attributes"    :tag "Attributes"
2460    :extra-offset 12    :extra-offset 12
2461    :button-args '(:help-echo "Control whether this attribute has any effect.")    :button-args '(:help-echo "Control whether this attribute has any effect.")
2462      :value-to-internal 'custom-face-edit-fix-value
2463      :match (lambda (widget value)
2464               (widget-checklist-match widget
2465                                       (custom-face-edit-fix-value widget value)))
2466    :convert-widget 'custom-face-edit-convert-widget    :convert-widget 'custom-face-edit-convert-widget
2467    :args (mapcar (lambda (att)    :args (mapcar (lambda (att)
2468                    (list 'group                    (list 'group
# Line 2468  restoring it to the state of a variable Line 2472  restoring it to the state of a variable
2472                          (nth 1 att)))                          (nth 1 att)))
2473                  custom-face-attributes))                  custom-face-attributes))
2474    
2475    (defun custom-face-edit-fix-value (widget value)
2476      "Ignoring WIDGET, convert :bold and :italic in VALUE to new form."
2477      (let (result)
2478        (while value
2479          (assert (cdr value))
2480          (let ((key (car value))
2481                (val (car (cdr value))))
2482            (cond ((eq key :italic)
2483                   (push :slant result)
2484                   (push (if val 'italic 'normal) result))
2485                  ((eq key :bold)
2486                   (push :weight result)
2487                   (push (if val 'bold 'normal) result))
2488                  (t
2489                   (push key result)
2490                   (push val result))))
2491          (setq value (cdr (cdr value))))
2492        (setq result (nreverse result))
2493        result))
2494    
2495  (defun custom-face-edit-convert-widget (widget)  (defun custom-face-edit-convert-widget (widget)
2496    "Convert :args as widget types in WIDGET."    "Convert :args as widget types in WIDGET."
2497    (widget-put    (widget-put

Legend:
Removed from v.1.138  
changed lines
  Added in v.1.139

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26