Mercurial > hg > xemacs-beta
comparison lisp/prim/startup.el @ 171:929b76928fce r20-3b12
Import from CVS: tag r20-3b12
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:47:52 +0200 |
parents | 0132846995bd |
children | 6075d714658b |
comparison
equal
deleted
inserted
replaced
170:98a42ee61975 | 171:929b76928fce |
---|---|
545 ;; Strip off last hyphen and what follows, then try again | 545 ;; Strip off last hyphen and what follows, then try again |
546 (if (setq hyphend (string-match "[-_][^-_]+\\'" term)) | 546 (if (setq hyphend (string-match "[-_][^-_]+\\'" term)) |
547 (setq term (substring term 0 hyphend)) | 547 (setq term (substring term 0 hyphend)) |
548 (setq term nil)))))) | 548 (setq term nil)))))) |
549 | 549 |
550 | 550 (defconst emacs-user-extension-dir "/.xemacs/" |
551 "Directory where user initialization and user-installed packages may go.") | |
551 | 552 |
552 (defun load-user-init-file (init-file-user) | 553 (defun load-user-init-file (init-file-user) |
553 "This function actually reads the init files. | 554 "This function actually reads the init files. |
554 First try .xemacs, then try .emacs, but only load one of the two." | 555 First try .xemacs, then try .emacs, but only load one of the two." |
555 (when init-file-user | 556 (when init-file-user |
556 (setq user-init-file | 557 (setq user-init-file |
557 (cond | 558 (cond |
558 ((eq system-type 'ms-dos) | 559 ((eq system-type 'ms-dos) |
559 (concat "~" init-file-user "/_xemacs")) | 560 (concat "~" init-file-user emacs-user-extension-dir "init.el")) |
560 ((eq system-type 'vax-vms) | |
561 "sys$login:.xemacs") | |
562 (t | 561 (t |
563 (concat "~" init-file-user "/.xemacs")))) | 562 (concat "~" init-file-user emacs-user-extension-dir "init.el")))) |
564 (unless (file-exists-p (expand-file-name user-init-file)) | 563 (unless (file-exists-p (expand-file-name user-init-file)) |
565 (setq user-init-file | 564 (setq user-init-file |
566 (cond | 565 (cond |
567 ((eq system-type 'ms-dos) | 566 ((eq system-type 'ms-dos) |
568 (concat "~" init-file-user "/_emacs")) | 567 (concat "~" init-file-user "/_emacs")) |
569 ((eq system-type 'vax-vms) | |
570 "sys$login:.emacs") | |
571 (t | 568 (t |
572 (concat "~" init-file-user "/.emacs"))))) | 569 (concat "~" init-file-user "/.emacs"))))) |
573 (load user-init-file t t t) | 570 (load user-init-file t t t) |
574 (when (string= custom-file (concat "~" init-file-user "/.xemacs-custom")) | 571 (when (string= custom-file (concat "~" |
575 (load (concat "~" init-file-user "/.xemacs-custom") t t)) | 572 init-file-user |
573 emacs-user-extension-dir | |
574 "options.el")) | |
575 (load (concat "~" | |
576 init-file-user | |
577 emacs-user-extension-dir | |
578 "options.el") t t)) | |
576 (unless inhibit-default-init | 579 (unless inhibit-default-init |
577 (let ((inhibit-startup-message nil)) | 580 (let ((inhibit-startup-message nil)) |
578 ;; Users are supposed to be told their rights. | 581 ;; Users are supposed to be told their rights. |
579 ;; (Plus how to get help and how to undo.) | 582 ;; (Plus how to get help and how to undo.) |
580 ;; Don't you dare turn this off for anyone except yourself. | 583 ;; Don't you dare turn this off for anyone except yourself. |