comparison lisp/startup.el @ 27365:56c304580b79

(command-line): Check for compiled user-init-file and set to uncompiled version if necessary.
author Dave Love <fx@gnu.org>
date Wed, 19 Jan 2000 14:39:01 +0000
parents a7feebdd964d
children 65d84be1e92d
comparison
equal deleted inserted replaced
27364:0c0628ca5029 27365:56c304580b79
176 "Default directory to use for command line arguments. 176 "Default directory to use for command line arguments.
177 This is normally copied from `default-directory' when Emacs starts.") 177 This is normally copied from `default-directory' when Emacs starts.")
178 178
179 ;;; This is here, rather than in x-win.el, so that we can ignore these 179 ;;; This is here, rather than in x-win.el, so that we can ignore these
180 ;;; options when we are not using X. 180 ;;; options when we are not using X.
181 (defvar command-line-x-option-alist 181 (defconst command-line-x-option-alist
182 '(("-bw" 1 x-handle-numeric-switch border-width) 182 '(("-bw" 1 x-handle-numeric-switch border-width)
183 ("-d" 1 x-handle-display) 183 ("-d" 1 x-handle-display)
184 ("-display" 1 x-handle-display) 184 ("-display" 1 x-handle-display)
185 ("-name" 1 x-handle-name-switch) 185 ("-name" 1 x-handle-name-switch)
186 ("-title" 1 x-handle-switch title) 186 ("-title" 1 x-handle-switch title)
675 ;; If we did not find the user's init file, 675 ;; If we did not find the user's init file,
676 ;; set user-init-file conclusively to nil; 676 ;; set user-init-file conclusively to nil;
677 ;; don't let it be set from default.el. 677 ;; don't let it be set from default.el.
678 (if (eq user-init-file t) 678 (if (eq user-init-file t)
679 (setq user-init-file nil)) 679 (setq user-init-file nil))
680 ;; If we loaded a compiled file, set
681 ;; `user-init-file' to the source version if that
682 ;; exists.
683 (if (and user-init-file
684 (equal (file-name-extension user-init-file)
685 "elc"))
686 (let ((el (concat (file-name-sans-extension
687 user-init-file)
688 ".el")))
689 (if (file-exists-p el)
690 (setq user-init-file el))))
680 (or inhibit-default-init 691 (or inhibit-default-init
681 (let ((inhibit-startup-message nil)) 692 (let ((inhibit-startup-message nil))
682 ;; Users are supposed to be told their rights. 693 ;; Users are supposed to be told their rights.
683 ;; (Plus how to get help and how to undo.) 694 ;; (Plus how to get help and how to undo.)
684 ;; Don't you dare turn this off for anyone 695 ;; Don't you dare turn this off for anyone
762 (command-line-1 (cdr command-line-args)) 773 (command-line-1 (cdr command-line-args))
763 774
764 ;; If -batch, terminate after processing the command options. 775 ;; If -batch, terminate after processing the command options.
765 (if noninteractive (kill-emacs t))) 776 (if noninteractive (kill-emacs t)))
766 777
767 (defcustom initial-scratch-message "\ 778 (defcustom initial-scratch-message (purecopy "\
768 ;; This buffer is for notes you don't want to save, and for Lisp evaluation. 779 ;; This buffer is for notes you don't want to save, and for Lisp evaluation.
769 ;; If you want to create a file, visit that file with C-x C-f, 780 ;; If you want to create a file, visit that file with C-x C-f,
770 ;; then enter the text in that file's own buffer. 781 ;; then enter the text in that file's own buffer.
771 782
772 " 783 ")
773 "Initial message displayed in *scratch* buffer at startup. 784 "Initial message displayed in *scratch* buffer at startup.
774 If this is nil, no message will be displayed." 785 If this is nil, no message will be displayed."
775 :type 'string) 786 :type 'string)
776 787
777 (defun command-line-1 (command-line-args-left) 788 (defun command-line-1 (command-line-args-left)