]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/select.el: Use lexical-binding.
authorStefan Monnier <monnier@iro.umontreal.ca>
Thu, 23 Oct 2014 01:38:59 +0000 (21:38 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Thu, 23 Oct 2014 01:38:59 +0000 (21:38 -0400)
(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.

Fixes: debbugs:18791
lisp/ChangeLog
lisp/emacs-lisp/bytecomp.el
lisp/frame.el
lisp/gnus/ChangeLog
lisp/org/ChangeLog
lisp/select.el
lisp/term/pc-win.el
lisp/term/w32-win.el
lisp/term/x-win.el

index 3fa382e531b670cbdc6ca5c8cd388a79d933b35c..715e132c43275c6de3ea4ec26b5511f7c2b737d8 100644 (file)
@@ -1,3 +1,20 @@
+2014-10-23  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * 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  <tsdh@gnu.org>
 
        * doc-view.el (doc-view-open-text): View the document's plain text
index 264539e03a7f80ef4609d4c7e428a765e887f897..df7c4cf11b0bf4639633ffb9fbbca887d60d258e 100644 (file)
@@ -2963,11 +2963,9 @@ for symbols generated by the byte compiler itself."
                                            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)
index 9ee86367adc5092840359e07607bbbb9897e354b..78480637e9bce1df301be76e1173f9e8f542ecf3 100644 (file)
@@ -305,7 +305,7 @@ there (in decreasing order of priority)."
                                     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.
index 39dff3d5832a2997ad2dad9538dcf0a18fe18ec8..6cc97e635d590f2ff46cfb80a68919683ec0e304 100644 (file)
        * gnus-icalendar.el (gnus-icalendar-event:org-timestamp):
        Fix org-timestamp for events ending at midnight.
 
-2013-11-21  Ivan Shmakov  <ivan@siamics.net>  (tiny change)
+2013-11-21  Ivan Shmakov  <ivan@siamics.net>
 
        * nndoc.el (nndoc-type-alist, nndoc-debbugs-db-type-p):
        Support debbugs .log files.
index b1de69a1b84cf135f32314a28c1396f132558b36..0f28ef0df925c157d2c4a0388f1e89b39f67ab4b 100644 (file)
        (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  <trevor.m.murphy@gmail.com>  (tiny change)
+2013-11-12  Trevor Murphy  <trevor.m.murphy@gmail.com>
 
        * org.el (org-get-compact-tod): Always pad minutes to two places.
 
index 6b7d32296ea5316f3bd65a80989405343cf6e685..2ce0ef0d7e6feeeb1d53394400a57447d2755877 100644 (file)
@@ -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 @@ SELECTION-SYMBOL is typically `PRIMARY', `SECONDARY', or `CLIPBOARD'.
 \(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.
index b224d6820f983ed8dd1f8317b7ab2d5194436cb6..90eb14aab25e5587cbdc8cf377c19094e346084e 100644 (file)
@@ -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.
 (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.
+;; 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.
+;; 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.
+;; 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 @@ Consult the selection.  Treat empty strings as if they were unset."
   (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 @@ Consult the selection.  Treat empty strings as if they were unset."
         ;; 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.
index 063acd7e8bbbc429ab7da33767264da5e95bd4ef..bb9a7e481a20426c9a5d98defdc20cd8d282ec52 100644 (file)
@@ -211,6 +211,8 @@ See the documentation of `create-fontset-from-fontset-spec' for the format.")
 
 (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 @@ See the documentation of `create-fontset-from-fontset-spec' for the format.")
 (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)
index ebc34d3fdd6a6a6eccf5fa4b183727b28d7ec640..a54846c7d7c1c99f19ab8f03519f5c0112515ea2 100644 (file)
@@ -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 @@ as returned by `x-server-vendor'."
   "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)))