comparison lisp/w3/font.el @ 136:b980b6286996 r20-2b2

Import from CVS: tag r20-2b2
author cvs
date Mon, 13 Aug 2007 09:31:12 +0200
parents cca96a509cfe
children 6608ceec7cf8
comparison
equal deleted inserted replaced
135:4636a6841cd6 136:b980b6286996
1 ;;; font.el --- New font model 1 ;;; font.el --- New font model
2 ;; Author: wmperry 2 ;; Author: wmperry
3 ;; Created: 1997/04/04 16:02:58 3 ;; Created: 1997/04/20 19:19:45
4 ;; Version: 1.44 4 ;; Version: 1.45
5 ;; Keywords: faces 5 ;; Keywords: faces
6 6
7 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 7 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
8 ;;; Copyright (c) 1995, 1996 by William M. Perry (wmperry@cs.indiana.edu) 8 ;;; Copyright (c) 1995, 1996 by William M. Perry (wmperry@cs.indiana.edu)
9 ;;; Copyright (c) 1996, 1997 Free Software Foundation, Inc. 9 ;;; Copyright (c) 1996, 1997 Free Software Foundation, Inc.
30 ;;; The emacsen compatibility package - load it up before anything else 30 ;;; The emacsen compatibility package - load it up before anything else
31 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 31 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
32 (require 'cl) 32 (require 'cl)
33 33
34 (eval-and-compile 34 (eval-and-compile
35 (if (not (and (string-match "XEmacs" emacs-version) 35 (require 'devices))
36 (or (> emacs-major-version 19) 36
37 (>= emacs-minor-version 14)))) 37 (eval-and-compile
38 (require 'w3-sysdp))) 38 (if (not (fboundp 'try-font-name))
39 (defsubst try-font-name (fontname &rest args)
40 (case window-system
41 ((x win32 pm) (car-safe (x-list-fonts fontname)))
42 (ns (car-safe (ns-list-fonts fontname)))
43 (otherwise nil))))
44 (if (not (fboundp 'facep))
45 (defsubst facep (face)
46 "Return t if X is a face name or an internal face vector."
47 (if (not window-system)
48 nil ; FIXME if FSF ever does TTY faces
49 (and (or (internal-facep face)
50 (and (symbolp face) (assq face global-face-data)))
51 t))))
52 (if (not (fboundp 'set-face-property))
53 (defsubst set-face-property (face property value &optional locale
54 tag-set how-to-add)
55 "Change a property of FACE."
56 (and (symbolp face)
57 (put face property value))))
58 (if (not (fboundp 'face-property))
59 (defsubst face-property (face property &optional locale tag-set exact-p)
60 "Return FACE's value of the given PROPERTY."
61 (and (symbolp face) (get face property)))))
39 62
40 (require 'disp-table) 63 (require 'disp-table)
64
41 (if (not (fboundp '<<)) (fset '<< 'lsh)) 65 (if (not (fboundp '<<)) (fset '<< 'lsh))
42 (if (not (fboundp '&)) (fset '& 'logand)) 66 (if (not (fboundp '&)) (fset '& 'logand))
43 (if (not (fboundp '|)) (fset '| 'logior)) 67 (if (not (fboundp '|)) (fset '| 'logior))
44 (if (not (fboundp '~)) (fset '~ 'lognot)) 68 (if (not (fboundp '~)) (fset '~ 'lognot))
45 (if (not (fboundp '>>)) (defun >> (value count) (<< value (- count)))) 69 (if (not (fboundp '>>)) (defun >> (value count) (<< value (- count))))