Commit c956c19f authored by David Byers's avatar David Byers
Browse files

Fixed bug in XEmacs and setting the faces more than once.

parent 39b0a08f
1999-10-14 David Byers <davby@ida.liu.se> 1999-10-14 David Byers <davby@ida.liu.se>
* option-edit.el (kom-customize): Use lyskom-copy-face.
* utilities.el (lyskom-copy-face): New function.
(lyskom-set-face-scheme): Use it.
* english-strings.el, swedish-strings.el, vars.el.in: Removed * english-strings.el, swedish-strings.el, vars.el.in: Removed
variable lyskom-text-start. variable lyskom-text-start.
......
...@@ -295,6 +295,13 @@ With optional argument N, returns Nth-to-last link (default 1)." ...@@ -295,6 +295,13 @@ With optional argument N, returns Nth-to-last link (default 1)."
(while (consp (cdr x)) (setq x (cdr x))) (while (consp (cdr x)) (setq x (cdr x)))
x)) x))
;;; ================================================================
;;; Faces
(lyskom-provide-function reset-face (face &optional locale tag-set exact-p)
)
;;; ====================================================================== ;;; ======================================================================
;;; Event stuff ;;; Event stuff
......
...@@ -385,7 +385,7 @@ customize buffer but do not save them to the server." ...@@ -385,7 +385,7 @@ customize buffer but do not save them to the server."
(erase-buffer)) (erase-buffer))
(use-local-map lyskom-customize-map) (use-local-map lyskom-customize-map)
(condition-case nil (condition-case nil
(copy-face 'kom-active-face 'widget-button-face) (lyskom-copy-face 'kom-active-face 'widget-button-face)
(error nil)) (error nil))
(mapcar 'lyskom-custom-insert lyskom-customize-buffer-format) (mapcar 'lyskom-custom-insert lyskom-customize-buffer-format)
(widget-setup) (widget-setup)
......
...@@ -462,6 +462,11 @@ under XEmacs." ...@@ -462,6 +462,11 @@ under XEmacs."
(set-face-background face color) (set-face-background face color)
(error nil))) (error nil)))
(defun lyskom-copy-face (old new)
(lyskom-xemacs-or-gnu (copy-face old new nil nil nil 'remove-all)
(copy-face old new)))
(defun lyskom-set-face-scheme (scheme) (defun lyskom-set-face-scheme (scheme)
"Set the LysKOM color and face scheme to SCHEME. Valid schemes are listed "Set the LysKOM color and face scheme to SCHEME. Valid schemes are listed
...@@ -474,7 +479,7 @@ in lyskom-face-schemes." ...@@ -474,7 +479,7 @@ in lyskom-face-schemes."
(mapcar (mapcar
(function (function
(lambda (spec) (lambda (spec)
(copy-face (or (elt spec 1) 'default) (elt spec 0)) (lyskom-copy-face (or (elt spec 1) 'default) (elt spec 0))
(if (elt spec 2) (if (elt spec 2)
(lyskom-set-face-foreground (elt spec 0) (elt spec 2))) (lyskom-set-face-foreground (elt spec 0) (elt spec 2)))
(if (elt spec 3) (if (elt spec 3)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment