summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2016-05-26 16:21:50 +0200
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2016-05-26 16:22:20 +0200
commitbf5ebe1fdda066a7795126fee3663ab0eebaf45f (patch)
treed337affcefd1cb6032503586b04e9b6f48936356
parent770711153d4720585c01c8849069b6f9cd36654a (diff)
downloadorg-mode-bf5ebe1fdda066a7795126fee3663ab0eebaf45f.tar.gz
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.
-rw-r--r--lisp/org-compat.el16
1 files changed, 9 insertions, 7 deletions
diff --git a/lisp/org-compat.el b/lisp/org-compat.el
index 91daf8c..808ecd0 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)