]> git.eshelyaron.com Git - emacs.git/commitdiff
Revert "New window parameter 'cursor-type'"
authorEshel Yaron <me@eshelyaron.com>
Sat, 18 May 2024 19:12:00 +0000 (21:12 +0200)
committerEshel Yaron <me@eshelyaron.com>
Sat, 18 May 2024 19:12:00 +0000 (21:12 +0200)
This reverts commit bab56b25149d5f86ac82272a3646893dfb58c41e.

doc/lispref/frames.texi
doc/lispref/windows.texi
etc/NEWS
src/window.c
src/xdisp.c

index b79879063fbe9532d5663e110d341965bc454f39..cae93acae9f9aa86b7183508896a30f6e166a380 100644 (file)
@@ -2341,9 +2341,8 @@ Display a horizontal bar @var{height} pixels high.
 @end table
 
 @vindex cursor-type
-The @code{cursor-type} frame parameter may be overridden by the window
-parameter @code{cursor-type} (@pxref{Definition of cursor-type window
-parameter}), and by the variables @code{cursor-type} and
+The @code{cursor-type} frame parameter may be overridden by the
+variables @code{cursor-type} and
 @code{cursor-in-non-selected-windows}:
 
 @defopt cursor-type
index 8b11f642066648fc99ec7b9656a7cc3255fc03e8..34f7b260a526e54405b23f7ef62fcdd8fd795245 100644 (file)
@@ -6691,19 +6691,6 @@ applications that use large margins to center buffer text within a
 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
 
 
index f774cb81eda05987957b8e3b6ba634b9e5f34752..1f7d39d65d431a585328f7e33d044d21179773c1 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -319,12 +319,6 @@ and 'window-state-get'.  Then later another new variable
 '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
 
 ---
index 95df13e22ed64509f1411812a7c13fb6e106a5ff..aac5b087c2c95ec5363359e9c365c454bbdf0523 100644 (file)
@@ -2401,10 +2401,6 @@ Return VALUE.  */)
       (w, Fcons (Fcons (parameter, value), w->window_parameters));
   else
     Fsetcdr (old_alist_elt, value);
-
-  if (EQ (parameter, Qcursor_type))
-    mark_window_display_accurate (window, false);
-
   return value;
 }
 
index 85f62a83f9eba13c95e1be61f673426b7e97cfb7..63ff8670b7905f240f4505baa7439f710a82c90a 100644 (file)
@@ -33604,7 +33604,7 @@ get_window_cursor_type (struct window *w, struct glyph *glyph, int *width,
   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;
@@ -33616,13 +33616,7 @@ get_window_cursor_type (struct window *w, struct glyph *glyph, int *width,
     {
       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);
@@ -33649,27 +33643,18 @@ get_window_cursor_type (struct window *w, struct glyph *glyph, int *width,
       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.  */