emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r118063: * lisp/term/w32-win.el: Move all code from


From: Stefan Monnier
Subject: [Emacs-diffs] trunk r118063: * lisp/term/w32-win.el: Move all code from 32-common-fns.el here.
Date: Mon, 06 Oct 2014 17:48:05 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 118063
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18629
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Mon 2014-10-06 13:47:56 -0400
message:
  * lisp/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.
  * 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.
removed:
  lisp/w32-common-fns.el         
w32commonfns.el-20120917115700-3at3xhn4to67xnca-4
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/loadup.el                 loadup.el-20091113204419-o5vbwnq5f7feedwu-49
  lisp/term/w32-win.el           w32win.el-20091113204419-o5vbwnq5f7feedwu-943
  lisp/w32-fns.el                w32fns.el-20091113204419-o5vbwnq5f7feedwu-805
  src/ChangeLog                  changelog-20091113204419-o5vbwnq5f7feedwu-1438
  src/lisp.mk                    lisp.mk-20110520003707-7eka49p37u9mards-1
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2014-10-06 14:12:56 +0000
+++ b/lisp/ChangeLog    2014-10-06 17:47:56 +0000
@@ -1,12 +1,16 @@
 2014-10-06  Stefan Monnier  <address@hidden>
 
+       * 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.
 

=== modified file 'lisp/loadup.el'
--- a/lisp/loadup.el    2014-10-06 14:12:56 +0000
+++ b/lisp/loadup.el    2014-10-06 17:47:56 +0000
@@ -252,7 +252,6 @@
       (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")

=== modified file 'lisp/term/w32-win.el'
--- a/lisp/term/w32-win.el      2014-10-02 03:19:32 +0000
+++ b/lisp/term/w32-win.el      2014-10-06 17:47:56 +0000
@@ -376,12 +376,69 @@
 (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)
 

=== removed file 'lisp/w32-common-fns.el'
--- a/lisp/w32-common-fns.el    2014-10-03 01:39:49 +0000
+++ b/lisp/w32-common-fns.el    1970-01-01 00:00:00 +0000
@@ -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
-
-
-;;;; 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))))
-
-;; 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)

=== modified file 'lisp/w32-fns.el'
--- a/lisp/w32-fns.el   2014-02-21 03:26:21 +0000
+++ b/lisp/w32-fns.el   2014-10-06 17:47:56 +0000
@@ -26,7 +26,6 @@
 
 ;;; Code:
 (require 'w32-vars)
-(require 'w32-common-fns)
 
 (defvar explicit-shell-file-name)
 

=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2014-10-05 23:18:31 +0000
+++ b/src/ChangeLog     2014-10-06 17:47:56 +0000
@@ -1,3 +1,7 @@
+2014-10-06  Stefan Monnier  <address@hidden>
+
+       * lisp.mk (lisp): Remove w32-common-fns.elc.
+
 2014-10-05  Paul Eggert  <address@hidden>
 
        * keyboard.c (Qleft, Qright): Remove duplicate definitions (Bug#9927).
@@ -20,10 +24,9 @@
        (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  <address@hidden>
 
-       * 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.
 
@@ -144,8 +147,8 @@
        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  <address@hidden>
@@ -156,8 +159,8 @@
        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.
 

=== modified file 'src/lisp.mk'
--- a/src/lisp.mk       2014-09-27 03:57:41 +0000
+++ b/src/lisp.mk       2014-10-06 17:47:56 +0000
@@ -153,7 +153,6 @@
        $(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 \


reply via email to

[Prev in Thread] Current Thread [Next in Thread]