Package: emacs / 1:30.1+1-6

0002-Run-debian-startup-and-set-debian-emacs-flavor.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
From 5a2dcc0916119e008cb5ecfa02e99915e86a27fa Mon Sep 17 00:00:00 2001
From: Rob Browning <rlb@defaultvalue.org>
Date: Mon, 4 Apr 2011 22:46:22 -0500
Subject: Run debian-startup and set debian-emacs-flavor

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 | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/lisp/startup.el b/lisp/startup.el
index 7ec500dfecb..e07e6515991 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -441,6 +441,10 @@ tutorial-directory
   :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 @@ command-line
         ;; 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