site-start.el.emacs22 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2. ;;; GNU Emacs EMACS_VERSION default settings for Vine Linux
  3. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  4. (defcustom emacs-ime (getenv "EMACS_IME")
  5. "A variable of default Input Method Editor"
  6. :type 'string)
  7. (if (null emacs-ime)
  8. (setq emacs-ime "scim"))
  9. (defcustom vine-default t
  10. "A boolean for all Vine Linux default settings"
  11. :type 'boolean)
  12. (if (equal (getenv "LOGNAME") "root")
  13. (setq vine-default nil))
  14. (defcustom vine-default-base t
  15. "A boolean for vine-default-base"
  16. :type 'boolean)
  17. (defcustom vine-default-faces t
  18. "A boolean for vine-default-faces"
  19. :type 'boolean)
  20. (defvar vine-default-setup-hook nil
  21. "List of functions to be called at vine-default-setup")
  22. (defvar after-vine-default-setup-hook nil
  23. "This hook is obsolete! Please do not use this hook.
  24. List of functions to be called at the end of vine-default-setup")
  25. (defun vine-default-setup ()
  26. "A function for setup to default configurations of Vine Linux"
  27. (if vine-default
  28. (progn
  29. (message "Starting vine-default-setup ...")
  30. (if vine-default-base (require 'vine-default-base))
  31. (if vine-default-faces (require 'vine-default-faces))
  32. (run-hooks 'vine-default-setup-hook)
  33. (run-hooks 'after-vine-default-setup-hook);; obsolete
  34. )
  35. )
  36. )
  37. (defun show-vine-default ()
  38. "A function to show current vine-default configurations"
  39. (interactive)
  40. (shell-command
  41. "/usr/lib/emacsen-common/show-vine-default.sh EMACS_VERSION"))
  42. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  43. ;;; run functions from the /etc/emacs-EMACS_VERSION/site-start.d directory
  44. ;;; Files in this directory ending with ".el" are run on startup
  45. (mapc 'load (directory-files "/etc/emacs-EMACS_VERSION/site-start.d" t "\\.el\\'"))
  46. ;;; load local configuration
  47. (if (file-exists-p (expand-file-name "/etc/emacs/emacs23-local.el"))
  48. (load (expand-file-name "/etc/emacs/emacs22-local.el")))
  49. ;;; load vine-default configuration per user before vine-default-setup
  50. (if (file-exists-p (expand-file-name "~/.emacs.d/emacs22-vine-default.el"))
  51. (load (expand-file-name "~/.emacs.d/emacs22-vine-default.el")))
  52. ;;; run vine-default-setup
  53. (vine-default-setup)
  54. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  55. ;; Local Variables:
  56. ;; mode: emacs-lisp
  57. ;; End: