Run debian-startup and set debian-emacs-flavor
authorRob Browning <rlb@defaultvalue.org>
Tue, 5 Apr 2011 03:46:22 +0000 (22:46 -0500)
committerRob Browning <rlb@defaultvalue.org>
Wed, 26 Dec 2018 19:54:16 +0000 (19:54 +0000)
Emacs runs debian-startup and sets debian-emacs-flavor.

* Emacs runs debian-startup during the startup process unless
  site-run-file is false.

* The global variable debian-emacs-flavor is bound to 'emacs.

Author: Rob Browning <rlb@defaultvalue.org>

Gbp-Pq: Name 0002-Run-debian-startup-and-set-debian-emacs-flavor.patch

lisp/startup.el

index 9d16b59defded3e31da116e6e57f8530f74a4c07..d20431492a7053b2da8929d3b25c50298bd1e6f8 100644 (file)
@@ -434,6 +434,10 @@ Warning Warning!!!  Pure space overflow    !!!Warning Warning
   :type 'directory
   :initialize #'custom-initialize-delay)
 
+(defconst debian-emacs-flavor 'emacs
+  "A symbol representing the particular debian flavor of emacs running.
+Something like 'emacs, 'xemacs21, etc.")
+
 (defun normal-top-level-add-subdirs-to-load-path ()
   "Recursively add all subdirectories of `default-directory' to `load-path'.
 More precisely, this uses only the subdirectories whose names
@@ -1121,8 +1125,21 @@ please check its value")
     ;; be loaded from site-run-file and wants to test if -q was given
     ;; should check init-file-user instead, since that is already set.
     ;; See cus-edit.el for an example.
-    (if site-run-file
-       (load site-run-file t t))
+
+    ;; Original upstream startup
+    ;; (if site-run-file
+    ;;     (load site-run-file t t))
+    ;;
+
+    ;; Debian startup
+     (if site-run-file
+        (progn
+          ;; Load all the debian package snippets.
+          ;; It's in here because we want -q to kill it too.
+          (if (load "debian-startup" t t nil)
+              (debian-startup debian-emacs-flavor))
+          ;; Now the normal site file...
+          (load site-run-file t t)))
 
     ;; Sites should not disable this.  Only individuals should disable
     ;; the startup screen.