comparison lisp/faces.el @ 34018:a442998dd573

(face-foreground, face-background, face-stipple): Return nil if attribute is unspecified, for backward compatibility.
author Gerd Moellmann <gerd@gnu.org>
date Wed, 29 Nov 2000 19:21:17 +0000
parents 01da583dbe56
children 08b928780fd1
comparison
equal deleted inserted replaced
34017:8cf5499796cc 34018:a442998dd573
355 (defun face-foreground (face &optional frame) 355 (defun face-foreground (face &optional frame)
356 "Return the foreground color name of FACE, or nil if unspecified. 356 "Return the foreground color name of FACE, or nil if unspecified.
357 If the optional argument FRAME is given, report on face FACE in that frame. 357 If the optional argument FRAME is given, report on face FACE in that frame.
358 If FRAME is t, report on the defaults for face FACE (for new frames). 358 If FRAME is t, report on the defaults for face FACE (for new frames).
359 If FRAME is omitted or nil, use the selected frame." 359 If FRAME is omitted or nil, use the selected frame."
360 (internal-get-lisp-face-attribute face :foreground frame)) 360 (let ((value (internal-get-lisp-face-attribute face :foreground frame)))
361 (if (eq value 'unspecified)
362 nil
363 value)))
361 364
362 365
363 (defun face-background (face &optional frame) 366 (defun face-background (face &optional frame)
364 "Return the background color name of FACE, or nil if unspecified. 367 "Return the background color name of FACE, or nil if unspecified.
365 If the optional argument FRAME is given, report on face FACE in that frame. 368 If the optional argument FRAME is given, report on face FACE in that frame.
366 If FRAME is t, report on the defaults for face FACE (for new frames). 369 If FRAME is t, report on the defaults for face FACE (for new frames).
367 If FRAME is omitted or nil, use the selected frame." 370 If FRAME is omitted or nil, use the selected frame."
368 (internal-get-lisp-face-attribute face :background frame)) 371 (let ((value (internal-get-lisp-face-attribute face :background frame)))
372 (if (eq value 'unspecified)
373 nil
374 value)))
369 375
370 376
371 (defun face-stipple (face &optional frame) 377 (defun face-stipple (face &optional frame)
372 "Return the stipple pixmap name of FACE, or nil if unspecified. 378 "Return the stipple pixmap name of FACE, or nil if unspecified.
373 If the optional argument FRAME is given, report on face FACE in that frame. 379 If the optional argument FRAME is given, report on face FACE in that frame.
374 If FRAME is t, report on the defaults for face FACE (for new frames). 380 If FRAME is t, report on the defaults for face FACE (for new frames).
375 If FRAME is omitted or nil, use the selected frame." 381 If FRAME is omitted or nil, use the selected frame."
376 (internal-get-lisp-face-attribute face :stipple frame)) 382 (let ((value (internal-get-lisp-face-attribute face :stipple frame)))
383 (if (eq value 'unspecified)
384 nil
385 value)))
377 386
378 387
379 (defalias 'face-background-pixmap 'face-stipple) 388 (defalias 'face-background-pixmap 'face-stipple)
380 389
381 390