]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/term/w32-win.el: Move all code from 32-common-fns.el here.
authorStefan Monnier <monnier@iro.umontreal.ca>
Mon, 6 Oct 2014 17:47:56 +0000 (13:47 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Mon, 6 Oct 2014 17:47:56 +0000 (13:47 -0400)
(gui-select-text, gui-selection-value): Use w32 handlers in the w32
console as well.
* lisp/w32-common-fns.el: Remove.
* lisp/loadup.el: Don't load w32-common-fns.el.
* w32-fns.elc: Don't require w32-common-fns.
* src/lisp.mk (lisp): Remove w32-common-fns.elc.

Fixes: debbugs:18629
lisp/ChangeLog
lisp/loadup.el
lisp/term/w32-win.el
lisp/w32-common-fns.el [deleted file]
lisp/w32-fns.el
src/ChangeLog
src/lisp.mk

index 5847802f8fd0d1bcd5970640ec69b13e807e6150..8c3a239e662f1fc629a064db72335a3c2f2a8d21 100644 (file)
@@ -1,12 +1,16 @@
 2014-10-06  Stefan Monnier  <monnier@iro.umontreal.ca>
 
+       * term/w32-win.el: Move all code from 32-common-fns.el here.
+       (gui-select-text, gui-selection-value): Use w32 handlers in the w32
+       console as well (bug#18629).
+       * w32-common-fns.el: Remove.
+       * loadup.el: Don't load w32-common-fns.el.
+       * w32-fns.elc: Don't require w32-common-fns.
+
+       * icomplete.el: Move Iswitchb autoload here.  Much simpler.
        * obsolete/iswitchb.el (iswitchb-mode): Use normal autoload cookie.
        Remove redundant obsolescence thingy.
-
        * loadup.el: Don't load obsolete/loaddefs.el.
-
-       * icomplete.el: Move Iswitchb autoload here.  Much simpler.
-
        * Makefile.in (obsolete-autoloads): Remove.
        (AUTOGENEL): Remove obsolete/loaddefs.el.
 
index 9c052b284b8cc1fe706e4eed00349d1e394ed6ab..fd34648bb30e0c7cca8161d889633170b2f557aa 100644 (file)
       (load "w32-vars")
       (load "term/w32-win")
       (load "disp-table")
-      (load "w32-common-fns")
       (when (eq system-type 'windows-nt)
         (load "w32-fns")
         (load "ls-lisp")
index 8ef718ad230e8af57906446e3663457712f3b019..7e32791c1796e044fd849b13b0cd042826b1fca1 100644 (file)
@@ -376,12 +376,69 @@ See the documentation of `create-fontset-from-fontset-spec' for the format.")
 (gui-method-define window-system-initialization w32
                    #'w32-initialize-window-system)
 
+;;;; Selections
+
 (declare-function w32-set-clipboard-data "w32select.c"
                  (string &optional ignored))
-(gui-method-define gui-select-text w32
-                   (lambda (text)
-                     (if gui-select-enable-clipboard
-                         (w32-set-clipboard-data text))))
+(declare-function w32-get-clipboard-data "w32select.c")
+
+(defun w32--select-text (text)
+  (if gui-select-enable-clipboard (w32-set-clipboard-data text)))
+
+(defun w32--get-selection-value ()
+  "Return the value of the current selection.
+Consult the selection.  Treat empty strings as if they were unset."
+  (if gui-select-enable-clipboard
+      ;; Don't die if x-get-selection signals an error.
+      (with-demoted-errors "w32-get-clipboard-data:%S"
+        (w32-get-clipboard-data))))
+
+;; Arrange for the kill and yank functions to set and check the clipboard.
+(gui-method-define gui-select-text w32 #'w32--select-text)
+(gui-method-define gui-selection-value w32 #'w32--get-selection-value)
+
+(when (eq system-type 'windows-nt)
+  ;; Make copy&pasting in w32's console interact with the system's clipboard!
+  (gui-method-define gui-select-text t #'w32--select-text)
+  (gui-method-define gui-selection-value t #'w32--get-selection-value))
+
+;;; Fix interface to (X-specific) mouse.el
+(gui-method-define gui-own-selection w32
+                   (lambda (type value)
+                     (put 'x-selections (or type 'PRIMARY) data)))
+
+(gui-method-define gui-disown-selection w32
+                   (lambda (type)
+                     (put 'x-selections (or type 'PRIMARY) nil)))
+
+(gui-method-define gui-get-selection w32
+                   (lambda (&optional type _data-type)
+                     (get 'x-selections (or type 'PRIMARY))))
+
+;; gui-selection-owner-p is used in simple.el
+(gui-method-define gui-selection-owner-p w32
+                   (lambda (selection)
+                     (and (memq selection '(nil PRIMARY SECONDARY))
+                          (get 'x-selections (or selection 'PRIMARY)))))
+
+;; The "Windows" keys on newer keyboards bring up the Start menu
+;; whether you want it or not - make Emacs ignore these keystrokes
+;; rather than beep.
+(global-set-key [lwindow] 'ignore)
+(global-set-key [rwindow] 'ignore)
+
+(declare-function x-server-version "w32fns.c" (&optional terminal))
+
+(defun w32-version ()
+  "Return the MS-Windows version numbers.
+The value is a list of three integers: the major and minor version
+numbers, and the build number."
+  (x-server-version))
+
+(defun w32-using-nt ()
+  "Return non-nil if running on a Windows NT descendant.
+That includes all Windows systems except for 9X/Me."
+  (getenv "SystemRoot"))
 
 (provide 'w32-win)
 
diff --git a/lisp/w32-common-fns.el b/lisp/w32-common-fns.el
deleted file mode 100644 (file)
index 0403783..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-;;; w32-common-fns.el --- Lisp routines for Windows and Cygwin-w32
-
-;; Copyright (C) 1994, 2001-2014 Free Software Foundation, Inc.
-
-;; This file is part of GNU Emacs.
-
-;; GNU Emacs is free software: you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation, either version 3 of the License, or
-;; (at your option) any later version.
-
-;; GNU Emacs is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
-
-;;; Commentary:
-;;;
-;;; This file contains functions that are used by both native NT Emacs
-;;; and Cygwin Emacs compiled to use the native Windows widget
-;;; library.
-
-(declare-function x-server-version "w32fns.c" (&optional terminal))
-
-(defun w32-version ()
-  "Return the MS-Windows version numbers.
-The value is a list of three integers: the major and minor version
-numbers, and the build number."
-  (x-server-version))
-
-(defun w32-using-nt ()
-  "Return non-nil if running on a Windows NT descendant.
-That includes all Windows systems except for 9X/Me."
-  (getenv "SystemRoot"))
-
-(declare-function w32-get-clipboard-data "w32select.c")
-(declare-function w32-set-clipboard-data "w32select.c")
-(declare-function x-server-version "w32fns.c" (&optional display))
-
-;;; Fix interface to (X-specific) mouse.el
-(gui-method-define gui-own-selection w32
-                   (lambda (type value)
-                     (put 'x-selections (or type 'PRIMARY) data)))
-
-(gui-method-define gui-disown-selection w32
-                   (lambda (type &optional _time-object _frame)
-                     (put 'x-selections (or type 'PRIMARY) nil)))
-
-(gui-method-define gui-get-selection w32
-                   (lambda (&optional type _data-type)
-                     (get 'x-selections (or type 'PRIMARY))))
-
-;; gui-selection-owner-p is used in simple.el
-(gui-method-define gui-selection-owner-p w32
-                   (lambda (selection)
-                     (and (memq selection '(nil PRIMARY SECONDARY))
-                          (get 'x-selections (or selection 'PRIMARY)))))
-
-;; The "Windows" keys on newer keyboards bring up the Start menu
-;; whether you want it or not - make Emacs ignore these keystrokes
-;; rather than beep.
-(global-set-key [lwindow] 'ignore)
-(global-set-key [rwindow] 'ignore)
-
-(defvar w32-charset-info-alist)                ; w32font.c
-
-\f
-;;;; Selections
-
-(defun w32-get-selection-value ()
-  "Return the value of the current selection.
-Consult the selection.  Treat empty strings as if they were unset."
-  (if gui-select-enable-clipboard
-      ;; Don't die if x-get-selection signals an error.
-      (with-demoted-errors "w32-get-clipboard-data:%S"
-        (w32-get-clipboard-data))))
-\f
-;; Arrange for the kill and yank functions to set and check the clipboard.
-(gui-method-define gui-selection-value w32 #'w32-get-selection-value)
-
-(provide 'w32-common-fns)
index fda51b1532b52ae6dc35affbe1699942f5eef681..2cbeb49d543b6d01e915c3888827e66f55ed68f9 100644 (file)
@@ -26,7 +26,6 @@
 
 ;;; Code:
 (require 'w32-vars)
-(require 'w32-common-fns)
 
 (defvar explicit-shell-file-name)
 
index facddf3b84901dbb7b2f187279473c6b3f84416e..c03b6dad06f74ff6acb78bd348edfedf648dbfd7 100644 (file)
@@ -1,3 +1,7 @@
+2014-10-06  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * lisp.mk (lisp): Remove w32-common-fns.elc.
+
 2014-10-05  Paul Eggert  <eggert@cs.ucla.edu>
 
        * keyboard.c (Qleft, Qright): Remove duplicate definitions (Bug#9927).
        (ns_draw_window_cursor): Adjust y for hbar cursor only if smaller than
        line height (Bug#17977).
 
-       * macfont.m: Fix indentation and import changes from macport
-       24.3.94.
+       * macfont.m: Fix indentation and import changes from macport 24.3.94.
        (macfont_closest_traits_index): New function.
-       (macfont_closest_traits_index_p): Renamed from
+       (macfont_closest_traits_index_p): Rename from
        macfont_closest_traits_index.
        (macfont_list): Use macfont_closest_traits_index_p.
 
@@ -40,8 +43,8 @@
 
 2014-10-04  Martin Rudalics  <rudalics@gmx.at>
 
-       * buffer.c (scroll_bar_width, scroll_bar_height): Fix
-       doc-strings.
+       * buffer.c (scroll_bar_width, scroll_bar_height):
+       Fix doc-strings.
        * window.c (Fset_window_scroll_bars): Fix doc-string.
        (Fwindow_scroll_bars): Have it return what the doc-string says.
 
        values.
        (my_create_window): Move the calculation of the coordinates of the
        frame's top-left edge here.  Pass them to the input thread via the
-       second parameter of the WM_EMACS_CREATEWINDOW message.  See
-       http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00892.html
+       second parameter of the WM_EMACS_CREATEWINDOW message.
+       See http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00892.html
        for the details.
 
 2014-09-30  Eli Zaretskii  <eliz@gnu.org>
        obey it if the glyph row showing point will be fully visible.
        Likewise when the window start is in a continuation line.  If,
        after trying everything under the 'force_start' label, point is
-       still not fully visible, give up and scroll the window.  Add
-       debugging traces.  (Bug#18545)
+       still not fully visible, give up and scroll the window.
+       Add debugging traces.  (Bug#18545)
 
        * window.c (Frecenter): Set the window's redisplay flag.
 
index e9783f649bef5196a59d84a00408bf79053097b0..642e9af225f29c88dc9d67aed9d5bb72e1b92209 100644 (file)
@@ -153,7 +153,6 @@ lisp = \
        $(lispsource)/term/w32-win.elc \
        $(lispsource)/ls-lisp.elc \
        $(lispsource)/disp-table.elc \
-       $(lispsource)/w32-common-fns.elc \
        $(lispsource)/dos-w32.elc \
        $(lispsource)/w32-fns.elc \
        $(lispsource)/dos-fns.elc \