comparison lisp/cus-edit.el @ 50077:21135e13f9cd

2003-03-10 Per Abrahamsen <abraham@dina.kvl.dk> * cus-edit.el (customize-rogue): New command.
author Per Abrahamsen <abraham@dina.kvl.dk>
date Mon, 10 Mar 2003 14:06:57 +0000
parents e8de2a4807e5
children 73ab8e5b6d65
comparison
equal deleted inserted replaced
50076:a3f6f7daf7e3 50077:21135e13f9cd
1 ;;; cus-edit.el --- tools for customizing Emacs and Lisp packages 1 ;;; cus-edit.el --- tools for customizing Emacs and Lisp packages
2 ;; 2 ;;
3 ;; Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. 3 ;; Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
4 ;; 4 ;;
5 ;; Author: Per Abrahamsen <abraham@dina.kvl.dk> 5 ;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
6 ;; Maintainer: FSF 6 ;; Maintainer: FSF
7 ;; Keywords: help, faces 7 ;; Keywords: help, faces
8 8
1083 (if (not found) 1083 (if (not found)
1084 (error "No customized user options") 1084 (error "No customized user options")
1085 (custom-buffer-create (custom-sort-items found t nil) 1085 (custom-buffer-create (custom-sort-items found t nil)
1086 "*Customize Customized*")))) 1086 "*Customize Customized*"))))
1087 1087
1088 ;;;###autoload
1089 (defun customize-rogue ()
1090 "Customize all user variable modified outside customize."
1091 (interactive)
1092 (let ((found nil))
1093 (mapatoms (lambda (symbol)
1094 (let ((cval (or (get symbol 'customized-value)
1095 (get symbol 'saved-value)
1096 (get symbol 'standard-value))))
1097 (when (and cval ;Declared with defcustom.
1098 (default-boundp symbol) ;Has a value.
1099 (not (equal (eval (car cval))
1100 ;; Which does not match customize.
1101 (default-value symbol))))
1102 (push (list symbol 'custom-variable) found)))))
1103 (if (not found)
1104 (error "No rogue user options")
1105 (custom-buffer-create (custom-sort-items found t nil)
1106 "*Customize Rogue*"))))
1088 ;;;###autoload 1107 ;;;###autoload
1089 (defun customize-saved () 1108 (defun customize-saved ()
1090 "Customize all already saved user options." 1109 "Customize all already saved user options."
1091 (interactive) 1110 (interactive)
1092 (let ((found nil)) 1111 (let ((found nil))