Parcourir la source

Minor XEmacs compatiblity fixes from Greg Chernev.

Carsten Dominik il y a 17 ans
Parent
commit
b97d2bcc4e
3 fichiers modifiés avec 12 ajouts et 6 suppressions
  1. 3 1
      lisp/org-compat.el
  2. 1 1
      lisp/org-macs.el
  3. 8 4
      lisp/org.el

+ 3 - 1
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."

+ 1 - 1
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)))
 

+ 8 - 4
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))