site-start.el.emacs23 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. ;;; Emacs default settings for Vine Linux
  2. (defcustom emacs-ime (getenv "EMACS_IME")
  3. "A variable of default Input Method Editor"
  4. :type 'string)
  5. (if (null emacs-ime)
  6. (setq emacs-ime "scim"))
  7. (defcustom vine-default t
  8. "A boolean for all Vine Linux default settings"
  9. :type 'boolean)
  10. (if (equal (getenv "LOGNAME") "root")
  11. (setq vine-default nil))
  12. (defcustom vine-default-base t
  13. "A boolean for vine-default-base"
  14. :type 'boolean)
  15. (defcustom vine-default-faces t
  16. "A boolean for vine-default-faces"
  17. :type 'boolean)
  18. ;; (defcustom vine-default-mouse t
  19. ;; "A boolean for vine-default-mouse"
  20. ;; :type 'boolean)
  21. ;; (defcustom vine-default-misc t
  22. ;; "A boolean for vine-default-misc"
  23. ;; :type 'boolean)
  24. (defvar vine-default-setup-hook nil
  25. "*List of functions to be called at vine-default-setup")
  26. (defvar after-vine-default-setup-hook nil
  27. "*List of functions to be called at the end of vine-default-setup")
  28. (defun vine-default-setup ()
  29. "a function for setup to default configurations of Vine Linux."
  30. (if vine-default
  31. (progn
  32. (if vine-default-base (require 'vine-default-base))
  33. (if vine-default-faces (require 'vine-default-faces))
  34. ;; (if vine-default-mouse (require 'vine-default-mouse))
  35. ;; (if vine-default-misc (require 'vine-default-misc))
  36. (run-hooks 'vine-default-setup-hook)
  37. (run-hooks 'after-vine-default-setup-hook)
  38. )
  39. )
  40. )
  41. (add-hook 'after-init-hook 'vine-default-setup)
  42. (defun show-vine-default ()
  43. (interactive)
  44. (let ((command nil) (version nil)
  45. (major (number-to-string emacs-major-version))
  46. (minor (number-to-string emacs-minor-version)))
  47. (setq version (concat major "." minor))
  48. (setq command (concat "showvdefaultemacs " version))
  49. (shell-command command)
  50. )
  51. )
  52. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  53. ;; Aspell is a replacement for ispell
  54. ;;(setq-default ispell-program-name "aspell")
  55. ;; Add python support
  56. ;(require 'python-mode)
  57. ;(setq auto-mode-alist
  58. ; (cons '("\\.py$" . python-mode) auto-mode-alist))
  59. ;(setq interpreter-mode-alist
  60. ; (cons '("python" . python-mode) interpreter-mode-alist))
  61. ;; run functions from the /usr/share/emacs/site-lisp/site-start.d directory
  62. ;; Files in this directory ending with ".el" are run on startup
  63. ;(mapc 'load (directory-files "/usr/share/emacs/site-lisp/site-start.d" t "\\.el\\'"))
  64. (mapc 'load (directory-files "/etc/emacs-EMACS_VERSION/site-start.d" t "\\.el\\'"))
  65. ;; Use the rpm-spec-mode for spec files
  66. ;(require 'rpm-spec-mode)
  67. ;(setq auto-mode-alist
  68. ; (cons '("\\.spec$" . rpm-spec-mode) auto-mode-alist))
  69. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  70. ;;; load local settings at the end of site-start.el for local system
  71. (if (file-exists-p (expand-file-name "/etc/emacs/emacs-23-local.el"))
  72. (load (expand-file-name "/etc/emacs/emacs-23-local.el") nil t nil))
  73. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  74. ;; Local Variables:
  75. ;; mode: emacs-lisp
  76. ;; End: