TEXT   25

dotemacs

Guest on 24th January 2023 02:06:59 PM


  1. ;;(autoload 'gnuserv-start "gnuserv-compat"
  2. ;; "Allow this Emacs process to be a server for client processes."
  3. ;; t)
  4. ;;(setq gnuserv-program "gnuserv-emacs")
  5. ;;(setq gnuserv-frame (selected-frame))
  6. ;;(gnuserv-start)
  7.  
  8. (add-to-list 'load-path "~/.emacs.d/lisp/")
  9.  
  10. (require 'color-theme)
  11. (color-theme-blue-sea)
  12.  
  13. (global-font-lock-mode 1)
  14.  
  15. (tool-bar-mode -1)
  16.  
  17. (set-scroll-bar-mode 'right)
  18.  
  19.  
  20. (global-set-key [(mouse-4)] (lambda () (interactive) (scroll-down 3)))
  21. (global-set-key [(mouse-5)] (lambda () (interactive) (scroll-up 3)))
  22.  
  23. (require 'php-mode)
  24.  
  25. (require 'css-mode)
  26. (setq auto-mode-alist      
  27.       (cons '("\\.css\\'" . css-mode) auto-mode-alist))
  28.  
  29. ; (add-to-list 'load-path "~/.emacs.d/lisp/csmode")
  30. ; (autoload 'csharp-mode "cc-mode")
  31. (setq auto-mode-alist
  32.       (append '(
  33.                 ("\\.cs$" . c++-mode)
  34.                 ) auto-mode-alist ))
  35.  
  36. (add-to-list 'load-path "~/misc/mozart-1.2.5.20030212/share/elisp/")
  37.  
  38. (defun expand-or-indent ()
  39.   "Complete if point is at end of a word, otherwise indent line."
  40.   (interactive)
  41.   (if (looking-at "\\>")
  42.       (dabbrev-expand nil)
  43.     (indent-for-tab-command)
  44.     ))
  45.  
  46. (setq c-default-style "bsd")
  47. (defun my-c-mode-common-hook ()
  48.   (c-set-style "bsd")
  49.   (setq indent-tab-mode t)
  50.   (c-set-offset 'statement-cont '*)
  51.   (c-set-offset 'arglist-cont-nonempty '*)
  52.   (c-set-offset 'arglist-intro '*)
  53.   (c-set-offset 'arglist-close '*)
  54.   (local-set-key (quote [f1]) (quote compile))
  55.   (local-set-key (kbd "<tab>") 'expand-or-indent)
  56.   )
  57.  
  58. (add-hook 'c-mode-common-hook 'my-c-mode-common-hook)
  59.  
  60. (setq ispell-program-name "aspell")
  61.  
  62. (add-to-list 'load-path "/usr/local/share/emacs/site-lisp/")
  63. (add-to-list 'load-path "/usr/local/share/emacs/site-lisp/sml-mode/")
  64. (add-to-list 'load-path "/usr/local/lib/ruby/elisp/")
  65.  
  66. ;; AucTeX
  67. ;; (add-to-list 'load-path "/usr/local/share/emacs/site-lisp-auctex/")
  68. (require 'tex-site)
  69.  
  70. ;; RefTeX
  71. (setq reftex-plug-into-AUCTeX t)
  72.  
  73. ;; (require 'sml-mode-startup)
  74.  
  75. (setq ruby-program-name "/usr/local/bin/ruby")
  76. (autoload 'ruby-mode "ruby-mode" "Mode for editing ruby source files")
  77. (add-to-list 'auto-mode-alist '("\\.rb$" . ruby-mode))
  78. (add-to-list 'auto-mode-alist '("\\.rbx$" . ruby-mode))
  79. (add-to-list 'interpreter-mode-alist '("ruby" . ruby-mode))
  80. (autoload 'run-ruby "inf-ruby" "Run an inferior Ruby process")
  81. (autoload 'inf-ruby-keys "inf-ruby" "Set local key defs for inf-ruby in ruby-mode")
  82. (add-hook 'ruby-mode-hook '(lambda () (inf-ruby-keys)))
  83.  
  84.  
  85. (setq tex-dvi-view-command "xdvi")
  86. (setq tex-shell-file-name "sh")
  87.  
  88. (add-to-list 'backup-directory-alist '("." . "~/backups"))
  89.  
  90. (defun dont-kill-emacs ()
  91.   (interactive)
  92.   ;;(error (substitute-command-keys "To exit emacs: \\[kill-emacs]")))
  93.   (if (yes-or-no-p "Do you really want to exit emacs?")
  94.       (save-buffers-kill-emacs)))
  95.  
  96. (global-set-key "\C-x\C-c" 'dont-kill-emacs)
  97.  
  98. (require 'guess-offset)
  99.  
  100. (defun my-latex-mode-hook ()
  101.   (auto-fill-mode)
  102.   (flyspell-mode))
  103.  
  104. (add-hook 'LaTeX-mode-hook 'my-latex-mode-hook)
  105.  
  106. (setq auto-mode-alist
  107.       (append auto-mode-alist
  108.               '(("\\.[hg]s$"  . haskell-mode)
  109.                 ("\\.hi$"     . haskell-mode)
  110.                 ("\\.l[hg]s$" . literate-haskell-mode))))
  111. (autoload 'haskell-mode "haskell-mode"
  112.    "Major mode for editing Haskell scripts." t)
  113. (autoload 'literate-haskell-mode "haskell-mode"
  114.    "Major mode for editing literate Haskell scripts." t)
  115.  
  116. (add-hook 'haskell-mode-hook 'turn-on-haskell-font-lock)
  117. (add-hook 'haskell-mode-hook 'turn-on-haskell-decl-scan)
  118. ;(add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)
  119. ;(add-hook 'haskell-mode-hook 'turn-on-haskell-indent)
  120. ;(add-hook 'haskell-mode-hook 'turn-on-haskell-simple-indent)
  121. (add-hook 'haskell-mode-hook 'turn-on-haskell-hugs)

Raw Paste


Login or Register to edit or fork this paste. It's free.

">