X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/06d8ace51597cd41e110560a56a1abeb6cce23d6..ef62b23df5a7007c3d8c74dbca87ba83e9da682e:/lisp/loadup.el diff --git a/lisp/loadup.el b/lisp/loadup.el index cb62cdcd24..3b2d4e3493 100644 --- a/lisp/loadup.el +++ b/lisp/loadup.el @@ -1,7 +1,7 @@ ;;; loadup.el --- load up standardly loaded Lisp files for Emacs -;; Copyright (C) 1985, 1986, 1992, 1994, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. +;; Copyright (C) 1985-1986, 1992, 1994, 2001-2012 +;; Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: internal @@ -29,21 +29,15 @@ ;; If you add/remove Lisp files to be loaded here, consider the ;; following issues: -;; i) Any file loaded on all platforms should appear in $lisp -;; and $shortlisp in src/Makefile.in. Use the .el or .elc version as -;; appropriate. +;; i) Any file loaded on any platform should appear in $lisp in src/lisp.mk. +;; Use the .el or .elc version as appropriate. -;; ii) Any file that is only loaded on some platforms should appear -;; in the version of $lisp in the generated Makefile on that platform. -;; At the present time, this is achieved by use of #ifdefs. -;; It should also appear in $SOME_MACHINE_LISP on all platforms. +;; This ensures both that the Lisp files are compiled (if necessary) +;; before the emacs executable is dumped, and that they are passed to +;; make-docfile. (Any that are not processed for DOC will not have +;; doc strings in the dumped Emacs.) Because of this: -;; The above steps ensure both that the Lisp files are compiled (if -;; necessary) before the emacs executable is dumped, and that they are -;; passed to make-docfile. (Any that are not processed for DOC will -;; not have doc strings in the dumped Emacs.) Because of this: - -;; iii) If the file is loaded uncompiled, it should (where possible) +;; ii) If the file is loaded uncompiled, it should (where possible) ;; obey the doc-string conventions expected by make-docfile. ;;; Code: @@ -87,26 +81,25 @@ ;; Do it after subr, since both after-load-functions and add-hook are ;; implemented in subr.el. -(add-hook 'after-load-functions '(lambda (f) (garbage-collect))) +(add-hook 'after-load-functions (lambda (f) (garbage-collect))) -;; We specify .el in case someone compiled version.el by mistake. -(load "version.el") +(load "version") (load "widget") (load "custom") (load "emacs-lisp/map-ynp") -(load "cus-start") (load "international/mule") (load "international/mule-conf") (load "env") (load "format") (load "bindings") +(load "cus-start") +(load "window") ; Needed here for `replace-buffer-in-windows'. (setq load-source-file-function 'load-with-code-conversion) (load "files") (load "cus-face") (load "faces") ; after here, `defface' may be used. -(load "minibuffer") (load "button") (load "startup") @@ -117,6 +110,7 @@ ;; In case loaddefs hasn't been generated yet. (file-error (load "ldefs-boot.el"))) +(load "minibuffer") (load "abbrev") ;lisp-mode.el and simple.el use define-abbrev-table. (load "simple") @@ -128,11 +122,11 @@ ;; multilingual text. (load "international/mule-cmds") (load "case-table") -(load "international/characters") -(load "composite") ;; This file doesn't exist when building a development version of Emacs ;; from the repository. It is generated just after temacs is built. (load "international/charprop.el" t) +(load "international/characters") +(load "composite") ;; Load language-specific files. (load "language/chinese") @@ -162,7 +156,6 @@ (load "language/cham") (load "indent") -(load "window") (load "frame") (load "term/tty-colors") (load "font-core") @@ -184,7 +177,7 @@ (load "rfn-eshadow") (load "menu-bar") -(load "paths.el") ;Don't get confused if someone compiled paths by mistake. +(load "paths") (load "emacs-lisp/lisp") (load "textmodes/page") (load "register") @@ -192,13 +185,17 @@ (load "emacs-lisp/lisp-mode") (load "textmodes/text-mode") (load "textmodes/fill") +(load "newcomment") (load "replace") +(load "emacs-lisp/tabulated-list") (load "buff-menu") (if (fboundp 'x-create-frame) (progn (load "fringe") + ;; Needed by `imagemagick-register-types' + (load "emacs-lisp/regexp-opt") (load "image") (load "international/fontset") (load "dnd") @@ -263,8 +260,10 @@ (let* ((base (concat "emacs-" emacs-version ".")) (files (file-name-all-completions base default-directory)) (versions (mapcar (function (lambda (name) - (string-to-int (substring name (length base))))) + (string-to-number (substring name (length base))))) files))) + (setq emacs-bzr-version (condition-case nil (emacs-bzr-get-version) + (error nil))) ;; `emacs-version' is a constant, so we shouldn't change it with `setq'. (defconst emacs-version (format "%s.%d" @@ -310,7 +309,7 @@ (equal (nth 4 command-line-args) "bootstrap")) (setcdr load-path nil)) -(remove-hook 'after-load-functions '(lambda (f) (garbage-collect))) +(remove-hook 'after-load-functions (lambda (f) (garbage-collect))) (setq inhibit-load-charset-map nil) (clear-charset-maps) @@ -319,6 +318,23 @@ ;; At this point, we're ready to resume undo recording for scratch. (buffer-enable-undo "*scratch*") +(when (hash-table-p purify-flag) + (let ((strings 0) + (vectors 0) + (bytecodes 0) + (conses 0) + (others 0)) + (maphash (lambda (k v) + (cond + ((stringp k) (setq strings (1+ strings))) + ((vectorp k) (setq vectors (1+ vectors))) + ((consp k) (setq conses (1+ conses))) + ((byte-code-function-p v) (setq bytecodes (1+ bytecodes))) + (t (setq others (1+ others))))) + purify-flag) + (message "Pure-hashed: %d strings, %d vectors, %d conses, %d bytecodes, %d others" + strings vectors conses bytecodes others))) + ;; Avoid error if user loads some more libraries now and make sure the ;; hash-consing hash table is GC'd. (setq purify-flag nil)