From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [PATCH 1/2] Add frame-pointer-visible-p Date: Mon, 18 Oct 2010 06:54:22 -0400 Message-ID: References: <1287067949-23750-1-git-send-email-julien@danjou.info> <1287067949-23750-2-git-send-email-julien@danjou.info> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1287399276 31728 80.91.229.12 (18 Oct 2010 10:54:36 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 18 Oct 2010 10:54:36 +0000 (UTC) Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Julien Danjou Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 18 12:54:35 2010 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.69) (envelope-from ) id 1P7nMQ-0003PR-9F for ged-emacs-devel@m.gmane.org; Mon, 18 Oct 2010 12:54:34 +0200 Original-Received: from localhost ([127.0.0.1]:55715 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P7nMP-0004L6-GS for ged-emacs-devel@m.gmane.org; Mon, 18 Oct 2010 06:54:33 -0400 Original-Received: from [140.186.70.92] (port=42122 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P7nMG-0004Jx-T1 for emacs-devel@gnu.org; Mon, 18 Oct 2010 06:54:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P7nMF-0004Mi-Ec for emacs-devel@gnu.org; Mon, 18 Oct 2010 06:54:24 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]:41865) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P7nMF-0004Me-CT for emacs-devel@gnu.org; Mon, 18 Oct 2010 06:54:23 -0400 Original-Received: from eliz by fencepost.gnu.org with local (Exim 4.69) (envelope-from ) id 1P7nME-0001eI-B8; Mon, 18 Oct 2010 06:54:22 -0400 In-reply-to: (message from Julien Danjou on Mon, 18 Oct 2010 11:31:30 +0200) X-detected-operating-system: by eggs.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:131801 Archived-At: > From: Julien Danjou > Date: Mon, 18 Oct 2010 11:31:30 +0200 > Cc: emacs-devel@gnu.org > > Stefan, thanks a lot for the review. That's my first C patch for Emacs, > so I'm glad to see your comments and learn! A few more below. > > One more thing: while I see that the C code currently stores the > > visibility in the frame data-structure, I'm not completely sure if this > > data is truly frame-specific as opposed to terminal-specific. > > Can someone confirm this issue? > > In theory, since you can have more pointers nowadays, it should/can be > frame specific. Not sure it's really the case in Emacs, since Emacs > probably does not support multi-pointer right now (but I don't know for > sure). Isn't it possible to have the pointer invisible in one frame, then switch to another where the pointer is visible, even if there's only one pointer? Anyway, as all mouse-specific variables are maintained per frame, I don't think we should hold this one on a per-terminal basis. > +@defun frame-pointer-visible-p &opt frame ^^^^ "&optional" > +This function return the current visibility status of the mouse ^^^^^^ "returns". But it is better to rephrase along the lines suggested by Andreas: This predicate function returns non-@code{nil} if the mouse pointer displayed on @var{frame} is visible; otherwise it returns @code{nil}. @var{frame} omitted or @code{nil} means the selected frame. This is useful when ... > +pointer in @var{frame}. This is useful when > +@code{make-pointer-invisible} is set to @code{t}: it allows to know if It is a good idea to have here a cross-reference to where make-pointer-invisible is described (in the Emacs User Manual). > --- a/src/ChangeLog > +++ b/src/ChangeLog > @@ -27,6 +27,11 @@ > * font.c (Ffont_variation_glyphs): > * ccl.c (Fccl_execute_on_string): Fix typo in docstring. > > +2010-10-14 Julien Danjou > + > + * frame.c (Fframe_pointer_visible_p): Add > + `frame-pointer-visible-p' to get the pointer visibility. > + Your entry should be at the top of the file.