From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: default-truncate-lines Date: Thu, 22 Nov 2007 21:38:14 -0500 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1195785518 18469 80.91.229.12 (23 Nov 2007 02:38:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 23 Nov 2007 02:38:38 +0000 (UTC) To: Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 23 03:38:44 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IvORA-0002EV-Ig for ged-emacs-devel@m.gmane.org; Fri, 23 Nov 2007 03:38:36 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IvOQw-00055B-80 for ged-emacs-devel@m.gmane.org; Thu, 22 Nov 2007 21:38:22 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IvOQs-00054w-D6 for emacs-devel@gnu.org; Thu, 22 Nov 2007 21:38:18 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IvOQq-00054k-0N for emacs-devel@gnu.org; Thu, 22 Nov 2007 21:38:17 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IvOQp-00054h-RG for emacs-devel@gnu.org; Thu, 22 Nov 2007 21:38:15 -0500 Original-Received: from tomts43.bellnexxia.net ([209.226.175.110] helo=tomts43-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IvOQp-0007ph-C0 for emacs-devel@gnu.org; Thu, 22 Nov 2007 21:38:15 -0500 Original-Received: from ceviche.home ([74.12.207.44]) by tomts43-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20071123023814.TWWO26794.tomts43-srv.bellnexxia.net@ceviche.home> for ; Thu, 22 Nov 2007 21:38:14 -0500 Original-Received: by ceviche.home (Postfix, from userid 20848) id 13580B42DF; Thu, 22 Nov 2007 21:38:13 -0500 (EST) In-Reply-To: (Reiner Steib's message of "Thu, 22 Nov 2007 22:04:05 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Solaris 8 (1) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:83921 Archived-At: >> -(defcustom gnus-article-truncate-lines default-truncate-lines >> +(defcustom gnus-article-truncate-lines (default-value 'truncate-lines) > I don't care about this change, but out of curiosity: (why) does it > make a difference? Every time I see one of those default-FOO variable used I get flashes of the following code: /* If this variable is a default for something stored in the buffer itself, such as default-fill-column, find the buffers that don't have local values for it and update them. */ if (XOBJFWD (valcontents)->objvar > (Lisp_Object *) &buffer_defaults && XOBJFWD (valcontents)->objvar < (Lisp_Object *) (&buffer_defaults + 1)) { int offset = ((char *) XOBJFWD (valcontents)->objvar - (char *) &buffer_defaults); int idx = PER_BUFFER_IDX (offset); Lisp_Object tail; if (idx <= 0) break; for (tail = Vbuffer_alist; CONSP (tail); tail = XCDR (tail)) { Lisp_Object buf; struct buffer *b; buf = Fcdr (XCAR (tail)); if (!BUFFERP (buf)) continue; b = XBUFFER (buf); if (! PER_BUFFER_VALUE_P (b, idx)) PER_BUFFER_VALUE (b, offset) = newval; } } and every time I get to replace it with a use of `default-value', I feel like maybe this madness will disappear some day. Stefan