From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/67943 Path: news.gmane.org!not-for-mail From: David Engster Newsgroups: gmane.emacs.gnus.general Subject: Re: gnus shouldn't be making general-purpose variables buffer-local Date: Wed, 17 Dec 2008 15:28:09 +0100 Message-ID: References: <9aa0cfde0812112242o38d885a1h12d9e4ac490021@mail.gmail.com> <863agokpas.fsf@lifelogs.com> <87vdtj41ux.fsf@engster.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1229524140 23436 80.91.229.12 (17 Dec 2008 14:29:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 17 Dec 2008 14:29:00 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M16389@lists.math.uh.edu Wed Dec 17 15:30:05 2008 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.50) id 1LCxPY-0005Yc-8y for ding-account@gmane.org; Wed, 17 Dec 2008 15:30:04 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1LCxNo-0005Bk-AS; Wed, 17 Dec 2008 08:28:16 -0600 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1LCxNm-0005BS-Gk for ding@lists.math.uh.edu; Wed, 17 Dec 2008 08:28:14 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.69) (envelope-from ) id 1LCxNj-00040V-Kw for ding@lists.math.uh.edu; Wed, 17 Dec 2008 08:28:14 -0600 Original-Received: from m61s02.vlinux.de ([83.151.21.164]) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1LCxNw-000737-00 for ; Wed, 17 Dec 2008 15:28:24 +0100 Original-Received: from kafka.physik3.gwdg.de ([134.76.92.48] helo=kafka) by m61s02.vlinux.de with esmtpsa (TLS-1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.63) (envelope-from ) id 1LCxNj-0004ZC-IV for ding@gnus.org; Wed, 17 Dec 2008 15:28:11 +0100 Mail-Copies-To: never Mail-Followup-To: ding@gnus.org In-Reply-To: (David Engster's message of "Wed, 17 Dec 2008 14:38:26 +0100") User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.60 (gnu/linux) X-Spam-Score: -2.6 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:67943 Archived-At: --=-=-= David Engster writes: > In short: Making a group parameter buffer-local should only be done for > overriding a global value. > > That gives me an idea: in `gnus-summary-set-local-parameters', instead > of defining fixed prefixes like "gnus-" or "mm-", we could simply make > only those parameters buffer-local which are globally bound? The attached one-line patch does this. So far everything is still working fine here. But don't count on it. :-) -David --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=gnus-sum-patch.diff diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index 4f6a565..1be5949 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -3831,6 +3831,7 @@ This function is intended to be used in (and (consp elem) ; Has to be a cons. (consp (cdr elem)) ; The cdr has to be a list. (symbolp (car elem)) ; Has to be a symbol in there. + (boundp (car elem)) ; Has to be already bound (not (memq (car elem) vars)) (ignore-errors ; So we set it. (push (car elem) vars) --=-=-=--