emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] trunk r118180: * lisp/select.el: Use lexical-binding.


From: Stefan Monnier
Subject: [Emacs-diffs] trunk r118180: * lisp/select.el: Use lexical-binding.
Date: Thu, 23 Oct 2014 01:39:11 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 118180
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18791
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Wed 2014-10-22 21:38:59 -0400
message:
  * lisp/select.el: Use lexical-binding.
  (gui-set-selection): Provide an implementation for non-GUI frames.
  * lisp/term/x-win.el: Use lexical-binding.
  (x-clipboard-yank): Fix up missed renamings.
  * lisp/term/w32-win.el (libgif-version, libjpeg-version): Silence compiler.
  (w32--set-selection): Fix up var names.
  * lisp/term/pc-win.el: Use lexical-binding.
  (w16-selection-exists-p): Silence compiler warning.
  (w16-selection-owner-p): Fix up missed renamings.
  
  * lisp/emacs-lisp/bytecomp.el (byte-compile-form): Remove left-over debug.
  
  * lisp/frame.el (frame-notice-user-settings): Fix excessive quoting.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/emacs-lisp/bytecomp.el    bytecomp.el-20091113204419-o5vbwnq5f7feedwu-492
  lisp/frame.el                  frame.el-20091113204419-o5vbwnq5f7feedwu-275
  lisp/gnus/ChangeLog            changelog-20091113204419-o5vbwnq5f7feedwu-1433
  lisp/org/ChangeLog             changelog-20091113204419-o5vbwnq5f7feedwu-8688
  lisp/select.el                 select.el-20091113204419-o5vbwnq5f7feedwu-550
  lisp/term/pc-win.el            pcwin.el-20091113204419-o5vbwnq5f7feedwu-795
  lisp/term/w32-win.el           w32win.el-20091113204419-o5vbwnq5f7feedwu-943
  lisp/term/x-win.el             xwin.el-20091113204419-o5vbwnq5f7feedwu-113
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2014-10-22 13:30:16 +0000
+++ b/lisp/ChangeLog    2014-10-23 01:38:59 +0000
@@ -1,3 +1,20 @@
+2014-10-23  Stefan Monnier  <address@hidden>
+
+       * select.el: Use lexical-binding.
+       (gui-set-selection): Provide an implementation for non-GUI frames
+       (bug#18791).
+       * term/x-win.el: Use lexical-binding.
+       (x-clipboard-yank): Fix up missed renamings.
+       * term/w32-win.el (libgif-version, libjpeg-version): Silence compiler.
+       (w32--set-selection): Fix up var names.
+       * term/pc-win.el: Use lexical-binding.
+       (w16-selection-exists-p): Silence compiler warning.
+       (w16-selection-owner-p): Fix up missed renamings.
+
+       * emacs-lisp/bytecomp.el (byte-compile-form): Remove left-over debug.
+
+       * frame.el (frame-notice-user-settings): Fix excessive quoting.
+
 2014-10-22  Tassilo Horn  <address@hidden>
 
        * doc-view.el (doc-view-open-text): View the document's plain text

=== modified file 'lisp/emacs-lisp/bytecomp.el'
--- a/lisp/emacs-lisp/bytecomp.el       2014-10-20 19:59:41 +0000
+++ b/lisp/emacs-lisp/bytecomp.el       2014-10-23 01:38:59 +0000
@@ -2963,11 +2963,9 @@
                                            interactive-only))
                                   (t "."))))
         (if (eq (car-safe (symbol-function (car form))) 'macro)
-            (progn
-              (debug)
-              (byte-compile-log-warning
-               (format "Forgot to expand macro %s in %S" (car form) form)
-               nil :error)))
+            (byte-compile-log-warning
+             (format "Forgot to expand macro %s in %S" (car form) form)
+             nil :error))
         (if (and handler
                  ;; Make sure that function exists.
                  (and (functionp handler)

=== modified file 'lisp/frame.el'
--- a/lisp/frame.el     2014-10-21 15:27:18 +0000
+++ b/lisp/frame.el     2014-10-23 01:38:59 +0000
@@ -305,7 +305,7 @@
                                     frame-initial-frame-tool-bar-height)))
                        (t (+ top frame-initial-frame-tool-bar-height)))))
                  (modify-frame-parameters
-                  frame-initial-frame '((top . adjusted-top))))))
+                  frame-initial-frame `((top . ,adjusted-top))))))
            (tool-bar-mode -1))))
 
       ;; The initial frame we create above always has a minibuffer.

=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog       2014-10-21 01:17:06 +0000
+++ b/lisp/gnus/ChangeLog       2014-10-23 01:38:59 +0000
@@ -616,7 +616,7 @@
        * gnus-icalendar.el (gnus-icalendar-event:org-timestamp):
        Fix org-timestamp for events ending at midnight.
 
-2013-11-21  Ivan Shmakov  <address@hidden>  (tiny change)
+2013-11-21  Ivan Shmakov  <address@hidden>
 
        * nndoc.el (nndoc-type-alist, nndoc-debbugs-db-type-p):
        Support debbugs .log files.

=== modified file 'lisp/org/ChangeLog'
--- a/lisp/org/ChangeLog        2014-10-21 01:17:06 +0000
+++ b/lisp/org/ChangeLog        2014-10-23 01:38:59 +0000
@@ -6680,7 +6680,7 @@
        (org-mew-open-by-message-id, org-mew-search, org-mew-capture)
        (org-mew-capture-guess-selection-keys): New functions.
 
-2013-11-12  Trevor Murphy  <address@hidden>  (tiny change)
+2013-11-12  Trevor Murphy  <address@hidden>
 
        * org.el (org-get-compact-tod): Always pad minutes to two places.
 

=== modified file 'lisp/select.el'
--- a/lisp/select.el    2014-10-21 15:27:18 +0000
+++ b/lisp/select.el    2014-10-23 01:38:59 +0000
@@ -1,4 +1,4 @@
-;;; select.el --- lisp portion of standard selection support
+;;; select.el --- lisp portion of standard selection support  -*- 
lexical-binding:t -*-
 
 ;; Copyright (C) 1993-1994, 2001-2014 Free Software Foundation, Inc.
 
@@ -255,7 +255,7 @@
 \(Those are literal upper-case symbol names, since that's what X expects.)
 TARGET-TYPE is the type of data desired, typically `STRING'.")
 
-(gui-method-declare gui-set-selection nil
+(gui-method-declare gui-set-selection #'ignore
   "Method to assert a selection of type SELECTION and value VALUE.
 SELECTION is a symbol, typically `PRIMARY', `SECONDARY', or `CLIPBOARD'.
 If VALUE is nil and we own the selection SELECTION, disown it instead.

=== modified file 'lisp/term/pc-win.el'
--- a/lisp/term/pc-win.el       2014-10-21 15:27:18 +0000
+++ b/lisp/term/pc-win.el       2014-10-23 01:38:59 +0000
@@ -1,4 +1,4 @@
-;;; pc-win.el --- setup support for `PC windows' (whatever that is)
+;;; pc-win.el --- setup support for `PC windows' (whatever that is)  -*- 
lexical-binding:t -*-
 
 ;; Copyright (C) 1994, 1996-1997, 1999, 2001-2014 Free Software
 ;; Foundation, Inc.
@@ -45,20 +45,20 @@
 (declare-function w16-get-clipboard-data "w16select.c")
 (declare-function msdos-setup-keyboard "internal" (frame))
 
-;;; This was copied from etc/rgb.txt, except that some values were changed
-;;; a bit to make them consistent with DOS console colors, and the RGB
-;;; values were scaled up to 16 bits, as `tty-define-color' requires.
-;;;
-;;; The mapping between the 16 standard EGA/VGA colors and X color names
-;;; was done by running a Unix version of Emacs inside an X client and a
-;;; DJGPP-compiled Emacs on the same PC.  The names of X colors used to
-;;; define the pixel values are shown as comments to each color below.
-;;;
-;;; If you want to change the RGB values, keep in mind that various pieces
-;;; of Emacs think that a color whose RGB values add up to less than 0.6 of
-;;; the values for WHITE (i.e. less than 117963) are ``dark'', otherwise the
-;;; color is ``light''; see `frame-set-background-mode' in lisp/faces.el for
-;;; an example.
+;; This was copied from etc/rgb.txt, except that some values were changed
+;; a bit to make them consistent with DOS console colors, and the RGB
+;; values were scaled up to 16 bits, as `tty-define-color' requires.
+;;;
+;; The mapping between the 16 standard EGA/VGA colors and X color names
+;; was done by running a Unix version of Emacs inside an X client and a
+;; DJGPP-compiled Emacs on the same PC.  The names of X colors used to
+;; define the pixel values are shown as comments to each color below.
+;;;
+;; If you want to change the RGB values, keep in mind that various pieces
+;; of Emacs think that a color whose RGB values add up to less than 0.6 of
+;; the values for WHITE (i.e. less than 117963) are ``dark'', otherwise the
+;; color is ``light''; see `frame-set-background-mode' in lisp/faces.el for
+;; an example.
 (defvar msdos-color-values
   '(("black"          0     0     0     0)
     ("blue"           1     0     0 52480) ; MediumBlue
@@ -226,15 +226,17 @@
   (with-demoted-errors "w16-get-clipboard-data:%s"
     (w16-get-clipboard-data)))
 
+(declare-function w16-selection-exists-p "w16select.c")
 ;; gui-selection-owner-p is used in simple.el.
 (gui-method-define gui-selection-exists-p pc #'w16-selection-exists-p)
 (gui-method-define gui-selection-owner-p pc #'w16-selection-owner-p)
+
 (defun w16-selection-owner-p (_selection)
-  ;; FIXME: Other systems don't obey gui-select-enable-clipboard here.
-  (if gui-select-enable-clipboard
+  ;; FIXME: Other systems don't obey select-enable-clipboard here.
+  (if select-enable-clipboard
       (let ((text
              ;; Don't die if w16-get-clipboard-data signals an error.
-             (ignore-errors
+             (with-demoted-errors "w16-get-clipboard-data: %S"
                (w16-get-clipboard-data))))
         ;; We consider ourselves the owner of the selection
         ;; if it does not exist, or exists and compares
@@ -242,9 +244,7 @@
         ;; Windows clipboard.
         (cond
          ((not text) t)
-         ((or (eq text gui-last-selected-text)
-              (string= text gui-last-selected-text))
-          text)
+         ((equal text gui--last-selected-text-clipboard) text)
          (t nil)))))
 
 ;; gui-set-selection is used in gui-set-selection.

=== modified file 'lisp/term/w32-win.el'
--- a/lisp/term/w32-win.el      2014-10-21 15:27:18 +0000
+++ b/lisp/term/w32-win.el      2014-10-23 01:38:59 +0000
@@ -211,6 +211,8 @@
 
 (defvar dynamic-library-alist)
 (defvar libpng-version)                 ; image.c #ifdef HAVE_NTGUI
+(defvar libgif-version)
+(defvar libjpeg-version)
 
 ;;; Set default known names for external libraries
 (setq dynamic-library-alist
@@ -381,12 +383,13 @@
 (declare-function w32-set-clipboard-data "w32select.c"
                  (string &optional ignored))
 (declare-function w32-get-clipboard-data "w32select.c")
+(declare-function w32-selection-exists-p "w32select.c")
 
 ;;; Fix interface to (X-specific) mouse.el
 (defun w32--set-selection (type value)
   (if (eq type 'CLIPBOARD)
-      (w32-set-clipboard-data text)
-    (put 'x-selections (or type 'PRIMARY) data)))
+      (w32-set-clipboard-data value)
+    (put 'x-selections (or type 'PRIMARY) value)))
 
 (defun w32--get-selection  (&optional type data-type)
   (if (and (eq type 'CLIPBOARD)

=== modified file 'lisp/term/x-win.el'
--- a/lisp/term/x-win.el        2014-10-21 15:27:18 +0000
+++ b/lisp/term/x-win.el        2014-10-23 01:38:59 +0000
@@ -1,4 +1,4 @@
-;;; x-win.el --- parse relevant switches and set up for X  -*-coding: 
iso-2022-7bit;-*-
+;;; x-win.el --- parse relevant switches and set up for X  -*-coding: 
iso-2022-7bit; lexical-binding:t -*-
 
 ;; Copyright (C) 1993-1994, 2001-2014 Free Software Foundation, Inc.
 
@@ -1163,8 +1163,8 @@
   "Insert the clipboard contents, or the last stretch of killed text."
   (declare (obsolete clipboard-yank "25.1"))
   (interactive "*")
-  (let ((clipboard-text (x-selection-value-internal 'CLIPBOARD))
-       (x-select-enable-clipboard t))
+  (let ((clipboard-text (gui--selection-value-internal 'CLIPBOARD))
+       (select-enable-clipboard t))
     (if (and clipboard-text (> (length clipboard-text) 0))
        (kill-new clipboard-text))
     (yank)))


reply via email to

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