aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/faces.el
diff options
context:
space:
mode:
authorStefan Monnier2012-06-22 17:24:54 -0400
committerStefan Monnier2012-06-22 17:24:54 -0400
commit36cec983d4e680e28e7066fda505910cd549f509 (patch)
treef6dc7ad0e0822bc5edd4f12e963969059e0989b5 /lisp/faces.el
parentd35af63cd671563fd188c3b0a1ef30067027c7aa (diff)
downloademacs-36cec983d4e680e28e7066fda505910cd549f509.tar.gz
emacs-36cec983d4e680e28e7066fda505910cd549f509.zip
Further GV/CL cleanups.
* lisp/emacs-lisp/gv.el (gv-get): Autoload functions to find their gv-expander. (gv--defun-declaration): New function. (defun-declarations-alist): Use it. (gv-define-modify-macro, gv-pushnew!, gv-inc!, gv-dec!): Remove. (gv-place): Autoload. * lisp/emacs-lisp/cl.el (cl--dotimes, cl--dolist): Remember subr.el's original definition of dotimes and dolist. * lisp/emacs-lisp/cl-macs.el (cl-expr-access-order): Remove unused. (cl-dolist, cl-dotimes): Use `dolist' and `dotimes'. * lisp/emacs-lisp/cl-lib.el: Move gv handlers from cl-macs to here. (cl-fifth, cl-sixth, cl-seventh, cl-eighth) (cl-ninth, cl-tenth): Move gv handler to the function's definition. * lisp/emacs-lisp/cl-extra.el (cl-subseq, cl-get, cl-getf): Move gv handler to the function's definition. * lisp/Makefile.in (COMPILE_FIRST): Re-order to speed it up by about 50%. * lisp/window.el: * lisp/files.el: * lisp/faces.el: * lisp/env.el: Don't use CL.
Diffstat (limited to 'lisp/faces.el')
-rw-r--r--lisp/faces.el29
1 files changed, 13 insertions, 16 deletions
diff --git a/lisp/faces.el b/lisp/faces.el
index 40b45187f6c..68700c2455b 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -25,9 +25,6 @@
25 25
26;;; Code: 26;;; Code:
27 27
28(eval-when-compile
29 (require 'cl))
30
31(defcustom term-file-prefix (purecopy "term/") 28(defcustom term-file-prefix (purecopy "term/")
32 "If non-nil, Emacs startup performs terminal-specific initialization. 29 "If non-nil, Emacs startup performs terminal-specific initialization.
33It does this by: (load (concat term-file-prefix (getenv \"TERM\"))) 30It does this by: (load (concat term-file-prefix (getenv \"TERM\")))
@@ -996,28 +993,28 @@ Value is an alist of (NAME . VALUE) if ATTRIBUTE expects a value out
996of a set of discrete values. Value is `integerp' if ATTRIBUTE expects 993of a set of discrete values. Value is `integerp' if ATTRIBUTE expects
997an integer value." 994an integer value."
998 (let ((valid 995 (let ((valid
999 (case attribute 996 (pcase attribute
1000 (:family 997 (`:family
1001 (if (window-system frame) 998 (if (window-system frame)
1002 (mapcar (lambda (x) (cons x x)) 999 (mapcar (lambda (x) (cons x x))
1003 (font-family-list)) 1000 (font-family-list))
1004 ;; Only one font on TTYs. 1001 ;; Only one font on TTYs.
1005 (list (cons "default" "default")))) 1002 (list (cons "default" "default"))))
1006 (:foundry 1003 (`:foundry
1007 (list nil)) 1004 (list nil))
1008 (:width 1005 (`:width
1009 (mapcar #'(lambda (x) (cons (symbol-name (aref x 1)) (aref x 1))) 1006 (mapcar #'(lambda (x) (cons (symbol-name (aref x 1)) (aref x 1)))
1010 font-width-table)) 1007 font-width-table))
1011 (:weight 1008 (`:weight
1012 (mapcar #'(lambda (x) (cons (symbol-name (aref x 1)) (aref x 1))) 1009 (mapcar #'(lambda (x) (cons (symbol-name (aref x 1)) (aref x 1)))
1013 font-weight-table)) 1010 font-weight-table))
1014 (:slant 1011 (`:slant
1015 (mapcar #'(lambda (x) (cons (symbol-name (aref x 1)) (aref x 1))) 1012 (mapcar #'(lambda (x) (cons (symbol-name (aref x 1)) (aref x 1)))
1016 font-slant-table)) 1013 font-slant-table))
1017 (:inverse-video 1014 (`:inverse-video
1018 (mapcar #'(lambda (x) (cons (symbol-name x) x)) 1015 (mapcar #'(lambda (x) (cons (symbol-name x) x))
1019 (internal-lisp-face-attribute-values attribute))) 1016 (internal-lisp-face-attribute-values attribute)))
1020 ((:underline :overline :strike-through :box) 1017 ((or `:underline `:overline `:strike-through `:box)
1021 (if (window-system frame) 1018 (if (window-system frame)
1022 (nconc (mapcar #'(lambda (x) (cons (symbol-name x) x)) 1019 (nconc (mapcar #'(lambda (x) (cons (symbol-name x) x))
1023 (internal-lisp-face-attribute-values attribute)) 1020 (internal-lisp-face-attribute-values attribute))
@@ -1025,12 +1022,12 @@ an integer value."
1025 (defined-colors frame))) 1022 (defined-colors frame)))
1026 (mapcar #'(lambda (x) (cons (symbol-name x) x)) 1023 (mapcar #'(lambda (x) (cons (symbol-name x) x))
1027 (internal-lisp-face-attribute-values attribute)))) 1024 (internal-lisp-face-attribute-values attribute))))
1028 ((:foreground :background) 1025 ((or `:foreground `:background)
1029 (mapcar #'(lambda (c) (cons c c)) 1026 (mapcar #'(lambda (c) (cons c c))
1030 (defined-colors frame))) 1027 (defined-colors frame)))
1031 ((:height) 1028 (`:height
1032 'integerp) 1029 'integerp)
1033 (:stipple 1030 (`:stipple
1034 (and (memq (window-system frame) '(x ns)) ; No stipple on w32 1031 (and (memq (window-system frame) '(x ns)) ; No stipple on w32
1035 (mapcar #'list 1032 (mapcar #'list
1036 (apply #'nconc 1033 (apply #'nconc
@@ -1039,11 +1036,11 @@ an integer value."
1039 (file-directory-p dir) 1036 (file-directory-p dir)
1040 (directory-files dir))) 1037 (directory-files dir)))
1041 x-bitmap-file-path))))) 1038 x-bitmap-file-path)))))
1042 (:inherit 1039 (`:inherit
1043 (cons '("none" . nil) 1040 (cons '("none" . nil)
1044 (mapcar #'(lambda (c) (cons (symbol-name c) c)) 1041 (mapcar #'(lambda (c) (cons (symbol-name c) c))
1045 (face-list)))) 1042 (face-list))))
1046 (t 1043 (_
1047 (error "Internal error"))))) 1044 (error "Internal error")))))
1048 (if (and (listp valid) (not (memq attribute '(:inherit)))) 1045 (if (and (listp valid) (not (memq attribute '(:inherit))))
1049 (nconc (list (cons "unspecified" 'unspecified)) valid) 1046 (nconc (list (cons "unspecified" 'unspecified)) valid)