From 7461417a8d8ed7577fddf2cc444117e17c2f95f9 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Mon, 14 Oct 2002 10:24:52 +0000 Subject: [PATCH] (syms_of_w32select): Fix docstring for `selection-coding-system'. --- src/w32select.c | 72 ++++++++++++++++++++++++------------------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/src/w32select.c b/src/w32select.c index fc584f53c58..8891da1c797 100644 --- a/src/w32select.c +++ b/src/w32select.c @@ -1,6 +1,6 @@ /* Selection processing for Emacs on the Microsoft W32 API. Copyright (C) 1993, 1994 Free Software Foundation. - + This file is part of GNU Emacs. GNU Emacs is free software; you can redistribute it and/or modify @@ -57,16 +57,16 @@ DEFUN ("w32-open-clipboard", Fw32_open_clipboard, Sw32_open_clipboard, 0, 1, 0, Lisp_Object frame; { BOOL ok = FALSE; - + if (!NILP (frame)) CHECK_LIVE_FRAME (frame, 0); - + BLOCK_INPUT; - + ok = OpenClipboard ((!NILP (frame) && FRAME_W32_P (XFRAME (frame))) ? FRAME_W32_WINDOW (XFRAME (frame)) : NULL); - + UNBLOCK_INPUT; - + return (ok ? frame : Qnil); } @@ -75,13 +75,13 @@ DEFUN ("w32-empty-clipboard", Fw32_empty_clipboard, Sw32_empty_clipboard, 0, 0, () { BOOL ok = FALSE; - + BLOCK_INPUT; - + ok = EmptyClipboard (); - + UNBLOCK_INPUT; - + return (ok ? Qt : Qnil); } @@ -90,13 +90,13 @@ DEFUN ("w32-close-clipboard", Fw32_close_clipboard, Sw32_close_clipboard, 0, 0, () { BOOL ok = FALSE; - + BLOCK_INPUT; - + ok = CloseClipboard (); - + UNBLOCK_INPUT; - + return (ok ? Qt : Qnil); } @@ -115,10 +115,10 @@ DEFUN ("w32-set-clipboard-data", Fw32_set_clipboard_data, Sw32_set_clipboard_dat unsigned char *dst; CHECK_STRING (string, 0); - + if (!NILP (frame)) CHECK_LIVE_FRAME (frame, 0); - + BLOCK_INPUT; nbytes = STRING_BYTES (XSTRING (string)) + 1; @@ -155,7 +155,7 @@ DEFUN ("w32-set-clipboard-data", Fw32_set_clipboard_data, Sw32_set_clipboard_dat if ((dst = (unsigned char *) GlobalLock (htext)) == NULL) goto error; - + /* convert to CRLF line endings expected by clipboard */ while (1) { @@ -172,12 +172,12 @@ DEFUN ("w32-set-clipboard-data", Fw32_set_clipboard_data, Sw32_set_clipboard_dat next[-1] = '\r'; next[0] = '\n'; dst = next + 1; - } + } else /* copied remaining partial line -> now finished */ break; } - + GlobalUnlock (htext); Vlast_coding_system_used = Qraw_text; @@ -226,18 +226,18 @@ DEFUN ("w32-set-clipboard-data", Fw32_set_clipboard_data, Sw32_set_clipboard_dat if (htext2 != NULL) htext = htext2; } } - + if (!OpenClipboard ((!NILP (frame) && FRAME_W32_P (XFRAME (frame))) ? FRAME_W32_WINDOW (XFRAME (frame)) : NULL)) goto error; ok = EmptyClipboard () && SetClipboardData (CF_TEXT, htext); - + CloseClipboard (); - + if (ok) goto done; error: - + ok = FALSE; if (htext) GlobalFree (htext); if (last_clipboard_text) @@ -245,7 +245,7 @@ DEFUN ("w32-set-clipboard-data", Fw32_set_clipboard_data, Sw32_set_clipboard_dat done: UNBLOCK_INPUT; - + return (ok ? string : Qnil); } @@ -256,15 +256,15 @@ DEFUN ("w32-get-clipboard-data", Fw32_get_clipboard_data, Sw32_get_clipboard_dat { HANDLE htext; Lisp_Object ret = Qnil; - + if (!NILP (frame)) CHECK_LIVE_FRAME (frame, 0); - + BLOCK_INPUT; - + if (!OpenClipboard ((!NILP (frame) && FRAME_W32_P (XFRAME (frame))) ? FRAME_W32_WINDOW (XFRAME (frame)) : NULL)) goto done; - + if ((htext = GetClipboardData (CF_TEXT)) == NULL) goto closeclip; @@ -274,10 +274,10 @@ DEFUN ("w32-get-clipboard-data", Fw32_get_clipboard_data, Sw32_get_clipboard_dat int nbytes; int truelen; int require_decoding = 0; - + if ((src = (unsigned char *) GlobalLock (htext)) == NULL) goto closeclip; - + nbytes = strlen (src); /* If the text in clipboard is identical to what we put there @@ -311,7 +311,7 @@ DEFUN ("w32-get-clipboard-data", Fw32_get_clipboard_data, Sw32_get_clipboard_dat } } } - + if (require_decoding) { int bufsize; @@ -389,10 +389,10 @@ DEFUN ("w32-get-clipboard-data", Fw32_get_clipboard_data, Sw32_get_clipboard_dat closeclip: CloseClipboard (); - + done: UNBLOCK_INPUT; - + return (ret); } @@ -434,7 +434,7 @@ and t is the same as `SECONDARY'.") return Qnil; } -void +void syms_of_w32select () { #if 0 @@ -450,8 +450,8 @@ syms_of_w32select () "Coding system for communicating with other X clients.\n\ When sending or receiving text via cut_buffer, selection, and clipboard,\n\ the text is encoded or decoded by this coding system.\n\ -A default value is `compound-text'"); - Vselection_coding_system=intern ("iso-latin-1-dos"); +The default value is `iso-latin-1-dos'."); + Vselection_coding_system = intern ("iso-latin-1-dos"); DEFVAR_LISP ("next-selection-coding-system", &Vnext_selection_coding_system, "Coding system for the next communication with other X clients.\n\ -- 2.39.2