unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Lennart Borgman" <lennart.borgman.073@student.lu.se>
Cc: hunterd42@comcast.net, Eli Zaretskii <eliz@gnu.org>,
	kobayays@otsukakj.co.jp, emacs-devel@gnu.org
Subject: Re: Hourglass only for X-windows?
Date: Sat, 12 Mar 2005 10:37:50 +0100	[thread overview]
Message-ID: <000501c526e7$33a17f90$0200a8c0@sedrcw11488> (raw)
In-Reply-To: uk6od396c.fsf@jasonrumney.net

----- Original Message ----- 
From: "Jason Rumney" <jasonr@gnu.org>


> "Lennart Borgman" <lennart.borgman.073@student.lu.se> writes:
>
> > I find it very hard to guess what this define is for without reading the
> > code. Using names like HAVE_MOUSE, HAVE_HOURGLASS makes it much more
easy to
> > guess IMO. And I think that is important if you are scanning the code
> > quickly trying to find things, see the structure etc.
>
> Conditional compilation constants are not comments. They are not there to
> assist your reading of the code, they are there to enable that code
> when appropriate. For that purpose, it is actually clearer to have the
> constants named so that the conditions under which that code is
> enabled is obvious. Having hourglass code surrounded by HAVE_HOURGLASS
> is not adding anything, because the actual conditions under which
> hourglass cursors are available depend on the platform, not some
> configure test. Also someone debugging why hourglass cursors do
> not work on a Mac might miss the fact that they are only enabled on X
> and W32, that is not likely if we list the real conditions under which
> that code is enabled.

I do not think you can escape that the constant names have a comment purpose
too. The names should of course be choosen so that it is as easy as possible
to change and read the code. Constants like HAVE_WINDOW_SYSTEM, HAVE_MOUSE
or HAVE_SOUND are currently set up by the configuration code.in config.in. I
believed they had purposes hinted by their names. Maybe those names are
misleading? Maybe it is bad practice and maybe those names should be
removed? I actually can not see that they are used on w32 (just looking at
config.h and makefile).

I currently perhaps have some problems with the code submitted by Jan D for
enabling hourglass when using "M-x  indent-region". Hourglass is actually
shown, but I wonder if I did something wrong since the messages about "10%"
etc are not shown. I wonder if I missed some piece of the hourglass code
somewhere? It would have been easier for me if that code had been surrounded
by HAVE_HOURGLASS - if and only if (of course) the definition of
HAVE_HOURGLASS was very clear.

Can someone please tell me if the problem above exists on X Windows as well?

  reply	other threads:[~2005-03-12  9:37 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-27 17:57 Hourglass only for X-windows? Lennart Borgman
2005-02-27 20:29 ` Eli Zaretskii
2005-02-28  0:20   ` Lennart Borgman
2005-02-28  4:38     ` Eli Zaretskii
2005-02-28 15:57       ` Lennart Borgman
2005-02-28 23:05         ` Eli Zaretskii
2005-03-01  0:17           ` Lennart Borgman
2005-03-10 23:33             ` Lennart Borgman
2005-03-11 13:28               ` Eli Zaretskii
2005-03-11 13:44                 ` Jason Rumney
2005-03-11 15:51                   ` Eli Zaretskii
2005-03-11 16:03                   ` Lennart Borgman
2005-03-11 16:15                     ` Eli Zaretskii
2005-03-11 16:43                       ` Lennart Borgman
2005-03-11 17:25                         ` Jan D.
2005-03-11 18:42                           ` Lennart Borgman
2005-03-11 20:51                             ` Eli Zaretskii
2005-03-12  1:03                               ` Lennart Borgman
2005-03-12  2:11                                 ` Jason Rumney
2005-03-12  9:37                                   ` Lennart Borgman [this message]
2005-03-12 11:43                                     ` Jan D.
2005-03-12 13:41                                   ` Stefan Monnier
2005-03-12 15:41                                     ` Jason Rumney
2005-03-13  3:50                                       ` David Hunter
2005-03-14 11:28                                         ` YAMAMOTO Mitsuharu
2005-03-13 15:29                                     ` Richard Stallman
2005-03-12 10:01                                 ` Eli Zaretskii
2005-03-12 21:40                                   ` Lennart Borgman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='000501c526e7$33a17f90$0200a8c0@sedrcw11488' \
    --to=lennart.borgman.073@student.lu.se \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=hunterd42@comcast.net \
    --cc=kobayays@otsukakj.co.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).