site-start.el.emacs24 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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. (when vine-default
  28. (message "Starting vine-default-setup ...")
  29. (when vine-default-base
  30. (message "Loading vine-default-base ...")
  31. (require 'vine-default-base))
  32. (when vine-default-faces
  33. (message "Loading vine-default-faces ...")
  34. (require 'vine-default-faces))
  35. (run-hooks 'vine-default-setup-hook)
  36. (run-hooks 'after-vine-default-setup-hook);; obsolete
  37. )
  38. )
  39. (defun show-vine-default ()
  40. "A function to show current vine-default configurations"
  41. (interactive)
  42. (shell-command
  43. "/usr/lib/emacsen-common/show-vine-default.sh EMACS_VERSION"))
  44. (defun drop-vine-default-from-load-path (regex)
  45. "A function to drop a path matching to REGEX from load-path"
  46. (setq load-path
  47. (loop for x in load-path
  48. unless (string-match regex x)
  49. collect x))
  50. )
  51. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  52. ;;; run functions from the /etc/emacs-EMACS_VERSION/site-start.d directory
  53. ;;; Files in this directory ending with ".el" are run on startup
  54. (mapc 'load (directory-files "/etc/emacs-EMACS_VERSION/site-start.d" t "\\.el\\'"))
  55. ;;; load local configuration
  56. (if (file-exists-p (expand-file-name "/etc/emacs/emacs24-local.el"))
  57. (load (expand-file-name "/etc/emacs/emacs24-local.el")))
  58. ;;; load vine-default configuration per user before vine-default-setup
  59. (if (file-exists-p (expand-file-name "~/.emacs.d/emacs24-vine-default.el"))
  60. (load (expand-file-name "~/.emacs.d/emacs24-vine-default.el")))
  61. ;;; run vine-default-setup
  62. (vine-default-setup)
  63. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  64. ;; Local Variables:
  65. ;; mode: emacs-lisp
  66. ;; End: