From 78ad1cd532c8da14bb582a56221eb0e17c052855 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Tue, 13 Feb 2001 02:03:58 +0000 Subject: [PATCH] (set-face-background, set-face-foreground) (set-face-stipple): Treat a value of nil as being `unspecified'. --- lisp/ChangeLog | 5 +++++ lisp/faces.el | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5b07a0d6a72..ed9ea59cdbd 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2001-02-13 Miles Bader + + * faces.el (set-face-background, set-face-foreground) + (set-face-stipple): Treat a value of nil as being `unspecified'. + 2001-02-12 Dave Love * international/latin1-disp.el: Doc fixes. diff --git a/lisp/faces.el b/lisp/faces.el index b1336af6cc7..dd319eb7601 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -1,6 +1,6 @@ ;;; faces.el --- Lisp faces -;; Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000 +;; Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 ;; Free Software Foundation, Inc. ;; This file is part of GNU Emacs. @@ -648,7 +648,7 @@ and `:slant'. When called interactively, prompt for the face and font." FRAME nil or not specified means change face on all frames. When called interactively, prompt for the face and color." (interactive (read-face-and-attribute :background)) - (set-face-attribute face frame :background color)) + (set-face-attribute face frame :background (or color 'unspecified))) (defun set-face-foreground (face color &optional frame) @@ -656,7 +656,7 @@ When called interactively, prompt for the face and color." FRAME nil or not specified means change face on all frames. When called interactively, prompt for the face and color." (interactive (read-face-and-attribute :foreground)) - (set-face-attribute face frame :foreground color)) + (set-face-attribute face frame :foreground (or color 'unspecified))) (defun set-face-stipple (face stipple &optional frame) @@ -669,7 +669,7 @@ Alternatively, STIPPLE may be a list of the form (WIDTH HEIGHT DATA) where WIDTH and HEIGHT are the size in pixels, and DATA is a string, containing the raw bits of the bitmap." (interactive (read-face-and-attribute :stipple)) - (set-face-attribute face frame :stipple stipple)) + (set-face-attribute face frame :stipple (or stipple 'unspecified))) (defun set-face-underline (face underline &optional frame) -- 2.39.5