summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Dominik <carsten.dominik@gmail.com>2010-04-22 15:30:12 +0200
committerCarsten Dominik <carsten.dominik@gmail.com>2010-04-22 15:30:12 +0200
commitd3b8ca4a3e56316a89e775f0198560342f7a5e13 (patch)
tree472e88b5b424fe66df54b33685b1cc8ebcf07451
parent16c0dd7f6993d4ea757af1bdd46ead56ce6019b1 (diff)
downloadorg-mode-d3b8ca4a3e56316a89e775f0198560342f7a5e13.tar.gz
Use (featurep 'xemacs) to help the byte compiler
-rwxr-xr-xlisp/ChangeLog2
-rw-r--r--lisp/org-compat.el8
2 files changed, 8 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index ba51949..02a97db 100755
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,7 @@
2010-04-22 Carsten Dominik <carsten.dominik@gmail.com>
+ * org-compat.el (org-get-x-clipboard-compat): Use (featurep 'xemacs).
+
* org-publish.el (org-publish-project-alist): Update docstring.
(org-publish-file-title-cache): New variable.
(org-publish-initialize-files-alist): Initialize
diff --git a/lisp/org-compat.el b/lisp/org-compat.el
index b6c7b61..05dbd99 100644
--- a/lisp/org-compat.el
+++ b/lisp/org-compat.el
@@ -39,7 +39,10 @@
(declare-function find-library-name "find-func" (library))
(declare-function w32-focus-frame "term/w32-win" (frame))
-(defconst org-xemacs-p (featurep 'xemacs)) ; not used by org.el itself
+;; The following constant is for backward compatibility. We do not use
+;; it in org-mode, because the Byte compiler evaluates (featurep 'xemacs)
+;; at compilation time and can therefore optimize code better.
+(defconst org-xemacs-p (featurep 'xemacs))
(defconst org-format-transports-properties-p
(let ((x "a"))
(add-text-properties 0 1 '(test t) x)
@@ -235,7 +238,8 @@ Works on both Emacs and XEmacs."
(defun org-get-x-clipboard-compat (value)
"Get the clipboard value on XEmacs or Emacs 21"
- (cond (org-xemacs-p (org-no-warnings (get-selection-no-error value)))
+ (cond ((featurep 'xemacs)
+ (org-no-warnings (get-selection-no-error value)))
((fboundp 'x-get-selection)
(condition-case nil
(or (x-get-selection value 'UTF8_STRING)