]> code.delx.au - gnu-emacs/blobdiff - lisp/startup.el
Mention read-regexp in doc of functions that use it
[gnu-emacs] / lisp / startup.el
index bbcf5bda2d735dbf352022fe1253706cc8ef4793..b3f2316729b1a95b49d67ee4ed5d15ecd0e907e7 100644 (file)
@@ -1,8 +1,9 @@
 ;;; startup.el --- process Emacs shell arguments  -*- lexical-binding: t -*-
 
-;; Copyright (C) 1985-1986, 1992, 1994-2013 Free Software Foundation, Inc.
+;; Copyright (C) 1985-1986, 1992, 1994-2014 Free Software Foundation,
+;; Inc.
 
-;; Maintainer: FSF
+;; Maintainer: emacs-devel@gnu.org
 ;; Keywords: internal
 ;; Package: emacs
 
@@ -1589,24 +1590,26 @@ a face or button specification."
 
 (declare-function image-size "image.c" (spec &optional pixels frame))
 
+(defun fancy-splash-image-file ()
+  (cond ((stringp fancy-splash-image) fancy-splash-image)
+       ((display-color-p)
+        (cond ((<= (display-planes) 8)
+               (if (image-type-available-p 'xpm)
+                   "splash.xpm"
+                 "splash.pbm"))
+              ((or (image-type-available-p 'svg)
+                   (image-type-available-p 'imagemagick))
+               "splash.svg")
+              ((image-type-available-p 'png)
+               "splash.png")
+              ((image-type-available-p 'xpm)
+               "splash.xpm")
+              (t "splash.pbm")))
+       (t "splash.pbm")))
+
 (defun fancy-splash-head ()
   "Insert the head part of the splash screen into the current buffer."
-  (let* ((image-file (cond ((stringp fancy-splash-image)
-                           fancy-splash-image)
-                          ((display-color-p)
-                           (cond ((<= (display-planes) 8)
-                                  (if (image-type-available-p 'xpm)
-                                      "splash.xpm"
-                                    "splash.pbm"))
-                                 ((or (image-type-available-p 'svg)
-                                      (image-type-available-p 'imagemagick))
-                                  "splash.svg")
-                                 ((image-type-available-p 'png)
-                                  "splash.png")
-                                 ((image-type-available-p 'xpm)
-                                  "splash.xpm")
-                                 (t "splash.pbm")))
-                          (t "splash.pbm")))
+  (let* ((image-file (fancy-splash-image-file))
         (img (create-image image-file))
         (image-width (and img (car (image-size img))))
         (window-width (window-width)))
@@ -1742,6 +1745,7 @@ splash screen in another window."
        (insert "\n")
        (fancy-startup-tail concise))
       (use-local-map splash-screen-keymap)
+      (setq-local browse-url-browser-function 'eww-browse-url)
       (setq tab-width 22
            buffer-read-only t)
       (set-buffer-modified-p nil)
@@ -1779,6 +1783,7 @@ splash screen in another window."
        (goto-char (point-min))
        (force-mode-line-update))
       (use-local-map splash-screen-keymap)
+      (setq-local browse-url-browser-function 'eww-browse-url)
       (setq tab-width 22)
       (setq buffer-read-only t)
       (goto-char (point-min))
@@ -1808,10 +1813,7 @@ we put it on this frame."
                  (image-type-available-p 'pbm)))
     (let ((frame (fancy-splash-frame)))
       (when frame
-       (let* ((img (create-image (or fancy-splash-image
-                                     (if (and (display-color-p)
-                                              (image-type-available-p 'xpm))
-                                         "splash.xpm" "splash.pbm"))))
+       (let* ((img (create-image (fancy-splash-image-file)))
               (image-height (and img (cdr (image-size img nil frame))))
               ;; We test frame-height so that, if the frame is split
               ;; by displaying a warning, that doesn't cause the normal