changeset 60642:a19b91e10a73

(sera-being-called-by-w3): New variable. (ethio-sera-to-fidel-ethio): Check also sera-being-called-by-w3. (ethio-fidel-to-sera-buffer): Likewise.
author Kenichi Handa <handa@m17n.org>
date Wed, 16 Mar 2005 11:33:14 +0000
parents d58f58688093
children 8430d50e2bc3
files lisp/language/ethio-util.el
diffstat 1 files changed, 12 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/language/ethio-util.el	Wed Mar 16 08:25:31 2005 +0000
+++ b/lisp/language/ethio-util.el	Wed Mar 16 11:33:14 2005 +0000
@@ -419,6 +419,8 @@
 
 ;; To avoid byte-compiler warnings.  It should never be set globally.
 (defvar ethio-sera-being-called-by-w3)
+;; This variable will be bound by some third-party package.
+(defvar sera-being-called-by-w3)
 
 ;;;###autoload
 (defun ethio-sera-to-fidel-region (beg end &optional secondary force)
@@ -590,9 +592,11 @@
       (cond
 
        ;; skip from "<" to ">" (or from "&" to ";") if in w3-mode
-       ((and (boundp 'ethio-sera-being-called-by-w3)
-	     ethio-sera-being-called-by-w3
-	     (or (= ch ?<) (= ch ?&)))
+       ((and (or (= ch ?<) (= ch ?&))
+	     (or (and (boundp 'ethio-sera-being-called-by-w3)
+		      ethio-sera-being-called-by-w3)
+		 (and (boundp 'sera-being-called-by-w3)
+		      sera-being-called-by-w3)))
 	(search-forward (if (= ch ?<) ">" ";")
 			nil 0))
 
@@ -1177,9 +1181,11 @@
 	  (goto-char (1+ (match-end 0)))) ; because we inserted one byte (\)
 
 	 ;; skip from "<" to ">" (or from "&" to ";") if called from w3
-	 ((and (boundp 'ethio-sera-being-called-by-w3)
-	       ethio-sera-being-called-by-w3
-	       (or (= ch ?<) (= ch ?&)))
+	 ((and (or (= ch ?<) (= ch ?&))
+	       (or (and (boundp 'ethio-sera-being-called-by-w3)
+			ethio-sera-being-called-by-w3)
+		   (and (boundp 'sera-being-called-by-w3)
+			sera-being-called-by-w3)))
 	  (search-forward (if (= ch ?<) ">" ";")
 			  nil 0))