comparison lisp/faces.el @ 85415:b1e285a2d293

(tty-create-frame-with-faces): Make sure not only tty-run-terminal-initialization but also set-locale-environment are run only once per terminal. (tty-run-terminal-initialization): Don't check if the terminal was already initted.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Thu, 18 Oct 2007 19:02:23 +0000
parents 591c29778a30
children 674b001d26e1 1251cabc40b7
comparison
equal deleted inserted replaced
85414:f79d3fec6de7 85415:b1e285a2d293
1874 1874
1875 ;; Make sure the kill and yank functions do not touch the X clipboard. 1875 ;; Make sure the kill and yank functions do not touch the X clipboard.
1876 (modify-frame-parameters frame '((interprogram-cut-function . nil))) 1876 (modify-frame-parameters frame '((interprogram-cut-function . nil)))
1877 (modify-frame-parameters frame '((interprogram-paste-function . nil))) 1877 (modify-frame-parameters frame '((interprogram-paste-function . nil)))
1878 1878
1879 (set-locale-environment nil frame) 1879 (unless (terminal-parameter frame 'terminal-initted)
1880 (tty-run-terminal-initialization frame) 1880 (set-terminal-parameter frame 'terminal-initted t)
1881 (set-locale-environment nil frame)
1882 (tty-run-terminal-initialization frame))
1881 (frame-set-background-mode frame) 1883 (frame-set-background-mode frame)
1882 (face-set-after-frame-default frame) 1884 (face-set-after-frame-default frame)
1883 (setq success t)) 1885 (setq success t))
1884 (unless success 1886 (unless success
1885 (delete-frame frame))) 1887 (delete-frame frame)))
1908 terminal type to a different value." 1910 terminal type to a different value."
1909 (setq type (or type (tty-type frame))) 1911 (setq type (or type (tty-type frame)))
1910 ;; Load library for our terminal type. 1912 ;; Load library for our terminal type.
1911 ;; User init file can set term-file-prefix to nil to prevent this. 1913 ;; User init file can set term-file-prefix to nil to prevent this.
1912 (with-selected-frame frame 1914 (with-selected-frame frame
1913 (unless (or (null term-file-prefix) 1915 (unless (null term-file-prefix)
1914 ;; Don't reinitialize the terminal each time a new
1915 ;; frame is opened on it.
1916 (terminal-parameter frame 'terminal-initted))
1917 (let* (term-init-func) 1916 (let* (term-init-func)
1918 ;; First, load the terminal initialization file, if it is 1917 ;; First, load the terminal initialization file, if it is
1919 ;; available and it hasn't been loaded already. 1918 ;; available and it hasn't been loaded already.
1920 (tty-find-type #'(lambda (type) 1919 (tty-find-type #'(lambda (type)
1921 (let ((file (locate-library (concat term-file-prefix type)))) 1920 (let ((file (locate-library (concat term-file-prefix type))))