From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/50566 Path: main.gmane.org!not-for-mail From: Per Abrahamsen Newsgroups: gmane.emacs.gnus.general Subject: Re: convert from setq to customization Date: Wed, 05 Mar 2003 14:31:17 +0100 Organization: The Church of Emacs Sender: owner-ding@hpc.uh.edu Message-ID: References: <86u1em4wdn.fsf@red.stonehenge.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1046878869 6371 80.91.224.249 (5 Mar 2003 15:41:09 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 5 Mar 2003 15:41:09 +0000 (UTC) Original-X-From: owner-ding@hpc.uh.edu Wed Mar 05 16:41:05 2003 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18qb0y-0001eK-00 for ; Wed, 05 Mar 2003 16:41:04 +0100 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 18qb10-00038e-00; Wed, 05 Mar 2003 09:41:06 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Wed, 05 Mar 2003 09:42:06 -0600 (CST) Original-Received: from main.gmane.org (main.gmane.org [80.91.224.249]) by sina.hpc.uh.edu (8.9.3/8.9.3) with ESMTP id JAA03304 for ; Wed, 5 Mar 2003 09:41:54 -0600 (CST) Original-Received: from root by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 18qb07-0001ad-00 for ; Wed, 05 Mar 2003 16:40:11 +0100 Mail-Followup-To: ding@hpc.uh.edu X-Injected-Via-Gmane: http://gmane.org/ Original-To: ding@hpc.uh.edu Original-Received: from news by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 18qYyw-0000W1-00 for ; Wed, 05 Mar 2003 14:30:50 +0100 Original-Lines: 30 Original-X-Complaints-To: usenet@main.gmane.org X-Face: +kRV2]2q}lixHkE{U)mY#+6]{AH=yN~S9@IFiOa@X6?GM|8MBp/ Mail-Copies-To: nobody User-Agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.1 (sparc-sun-solaris2.8) Cancel-Lock: sha1:ads2dHJzOpgjfRDNywl/l+ObLkg= Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:50566 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:50566 merlyn@stonehenge.com (Randal L. Schwartz) writes: > Is there any trivial way for me to tell the customization stuff to > look at the current values of things, and absorb them as customize > settings? Am I making any sense? Interesting idea, try this function. It list all user options that have been changed outside customize. (defun customize-rogue () "Customize all user options 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. (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*")))) Unfortuntely, there is too much rude Lisp code that changes user setings for this to be really useful.