diff options
| author | Stefan Monnier | 2014-10-06 13:47:56 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2014-10-06 13:47:56 -0400 |
| commit | 3ef041ae3b98dde7300c9be4a28047748903ddc7 (patch) | |
| tree | c77175d1d9ba4506878ccda9aa2132f1e47856b4 | |
| parent | 71785ae78c87c3b96b20900cd7a9d4f69bce7757 (diff) | |
| download | emacs-3ef041ae3b98dde7300c9be4a28047748903ddc7.tar.gz emacs-3ef041ae3b98dde7300c9be4a28047748903ddc7.zip | |
* 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.
Fixes: debbugs:18629
| -rw-r--r-- | lisp/ChangeLog | 12 | ||||
| -rw-r--r-- | lisp/loadup.el | 1 | ||||
| -rw-r--r-- | lisp/term/w32-win.el | 65 | ||||
| -rw-r--r-- | lisp/w32-common-fns.el | 84 | ||||
| -rw-r--r-- | lisp/w32-fns.el | 1 | ||||
| -rw-r--r-- | src/ChangeLog | 21 | ||||
| -rw-r--r-- | src/lisp.mk | 1 |
7 files changed, 81 insertions, 104 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5847802f8fd..8c3a239e662 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,12 +1,16 @@ | |||
| 1 | 2014-10-06 Stefan Monnier <monnier@iro.umontreal.ca> | 1 | 2014-10-06 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 2 | ||
| 3 | * term/w32-win.el: Move all code from 32-common-fns.el here. | ||
| 4 | (gui-select-text, gui-selection-value): Use w32 handlers in the w32 | ||
| 5 | console as well (bug#18629). | ||
| 6 | * w32-common-fns.el: Remove. | ||
| 7 | * loadup.el: Don't load w32-common-fns.el. | ||
| 8 | * w32-fns.elc: Don't require w32-common-fns. | ||
| 9 | |||
| 10 | * icomplete.el: Move Iswitchb autoload here. Much simpler. | ||
| 3 | * obsolete/iswitchb.el (iswitchb-mode): Use normal autoload cookie. | 11 | * obsolete/iswitchb.el (iswitchb-mode): Use normal autoload cookie. |
| 4 | Remove redundant obsolescence thingy. | 12 | Remove redundant obsolescence thingy. |
| 5 | |||
| 6 | * loadup.el: Don't load obsolete/loaddefs.el. | 13 | * loadup.el: Don't load obsolete/loaddefs.el. |
| 7 | |||
| 8 | * icomplete.el: Move Iswitchb autoload here. Much simpler. | ||
| 9 | |||
| 10 | * Makefile.in (obsolete-autoloads): Remove. | 14 | * Makefile.in (obsolete-autoloads): Remove. |
| 11 | (AUTOGENEL): Remove obsolete/loaddefs.el. | 15 | (AUTOGENEL): Remove obsolete/loaddefs.el. |
| 12 | 16 | ||
diff --git a/lisp/loadup.el b/lisp/loadup.el index 9c052b284b8..fd34648bb30 100644 --- a/lisp/loadup.el +++ b/lisp/loadup.el | |||
| @@ -252,7 +252,6 @@ | |||
| 252 | (load "w32-vars") | 252 | (load "w32-vars") |
| 253 | (load "term/w32-win") | 253 | (load "term/w32-win") |
| 254 | (load "disp-table") | 254 | (load "disp-table") |
| 255 | (load "w32-common-fns") | ||
| 256 | (when (eq system-type 'windows-nt) | 255 | (when (eq system-type 'windows-nt) |
| 257 | (load "w32-fns") | 256 | (load "w32-fns") |
| 258 | (load "ls-lisp") | 257 | (load "ls-lisp") |
diff --git a/lisp/term/w32-win.el b/lisp/term/w32-win.el index 8ef718ad230..7e32791c179 100644 --- a/lisp/term/w32-win.el +++ b/lisp/term/w32-win.el | |||
| @@ -376,12 +376,69 @@ See the documentation of `create-fontset-from-fontset-spec' for the format.") | |||
| 376 | (gui-method-define window-system-initialization w32 | 376 | (gui-method-define window-system-initialization w32 |
| 377 | #'w32-initialize-window-system) | 377 | #'w32-initialize-window-system) |
| 378 | 378 | ||
| 379 | ;;;; Selections | ||
| 380 | |||
| 379 | (declare-function w32-set-clipboard-data "w32select.c" | 381 | (declare-function w32-set-clipboard-data "w32select.c" |
| 380 | (string &optional ignored)) | 382 | (string &optional ignored)) |
| 381 | (gui-method-define gui-select-text w32 | 383 | (declare-function w32-get-clipboard-data "w32select.c") |
| 382 | (lambda (text) | 384 | |
| 383 | (if gui-select-enable-clipboard | 385 | (defun w32--select-text (text) |
| 384 | (w32-set-clipboard-data text)))) | 386 | (if gui-select-enable-clipboard (w32-set-clipboard-data text))) |
| 387 | |||
| 388 | (defun w32--get-selection-value () | ||
| 389 | "Return the value of the current selection. | ||
| 390 | Consult the selection. Treat empty strings as if they were unset." | ||
| 391 | (if gui-select-enable-clipboard | ||
| 392 | ;; Don't die if x-get-selection signals an error. | ||
| 393 | (with-demoted-errors "w32-get-clipboard-data:%S" | ||
| 394 | (w32-get-clipboard-data)))) | ||
| 395 | |||
| 396 | ;; Arrange for the kill and yank functions to set and check the clipboard. | ||
| 397 | (gui-method-define gui-select-text w32 #'w32--select-text) | ||
| 398 | (gui-method-define gui-selection-value w32 #'w32--get-selection-value) | ||
| 399 | |||
| 400 | (when (eq system-type 'windows-nt) | ||
| 401 | ;; Make copy&pasting in w32's console interact with the system's clipboard! | ||
| 402 | (gui-method-define gui-select-text t #'w32--select-text) | ||
| 403 | (gui-method-define gui-selection-value t #'w32--get-selection-value)) | ||
| 404 | |||
| 405 | ;;; Fix interface to (X-specific) mouse.el | ||
| 406 | (gui-method-define gui-own-selection w32 | ||
| 407 | (lambda (type value) | ||
| 408 | (put 'x-selections (or type 'PRIMARY) data))) | ||
| 409 | |||
| 410 | (gui-method-define gui-disown-selection w32 | ||
| 411 | (lambda (type) | ||
| 412 | (put 'x-selections (or type 'PRIMARY) nil))) | ||
| 413 | |||
| 414 | (gui-method-define gui-get-selection w32 | ||
| 415 | (lambda (&optional type _data-type) | ||
| 416 | (get 'x-selections (or type 'PRIMARY)))) | ||
| 417 | |||
| 418 | ;; gui-selection-owner-p is used in simple.el | ||
| 419 | (gui-method-define gui-selection-owner-p w32 | ||
| 420 | (lambda (selection) | ||
| 421 | (and (memq selection '(nil PRIMARY SECONDARY)) | ||
| 422 | (get 'x-selections (or selection 'PRIMARY))))) | ||
| 423 | |||
| 424 | ;; The "Windows" keys on newer keyboards bring up the Start menu | ||
| 425 | ;; whether you want it or not - make Emacs ignore these keystrokes | ||
| 426 | ;; rather than beep. | ||
| 427 | (global-set-key [lwindow] 'ignore) | ||
| 428 | (global-set-key [rwindow] 'ignore) | ||
| 429 | |||
| 430 | (declare-function x-server-version "w32fns.c" (&optional terminal)) | ||
| 431 | |||
| 432 | (defun w32-version () | ||
| 433 | "Return the MS-Windows version numbers. | ||
| 434 | The value is a list of three integers: the major and minor version | ||
| 435 | numbers, and the build number." | ||
| 436 | (x-server-version)) | ||
| 437 | |||
| 438 | (defun w32-using-nt () | ||
| 439 | "Return non-nil if running on a Windows NT descendant. | ||
| 440 | That includes all Windows systems except for 9X/Me." | ||
| 441 | (getenv "SystemRoot")) | ||
| 385 | 442 | ||
| 386 | (provide 'w32-win) | 443 | (provide 'w32-win) |
| 387 | 444 | ||
diff --git a/lisp/w32-common-fns.el b/lisp/w32-common-fns.el deleted file mode 100644 index 04037839b94..00000000000 --- a/lisp/w32-common-fns.el +++ /dev/null | |||
| @@ -1,84 +0,0 @@ | |||
| 1 | ;;; w32-common-fns.el --- Lisp routines for Windows and Cygwin-w32 | ||
| 2 | |||
| 3 | ;; Copyright (C) 1994, 2001-2014 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | ;; This file is part of GNU Emacs. | ||
| 6 | |||
| 7 | ;; GNU Emacs is free software: you can redistribute it and/or modify | ||
| 8 | ;; it under the terms of the GNU General Public License as published by | ||
| 9 | ;; the Free Software Foundation, either version 3 of the License, or | ||
| 10 | ;; (at your option) any later version. | ||
| 11 | |||
| 12 | ;; GNU Emacs is distributed in the hope that it will be useful, | ||
| 13 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | ;; GNU General Public License for more details. | ||
| 16 | |||
| 17 | ;; You should have received a copy of the GNU General Public License | ||
| 18 | ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. | ||
| 19 | |||
| 20 | ;;; Commentary: | ||
| 21 | ;;; | ||
| 22 | ;;; This file contains functions that are used by both native NT Emacs | ||
| 23 | ;;; and Cygwin Emacs compiled to use the native Windows widget | ||
| 24 | ;;; library. | ||
| 25 | |||
| 26 | (declare-function x-server-version "w32fns.c" (&optional terminal)) | ||
| 27 | |||
| 28 | (defun w32-version () | ||
| 29 | "Return the MS-Windows version numbers. | ||
| 30 | The value is a list of three integers: the major and minor version | ||
| 31 | numbers, and the build number." | ||
| 32 | (x-server-version)) | ||
| 33 | |||
| 34 | (defun w32-using-nt () | ||
| 35 | "Return non-nil if running on a Windows NT descendant. | ||
| 36 | That includes all Windows systems except for 9X/Me." | ||
| 37 | (getenv "SystemRoot")) | ||
| 38 | |||
| 39 | (declare-function w32-get-clipboard-data "w32select.c") | ||
| 40 | (declare-function w32-set-clipboard-data "w32select.c") | ||
| 41 | (declare-function x-server-version "w32fns.c" (&optional display)) | ||
| 42 | |||
| 43 | ;;; Fix interface to (X-specific) mouse.el | ||
| 44 | (gui-method-define gui-own-selection w32 | ||
| 45 | (lambda (type value) | ||
| 46 | (put 'x-selections (or type 'PRIMARY) data))) | ||
| 47 | |||
| 48 | (gui-method-define gui-disown-selection w32 | ||
| 49 | (lambda (type &optional _time-object _frame) | ||
| 50 | (put 'x-selections (or type 'PRIMARY) nil))) | ||
| 51 | |||
| 52 | (gui-method-define gui-get-selection w32 | ||
| 53 | (lambda (&optional type _data-type) | ||
| 54 | (get 'x-selections (or type 'PRIMARY)))) | ||
| 55 | |||
| 56 | ;; gui-selection-owner-p is used in simple.el | ||
| 57 | (gui-method-define gui-selection-owner-p w32 | ||
| 58 | (lambda (selection) | ||
| 59 | (and (memq selection '(nil PRIMARY SECONDARY)) | ||
| 60 | (get 'x-selections (or selection 'PRIMARY))))) | ||
| 61 | |||
| 62 | ;; The "Windows" keys on newer keyboards bring up the Start menu | ||
| 63 | ;; whether you want it or not - make Emacs ignore these keystrokes | ||
| 64 | ;; rather than beep. | ||
| 65 | (global-set-key [lwindow] 'ignore) | ||
| 66 | (global-set-key [rwindow] 'ignore) | ||
| 67 | |||
| 68 | (defvar w32-charset-info-alist) ; w32font.c | ||
| 69 | |||
| 70 | |||
| 71 | ;;;; Selections | ||
| 72 | |||
| 73 | (defun w32-get-selection-value () | ||
| 74 | "Return the value of the current selection. | ||
| 75 | Consult the selection. Treat empty strings as if they were unset." | ||
| 76 | (if gui-select-enable-clipboard | ||
| 77 | ;; Don't die if x-get-selection signals an error. | ||
| 78 | (with-demoted-errors "w32-get-clipboard-data:%S" | ||
| 79 | (w32-get-clipboard-data)))) | ||
| 80 | |||
| 81 | ;; Arrange for the kill and yank functions to set and check the clipboard. | ||
| 82 | (gui-method-define gui-selection-value w32 #'w32-get-selection-value) | ||
| 83 | |||
| 84 | (provide 'w32-common-fns) | ||
diff --git a/lisp/w32-fns.el b/lisp/w32-fns.el index fda51b1532b..2cbeb49d543 100644 --- a/lisp/w32-fns.el +++ b/lisp/w32-fns.el | |||
| @@ -26,7 +26,6 @@ | |||
| 26 | 26 | ||
| 27 | ;;; Code: | 27 | ;;; Code: |
| 28 | (require 'w32-vars) | 28 | (require 'w32-vars) |
| 29 | (require 'w32-common-fns) | ||
| 30 | 29 | ||
| 31 | (defvar explicit-shell-file-name) | 30 | (defvar explicit-shell-file-name) |
| 32 | 31 | ||
diff --git a/src/ChangeLog b/src/ChangeLog index facddf3b849..c03b6dad06f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2014-10-06 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * lisp.mk (lisp): Remove w32-common-fns.elc. | ||
| 4 | |||
| 1 | 2014-10-05 Paul Eggert <eggert@cs.ucla.edu> | 5 | 2014-10-05 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 6 | ||
| 3 | * keyboard.c (Qleft, Qright): Remove duplicate definitions (Bug#9927). | 7 | * keyboard.c (Qleft, Qright): Remove duplicate definitions (Bug#9927). |
| @@ -20,10 +24,9 @@ | |||
| 20 | (ns_draw_window_cursor): Adjust y for hbar cursor only if smaller than | 24 | (ns_draw_window_cursor): Adjust y for hbar cursor only if smaller than |
| 21 | line height (Bug#17977). | 25 | line height (Bug#17977). |
| 22 | 26 | ||
| 23 | * macfont.m: Fix indentation and import changes from macport | 27 | * macfont.m: Fix indentation and import changes from macport 24.3.94. |
| 24 | 24.3.94. | ||
| 25 | (macfont_closest_traits_index): New function. | 28 | (macfont_closest_traits_index): New function. |
| 26 | (macfont_closest_traits_index_p): Renamed from | 29 | (macfont_closest_traits_index_p): Rename from |
| 27 | macfont_closest_traits_index. | 30 | macfont_closest_traits_index. |
| 28 | (macfont_list): Use macfont_closest_traits_index_p. | 31 | (macfont_list): Use macfont_closest_traits_index_p. |
| 29 | 32 | ||
| @@ -40,8 +43,8 @@ | |||
| 40 | 43 | ||
| 41 | 2014-10-04 Martin Rudalics <rudalics@gmx.at> | 44 | 2014-10-04 Martin Rudalics <rudalics@gmx.at> |
| 42 | 45 | ||
| 43 | * buffer.c (scroll_bar_width, scroll_bar_height): Fix | 46 | * buffer.c (scroll_bar_width, scroll_bar_height): |
| 44 | doc-strings. | 47 | Fix doc-strings. |
| 45 | * window.c (Fset_window_scroll_bars): Fix doc-string. | 48 | * window.c (Fset_window_scroll_bars): Fix doc-string. |
| 46 | (Fwindow_scroll_bars): Have it return what the doc-string says. | 49 | (Fwindow_scroll_bars): Have it return what the doc-string says. |
| 47 | 50 | ||
| @@ -144,8 +147,8 @@ | |||
| 144 | values. | 147 | values. |
| 145 | (my_create_window): Move the calculation of the coordinates of the | 148 | (my_create_window): Move the calculation of the coordinates of the |
| 146 | frame's top-left edge here. Pass them to the input thread via the | 149 | frame's top-left edge here. Pass them to the input thread via the |
| 147 | second parameter of the WM_EMACS_CREATEWINDOW message. See | 150 | second parameter of the WM_EMACS_CREATEWINDOW message. |
| 148 | http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00892.html | 151 | See http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00892.html |
| 149 | for the details. | 152 | for the details. |
| 150 | 153 | ||
| 151 | 2014-09-30 Eli Zaretskii <eliz@gnu.org> | 154 | 2014-09-30 Eli Zaretskii <eliz@gnu.org> |
| @@ -156,8 +159,8 @@ | |||
| 156 | obey it if the glyph row showing point will be fully visible. | 159 | obey it if the glyph row showing point will be fully visible. |
| 157 | Likewise when the window start is in a continuation line. If, | 160 | Likewise when the window start is in a continuation line. If, |
| 158 | after trying everything under the 'force_start' label, point is | 161 | after trying everything under the 'force_start' label, point is |
| 159 | still not fully visible, give up and scroll the window. Add | 162 | still not fully visible, give up and scroll the window. |
| 160 | debugging traces. (Bug#18545) | 163 | Add debugging traces. (Bug#18545) |
| 161 | 164 | ||
| 162 | * window.c (Frecenter): Set the window's redisplay flag. | 165 | * window.c (Frecenter): Set the window's redisplay flag. |
| 163 | 166 | ||
diff --git a/src/lisp.mk b/src/lisp.mk index e9783f649be..642e9af225f 100644 --- a/src/lisp.mk +++ b/src/lisp.mk | |||
| @@ -153,7 +153,6 @@ lisp = \ | |||
| 153 | $(lispsource)/term/w32-win.elc \ | 153 | $(lispsource)/term/w32-win.elc \ |
| 154 | $(lispsource)/ls-lisp.elc \ | 154 | $(lispsource)/ls-lisp.elc \ |
| 155 | $(lispsource)/disp-table.elc \ | 155 | $(lispsource)/disp-table.elc \ |
| 156 | $(lispsource)/w32-common-fns.elc \ | ||
| 157 | $(lispsource)/dos-w32.elc \ | 156 | $(lispsource)/dos-w32.elc \ |
| 158 | $(lispsource)/w32-fns.elc \ | 157 | $(lispsource)/w32-fns.elc \ |
| 159 | $(lispsource)/dos-fns.elc \ | 158 | $(lispsource)/dos-fns.elc \ |