]> git.eshelyaron.com Git - emacs.git/commitdiff
2003-03-10 Per Abrahamsen <abraham@dina.kvl.dk>
authorPer Abrahamsen <abraham@dina.kvl.dk>
Mon, 10 Mar 2003 14:06:57 +0000 (14:06 +0000)
committerPer Abrahamsen <abraham@dina.kvl.dk>
Mon, 10 Mar 2003 14:06:57 +0000 (14:06 +0000)
* cus-edit.el (customize-rogue): New command.

lisp/ChangeLog
lisp/cus-edit.el

index e986c6604b6fe7be763ff9856de38d663a3786b5..1eb657773cd9cc2ff09c8239863c7bf0ce094840 100644 (file)
@@ -1,3 +1,7 @@
+2003-03-10  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+       * cus-edit.el (customize-rogue): New command.
+
 2003-03-10  Andreas Schwab  <schwab@suse.de>
 
        * info.el (Info-extract-menu-node-name)
index c85b2a67ac9a63b6274dbb78a10d71034c168526..18059fcd85b8cb8e8b7ad7db7289291487c53c2c 100644 (file)
@@ -1,6 +1,6 @@
 ;;; cus-edit.el --- tools for customizing Emacs and Lisp packages
 ;;
-;; Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+;; Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
 ;;
 ;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
 ;; Maintainer: FSF
@@ -1086,6 +1086,25 @@ suggest to customized that face, if it's customizable."
                            "*Customize Customized*"))))
 
 ;;;###autoload
+(defun customize-rogue ()
+  "Customize all user variable modified outside customize."
+  (interactive)
+  (let ((found nil))
+    (mapatoms (lambda (symbol)
+               (let ((cval (or (get symbol 'customized-value)
+                               (get symbol 'saved-value)
+                               (get symbol 'standard-value))))
+                 (when (and cval       ;Declared with defcustom.
+                            (default-boundp symbol) ;Has a value.
+                            (not (equal (eval (car cval)) 
+                                        ;; Which does not match customize.
+                                        (default-value symbol))))
+                   (push (list symbol 'custom-variable) found)))))
+    (if (not found)
+       (error "No rogue user options")
+      (custom-buffer-create (custom-sort-items found t nil)
+                           "*Customize Rogue*"))))
+;;;###autoload
 (defun customize-saved ()
   "Customize all already saved user options."
   (interactive)