Advertisement
Guest User

.emacs

a guest
Dec 10th, 2013
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.66 KB | None | 0 0
  1. (add-to-list 'load-path "~/.emacs.d/")
  2. (require 'auto-complete-config)
  3. (add-to-list 'ac-dictionary-directories "~/.emacs.d//ac-dict")
  4. (ac-config-default)
  5. ;;now auto-complete-config is enabled
  6.  
  7. (autoload 'octave-mode "octave-mod" nil t)
  8. (setq auto-mode-alist
  9. (cons '("\\.m$" . octave-mode) auto-mode-alist))
  10. ;;now emacs has octave support
  11.  
  12. (add-hook 'octave-mode-hook
  13. (lambda ()
  14. (abbrev-mode 1)
  15. (auto-fill-mode 1)
  16. (if (eq window-system 'x)
  17. (font-lock-mode 1))))
  18. ;;now abbrevs is enabled (whatever that means,
  19. ;;though it must have something to do with octave)
  20.  
  21.  
  22. ;;the following code formats the whole buffer
  23. (defun iwb ()
  24. "indent whole buffer"
  25. (interactive)
  26. (delete-trailing-whitespace)
  27. (indent-region (point-min) (point-max) nil)
  28. (untabify (point-min) (point-max)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement