Hello,

I have a question about the bar cursor in Emacs on MAC OS X.  The first thing I noticed when I configured Emacs to use the bar cursor on MAC OS X was that the cursor seemed to be narrower that I expected, despite the fact that when I configured Emacs to use the bar cursor I specified the width of the cursor to be four pixels wide using the (bar . WIDTH) syntax.

While debugging this problem I found a couple of FIXME comments in ns_draw_window_cursor along with the following line of code
    s.size.width = min (cursor_width, 2); //FIXME(see above)

The comments basically say that the cursor_width parameter is being ignored because set_frame_cursor_types does not always initialize it.  When investigating this further, I discovered that it is true that set_frame_cursor_types does not always initialize the width (it is actually get_specified_cursor_type that fails to initialize the width).

Note that as far as I can tell, when the (bar . WIDTH) syntax is used, the cursor_width parameter is always initialized correctly.

My question is would it not be better to fix get_specified_cursor_type so that the width is always initialized and then modify ns_draw_window_cursor to honor the user specified cursor width than to always ignore the user's desired cursor width?  This could be easily done by adding the line
    *width = 2;
near the top of get_specified_cursor_type.

Then the line in ns_draw_window_cursor could be changed to the following, causing the user's selection when they use the (bar . WIDTH) syntax to be honored.
    s.size.width = cursor_width;
Or, as an alternative, the line could be changed to the following:
      s.size.width = min (cursor_width, w->phys_cursor_width); //FIXME(see above)

Would not this be a better thing to do?

I would appreciate any feedback you might have to offer on this question.