From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Artur Malabarba Newsgroups: gmane.emacs.devel Subject: Re: why do some programming modes have customize hooks and others do not? Date: Mon, 20 Oct 2014 11:38:33 +0100 Message-ID: References: <87bnp9eir3.fsf@ferrier.me.uk> <2128728.y75FreRA9t@descartes> <871tq36tpl.fsf@ferrier.me.uk> Reply-To: bruce.connor.am@gmail.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11335ad6fca6130505d85070 X-Trace: ger.gmane.org 1413801531 26135 80.91.229.3 (20 Oct 2014 10:38:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 20 Oct 2014 10:38:51 +0000 (UTC) Cc: =?UTF-8?Q?R=C3=BCdiger_Sonderfeld?= , Stefan Monnier , emacs-devel To: Nic Ferrier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 20 12:38:44 2014 Return-path: Envelope-to: ged-emacs-devel@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 1XgAML-00033w-Qa for ged-emacs-devel@m.gmane.org; Mon, 20 Oct 2014 12:38:41 +0200 Original-Received: from localhost ([::1]:43827 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XgAML-0004if-4b for ged-emacs-devel@m.gmane.org; Mon, 20 Oct 2014 06:38:41 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43539) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XgAMH-0004iZ-CW for emacs-devel@gnu.org; Mon, 20 Oct 2014 06:38:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XgAME-00052F-2C for emacs-devel@gnu.org; Mon, 20 Oct 2014 06:38:37 -0400 Original-Received: from mail-ob0-x234.google.com ([2607:f8b0:4003:c01::234]:56380) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XgAMD-00052B-TN for emacs-devel@gnu.org; Mon, 20 Oct 2014 06:38:33 -0400 Original-Received: by mail-ob0-f180.google.com with SMTP id va2so3603852obc.11 for ; Mon, 20 Oct 2014 03:38:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=hCKz9PucBTjGuYil3qCkFSJ0yrTglFo4alNpDgs74Po=; b=wzCAQNVDZcmnxc20ZltDiQdmfkHZm2pBce3PsrmQbyP7p19S+EhiwJ/krMc4guKf2C r3hvI9iNlh/r46r+eMyNQR02F37wjG6eUuCDLW5uoEldBnOYRBpossUrq08w4TUkFOQR Z8biu0narg+R6KvU12zgX6pRD+Sbnh043/H82hfDkoegAXa4JAtxvQlzA9UUP5xkPd/y b9AssKGOjtYK/jg4S3QZp+2ETXQyH4vq5WNu9dHxjnWDKmAL1grtcf6uM5AZFz4ZeCv+ DQsYDoulvvVWKY2wnPUnQAk//fyzEdOnFNZGNgUk/qUWihh/xUuPKefU1BHJ8VWC1fKK Lxug== X-Received: by 10.182.149.226 with SMTP id ud2mr22096831obb.31.1413801513361; Mon, 20 Oct 2014 03:38:33 -0700 (PDT) Original-Received: by 10.76.1.137 with HTTP; Mon, 20 Oct 2014 03:38:33 -0700 (PDT) Original-Received: by 10.76.1.137 with HTTP; Mon, 20 Oct 2014 03:38:33 -0700 (PDT) In-Reply-To: <871tq36tpl.fsf@ferrier.me.uk> X-Google-Sender-Auth: 6t3c_ZJDRfc-X1abtxzPFiwhlqI X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4003:c01::234 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:175581 Archived-At: --001a11335ad6fca6130505d85070 Content-Type: text/plain; charset=UTF-8 > If I sent patches (once we're on git, how goes that?) for customize any > hooks that aren't already customizable, they would get accepted? I'd like to point out that saving a hook with the customize interface is kind of asking for trouble. Hooks are routinely added by arbitrary packages. If an unsuspecting user customizes and saves a hook through the customize interface, any functions that other packages have added to it will be saved as well. If the user later removes one of these packages, he'll be confronted with "undefined function" errors which no amount of restarting will solve. The safe (and annoying) way to do this would be to define a second hook for the user, and make that a defcustom. Malabarba --001a11335ad6fca6130505d85070 Content-Type: text/html; charset=UTF-8


> If I sent patches (once we're on git, how goes that?) for customize any
> hooks that aren't already customizable, they would get accepted?

I'd like to point out that saving a hook with the customize interface is kind of asking for trouble.

Hooks are routinely added by arbitrary packages. If an unsuspecting user customizes and saves a hook through the customize interface, any functions that other packages have added to it will be saved as well.
If the user later removes one of these packages, he'll be confronted with "undefined function" errors which no amount of restarting will solve.

The safe (and annoying) way to do this would be to define a second hook for the user, and make that a defcustom.

Malabarba

--001a11335ad6fca6130505d85070--