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 49 50 51 52 53 54 55 56
|
From 381dc48e4f31a00726f44f3723b913aea4485cca 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 | 21 +++++++++++++++++++--
1 file changed, 19 insertions(+), 2 deletions(-)
diff --git a/lisp/startup.el b/lisp/startup.el
index 9d16b59defd..d20431492a7 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -434,6 +434,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
@@ -1121,8 +1125,21 @@ command-line
;; 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.
|