From b97d2bcc4e811e71d4cad5fb64c49a7884030559 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Sun, 20 Apr 2008 08:10:18 +0200 Subject: [PATCH] Minor XEmacs compatiblity fixes from Greg Chernev. --- lisp/org-compat.el | 4 +++- lisp/org-macs.el | 2 +- lisp/org.el | 12 ++++++++---- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/lisp/org-compat.el b/lisp/org-compat.el index 7fe15c785..b83e1f6dc 100644 --- a/lisp/org-compat.el +++ b/lisp/org-compat.el @@ -79,7 +79,7 @@ any other entries, and any resulting duplicates will be removed entirely." (make-extent beg end buffer) (make-overlay beg end buffer))) (defun org-delete-overlay (ovl) - (if (featurep 'xemacs) (delete-extent ovl) (delete-overlay ovl))) + (if (featurep 'xemacs) (progn (delete-extent ovl) nil) (delete-overlay ovl))) (defun org-detach-overlay (ovl) (if (featurep 'xemacs) (detach-extent ovl) (delete-overlay ovl))) (defun org-move-overlay (ovl beg end &optional buffer) @@ -123,6 +123,8 @@ any other entries, and any resulting duplicates will be removed entirely." (if (featurep 'xemacs) (extent-start-position o) (overlay-start o))) (defun org-overlay-end (o) (if (featurep 'xemacs) (extent-end-position o) (overlay-end o))) +(defun org-overlay-buffer (o) + (if (featurep 'xemacs) (extent-buffer o) (overlay-buffer o))) (defun org-find-overlays (prop &optional pos delete) "Find all overlays specifying PROP at POS or point. If DELETE is non-nil, delete all those overlays." diff --git a/lisp/org-macs.el b/lisp/org-macs.el index 61a3421e3..9c292521e 100644 --- a/lisp/org-macs.el +++ b/lisp/org-macs.el @@ -138,7 +138,7 @@ We use a macro so that the test can happen at compilation time." (defsubst org-match-string-no-properties (num &optional string) (if (featurep 'xemacs) (let ((s (match-string num string))) - (remove-text-properties 0 (length s) org-rm-props s) + (and s (remove-text-properties 0 (length s) org-rm-props s)) s) (match-string-no-properties num string))) diff --git a/lisp/org.el b/lisp/org.el index cc94ae723..d2cd01d56 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -8542,10 +8542,12 @@ ACTION can be `set', `up', `down', or a character." have t) (setq current org-default-priority)) (cond - ((or (eq action 'set) (integerp action)) - (if (integerp action) + ((or (eq action 'set) + (if (featurep 'xemacs) (characterp action) (integerp action))) + (if (not (eq action 'set)) (setq new action) - (message "Priority %c-%c, SPC to remove: " org-highest-priority org-lowest-priority) + (message "Priority %c-%c, SPC to remove: " + org-highest-priority org-lowest-priority) (setq new (read-char-exclusive))) (if (and (= (upcase org-highest-priority) org-highest-priority) (= (upcase org-lowest-priority) org-lowest-priority)) @@ -11557,7 +11559,9 @@ The images can be removed again with \\[org-ctrl-c-ctrl-c]." (texfile (concat texfilebase ".tex")) (dvifile (concat texfilebase ".dvi")) (pngfile (concat texfilebase ".png")) - (fnh (face-attribute 'default :height nil)) + (fnh (if (featurep 'xemacs) + (font-height (get-face-font 'default)) + (face-attribute 'default :height nil))) (scale (or (plist-get options (if buffer :scale :html-scale)) 1.0)) (dpi (number-to-string (* scale (floor (* 0.9 (if buffer fnh 140.)))))) (fg (or (plist-get options (if buffer :foreground :html-foreground))