diff options
| author | Glenn Morris | 2008-02-11 00:24:16 +0000 |
|---|---|---|
| committer | Glenn Morris | 2008-02-11 00:24:16 +0000 |
| commit | 238cbdf80bc5300250b21f55aa7d2aa4d11c6e72 (patch) | |
| tree | 05ae64238385197cdc260d3cf12e86a7ebfe0c6a | |
| parent | 124ce267f7066c468d412d6aa3a4f9c72c933306 (diff) | |
| download | emacs-238cbdf80bc5300250b21f55aa7d2aa4d11c6e72.tar.gz emacs-238cbdf80bc5300250b21f55aa7d2aa4d11c6e72.zip | |
(emacs-startup-time): New variable.
(command-line): Set emacs-startup-time.
| -rw-r--r-- | lisp/startup.el | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/startup.el b/lisp/startup.el index e297f7bf029..7139b7a5c07 100644 --- a/lisp/startup.el +++ b/lisp/startup.el | |||
| @@ -194,6 +194,9 @@ There is no `condition-case' around the running of these functions; | |||
| 194 | therefore, if you set `debug-on-error' non-nil in `.emacs', | 194 | therefore, if you set `debug-on-error' non-nil in `.emacs', |
| 195 | an error in one of these functions will invoke the debugger.") | 195 | an error in one of these functions will invoke the debugger.") |
| 196 | 196 | ||
| 197 | (defvar emacs-startup-time nil | ||
| 198 | "Value of `current-time' when Emacs was started.") | ||
| 199 | |||
| 197 | (defvar emacs-startup-hook nil | 200 | (defvar emacs-startup-hook nil |
| 198 | "Normal hook run after loading init files and handling the command line.") | 201 | "Normal hook run after loading init files and handling the command line.") |
| 199 | 202 | ||
| @@ -625,7 +628,8 @@ opening the first frame (e.g. open a connection to an X server).") | |||
| 625 | (nreverse rest))) | 628 | (nreverse rest))) |
| 626 | 629 | ||
| 627 | (defun command-line () | 630 | (defun command-line () |
| 628 | (setq command-line-default-directory default-directory) | 631 | (setq emacs-startup-time (current-time) |
| 632 | command-line-default-directory default-directory) | ||
| 629 | 633 | ||
| 630 | ;; Choose a reasonable location for temporary files. | 634 | ;; Choose a reasonable location for temporary files. |
| 631 | (custom-reevaluate-setting 'temporary-file-directory) | 635 | (custom-reevaluate-setting 'temporary-file-directory) |