Run debian-startup and set debian-emacs-flavor
authorRob Browning <rlb@defaultvalue.org>
Tue, 5 Apr 2011 03:46:22 +0000 (22:46 -0500)
committerSean Whitton <spwhitton@spwhitton.name>
Mon, 24 Feb 2025 07:23:21 +0000 (15:23 +0800)
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>

lisp/startup.el

index 7ec500dfecba817b88ea15aa971e46e17aecead2..e07e6515991cd4f0f6abfdf98813fdc03d4152ac 100644 (file)
@@ -441,6 +441,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
@@ -1493,7 +1497,14 @@ please check its value")
         ;; Sites should not disable the startup screen.
         ;; Only individuals should disable the startup screen.
         (let ((inhibit-startup-screen inhibit-startup-screen))
-         (load site-run-file t t)))
+          (progn
+            ;; This form has been added by Debian to load all the
+            ;; debian package snippets (dh-elpa, etc.).  It's in here
+            ;; because we want -q to kill it too.
+            (if (load "debian-startup" t t nil)
+                (debian-startup debian-emacs-flavor))
+            ;; This is the normal upstream behavior
+            (load site-run-file t t))))
 
     ;; Load that user's init file, or the default one, or none.
     (startup--load-user-init-file