From bf5ebe1fdda066a7795126fee3663ab0eebaf45f Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Thu, 26 May 2016 16:21:50 +0200 Subject: [PATCH] Silence byte-compiler in Emacs 25.1 * lisp/org-compat.el (org-get-x-clipboard): Use `gui-get-selection', which obsoletes `x-get-selection'. Define the former as an alias for the latter for backward compatibility. --- lisp/org-compat.el | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/lisp/org-compat.el b/lisp/org-compat.el index 91daf8c63..808ecd01f 100644 --- a/lisp/org-compat.el +++ b/lisp/org-compat.el @@ -133,10 +133,10 @@ Don't do the aliasing when `defvaralias' is not bound." (cond ((eq window-system 'x) (org-no-properties (ignore-errors - (or (x-get-selection value 'UTF8_STRING) - (x-get-selection value 'COMPOUND_TEXT) - (x-get-selection value 'STRING) - (x-get-selection value 'TEXT))))) + (or (gui-get-selection value 'UTF8_STRING) + (gui-get-selection value 'COMPOUND_TEXT) + (gui-get-selection value 'STRING) + (gui-get-selection value 'TEXT))))) ((and (eq window-system 'w32) (fboundp 'w32-get-clipboard-data)) (w32-get-clipboard-data)))) @@ -346,8 +346,9 @@ With two arguments, return floor and remainder of their quotient." (buffer-narrowed-p) (/= (- (point-max) (point-min)) (buffer-size)))) -;; As of Emacs 25.1, `outline-mode` functions are under the 'outline-' -;; prefix and `find-tag` is replaced with `xref-find-definition`. +;; As of Emacs 25.1, `outline-mode' functions are under the 'outline-' +;; prefix, `find-tag' is replaced with `xref-find-definition' and +;; `x-get-selection' with `gui-get-selection'. (when (< emacs-major-version 25) (defalias 'outline-hide-entry 'hide-entry) (defalias 'outline-hide-sublevels 'hide-sublevels) @@ -357,7 +358,8 @@ With two arguments, return floor and remainder of their quotient." (defalias 'outline-show-children 'show-children) (defalias 'outline-show-entry 'show-entry) (defalias 'outline-show-subtree 'show-subtree) - (defalias 'xref-find-definitions 'find-tag)) + (defalias 'xref-find-definitions 'find-tag) + (defalias 'gui-get-selection 'x-get-selection)) (defmacro org-with-silent-modifications (&rest body) (if (fboundp 'with-silent-modifications)