comparison lisp/startup.el @ 404:2f8bb876ab1d r21-2-32

Import from CVS: tag r21-2-32
author cvs
date Mon, 13 Aug 2007 11:16:07 +0200
parents 74fd4e045ea6
children 501cfd01ee6d
comparison
equal deleted inserted replaced
403:9f011ab08d48 404:2f8bb876ab1d
18 ;; WITHOUT ANY WARRANTY; without even the implied warranty of 18 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 ;; General Public License for more details. 20 ;; General Public License for more details.
21 21
22 ;; You should have received a copy of the GNU General Public License 22 ;; You should have received a copy of the GNU General Public License
23 ;; along with XEmacs; see the file COPYING. If not, write to the 23 ;; along with XEmacs; see the file COPYING. If not, write to the
24 ;; Free Software Foundation, 59 Temple Place - Suite 330, 24 ;; Free Software Foundation, 59 Temple Place - Suite 330,
25 ;; Boston, MA 02111-1307, USA. 25 ;; Boston, MA 02111-1307, USA.
26 26
27 ;;; Synched up with: FSF 19.34. 27 ;;; Synched up with: FSF 19.34.
28 28
647 (when (file-exists-p expanded) 647 (when (file-exists-p expanded)
648 (return expanded))))) 648 (return expanded)))))
649 649
650 (defun load-user-init-file () 650 (defun load-user-init-file ()
651 "This function actually reads the init file, .emacs." 651 "This function actually reads the init file, .emacs."
652 (if (not user-init-file) 652 (if (or user-init-file
653 (setq user-init-file (find-user-init-file))) 653 (setq user-init-file (find-user-init-file)))
654 (load user-init-file t t t) 654 (load user-init-file t t t))
655 (unless inhibit-default-init 655 (unless inhibit-default-init
656 (let ((inhibit-startup-message nil)) 656 (let ((inhibit-startup-message nil))
657 ;; Users are supposed to be told their rights. 657 ;; Users are supposed to be told their rights.
658 ;; (Plus how to get help and how to undo.) 658 ;; (Plus how to get help and how to undo.)
659 ;; Don't you dare turn this off for anyone except yourself. 659 ;; Don't you dare turn this off for anyone except yourself.
775 ;; Command-line-options exist 775 ;; Command-line-options exist
776 (let ((dir command-line-default-directory) 776 (let ((dir command-line-default-directory)
777 (file-count 0) 777 (file-count 0)
778 (line nil) 778 (line nil)
779 (end-of-options nil) 779 (end-of-options nil)
780 first-file-buffer file-p arg tem) 780 file-p arg tem)
781 (while command-line-args-left 781 (while command-line-args-left
782 (setq arg (pop command-line-args-left)) 782 (setq arg (pop command-line-args-left))
783 (cond 783 (cond
784 (end-of-options 784 (end-of-options
785 (setq file-p t)) 785 (setq file-p t))
802 (when file-p 802 (when file-p
803 (setq file-p nil) 803 (setq file-p nil)
804 (incf file-count) 804 (incf file-count)
805 (setq arg (expand-file-name arg dir)) 805 (setq arg (expand-file-name arg dir))
806 (cond 806 (cond
807 ((= file-count 1) (setq first-file-buffer 807 ((= file-count 1)
808 (progn (find-file arg) (current-buffer)))) 808 (find-file arg))
809 (noninteractive (find-file arg)) 809 (noninteractive (find-file arg))
810 (t (find-file-other-window arg))) 810 (t (find-file-other-window arg)))
811 (when line 811 (when line
812 (goto-line line) 812 (goto-line line)
813 (setq line nil)))))))) 813 (setq line nil))))))))