aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaroly Lorentey2005-09-07 02:22:52 +0000
committerKaroly Lorentey2005-09-07 02:22:52 +0000
commite40b3340ac2275d7c5caee7e1d16f0c37ac77779 (patch)
tree6720a550a73c82393009b199b2ad0eb5f5c9898f
parent6f5b225036d2dd45cb413d9b373abae8cb44a2eb (diff)
downloademacs-e40b3340ac2275d7c5caee7e1d16f0c37ac77779.tar.gz
emacs-e40b3340ac2275d7c5caee7e1d16f0c37ac77779.zip
Fix terminal initialization code. (Contributed by Dan Nicolaescu.)
* lisp/faces.el (tty-create-frame-with-faces): Call terminal-init-*. Don't load the initialization file more than once. * lisp/startup.el (command-line): Don't load the terminal initialization file more than once. git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-398
-rw-r--r--lisp/faces.el15
-rw-r--r--lisp/startup.el11
2 files changed, 21 insertions, 5 deletions
diff --git a/lisp/faces.el b/lisp/faces.el
index 7c0185e1700..eb61a04cb70 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -1820,14 +1820,25 @@ created."
1820 ;; User init file can set term-file-prefix to nil to prevent this. 1820 ;; User init file can set term-file-prefix to nil to prevent this.
1821 (unless (null term-file-prefix) 1821 (unless (null term-file-prefix)
1822 (let ((term (cdr (assq 'tty-type parameters))) 1822 (let ((term (cdr (assq 'tty-type parameters)))
1823 hyphend) 1823 hyphend
1824 term-init-func)
1824 (while (and term 1825 (while (and term
1826 (not (fboundp
1827 (setq term-init-func (intern (concat "terminal-init-" term)))))
1825 (not (load (concat term-file-prefix term) t t))) 1828 (not (load (concat term-file-prefix term) t t)))
1826 ;; Strip off last hyphen and what follows, then try again 1829 ;; Strip off last hyphen and what follows, then try again
1827 (setq term 1830 (setq term
1828 (if (setq hyphend (string-match "[-_][^-_]+$" term)) 1831 (if (setq hyphend (string-match "[-_][^-_]+$" term))
1829 (substring term 0 hyphend) 1832 (substring term 0 hyphend)
1830 nil))))) 1833 nil))
1834 (setq term-init-func nil))
1835 (when term
1836 ;; The terminal file has been loaded, now call the terminal
1837 ;; specific initialization function.
1838 (unless term-init-func
1839 (setq term-init-func (intern (concat "terminal-init-" term)))
1840 (when (fboundp term-init-func)
1841 (funcall term-init-func))))))
1831 ;; Make sure the kill and yank functions do not touch the X clipboard. 1842 ;; Make sure the kill and yank functions do not touch the X clipboard.
1832 (modify-frame-parameters frame '((interprogram-cut-function . nil))) 1843 (modify-frame-parameters frame '((interprogram-cut-function . nil)))
1833 (modify-frame-parameters frame '((interprogram-paste-function . nil))) 1844 (modify-frame-parameters frame '((interprogram-paste-function . nil)))
diff --git a/lisp/startup.el b/lisp/startup.el
index 5ca9d2ca2fa..86f9bae30a3 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -982,18 +982,23 @@ opening the first frame (e.g. open a connection to an X server).")
982 initial-window-system 982 initial-window-system
983 (null term-file-prefix)) 983 (null term-file-prefix))
984 (let ((term (getenv "TERM")) 984 (let ((term (getenv "TERM"))
985 hyphend) 985 hyphend
986 term-init-func)
986 (while (and term 987 (while (and term
988 (not (fboundp
989 (setq term-init-func (intern (concat "terminal-init-" term)))))
987 (not (load (concat term-file-prefix term) t t))) 990 (not (load (concat term-file-prefix term) t t)))
988 ;; Strip off last hyphen and what follows, then try again 991 ;; Strip off last hyphen and what follows, then try again
989 (setq term 992 (setq term
990 (if (setq hyphend (string-match "[-_][^-_]+$" term)) 993 (if (setq hyphend (string-match "[-_][^-_]+$" term))
991 (substring term 0 hyphend) 994 (substring term 0 hyphend)
992 nil))) 995 nil))
996 (setq term-init-func nil))
993 (when term 997 (when term
994 ;; The terminal file has been loaded, now call the terminal 998 ;; The terminal file has been loaded, now call the terminal
995 ;; specific initialization function. 999 ;; specific initialization function.
996 (let ((term-init-func (intern (concat "terminal-init-" term)))) 1000 (unless term-init-func
1001 (setq term-init-func (intern (concat "terminal-init-" term)))
997 (when (fboundp term-init-func) 1002 (when (fboundp term-init-func)
998 (funcall term-init-func)))))) 1003 (funcall term-init-func))))))
999 1004