Don't mess with *temp*.
[bpt/emacs.git] / lisp / startup.el
index 207297f..e637651 100644 (file)
@@ -2017,7 +2017,7 @@ Type \\[describe-distribution] for information on "))
 
 (defun display-startup-echo-area-message ()
   (let ((resize-mini-windows t))
-    (or noninteractive ;(input-pending-p) init-file-had-error
+    (or noninteractive                  ;(input-pending-p) init-file-had-error
        ;; t if the init file says to inhibit the echo area startup message.
        (and inhibit-startup-echo-area-message
             user-init-file
@@ -2027,24 +2027,21 @@ Type \\[describe-distribution] for information on "))
                                 (user-login-name)
                               init-file-user)))
                 ;; Wasn't set with custom; see if .emacs has a setq.
-                (let ((buffer (get-buffer-create " *temp*")))
-                  (prog1
-                      (condition-case nil
-                          (with-current-buffer buffer
-                            (insert-file-contents user-init-file)
-                            (re-search-forward
-                             (concat
-                              "([ \t\n]*setq[ \t\n]+"
-                              "inhibit-startup-echo-area-message[ \t\n]+"
-                              (regexp-quote
-                               (prin1-to-string
-                                (if (equal init-file-user "")
-                                    (user-login-name)
-                                  init-file-user)))
-                              "[ \t\n]*)")
-                             nil t))
-                        (error nil))
-                    (kill-buffer buffer)))))
+                 (condition-case nil
+                     (with-temp-buffer
+                       (insert-file-contents user-init-file)
+                       (re-search-forward
+                        (concat
+                         "([ \t\n]*setq[ \t\n]+"
+                         "inhibit-startup-echo-area-message[ \t\n]+"
+                         (regexp-quote
+                          (prin1-to-string
+                           (if (equal init-file-user "")
+                               (user-login-name)
+                             init-file-user)))
+                         "[ \t\n]*)")
+                        nil t))
+                   (error nil))))
        (message "%s" (startup-echo-area-message)))))
 
 (defun display-startup-screen (&optional concise)