diff options
Diffstat (limited to 'src/w16select.c')
-rw-r--r-- | src/w16select.c | 49 |
1 files changed, 9 insertions, 40 deletions
diff --git a/src/w16select.c b/src/w16select.c index 0ecd39b7afa..b878481e469 100644 --- a/src/w16select.c +++ b/src/w16select.c @@ -1,6 +1,8 @@ /* 16-bit Windows Selection processing for emacs on MS-Windows -Copyright (C) 1996-1997, 2001-2017 Free Software Foundation, Inc. +Copyright (C) 1996-1997, 2001-2022 Free Software Foundation, Inc. + +Author: Dale P. Smith <dpsm@en.com> This file is part of GNU Emacs. @@ -22,7 +24,6 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */ "old" (character-mode) application access to Dynamic Data Exchange, menus, and the Windows clipboard. */ -/* Written by Dale P. Smith <dpsm@en.com> */ /* Adapted to DJGPP by Eli Zaretskii <eliz@gnu.org> */ #ifdef MSDOS @@ -86,7 +87,7 @@ static size_t clipboard_storage_size; /* C functions to access the Windows 3.1x clipboard from DOS apps. The information was obtained from the Microsoft Knowledge Base, - article Q67675 and can be found at: + article Q67675 and can be found at: [broken link -- SK 2021-09-27] http://www.microsoft.com/kb/developr/win_dk/q67675.htm */ /* See also Ralf Brown's Interrupt List. @@ -223,7 +224,7 @@ set_clipboard_data (unsigned Format, void *Data, unsigned Size, int Raw) if (!Raw) { - /* avoid using strchr because it recomputes the length everytime */ + /* avoid using strchr because it recomputes the length every time */ while ((dp = memchr (dp, '\n', Size - (dp - dstart))) != 0) { truelen++; @@ -535,7 +536,7 @@ DEFUN ("w16-set-clipboard-data", Fw16_set_clipboard_data, Sw16_set_clipboard_dat message3 (make_unibyte_string (system_error_msg, sizeof (system_error_msg) - 1)); break; } - sit_for (make_number (2), 0, 2); + sit_for (make_fixnum (2), 0, 2); } done: @@ -650,7 +651,7 @@ frame's display, or the first available X display. */) by the X interface code. (On MSDOS, killed text is only put into the clipboard if we run under Windows, so we cannot check the clipboard alone.) */ - if ((EQ (selection, Qnil) || EQ (selection, QPRIMARY)) + if ((NILP (selection) || EQ (selection, QPRIMARY)) && ! NILP (Fsymbol_value (Fintern_soft (build_string ("kill-ring"), Qnil)))) return Qt; @@ -678,43 +679,11 @@ syms_of_win16select (void) defsubr (&Sw16_selection_exists_p); DEFVAR_LISP ("selection-coding-system", Vselection_coding_system, - doc: /* Coding system for communicating with other programs. - -For MS-Windows and MS-DOS: -When sending or receiving text via selection and clipboard, the text -is encoded or decoded by this coding system. The default value is -the current system default encoding on 9x/Me, `utf-16le-dos' -\(Unicode) on NT/W2K/XP, and `iso-latin-1-dos' on MS-DOS. - -For X Windows: -When sending text via selection and clipboard, if the target -data-type matches with the type of this coding system, it is used -for encoding the text. Otherwise (including the case that this -variable is nil), a proper coding system is used as below: - -data-type coding system ---------- ------------- -UTF8_STRING utf-8 -COMPOUND_TEXT compound-text-with-extensions -STRING iso-latin-1 -C_STRING no-conversion - -When receiving text, if this coding system is non-nil, it is used -for decoding regardless of the data-type. If this is nil, a -proper coding system is used according to the data-type as above. - -See also the documentation of the variable `x-select-request-type' how -to control which data-type to request for receiving text. - -The default value is nil. */); + doc: /* SKIP: real doc in select.el. */); Vselection_coding_system = intern ("iso-latin-1-dos"); DEFVAR_LISP ("next-selection-coding-system", Vnext_selection_coding_system, - doc: /* Coding system for the next communication with other programs. -Usually, `selection-coding-system' is used for communicating with -other programs (X Windows clients or MS Windows programs). But, if this -variable is set, it is used for the next communication only. -After the communication, this variable is set to nil. */); + doc: /* SKIP: real doc in select.el. */); Vnext_selection_coding_system = Qnil; DEFSYM (QCLIPBOARD, "CLIPBOARD"); |