Guest User

Untitled

a guest
Oct 20th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.76 KB | None | 0 0
  1. (defun set-frame-size-according-to-resolution ()
  2. (interactive)
  3. (if window-system
  4. (progn
  5. ;; use 120 char wide window for largeish displays
  6. ;; and smaller 80 column windows for smaller displays
  7. ;; pick whatever numbers make sense for you
  8. (if (> (x-display-pixel-width) 1280)
  9. (add-to-list 'default-frame-alist (cons 'width 120))
  10. (add-to-list 'default-frame-alist (cons 'width 80)))
  11. ;; for the height, subtract a couple hundred pixels
  12. ;; from the screen height (for panels, menubars and
  13. ;; whatnot), then divide by the height of a char to
  14. ;; get the height we want
  15. (add-to-list 'default-frame-alist
  16. (cons 'height (/ (- (x-display-pixel-height) 200)
  17. (frame-char-height)))))))
  18.  
  19. (set-frame-size-according-to-resolution)
  20.  
  21. (set-frame-position (selected-frame) 200 25)
  22.  
  23. (semantic-mode 1)
  24. (global-ede-mode t)
  25.  
  26. ;; start speedbar if we're using a window system
  27. (when window-system
  28. (speedbar t))
  29.  
  30. ;; Interactively Do Things (highly recommended, but not strictly required)
  31. (require 'ido)
  32. (ido-mode t)
  33.  
  34. ;; Magit for Emacs
  35. (require 'magit)
  36.  
  37. ;; Rinari
  38. (add-to-list 'load-path "~/.emacs.d/rinari")
  39. (require 'rinari)
  40.  
  41. ;; loading go mode
  42. (add-to-list 'load-path "/usr/local/Cellar/go/1.0.1/misc/emacs" t)
  43. (require 'go-mode-load)
  44.  
  45. ;; loading scala mode
  46. (add-to-list 'load-path "/usr/local/src/scala-2.8.1.final/misc/scala-tool-support/emacs/")
  47. ;; (require 'scala-mode-auto)
  48.  
  49. ;; loading erlang mode
  50. (setq load-path (cons "/usr/local/Cellar/erlang/R15B01/lib/erlang/lib/tools-2.6.7/emacs"
  51. load-path))
  52. (setq erlang-root-dir "/usr/local/lib/erlang")
  53. (setq exec-path (cons "/usr/local/lib/erlang/bin" exec-path))
  54. (require 'erlang-start)
  55.  
  56. ;; loading coffee script mode
  57. (add-to-list 'load-path "~/.emacs.d/coffee-mode")
  58. ;; (require 'coffee-mode)
  59. (add-to-list 'auto-mode-alist '("\\.coffee$" . coffee-mode))
  60. (add-to-list 'auto-mode-alist '("Cakefile" . coffee-mode))
  61.  
  62. ;; loading markdown major mode
  63. (autoload 'markdown-mode "markdown-mode.el"
  64. "Major mode for editing Markdown files" t)
  65. (setq auto-mode-alist (cons '("\\.md" . markdown-mode) auto-mode-alist))
  66.  
  67. ;; loading agda mode, currently not working hence commented out
  68. ;; (load-file (let ((coding-system-for-read 'utf-8))
  69. ;; (shell-command-to-string "agda-mode locate")))
  70.  
  71. (custom-set-variables
  72. ;; custom-set-variables was added by Custom.
  73. ;; If you edit it by hand, you could mess it up, so be careful.
  74. ;; Your init file should contain only one such instance.
  75. ;; If there is more than one, they won't work right.
  76. '(column-number-mode t)
  77. '(compose-mail-user-agent-warnings t)
  78. '(custom-enabled-themes (quote (tango-dark)))
  79. '(display-battery-mode t)
  80. '(display-time-mode t)
  81. '(mail-alias-file "~/mail/.aliases")
  82. '(mail-archive-file-name "outgoing")
  83. '(mail-default-headers nil)
  84. '(mail-default-reply-to "zlu@me.com")
  85. '(mail-from-style (quote angles))
  86. '(mail-host-address "zlu-mba")
  87. '(mail-mailing-lists nil)
  88. '(mail-self-blind nil)
  89. '(mail-setup-with-from t)
  90. '(mail-signature-file "~/.signature")
  91. '(mail-user-agent (quote sendmail-user-agent))
  92. '(message-send-mail-function (quote message-send-mail-with-sendmail))
  93. '(rmail-enable-mime t)
  94. '(rmail-movemail-program "/Applications/Emacs.app/Contents/MacOS/bin/movemail")
  95. '(rmail-preserve-inbox nil)
  96. '(rmail-user-mail-address-regexp nil)
  97. '(send-mail-function (quote sendmail-send-it))
  98. '(show-paren-mode t)
  99. '(size-indication-mode t)
  100. '(speedbar-default-position (quote right))
  101. '(speedbar-use-images nil)
  102. '(tool-bar-mode nil)
  103. '(user-full-name "Zhao Lu")
  104. '(user-mail-address "zlu@me.com"))
  105. (custom-set-faces
  106. ;; custom-set-faces was added by Custom.
  107. ;; If you edit it by hand, you could mess it up, so be careful.
  108. ;; Your init file should contain only one such instance.
  109. ;; If there is more than one, they won't work right.
  110. )
Add Comment
Please, Sign In to add comment