aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/faces.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/faces.el b/lisp/faces.el
index bb9d4471da3..ac9b6645ae0 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -824,14 +824,14 @@ Use `set-face-attribute' or `modify-face' for finer control."
824 824
825(defun invert-face (face &optional frame) 825(defun invert-face (face &optional frame)
826 "Swap the foreground and background colors of FACE. 826 "Swap the foreground and background colors of FACE.
827FRAME nil or not specified means change face on all frames. 827If FRAME is omitted or nil, it means change face on all frames.
828If FACE specifies neither foreground nor background color, 828If FACE specifies neither foreground nor background color,
829set its foreground and background to the background and foreground 829set its foreground and background to the background and foreground
830of the default face. Value is FACE." 830of the default face. Value is FACE."
831 (interactive (list (read-face-name "Invert face "))) 831 (interactive (list (read-face-name "Invert face ")))
832 (let ((fg (face-attribute face :foreground frame)) 832 (let ((fg (face-attribute face :foreground frame))
833 (bg (face-attribute face :background frame))) 833 (bg (face-attribute face :background frame)))
834 (if (or fg bg) 834 (if (not (and (eq fg 'unspecified) (eq bg 'unspecified)))
835 (set-face-attribute face frame :foreground bg :background fg) 835 (set-face-attribute face frame :foreground bg :background fg)
836 (set-face-attribute face frame 836 (set-face-attribute face frame
837 :foreground 837 :foreground