From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Proposal to change cursor appearance to indicate region activation Date: Thu, 29 Jan 2015 12:16:55 +0100 Message-ID: <87r3udomzc.fsf@fencepost.gnu.org> References: <87zj93ayrr.fsf@fencepost.gnu.org> <874mrbcflj.fsf@fencepost.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1422530228 28771 80.91.229.3 (29 Jan 2015 11:17:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 29 Jan 2015 11:17:08 +0000 (UTC) Cc: emacs-devel@gnu.org To: Kelly Dean Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 29 12:17:08 2015 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 1YGn5s-00069l-Dw for ged-emacs-devel@m.gmane.org; Thu, 29 Jan 2015 12:17:04 +0100 Original-Received: from localhost ([::1]:58995 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGn5r-0007XP-LP for ged-emacs-devel@m.gmane.org; Thu, 29 Jan 2015 06:17:03 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37786) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGn5l-0007Vu-Fi for emacs-devel@gnu.org; Thu, 29 Jan 2015 06:17:01 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YGn5k-0007Az-Gc for emacs-devel@gnu.org; Thu, 29 Jan 2015 06:16:57 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:53177) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGn5k-0007As-Cs for emacs-devel@gnu.org; Thu, 29 Jan 2015 06:16:56 -0500 Original-Received: from localhost ([127.0.0.1]:60351 helo=lola) by fencepost.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGn5j-0004zC-U5; Thu, 29 Jan 2015 06:16:56 -0500 Original-Received: by lola (Postfix, from userid 1000) id 81A61DF2EF; Thu, 29 Jan 2015 12:16:55 +0100 (CET) In-Reply-To: (Kelly Dean's message of "Thu, 29 Jan 2015 10:46:04 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::e 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:181972 Archived-At: Kelly Dean writes: > David Kastrup wrote: >> As to the varhook feature itself: apart from the performance impact, it >> also has the problem that one cannot usefully manipulate such a varhook >> using add-hook or remove-hook. That makes it a feature that does not >> scale to multiple applications (like variable profiling). > > You can have multiple functions watch a symbol, and a function that > watches multiple symbols. I don't understand the use case you're > talking about that the varhook feature won't work for. Can you > explain? Multiple independent use cases. add-hook/remove-hook is a mechanism for organizing independent use cases for one feature, but there is no such mechanism for organizing independent use cases for the varhook feature in your implementation even though you actually use add-hook. But it requires first individually allocating, naming, and using a hook for any variable you might want to varhook into. So you manage to combine two mechanisms intended for generality in a manner which no longer works in general. -- David Kastrup