diff options
-rw-r--r-- | lisp/ChangeLog | 17 | ||||
-rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 8 | ||||
-rw-r--r-- | lisp/frame.el | 2 | ||||
-rw-r--r-- | lisp/gnus/ChangeLog | 2 | ||||
-rw-r--r-- | lisp/org/ChangeLog | 2 | ||||
-rw-r--r-- | lisp/select.el | 4 | ||||
-rw-r--r-- | lisp/term/pc-win.el | 38 | ||||
-rw-r--r-- | lisp/term/w32-win.el | 7 | ||||
-rw-r--r-- | lisp/term/x-win.el | 6 |
9 files changed, 52 insertions, 34 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3fa382e531b..715e132c432 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -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 diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 264539e03a7..df7c4cf11b0 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -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) diff --git a/lisp/frame.el b/lisp/frame.el index 9ee86367adc..78480637e9b 100644 --- a/lisp/frame.el +++ b/lisp/frame.el @@ -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. diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 39dff3d5832..6cc97e635d5 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -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 <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. diff --git a/lisp/org/ChangeLog b/lisp/org/ChangeLog index b1de69a1b84..0f28ef0df92 100644 --- a/lisp/org/ChangeLog +++ b/lisp/org/ChangeLog @@ -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 <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. diff --git a/lisp/select.el b/lisp/select.el index 6b7d32296ea..2ce0ef0d7e6 100644 --- a/lisp/select.el +++ b/lisp/select.el @@ -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. diff --git a/lisp/term/pc-win.el b/lisp/term/pc-win.el index b224d6820f9..90eb14aab25 100644 --- a/lisp/term/pc-win.el +++ b/lisp/term/pc-win.el @@ -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. +;; 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. diff --git a/lisp/term/w32-win.el b/lisp/term/w32-win.el index 063acd7e8bb..bb9a7e481a2 100644 --- a/lisp/term/w32-win.el +++ b/lisp/term/w32-win.el @@ -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) diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el index ebc34d3fdd6..a54846c7d7c 100644 --- a/lisp/term/x-win.el +++ b/lisp/term/x-win.el @@ -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))) |