[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[mhc:00425] Re: mhc-snap20000229



On Tue, 29 Feb 2000 20:57:24 +0900,
	Hideyuki SHIRAI (白井秀行) <shirai@xxxxxxxxxxxxxxxxxxx> said:

> nom>     + 19.28 の macro 書式に戻す。
> 
> のことですか? 今のところ問題はないです。

いえ、これは問題ないことは分かっていたのですが、
それ以外にいじった所が 19.28 に対応してるかどうか不安だなと。

> ● XEmacs だと (facep 'italic) って
:
> ● う〜〜ん、ユーザ定義が効かない。
:
> のパッチです

どうもです。あわてて出すといかんですね。なってない。

On Tue, 29 Feb 2000 21:19:16 +0900,
	Hideyuki SHIRAI (白井秀行) <shirai@xxxxxxxxxxxxxxxxxxx> said:

> (おそらく)この挙動って、ユーザが自分で face を作っていたときに上
> 書きしないようになのですね。
> 
> # どうすりゃいいんでしょうか ^^;;;

以下のようにしました。snap からのパッチになってすみません。
結局 mhc-symbol-face-alist-internal では絶対 ow しないで、
setup 中でもで最後に呼ぶ。
--
nom

--- mhc-face.el	2000/02/22 10:21:19	1.6
+++ mhc-face.el	2000/02/29 15:07:14
@@ -66,7 +66,7 @@
   (or (intern-soft (format "mhc-category-face-%s" (downcase category)))
       'default))
 
-(defun mhc-face-make-face-from-string (string prop &optional prefix overwrite)
+(defun mhc-face-make-face-from-string (string prop &optional overwrite prefix)
   (let ((symbol-name (concat prefix (if prefix "-") string)))
     (mhc-face-make-face-from-symbol (intern symbol-name) prop overwrite)))
 
@@ -78,7 +78,7 @@
 	(font    (nth 4 prop))
 	(stipple (nth 5 prop))
 	(face    nil))
-    (if (and (facep symbol) (not overwrite))
+    (if (and (mhc-facep symbol) (not overwrite))
 	symbol
       (setq face (if parent (copy-face parent symbol) (make-face symbol)))
       (if fg      (set-face-foreground  face fg))
@@ -93,7 +93,7 @@
 
 (defun mhc-face-get-gray-face (face)
   (let ((gray-symbol (intern (concat (symbol-name face) "-gray"))))
-    (if (facep gray-symbol)
+    (if (mhc-facep gray-symbol)
 	()
       (copy-face face gray-symbol)
       (set-face-background gray-symbol "gray"))
@@ -101,7 +101,7 @@
 
 (defun mhc-face-get-busy-face (face)
   (let ((busy-symbol (intern (concat (symbol-name face) "-busy"))))
-    (if (facep busy-symbol)
+    (if (mhc-facep busy-symbol)
 	()
       (copy-face face busy-symbol)
       (or (make-face-bold busy-symbol nil t)
@@ -111,7 +111,7 @@
 
 (defun mhc-face-get-underline-face (face)
   (let ((busy-symbol (intern (concat (symbol-name face) "-uline"))))
-    (if (facep busy-symbol)
+    (if (mhc-facep busy-symbol)
 	()
       (copy-face face busy-symbol)
       (set-face-underline-p busy-symbol t))
@@ -122,13 +122,13 @@
 
 (defun mhc-face-setup ()
   (interactive)
-  (let (ow (interactive-p))
+  (let ((ow (interactive-p)))
     ;;
-    (mhc-face-setup-internal mhc-symbol-face-alist-internal ow)
     (mhc-face-setup-internal mhc-symbol-face-alist          ow)
-    ;;
     (mhc-face-setup-internal mhc-category-face-alist        ow)
     ;;
+    (mhc-face-setup-internal mhc-symbol-face-alist-internal nil)
+    ;;
     (mhc-face-put mhc-summary-string-secret   'mhc-summary-face-secret)
     (mhc-face-put mhc-summary-string-conflict 'mhc-summary-face-conflict)
     ))
@@ -151,17 +151,22 @@
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; facep for emacs 19.28
-
-(or (fboundp 'facep)
-    ;; Introduced in Emacs 19.29.
-    (defun facep (x)
-      "Return t if X is a face name or an internal face vector."
-      (and (or (and (fboundp 'internal-facep) (internal-facep x))
-	       (and 
-		(symbolp x) 
-		(assq x (and (boundp 'global-face-data) global-face-data))))
-	   t)))
 
+(cond
+ ((fboundp 'find-face)
+  (defalias 'mhc-facep 'find-face))
+ ((fboundp 'facep)
+  (defalias 'mhc-facep 'facep))
+ (t
+  ;; Introduced in Emacs 19.29.
+  (defun mhc-facep (x)
+    "Return t if X is a face name or an internal face vector."
+    (and (or (and (fboundp 'internal-facep) (internal-facep x))
+	     (and 
+	      (symbolp x) 
+	      (assq x (and (boundp 'global-face-data) global-face-data))))
+	 t))))
+ 
 (provide 'mhc-face)
 
 ;;; Copyright Notice: