Mercurial > hg > xemacs-beta
comparison lisp/prim/faces.el @ 118:7d55a9ba150c r20-1b11
Import from CVS: tag r20-1b11
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:24:17 +0200 |
parents | 360340f9fd5f |
children | 6075d714658b |
comparison
equal
deleted
inserted
replaced
117:578fd4947a72 | 118:7d55a9ba150c |
---|---|
1389 ((color x) . "forestgreen")) 'global)))) | 1389 ((color x) . "forestgreen")) 'global)))) |
1390 (set-face-parent 'modeline-mousable-minor-mode 'modeline-mousable | 1390 (set-face-parent 'modeline-mousable-minor-mode 'modeline-mousable |
1391 nil nil 'append) | 1391 nil nil 'append) |
1392 ) | 1392 ) |
1393 | 1393 |
1394 ;; New function with 20.1, suggested by Per Abrahamsen, coded by Kyle Jones. | |
1395 (defun set-face-stipple (face pixmap &optional frame) | |
1396 "Change the stipple pixmap of face FACE to PIXMAP. | |
1397 This is an Emacs compatibility function; consider using | |
1398 set-face-background-pixmap instead. | |
1399 | |
1400 PIXMAP should be a string, the name of a file of pixmap data. | |
1401 The directories listed in the `x-bitmap-file-path' variable are searched. | |
1402 Any kind of image file for which XEmacs has builtin support can be used. | |
1403 | |
1404 Alternatively, PIXMAP may be a list of the form (WIDTH HEIGHT | |
1405 DATA) where WIDTH and HEIGHT are the size in pixels, and DATA is | |
1406 a string, containing the raw bits of the bitmap. XBM data is | |
1407 expected in this case, other types of image data will not work. | |
1408 | |
1409 If the optional FRAME argument is provided, change only | |
1410 in that frame; otherwise change each frame." | |
1411 (while (not (find-face face)) | |
1412 (setq face (signal 'wrong-type-argument (list 'facep face)))) | |
1413 (while (cond ((stringp pixmap) | |
1414 (unless (file-readable-p pixmap) | |
1415 (setq pixmap (vector 'xbm ':file pixmap))) | |
1416 nil) | |
1417 ((and (consp pixmap) (= (length pixmap) 3)) | |
1418 (setq pixmap (vector 'xbm ':data pixmap)) | |
1419 nil) | |
1420 (t t)) | |
1421 (setq pixmap (signal 'wrong-type-argument | |
1422 (list 'stipple-pixmap-p pixmap)))) | |
1423 (while (and frame (not (framep frame))) | |
1424 (setq frame (signal 'wrong-type-argument (list 'framep frame)))) | |
1425 (set-face-background-pixmap face pixmap frame)) | |
1426 | |
1394 | 1427 |
1395 ;; Create the remaining standard faces now. This way, packages that we dump | 1428 ;; Create the remaining standard faces now. This way, packages that we dump |
1396 ;; can reference these faces as parents. | 1429 ;; can reference these faces as parents. |
1397 ;; | 1430 ;; |
1398 ;; The default, modeline, left-margin, right-margin, text-cursor, | 1431 ;; The default, modeline, left-margin, right-margin, text-cursor, |
1434 (set-face-reverse-p 'modeline t 'global 'tty) | 1467 (set-face-reverse-p 'modeline t 'global 'tty) |
1435 (set-face-reverse-p 'zmacs-region t 'global 'tty) | 1468 (set-face-reverse-p 'zmacs-region t 'global 'tty) |
1436 (set-face-reverse-p 'list-mode-item-selected t 'global 'tty) | 1469 (set-face-reverse-p 'list-mode-item-selected t 'global 'tty) |
1437 (set-face-reverse-p 'isearch t 'global 'tty) | 1470 (set-face-reverse-p 'isearch t 'global 'tty) |
1438 ) | 1471 ) |
1472 | |
1473 ;;; faces.el ends here |