From d3b8ca4a3e56316a89e775f0198560342f7a5e13 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Thu, 22 Apr 2010 15:30:12 +0200 Subject: [PATCH] Use (featurep 'xemacs) to help the byte compiler --- lisp/ChangeLog | 2 ++ lisp/org-compat.el | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ba51949af..02a97db23 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,7 @@ 2010-04-22 Carsten Dominik + * 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 b6c7b6185..05dbd9929 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)