From: Glenn Morris Date: Mon, 11 Feb 2008 00:24:16 +0000 (+0000) Subject: (emacs-startup-time): New variable. X-Git-Tag: emacs-pretest-23.0.90~8029 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=238cbdf80bc5300250b21f55aa7d2aa4d11c6e72;p=emacs.git (emacs-startup-time): New variable. (command-line): Set emacs-startup-time. --- 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; therefore, if you set `debug-on-error' non-nil in `.emacs', an error in one of these functions will invoke the debugger.") +(defvar emacs-startup-time nil + "Value of `current-time' when Emacs was started.") + (defvar emacs-startup-hook nil "Normal hook run after loading init files and handling the command line.") @@ -625,7 +628,8 @@ opening the first frame (e.g. open a connection to an X server).") (nreverse rest))) (defun command-line () - (setq command-line-default-directory default-directory) + (setq emacs-startup-time (current-time) + command-line-default-directory default-directory) ;; Choose a reasonable location for temporary files. (custom-reevaluate-setting 'temporary-file-directory)