From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#18725: [PATCH]: Emacs 24.4. Say "no" to "erase customizations?". .emacs gets written. Date: Wed, 15 Oct 2014 10:45:04 +0000 (UTC) Organization: muc.de e.V. Message-ID: References: NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1413370565 3908 80.91.229.3 (15 Oct 2014 10:56:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 15 Oct 2014 10:56:05 +0000 (UTC) To: gnu-emacs-bug@moderators.isc.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Oct 15 12:55:58 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XeMFJ-00057E-3m for geb-bug-gnu-emacs@m.gmane.org; Wed, 15 Oct 2014 12:55:57 +0200 Original-Received: from localhost ([::1]:43907 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XeMFI-0000YQ-PC for geb-bug-gnu-emacs@m.gmane.org; Wed, 15 Oct 2014 06:55:56 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34182) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XeM5p-00025V-13 for bug-gnu-emacs@gnu.org; Wed, 15 Oct 2014 06:46:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XeM5i-0003EA-IT for bug-gnu-emacs@gnu.org; Wed, 15 Oct 2014 06:46:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:52355) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XeM5i-0003E5-F0 for bug-gnu-emacs@gnu.org; Wed, 15 Oct 2014 06:46:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XeM5i-0006CY-47 for bug-gnu-emacs@gnu.org; Wed, 15 Oct 2014 06:46:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <20141014220426.GD6430@acm.acm> Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 15 Oct 2014 10:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18725 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by submit@debbugs.gnu.org id=B.141336993723798 (code B ref -1); Wed, 15 Oct 2014 10:46:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 15 Oct 2014 10:45:37 +0000 Original-Received: from localhost ([127.0.0.1]:43919 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XeM5I-0006Bm-GV for submit@debbugs.gnu.org; Wed, 15 Oct 2014 06:45:36 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:59001) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XeM5F-0006Bd-LH for submit@debbugs.gnu.org; Wed, 15 Oct 2014 06:45:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XeM58-0002tV-OK for submit@debbugs.gnu.org; Wed, 15 Oct 2014 06:45:33 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:56582) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XeM58-0002tR-LL for submit@debbugs.gnu.org; Wed, 15 Oct 2014 06:45:26 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60011) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XeM50-0001q6-49 for bug-gnu-emacs@gnu.org; Wed, 15 Oct 2014 06:45:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XeM4o-0002iw-W3 for bug-gnu-emacs@gnu.org; Wed, 15 Oct 2014 06:45:18 -0400 Original-Received: from xvm-90.mit.edu ([18.181.2.90]:40799 helo=mod-relay.xvm.mit.edu) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XeM4o-0002gL-TF for bug-gnu-emacs@gnu.org; Wed, 15 Oct 2014 06:45:06 -0400 Original-Received: by mod-relay.xvm.mit.edu (Postfix) id 22A991F045; Wed, 15 Oct 2014 06:45:06 -0400 (EDT) Original-Received: from mail.muc.de (colin.muc.de [193.149.48.1]) by mod-relay.xvm.mit.edu (Postfix) with ESMTP id BC6031EE6A for ; Wed, 15 Oct 2014 06:45:05 -0400 (EDT) Original-Received: (qmail 67095 invoked by uid 8); 15 Oct 2014 10:45:04 -0000 Original-Path: not-for-mail Original-Newsgroups: gnu.emacs.bug Original-Lines: 59 Original-NNTP-Posting-Host: news.muc.de Original-X-Trace: colin.muc.de 1413369904 65929 193.149.48.2 (15 Oct 2014 10:45:04 GMT) Original-X-Complaints-To: news-admin@muc.de Original-NNTP-Posting-Date: Wed, 15 Oct 2014 10:45:04 +0000 (UTC) User-Agent: tin/2.2.0-20131224 ("Lochindaal") (UNIX) (FreeBSD/8.4-RELEASE (amd64)) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-Mailman-Approved-At: Wed, 15 Oct 2014 06:55:53 -0400 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:94527 Alan Mackenzie wrote: > In Emacs 24.4, started with a .emacs which includes a customisation for > face show-paren-match, do > M-x customize-group paren-showing-faces > . One of the widgets is "Revert ...". Hit on this widget, then 2 > for "Erase customizations". Emacs prompts with "Really erase > customizations? (yes or no)". Type "no". > .emacs is then written. It shouldn't be. Here is a possible patch for the problem: === modified file 'lisp/cus-edit.el' --- lisp/cus-edit.el 2014-06-29 02:33:50 +0000 +++ lisp/cus-edit.el 2014-10-15 10:11:00 +0000 @@ -779,7 +779,8 @@ "Call function FUN on all widgets in `custom-options'. If there is more than one widget, ask user for confirmation using the query string QUERY, using `y-or-n-p' if STRONG-QUERY is nil, -and `yes-or-no-p' otherwise." +and `yes-or-no-p' otherwise. Return t if the functionality has +been executed, nil otherwise." (if (or (and (= 1 (length custom-options)) (memq (widget-type (car custom-options)) '(custom-variable custom-face))) @@ -892,16 +893,17 @@ ;; Bind these temporarily. (let ((custom-reset-standard-variables-list '(t)) (custom-reset-standard-faces-list '(t))) - (custom-command-apply - (lambda (widget) - (and (or (null (widget-get widget :custom-standard-value)) - (widget-apply widget :custom-standard-value)) - (memq (widget-get widget :custom-state) - '(modified set changed saved rogue)) - (widget-apply widget :custom-mark-to-reset-standard))) - "The settings will revert to their default values, in this + (if + (custom-command-apply + (lambda (widget) + (and (or (null (widget-get widget :custom-standard-value)) + (widget-apply widget :custom-standard-value)) + (memq (widget-get widget :custom-state) + '(modified set changed saved rogue)) + (widget-apply widget :custom-mark-to-reset-standard))) + "The settings will revert to their default values, in this and future sessions. Really erase customizations? " t) - (custom-reset-standard-save-and-update))) + (custom-reset-standard-save-and-update)))) ;;; The Customize Commands -- Alan Mackenzie (Nuremberg, Germany).