[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/cus-edit.el
From: |
Richard M. Stallman |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/cus-edit.el |
Date: |
Tue, 16 Jul 2002 09:37:22 -0400 |
Index: emacs/lisp/cus-edit.el
diff -c emacs/lisp/cus-edit.el:1.157 emacs/lisp/cus-edit.el:1.158
*** emacs/lisp/cus-edit.el:1.157 Sun Jun 9 22:51:18 2002
--- emacs/lisp/cus-edit.el Tue Jul 16 09:37:21 2002
***************
*** 698,704 ****
(interactive)
(let ((children custom-options))
(mapc (lambda (widget)
! (and (get (widget-value widget) 'standard-value)
(if (memq (widget-get widget :custom-state)
'(modified set changed saved rogue))
(widget-apply widget :custom-reset-standard))))
--- 698,704 ----
(interactive)
(let ((children custom-options))
(mapc (lambda (widget)
! (and (widget-apply widget :custom-standard-value)
(if (memq (widget-get widget :custom-state)
'(modified set changed saved rogue))
(widget-apply widget :custom-reset-standard))))
***************
*** 2051,2057 ****
:custom-save 'custom-variable-save
:custom-reset-current 'custom-redraw
:custom-reset-saved 'custom-variable-reset-saved
! :custom-reset-standard 'custom-variable-reset-standard)
(defun custom-variable-type (symbol)
"Return a widget suitable for editing the value of SYMBOL.
--- 2051,2058 ----
:custom-save 'custom-variable-save
:custom-reset-current 'custom-redraw
:custom-reset-saved 'custom-variable-reset-saved
! :custom-reset-standard 'custom-variable-reset-standard
! :custom-standard-value 'custom-variable-standard-value)
(defun custom-variable-type (symbol)
"Return a widget suitable for editing the value of SYMBOL.
***************
*** 2269,2274 ****
--- 2270,2278 ----
(t 'rogue))))
(widget-put widget :custom-state state)))
+ (defun custom-variable-standard-value (widget)
+ (get (widget-value widget) 'standard-value))
+
(defvar custom-variable-menu
'(("Set for Current Session" custom-variable-set
(lambda (widget)
***************
*** 2475,2496 ****
(defun custom-face-edit-fix-value (widget value)
"Ignoring WIDGET, convert :bold and :italic in VALUE to new form."
! (let (result)
! (while value
! (let ((key (car value))
! (val (car (cdr value))))
! (cond ((eq key :italic)
! (push :slant result)
! (push (if val 'italic 'normal) result))
! ((eq key :bold)
! (push :weight result)
! (push (if val 'bold 'normal) result))
! (t
! (push key result)
! (push val result))))
! (setq value (cdr (cdr value))))
! (setq result (nreverse result))
! result))
(defun custom-face-edit-convert-widget (widget)
"Convert :args as widget types in WIDGET."
--- 2479,2502 ----
(defun custom-face-edit-fix-value (widget value)
"Ignoring WIDGET, convert :bold and :italic in VALUE to new form."
! (if (listp value)
! (let (result)
! (while value
! (let ((key (car value))
! (val (car (cdr value))))
! (cond ((eq key :italic)
! (push :slant result)
! (push (if val 'italic 'normal) result))
! ((eq key :bold)
! (push :weight result)
! (push (if val 'bold 'normal) result))
! (t
! (push key result)
! (push val result))))
! (setq value (cdr (cdr value))))
! (setq result (nreverse result))
! result)
! value))
(defun custom-face-edit-convert-widget (widget)
"Convert :args as widget types in WIDGET."
***************
*** 2662,2667 ****
--- 2668,2674 ----
:custom-reset-current 'custom-redraw
:custom-reset-saved 'custom-face-reset-saved
:custom-reset-standard 'custom-face-reset-standard
+ :custom-standard-value 'custom-face-standard-value
:custom-menu 'custom-face-menu-create)
(define-widget 'custom-face-all 'editable-list
***************
*** 2979,2985 ****
;; face-set-spec ignores empty attribute lists, so just give it
;; something harmless instead.
(face-spec-set symbol '((t :foreground unspecified))))
! (put symbol 'saved-face value)
(put symbol 'customized-face nil)
(put symbol 'face-comment comment)
(put symbol 'customized-face-comment nil)
--- 2986,2993 ----
;; face-set-spec ignores empty attribute lists, so just give it
;; something harmless instead.
(face-spec-set symbol '((t :foreground unspecified))))
! (unless (eq (widget-get widget :custom-state) 'standard)
! (put symbol 'saved-face value))
(put symbol 'customized-face nil)
(put symbol 'face-comment comment)
(put symbol 'customized-face-comment nil)
***************
*** 3007,3012 ****
--- 3015,3023 ----
(custom-face-state-set widget)
(custom-redraw-magic widget)))
+ (defun custom-face-standard-value (widget)
+ (get (widget-value widget) 'face-defface-spec))
+
(defun custom-face-reset-standard (widget)
"Restore WIDGET to the face's standard settings.
This operation eliminates any saved setting for the face,
***************
*** 3681,3691 ****
(mapcar
(lambda (symbol)
(let ((value (get symbol 'saved-face))
! (now (not (or (get 'default 'face-defface-spec)
! (and (not (custom-facep 'default))
! (not (get 'default 'force-face))))))
! (comment (get 'default 'saved-face-comment)))
! (unless (eq symbol 'default))
;; Don't print default face here.
(unless (bolp)
(princ "\n"))
--- 3692,3701 ----
(mapcar
(lambda (symbol)
(let ((value (get symbol 'saved-face))
! (now (not (or (get symbol 'face-defface-spec)
! (and (not (custom-facep symbol))
! (not (get symbol 'force-face))))))
! (comment (get symbol 'saved-face-comment)))
;; Don't print default face here.
(unless (bolp)
(princ "\n"))
- [Emacs-diffs] Changes to emacs/lisp/cus-edit.el,
Richard M. Stallman <=