unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Luc Teirlinck <teirllm@dms.auburn.edu>
Cc: emacs-devel@gnu.org
Subject: Re: [Martin.Buchmann@uni-jena.de: Re: erase customization does not work]
Date: Mon, 21 Nov 2005 22:24:40 -0600 (CST)	[thread overview]
Message-ID: <200511220424.jAM4OeU00610@raven.dms.auburn.edu> (raw)
In-Reply-To: <E1Edc6j-00029z-Ng@fencepost.gnu.org> (rms@gnu.org)

There was a mistake in my previous patch.  Below is a corrected version.

Also, unlike what I told before, the question would always be asked in
group buffers, even if they contained only one item (which is rare),
but not in buffers gotten with customize-option or customize-face (my
main concern).  The question would also not be asked in non-group
buffers with only one option, say buffers gotten with
customize-apropos, where the search yielded only one result.  (These
are the ones that are difficult to distinguish from
customize-{option,face} buffers.)

Corrected patch:

===File ~/cus-edit-diff=====================================
*** cus-edit.el	17 Nov 2005 10:24:20 -0600	1.241
--- cus-edit.el	21 Nov 2005 22:15:33 -0600	
***************
*** 800,812 ****
  making them as if they had never been customized at all."
    (interactive)
    (let ((children custom-options))
!     (mapc (lambda (widget)
! 	    (and (widget-get widget :custom-standard-value)
! 		 (widget-apply widget :custom-standard-value)
! 		 (if (memq (widget-get widget :custom-state)
! 			   '(modified set changed saved rogue))
! 		     (widget-apply widget :custom-reset-standard))))
! 	    children)))
  
  ;;; The Customize Commands
  
--- 800,816 ----
  making them as if they had never been customized at all."
    (interactive)
    (let ((children custom-options))
!     (when (or (and (= 1 (length children))
! 		   (widget-get (car children) :custom-standard-value))
! 	      (yes-or-no-p "Really erase all customizations in this buffer? "))
!       (mapc (lambda (widget)
! 	      (and (if (widget-get widget :custom-standard-value)
! 		       (widget-apply widget :custom-standard-value)
! 		     t)
! 		   (memq (widget-get widget :custom-state)
! 			 '(modified set changed saved rogue))
! 		   (widget-apply widget :custom-reset-standard)))
! 	    children))))
  
  ;;; The Customize Commands
  
============================================================

  parent reply	other threads:[~2005-11-22  4:24 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-16 10:47 [Martin.Buchmann@uni-jena.de: Re: erase customization does not work] Richard M. Stallman
2005-11-18  0:54 ` Luc Teirlinck
2005-11-18  1:38   ` Luc Teirlinck
2005-11-18  2:17     ` Luc Teirlinck
2005-11-18  2:24     ` Luc Teirlinck
2005-11-18  4:39   ` Luc Teirlinck
2005-11-19 23:26   ` Richard M. Stallman
2005-11-19 23:42     ` David Kastrup
2005-11-20 23:22       ` Richard M. Stallman
2005-11-22  4:03     ` Luc Teirlinck
2005-11-22 20:33       ` Richard M. Stallman
2005-11-22  4:24     ` Luc Teirlinck [this message]
2005-11-22  4:32       ` Luc Teirlinck
2005-11-18  1:04 ` Luc Teirlinck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200511220424.jAM4OeU00610@raven.dms.auburn.edu \
    --to=teirllm@dms.auburn.edu \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).