From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.devel Subject: Re: Reducing mouse-dependency In Emacs. Date: 13 Aug 2003 16:47:54 +0900 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <200308130536.h7D5avD22390@raven.dms.auburn.edu> Reply-To: Miles Bader NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1060761142 30073 80.91.224.253 (13 Aug 2003 07:52:22 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 13 Aug 2003 07:52:22 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Wed Aug 13 09:52:21 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19mqQf-0004DR-00 for ; Wed, 13 Aug 2003 09:52:21 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 19mqQY-0005rZ-00 for ; Wed, 13 Aug 2003 09:52:21 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19mqPz-0002Fv-3l for emacs-devel@quimby.gnus.org; Wed, 13 Aug 2003 03:51:39 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19mqPZ-0001mY-5Z for emacs-devel@gnu.org; Wed, 13 Aug 2003 03:51:13 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19mqNb-0008SJ-QG for emacs-devel@gnu.org; Wed, 13 Aug 2003 03:49:44 -0400 Original-Received: from [202.32.8.214] (helo=TYO201.gate.nec.co.jp) by monty-python.gnu.org with esmtp (Exim 4.20) id 19mqMc-0005JJ-MJ; Wed, 13 Aug 2003 03:48:10 -0400 Original-Received: from mailgate4.nec.co.jp (mailgate54.nec.co.jp [10.7.69.195]) by TYO201.gate.nec.co.jp (8.11.6/3.7W01080315) with ESMTP id h7D7m0107085; Wed, 13 Aug 2003 16:48:00 +0900 (JST) Original-Received: from mailsv5.nec.co.jp (mailgate51.nec.co.jp [10.7.69.190]) by mailgate4.nec.co.jp (8.11.6/3.7W-MAILGATE-NEC) with ESMTP id h7D7m0g28705; Wed, 13 Aug 2003 16:48:00 +0900 (JST) Original-Received: from edtmg02.lsi.nec.co.jp ([10.26.16.202]) by mailsv5.nec.co.jp (8.11.7/3.7W-MAILSV-NEC) with ESMTP id h7D7lxg20707; Wed, 13 Aug 2003 16:47:59 +0900 (JST) Original-Received: from mcsss2.ucom.lsi.nec.co.jp (localhost [127.0.0.1]) by edtmg02.lsi.nec.co.jp (8.9.3p2+3.2W/3.7W_EDC_Ver.1.0) with ESMTP id QAA20337; Wed, 13 Aug 2003 16:47:58 +0900 (JST) Original-Received: from mcspd15.ucom.lsi.nec.co.jp (mcspd15 [10.30.114.174]) by mcsss2.ucom.lsi.nec.co.jp (8.12.8/8.12.8/EDcg v2.01-mc/1046780839) with ESMTP id h7D7ltNH013658; Wed, 13 Aug 2003 16:47:58 +0900 (JST) Original-Received: by mcspd15.ucom.lsi.nec.co.jp (Postfix, from userid 31295) id 76D3A3723; Wed, 13 Aug 2003 16:47:55 +0900 (JST) Original-To: Luc Teirlinck System-Type: i686-pc-linux-gnu Blat: Foop In-Reply-To: <200308130536.h7D5avD22390@raven.dms.auburn.edu> Original-Lines: 41 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:15923 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:15923 Luc Teirlinck writes: > To take care of functional values, I need not only the value of the > property but also need to know whether it was found in an overlay (and > if so which overlay) or as a text property. How come? > DEFUN ("find-char-property", Ffind_char_property, Sfind_char_property, 2, 3, 0, I think (as you said) the name is wrong -- `find' implies that it does some sort of searching, when really it's just the same as get-char-property with an additional return value -- why not just use the same name as the C code: get-char-property-and-overlay? Also, you don't need to use alloca, you can just use a stack variable: DEFUN ("get-char-property-and-overlay", Fget_char_property_and_overlay, Sget_char_property_and_overlay, 2, 3, 0, doc: /* Return a cons whose car is the value of POSITION's property PROP, in OBJECT and whose cdr is the overlay in which the property was found, or nil if it was found as a text property. OBJECT is optional and defaults to the current buffer. If POSITION is at the end of OBJECT, the value is nil. If OBJECT is a buffer, then overlay properties are considered as well as text properties. If OBJECT is a window, then that window's buffer is used, but window-specific overlays are considered only if they are associated with OBJECT. */) (position, prop, object) Lisp_Object position, object; register Lisp_Object prop; { Lisp_Object overlay; Lisp_Object val = get_char_property_and_overlay (position, prop, object, &overlay); return Fcons (val, overlay); } -Miles -- We have met the enemy, and he is us. -- Pogo