window and should be used, with due care, exclusively by those
applications. It might be replaced by an improved solution in future
versions of Emacs.
-
-@item cursor-type
-@vindex cursor-type@r{, a window parameter}
-@anchor{Definition of cursor-type window parameter}
-If this parameter is set to a cons cell, its @sc{car} specifies the
-shape of the cursor in this window, using the same format as the
-buffer-local variable @code{cursor-type}. @xref{Cursor Parameters}.
-Use this window parameter instead of the @code{cursor-type} variable or
-frame parameter when a buffer is displayed in multiple windows and you
-want to change the cursor for one window without affecting the others.
-This window parameter takes precedence over the @code{cursor-type}
-variable when the window is selected. For non-selected windows, the
-variable @code{cursor-in-non-selected-windows} takes precedence.
@end table
'window-state-put' to restore positions of window points
according to the context stored in a window parameter.
-+++
-*** New window parameter 'cursor-type'.
-If this parameter is set to a cons cell, its 'car' specifies the shape
-of the window's cursor, using the same format as the buffer-local
-variable 'cursor-type'.
-
** Tab Bars and Tab Lines
---
struct frame *f = XFRAME (w->frame);
struct buffer *b = XBUFFER (w->contents);
int cursor_type = DEFAULT_CURSOR;
- Lisp_Object alt_cursor, win_cursor;
+ Lisp_Object alt_cursor;
bool non_selected = false;
*active_cursor = true;
{
if (w == XWINDOW (echo_area_window))
{
- win_cursor = window_parameter (w, Qcursor_type);
- if (!NILP (win_cursor))
- return get_specified_cursor_type (EQ (win_cursor, Qnone)
- ? Qnil
- : win_cursor,
- width);
- else if (EQ (BVAR (b, cursor_type), Qt) || NILP (BVAR (b, cursor_type)))
+ if (EQ (BVAR (b, cursor_type), Qt) || NILP (BVAR (b, cursor_type)))
{
*width = FRAME_CURSOR_WIDTH (f);
return FRAME_DESIRED_CURSOR (f);
non_selected = true;
}
- win_cursor = window_parameter (w, Qcursor_type);
- if (!NILP (win_cursor))
- cursor_type = get_specified_cursor_type (EQ (win_cursor, Qnone)
- ? Qnil
- : win_cursor,
- width);
- else
- {
- /* Never display a cursor in a window in which cursor-type is nil. */
- if (NILP (BVAR (b, cursor_type)))
- return NO_CURSOR;
+ /* Never display a cursor in a window in which cursor-type is nil. */
+ if (NILP (BVAR (b, cursor_type)))
+ return NO_CURSOR;
- /* Get the normal cursor type for this window. */
- if (EQ (BVAR (b, cursor_type), Qt))
- {
- cursor_type = FRAME_DESIRED_CURSOR (f);
- *width = FRAME_CURSOR_WIDTH (f);
- }
- else
- cursor_type = get_specified_cursor_type (BVAR (b, cursor_type), width);
+ /* Get the normal cursor type for this window. */
+ if (EQ (BVAR (b, cursor_type), Qt))
+ {
+ cursor_type = FRAME_DESIRED_CURSOR (f);
+ *width = FRAME_CURSOR_WIDTH (f);
}
+ else
+ cursor_type = get_specified_cursor_type (BVAR (b, cursor_type), width);
/* Use cursor-in-non-selected-windows instead
for non-selected window or frame. */