summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Dominik <carsten.dominik@gmail.com>2010-04-21 09:03:30 +0200
committerCarsten Dominik <carsten.dominik@gmail.com>2010-04-21 09:18:12 +0200
commite0ca9a5bdf0dc61e3c117891b3b6b3f8dc6bc4fd (patch)
treedd6cc487f879872e6613b792fa09e7440162203a
parent56ba0892e5ef136bca03bf53eb7ca8d1c45b7d88 (diff)
downloadorg-mode-e0ca9a5bdf0dc61e3c117891b3b6b3f8dc6bc4fd.tar.gz
More work on simplifying compatibility code
-rwxr-xr-xlisp/ChangeLog8
-rw-r--r--lisp/org-agenda.el5
-rw-r--r--lisp/org-clock.el11
-rw-r--r--lisp/org-colview.el3
-rw-r--r--lisp/org.el6
5 files changed, 20 insertions, 13 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 57ddae3..31d7f64 100755
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,13 @@
2010-04-21 Carsten Dominik <carsten.dominik@gmail.com>
+ * org-colview-xemacs.el: Make sure this file is never loaded into
+ Emacs. Remove all tests for XEmacs.
+
+ * org-colview.el: Make sure this file is never loaded into XEmacs.
+
+ * org-agenda.el (org-highlight, org-unhighlight): Use direct
+ overlay calls.
+
* org.el (org-key): Apply the translations defined in
`org-xemacs-key-equivalents'.
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 9dd7d19..c68038d 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -5878,12 +5878,11 @@ so that the date SD will be in that range."
(defun org-highlight (begin end &optional buffer)
"Highlight a region with overlay."
- (funcall (if (featurep 'xemacs) 'set-extent-endpoints 'move-overlay)
- org-hl begin end (or buffer (current-buffer))))
+ (move-overlay org-hl begin end (or buffer (current-buffer))))
(defun org-unhighlight ()
"Detach overlay INDEX."
- (funcall (if (featurep 'xemacs) 'detach-extent 'delete-overlay) org-hl))
+ (org-detach-overlay org-hl))
;; FIXME this is currently not used.
(defun org-highlight-until-next-command (beg end &optional buffer)
diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index b971a75..d1805e6 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -759,11 +759,10 @@ was started."
(goto-char (match-end 0)))
nil))))))
(let (char-pressed)
- (if (featurep 'xemacs)
- (progn
- (message (concat (funcall prompt-fn clock)
- " [(kK)eep (sS)ubtract (C)ancel]? "))
- (setq char-pressed (read-char-exclusive)))
+ (when (featurep 'xemacs)
+ (message (concat (funcall prompt-fn clock)
+ " [(kK)eep (sS)ubtract (C)ancel]? "))
+ (setq char-pressed (read-char-exclusive)))
(while (or (null char-pressed)
(and (not (memq char-pressed '(?k ?K ?s ?S ?C ?i)))
(or (ding) t)))
@@ -771,7 +770,7 @@ was started."
(read-char (concat (funcall prompt-fn clock)
" [(kK)p (sS)ub (C)ncl (i)gn]? ")
nil 45)))
- (and (not (eq char-pressed ?i)) char-pressed))))))
+ (and (not (eq char-pressed ?i)) char-pressed)))))
(default (floor (/ (org-float-time
(time-subtract (current-time) last-valid)) 60)))
(keep (and (memq ch '(?k ?K))
diff --git a/lisp/org-colview.el b/lisp/org-colview.el
index 6cb7010..f80c912 100644
--- a/lisp/org-colview.el
+++ b/lisp/org-colview.el
@@ -36,6 +36,9 @@
(declare-function org-agenda-redo "org-agenda" ())
(declare-function org-agenda-do-context-action "org-agenda" ())
+(when (featurep 'xemacs)
+ (error "Do not load this file into XEmacs, use 'org-colview-xemacs.el'."))
+
;;; Column View
(defvar org-columns-overlays nil
diff --git a/lisp/org.el b/lisp/org.el
index eb16a4d..0eaf326 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -4356,7 +4356,7 @@ The following commands are available:
;; we switch another buffer into org-mode.
(if (featurep 'xemacs)
(when (boundp 'outline-mode-menu-heading)
- ;; Assume this is Greg's port, it used easymenu
+ ;; Assume this is Greg's port, it uses easymenu
(easy-menu-remove outline-mode-menu-heading)
(easy-menu-remove outline-mode-menu-show)
(easy-menu-remove outline-mode-menu-hide))
@@ -16999,9 +16999,7 @@ With prefix arg UNCOMPILED, load the uncompiled versions."
"Display the given MESSAGE as a warning."
(if (fboundp 'display-warning)
(display-warning 'org message
- (if (featurep 'xemacs)
- 'warning
- :warning))
+ (if (featurep 'xemacs) 'warning :warning))
(let ((buf (get-buffer-create "*Org warnings*")))
(with-current-buffer buf
(goto-char (point-max))