Browse Source

Fix XEmacs compatibility problems.

Carsten Dominik 16 years ago
parent
commit
8a13a7704f
4 changed files with 20 additions and 4 deletions
  1. 9 0
      lisp/ChangeLog
  2. 1 1
      lisp/org-clock.el
  3. 8 1
      lisp/org-compat.el
  4. 2 2
      lisp/org-remember.el

+ 9 - 0
lisp/ChangeLog

@@ -1,5 +1,14 @@
+
 2008-11-21  Carsten Dominik  <carsten.dominik@gmail.com>
 
+	* org-remember.el (org-remember-apply-template): Use
+	`org-substring-no-properties'.
+
+	* org-compat.el (org-substring-no-properties): New function.
+
+	* org-remember.el (org-remember-apply-template): Use
+	`org-substring-no-properties' for compatibility.
+
 	* org-list.el (org-list-two-spaces-after-bullet-regexp): New
 	option.
 	(org-fix-bullet-type): respect

+ 1 - 1
lisp/org-clock.el

@@ -256,7 +256,7 @@ of a different task.")
 			     'help-echo (concat help-text ": " org-clock-heading))
 	       (org-propertize clock-string 'help-echo help-text)))
 	   'local-map org-clock-mode-map
-	   'mouse-face '(face mode-line-highlight)))
+	   'mouse-face (if (featurep 'xemacs) 'highlight 'mode-line-highlight)))
     (force-mode-line-update)))
 
 (defvar org-clock-mode-line-entry nil

+ 8 - 1
lisp/org-compat.el

@@ -277,9 +277,16 @@ that can be added."
 
 (defun org-propertize (string &rest properties)
   (if (featurep 'xemacs)
-      (add-text-properties 0 (length string) properties string)
+      (progn
+	(add-text-properties 0 (length string) properties string)
+	string)
     (apply 'propertize string properties)))
 
+(defun org-substring-no-properties (string &optional from to)
+  (if (featurep 'xemacs)
+      (org-no-properties (substring string from to))
+    (substring-no-properties string from to)))
+
 (provide 'org-compat)
 
 ;; arch-tag: a0a0579f-e68c-4bdf-9e55-93768b846bbe

+ 2 - 2
lisp/org-remember.el

@@ -380,7 +380,7 @@ to be run from that hook to function properly."
 		    v-a))
 	     (v-n user-full-name)
 	     (v-k (if (marker-buffer org-clock-marker)
-		      (substring-no-properties org-clock-heading)))
+		      (org-substring-no-properties org-clock-heading)))
 	     (v-K (if (marker-buffer org-clock-marker)
 		      (org-make-link-string
 		       (buffer-file-name (marker-buffer org-clock-marker))
@@ -520,7 +520,7 @@ to be run from that hook to function properly."
 						   (car clipboards))))))
 	   ((equal char "p")
 	    (let*
-		((prop (substring-no-properties prompt))
+		((prop (org-substring-no-properties prompt))
 		 (pall (concat prop "_ALL"))
 		 (allowed
 		  (with-current-buffer