From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.devel Subject: Re: face-remap.el patch to resize window Date: Tue, 11 Aug 2009 02:37:39 +0900 Message-ID: <8763cvbme4.fsf@catnip.gol.com> References: <7D6750DD60204DB082A761ECEE706CEA@us.oracle.com> <91793771320945CAA5CA2B600D0E9B67@us.oracle.com> Reply-To: Miles Bader NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1249925981 29564 80.91.229.12 (10 Aug 2009 17:39:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 10 Aug 2009 17:39:41 +0000 (UTC) Cc: 'Stefan Monnier' , emacs-devel@gnu.org To: "Drew Adams" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Aug 10 19:39:34 2009 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 1MaYqL-0003QF-EB for ged-emacs-devel@m.gmane.org; Mon, 10 Aug 2009 19:39:33 +0200 Original-Received: from localhost ([127.0.0.1]:57629 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MaYqK-00031o-9A for ged-emacs-devel@m.gmane.org; Mon, 10 Aug 2009 13:39:32 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MaYog-00027s-Bw for emacs-devel@gnu.org; Mon, 10 Aug 2009 13:37:50 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MaYob-00022x-LG for emacs-devel@gnu.org; Mon, 10 Aug 2009 13:37:50 -0400 Original-Received: from [199.232.76.173] (port=46410 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MaYob-00022s-IN for emacs-devel@gnu.org; Mon, 10 Aug 2009 13:37:45 -0400 Original-Received: from smtp11.dentaku.gol.com ([203.216.5.73]:55689) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MaYoY-00060B-LO; Mon, 10 Aug 2009 13:37:43 -0400 Original-Received: from 218.231.177.167.eo.eaccess.ne.jp ([218.231.177.167] helo=catnip.gol.com) by smtp11.dentaku.gol.com with esmtpa (Dentaku) id 1MaYoW-0000lO-4t; Tue, 11 Aug 2009 02:37:40 +0900 Original-Received: by catnip.gol.com (Postfix, from userid 1000) id 60533DF93; Tue, 11 Aug 2009 02:37:39 +0900 (JST) System-Type: x86_64-unknown-linux-gnu In-Reply-To: (Drew Adams's message of "Mon, 10 Aug 2009 10:15:26 -0700") Original-Lines: 38 X-Virus-Scanned: ClamAV GOL (outbound) X-Abuse-Complaints: abuse@gol.com X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) 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:113987 Archived-At: "Drew Adams" writes: >> How 'bout Miles's suggestion to use your code but without a separate >> config var, using text-scale-mode-hook instead? That would sound like >> a good idea to me. > > (No reason given.) Why? Well the obvious reason is that it avoids hard-wiring behavior which we believe to be to inflexible, and is a smaller change. [The hook, after all, already exists; my patch mainly just records a bit more information for it to use.] > I mentioned some disadvantages to using a hook. Hmm, the only real disadvantage I can see is that hooks aren't well-supported by customize. [As for "buffer localness", hooks, after all, can also be buffer-local, or can examine a buffer-local variable to determine their behavior.] > No one has mentioned any advantages. See above: Smaller; more flexible. Hooks (like other indirection mechanisms) are generally more flexible, at some cost in user-friendliness and clarity. So if there's very commonly desired behavior, sometimes it's good to hard-wire it instead of telling people to use a hook or whatever (even if an appropriate hook already exists). However as I've mentioned, it's not clear to me that the described behavior in this case is generally useful/universal enough to hard-wire. -Miles -- `...the Soviet Union was sliding in to an economic collapse so comprehensive that in the end its factories produced not goods but bads: finished products less valuable than the raw materials they were made from.' [The Economist]