/[emacs]/emacs/lisp/startup.el
ViewVC logotype

Diff of /emacs/lisp/startup.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.375 by rms, Sat Aug 20 21:48:20 2005 UTC revision 1.376 by monnier, Mon Sep 12 15:47:31 2005 UTC
# Line 976  or `CVS', and any subdirectory that cont Line 976  or `CVS', and any subdirectory that cont
976    (unless (or noninteractive    (unless (or noninteractive
977                window-system                window-system
978                (null term-file-prefix))                (null term-file-prefix))
979      (let ((term (getenv "TERM"))      (let* ((TERM (getenv "TERM"))
980               (term TERM)
981            hyphend)            hyphend)
982        (while (and term        (while (and term
983                    (not (load (concat term-file-prefix term) t t)))                    (not (load (concat term-file-prefix term) t t)))
984          ;; Strip off last hyphen and what follows, then try again          ;; Strip off last hyphen and what follows, then try again
985          (setq term          (setq term
986                (if (setq hyphend (string-match "[-_][^-_]+$" term))                (if (setq hyphend (string-match "[-_][^-_]+\\'" term))
987                    (substring term 0 hyphend)                    (substring term 0 hyphend)
988                  nil)))                  nil)))
989        (when term        (setq term TERM)
990          ;; The terminal file has been loaded, now call the terminal        ;; The terminal file has been loaded, now call the terminal specific
991          ;; specific initialization function.        ;; initialization function.
992          (let ((term-init-func (intern (concat "terminal-init-" term))))        (while term
993            (when (fboundp term-init-func)          (let ((term-init-func (intern-soft (concat "terminal-init-" term))))
994              (if (not (fboundp term-init-func))
995                  ;; Strip off last hyphen and what follows, then try again
996                  (setq term
997                        (if (setq hyphend (string-match "[-_][^-_]+\\'" term))
998                            (substring term 0 hyphend)
999                          nil))
1000                (setq term nil)
1001              (funcall term-init-func))))))              (funcall term-init-func))))))
1002    
1003    ;; Update the out-of-memory error message based on user's key bindings    ;; Update the out-of-memory error message based on user's key bindings

Legend:
Removed from v.1.375  
changed lines
  Added in v.1.376

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26