aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2000-10-17 12:59:41 +0000
committerEli Zaretskii2000-10-17 12:59:41 +0000
commit1592c1efdf808c504fbd3e648b65423ded6c4197 (patch)
treeadc42e3e9f2921cb63944843baa58d4552447e0a
parentf86292a9e9b047e741a97dd0402f70219db3f19d (diff)
downloademacs-1592c1efdf808c504fbd3e648b65423ded6c4197.tar.gz
emacs-1592c1efdf808c504fbd3e648b65423ded6c4197.zip
(command-line): Move the code which registers the default colors to
before before-init-hook.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/startup.el34
2 files changed, 22 insertions, 17 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 8521567f17d..ebd6ae77c4f 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12000-10-17 Eli Zaretskii <eliz@is.elta.co.il>
2
3 * startup.el (command-line): Move the code which sets the default
4 TTY colors to before before-init-hook.
5
12000-10-17 Gerd Moellmann <gerd@gnu.org> 62000-10-17 Gerd Moellmann <gerd@gnu.org>
2 7
3 * jit-lock.el (jit-lock-stealth-time): Doc fix. 8 * jit-lock.el (jit-lock-stealth-time): Doc fix.
diff --git a/lisp/startup.el b/lisp/startup.el
index b2e03e2ab4e..e5cb37fd082 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -665,6 +665,23 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'."
665 (setq-default blink-cursor t) 665 (setq-default blink-cursor t)
666 (blink-cursor-mode 1)) 666 (blink-cursor-mode 1))
667 667
668 ;; Register default TTY colors for the case the terminal hasn't a
669 ;; terminal init file.
670 (or (memq window-system '(x w32))
671 (not (tty-display-color-p))
672 (let* ((colors (cond ((eq window-system 'pc)
673 msdos-color-values)
674 ((eq system-type 'windows-nt)
675 w32-tty-standard-colors)
676 (t tty-standard-colors)))
677 (color (car colors)))
678 (while colors
679 (tty-color-define (car color) (cadr color) (cddr color))
680 (setq colors (cdr colors) color (car colors)))
681 ;; Modifying color mappings means realized faces don't
682 ;; use the right colors, so clear them.
683 (clear-face-cache)))
684
668 (run-hooks 'before-init-hook) 685 (run-hooks 'before-init-hook)
669 686
670 ;; Run the site-start library if it exists. The point of this file is 687 ;; Run the site-start library if it exists. The point of this file is
@@ -796,23 +813,6 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'."
796 (set-buffer "*scratch*") 813 (set-buffer "*scratch*")
797 (if (eq major-mode 'fundamental-mode) 814 (if (eq major-mode 'fundamental-mode)
798 (funcall initial-major-mode)))) 815 (funcall initial-major-mode))))
799
800 ;; Register default TTY colors for the case the terminal hasn't a
801 ;; terminal init file.
802 (or (memq window-system '(x w32))
803 (not (tty-display-color-p))
804 (let* ((colors (cond ((eq window-system 'pc)
805 msdos-color-values)
806 ((eq system-type 'windows-nt)
807 w32-tty-standard-colors)
808 (t tty-standard-colors)))
809 (color (car colors)))
810 (while colors
811 (tty-color-define (car color) (cadr color) (cddr color))
812 (setq colors (cdr colors) color (car colors)))
813 ;; Modifying color mappings means realized faces don't
814 ;; use the right colors, so clear them.
815 (clear-face-cache)))
816 816
817 ;; Load library for our terminal type. 817 ;; Load library for our terminal type.
818 ;; User init file can set term-file-prefix to nil to prevent this. 818 ;; User init file can set term-file-prefix to nil to prevent this.