----- Original Message ----- From: "Jason Rumney" <[EMAIL PROTECTED]>
> "Lennart Borgman" <[EMAIL PROTECTED]> 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? _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel