0002-Run-debian-startup-and-set-debian-emacs-flavor.patch 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. From 00f1169fb8a41d1f5cd6d2bc41f692c9ceb63a4b Mon Sep 17 00:00:00 2001
  2. From: Rob Browning <rlb@defaultvalue.org>
  3. Date: Mon, 4 Apr 2011 22:46:22 -0500
  4. Subject: Run debian-startup and set debian-emacs-flavor.
  5. Emacs runs debian-startup and sets debian-emacs-flavor.
  6. * Emacs runs debian-startup during the startup process unless
  7. site-run-file is false.
  8. * The global variable debian-emacs-flavor is bound to 'emacs24.
  9. Author: Rob Browning <rlb@defaultvalue.org>
  10. ---
  11. lisp/startup.el | 21 +++++++++++++++++++--
  12. 1 file changed, 19 insertions(+), 2 deletions(-)
  13. diff --git a/lisp/startup.el b/lisp/startup.el
  14. index 5c90595..2edfae8 100644
  15. --- a/lisp/startup.el
  16. +++ b/lisp/startup.el
  17. @@ -412,6 +412,10 @@ The second subexpression is the version string.
  18. The regexp should not contain a starting \"\\`\" or a trailing
  19. \"\\'\"; those are added automatically by callers.")
  20. +(defconst debian-emacs-flavor 'emacs24
  21. + "A symbol representing the particular debian flavor of emacs running.
  22. +Something like 'emacs20, 'xemacs20, etc.")
  23. +
  24. (defun normal-top-level-add-subdirs-to-load-path ()
  25. "Add all subdirectories of `default-directory' to `load-path'.
  26. More precisely, this uses only the subdirectories whose names
  27. @@ -987,8 +991,21 @@ Amongst another things, it parses the command-line arguments."
  28. ;; be loaded from site-run-file and wants to test if -q was given
  29. ;; should check init-file-user instead, since that is already set.
  30. ;; See cus-edit.el for an example.
  31. - (if site-run-file
  32. - (load site-run-file t t))
  33. +
  34. + ;; Original upstream startup
  35. + ;; (if site-run-file
  36. + ;; (load site-run-file t t))
  37. + ;;
  38. +
  39. + ;; Debian startup
  40. + (if site-run-file
  41. + (progn
  42. + ;; Load all the debian package snippets.
  43. + ;; It's in here because we want -q to kill it too.
  44. + (if (load "debian-startup" t t nil)
  45. + (debian-startup debian-emacs-flavor))
  46. + ;; Now the normal site file...
  47. + (load site-run-file t t)))
  48. ;; Sites should not disable this. Only individuals should disable
  49. ;; the startup screen.