From ea0b913ab64c872b169a4b9dfd3e4699cb1fd637 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Sat, 9 Jul 2022 13:05:49 +0200 Subject: [PATCH] Delete variable window-system-version obsolete since 24.3 * lisp/frame.el (window-system-version): Delete variable. * src/dispnew.c (syms_of_display) : Delete DEFVAR, obsolete since 24.3. (init_display_interactive, syms_of_display_for_pdumper): * src/msdos.c (internal_terminal_init): * src/nsterm.m (ns_term_init): * src/pgtkfns.c (pgtk_display_info_for_name): * src/w32fns.c (w32_display_info_for_name, Fx_open_connection): * src/xfns.c (x_display_info_for_name, Fx_open_connection): Don't set above deleted variable. * admin/admin.el (set-version): Don't update above deleted variable in msdos.c. * lisp/textmodes/artist.el (artist-submit-bug-report): Don't use above deleted variable. --- admin/admin.el | 3 --- etc/NEWS | 4 ++-- lisp/frame.el | 4 ---- lisp/textmodes/artist.el | 2 -- src/dispnew.c | 12 ------------ src/msdos.c | 1 - src/nsterm.m | 11 ----------- src/pgtkfns.c | 2 -- src/w32fns.c | 3 --- src/xfns.c | 3 --- 10 files changed, 2 insertions(+), 43 deletions(-) diff --git a/admin/admin.el b/admin/admin.el index c84287a7024..fececc86a4b 100644 --- a/admin/admin.el +++ b/admin/admin.el @@ -124,9 +124,6 @@ Root must be the root of an Emacs source tree." ;; Major version only. (when (string-match "\\([0-9]\\{2,\\}\\)" version) (let ((newmajor (match-string 1 version))) - (set-version-in-file root "src/msdos.c" newmajor - (rx (and "Vwindow_system_version" (1+ not-newline) - ?\( (submatch (1+ (in "0-9"))) ?\)))) (set-version-in-file root "etc/refcards/ru-refcard.tex" newmajor "\\\\newcommand{\\\\versionemacs}\\[0\\]\ {\\([0-9]\\{2,\\}\\)}.+%.+version of Emacs"))) diff --git a/etc/NEWS b/etc/NEWS index 7005e290b33..97a476ae08e 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -2715,8 +2715,8 @@ but switching to `ash` is generally much preferable. 'url-recreate-url-attributes', 'user-variable-p', 'vc-string-prefix-p', 'vc-toggle-read-only', 'view-return-to-alist', 'view-return-to-alist-update', 'w32-default-color-map' (function), -'which-func-mode' (function), 'winner-mode-leave-hook', -'x-cut-buffer-or-selection-value'. +'which-func-mode' (function), 'window-system-version', +'winner-mode-leave-hook', 'x-cut-buffer-or-selection-value'. --- ** Some functions and variables obsolete since Emacs 23 have been removed: diff --git a/lisp/frame.el b/lisp/frame.el index 9361683c28a..ae8449d0ea8 100644 --- a/lisp/frame.el +++ b/lisp/frame.el @@ -3050,10 +3050,6 @@ See also `toggle-frame-maximized'." (make-variable-buffer-local 'show-trailing-whitespace) -;; Defined in dispnew.c. -(make-obsolete-variable - 'window-system-version "it does not give useful information." "24.3") - (defun set-frame-property--interactive (prompt number) "Get a value for `set-frame-width' or `set-frame-height', prompting with PROMPT. Offer NUMBER as default value, if it is a natural number." diff --git a/lisp/textmodes/artist.el b/lisp/textmodes/artist.el index 2cf9ded04bf..76675328daa 100644 --- a/lisp/textmodes/artist.el +++ b/lisp/textmodes/artist.el @@ -5341,8 +5341,6 @@ The event, EV, is the mouse event." (require 'reporter) (if (y-or-n-p "Do you want to submit a bug report on Artist? ") (let ((vars '(window-system - window-system-version - ;; artist-rubber-banding artist-interface-with-rect artist-aspect-ratio diff --git a/src/dispnew.c b/src/dispnew.c index 53a47c4b2f2..8932f103f1f 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -6504,9 +6504,6 @@ init_display_interactive (void) if (!inhibit_window_system && display_arg) { Vinitial_window_system = Qx; -#ifdef HAVE_X11 - Vwindow_system_version = make_fixnum (11); -#endif #ifdef USE_NCURSES /* In some versions of ncurses, tputs crashes if we have not called tgetent. @@ -6521,7 +6518,6 @@ init_display_interactive (void) if (!inhibit_window_system) { Vinitial_window_system = Qw32; - Vwindow_system_version = make_fixnum (1); return; } #endif /* HAVE_NTGUI */ @@ -6530,7 +6526,6 @@ init_display_interactive (void) if (!inhibit_window_system && !will_dump_p ()) { Vinitial_window_system = Qns; - Vwindow_system_version = make_fixnum (10); return; } #endif @@ -6539,7 +6534,6 @@ init_display_interactive (void) if (!inhibit_window_system && !will_dump_p ()) { Vinitial_window_system = Qpgtk; - Vwindow_system_version = make_fixnum (3); return; } #endif @@ -6548,7 +6542,6 @@ init_display_interactive (void) if (!inhibit_window_system && !will_dump_p ()) { Vinitial_window_system = Qhaiku; - Vwindow_system_version = make_fixnum (1); return; } #endif @@ -6766,10 +6759,6 @@ Use of this variable as a boolean is deprecated. Instead, use `display-graphic-p' or any of the other `display-*-p' predicates which report frame's specific UI-related capabilities. */); - DEFVAR_LISP ("window-system-version", Vwindow_system_version, - doc: /* The version number of the window system in use. -For X windows, this is 11. */); - DEFVAR_BOOL ("cursor-in-echo-area", cursor_in_echo_area, doc: /* Non-nil means put cursor in minibuffer, at end of any message there. */); @@ -6817,5 +6806,4 @@ static void syms_of_display_for_pdumper (void) { Vinitial_window_system = Qnil; - Vwindow_system_version = Qnil; } diff --git a/src/msdos.c b/src/msdos.c index 1608245904c..1d3fdd528d7 100644 --- a/src/msdos.c +++ b/src/msdos.c @@ -1794,7 +1794,6 @@ internal_terminal_init (void) } Vinitial_window_system = Qpc; - Vwindow_system_version = make_fixnum (29); /* RE Emacs version */ tty->terminal->type = output_msdos_raw; /* If Emacs was dumped on DOS/V machine, forget the stale VRAM diff --git a/src/nsterm.m b/src/nsterm.m index d6290449b43..b8b4e66cd11 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -5607,17 +5607,6 @@ ns_term_init (Lisp_Object display_name) NSTRACE_MSG ("Versions"); - { -#ifdef NS_IMPL_GNUSTEP - Vwindow_system_version = build_string (gnustep_base_version); -#else - /* PSnextrelease (128, c); */ - char c[DBL_BUFSIZE_BOUND]; - int len = dtoastr (c, sizeof c, 0, 0, NSAppKitVersionNumber); - Vwindow_system_version = make_unibyte_string (c, len); -#endif - } - delete_keyboard_wait_descriptor (0); ns_app_name = [[NSProcessInfo processInfo] processName]; diff --git a/src/pgtkfns.c b/src/pgtkfns.c index beaf28f69d9..9473e14f5cf 100644 --- a/src/pgtkfns.c +++ b/src/pgtkfns.c @@ -164,8 +164,6 @@ pgtk_display_info_for_name (Lisp_Object name) if (dpyinfo == 0) error ("Cannot connect to display server %s", SDATA (name)); - XSETFASTINT (Vwindow_system_version, 11); - return dpyinfo; } diff --git a/src/w32fns.c b/src/w32fns.c index 28d13a68d45..745458d0a03 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -6699,8 +6699,6 @@ w32_display_info_for_name (Lisp_Object name) if (dpyinfo == 0) error ("Cannot connect to server %s", SDATA (name)); - XSETFASTINT (Vwindow_system_version, w32_major_version); - return dpyinfo; } @@ -6781,7 +6779,6 @@ DEFUN ("x-open-connection", Fx_open_connection, Sx_open_connection, error ("Cannot connect to server %s", SDATA (display)); } - XSETFASTINT (Vwindow_system_version, w32_major_version); return Qnil; } diff --git a/src/xfns.c b/src/xfns.c index fc8b30a9d6f..ecb869bf360 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -7250,8 +7250,6 @@ x_display_info_for_name (Lisp_Object name) if (dpyinfo == 0) error ("Cannot connect to X server %s", SDATA (name)); - XSETFASTINT (Vwindow_system_version, 11); - return dpyinfo; } @@ -7295,7 +7293,6 @@ An insecure way to solve the problem may be to use `xhost'.\n", error ("Cannot connect to X server %s", SDATA (display)); } - XSETFASTINT (Vwindow_system_version, 11); return Qnil; } -- 2.39.2