Advertisement
Guest User

Untitled

a guest
Jan 15th, 2018
328
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 70.24 KB | None | 0 0
  1. (custom-set-variables
  2. ;; custom-set-variables was added by Custom.
  3. ;; If you edit it by hand, you could mess it up, so be careful.
  4. ;; Your init file should contain only one such instance.
  5. ;; If there is more than one, they won't work right.
  6. '(custom-enabled-themes (quote (tsdh-dark)))
  7. '(inhibit-startup-screen t))
  8. (custom-set-faces
  9. ;; custom-set-faces was added by Custom.
  10. ;; If you edit it by hand, you could mess it up, so be careful.
  11. ;; Your init file should contain only one such instance.
  12. ;; If there is more than one, they won't work right.
  13. )
  14.  
  15. ;; Allmäna saker (tillägg av tao@ida.liu.se)
  16. (setq default-major-mode 'text-mode)
  17. (setq require-final-newline 1)
  18. (setq inhibit-startup-message t)
  19. (put 'downcase-region 'disabled nil)
  20.  
  21. ;; Reservkopiering (tillägg av tao@ida.liu.se)
  22. (setq version-control t)
  23. (setq backup-by-copying t)
  24. (setq backup-by-copying-when-linked t)
  25. (setq backup-by-copying-when-mismatch t)
  26. (setq kept-new-versions 99)
  27. (setq kept-old-versions 0)
  28. (setq delete-auto-save-files t)
  29. (setq trim-versions-without-asking t)
  30. (global-set-key "\C-X\C-s"
  31. '(lambda () (interactive) (save-buffer 16)))
  32.  
  33. ;; Framhävning, så mycket som möjligt!
  34. (global-font-lock-mode t)
  35. (setq font-lock-maximum-decoration t)
  36.  
  37. ;; Hantera svenska tecken korrekt.
  38. (set-language-environment "Latin-1")
  39. (set-terminal-coding-system 'latin-1)
  40.  
  41. ;; Rullningslist på rätt plats!
  42. (setq scroll-bar-mode-explicit t)
  43. (set-scroll-bar-mode 'right)
  44. (custom-set-variables
  45. ;; custom-set-variables was added by Custom.
  46. ;; If you edit it by hand, you could mess it up, so be careful.
  47. ;; Your init file should contain only one such instance.
  48. ;; If there is more than one, they won't work right.
  49. '(custom-enabled-themes (quote (tsdh-dark)))
  50. '(inhibit-startup-screen t))
  51. (custom-set-faces
  52. ;; custom-set-faces was added by Custom.
  53. ;; If you edit it by hand, you could mess it up, so be careful.
  54. ;; Your init file should contain only one such instance.
  55. ;; If there is more than one, they won't work right.
  56. )
  57.  
  58. ;; Allmäna saker (tillägg av tao@ida.liu.se)
  59. (setq default-major-mode 'text-mode)
  60. (setq require-final-newline 1)
  61. (setq inhibit-startup-message t)
  62. (put 'downcase-region 'disabled nil)
  63.  
  64. ;; Reservkopiering (tillägg av tao@ida.liu.se)
  65. (setq version-control t)
  66. (setq backup-by-copying t)
  67. (setq backup-by-copying-when-linked t)
  68. (setq backup-by-copying-when-mismatch t)
  69. (setq kept-new-versions 99)
  70. (setq kept-old-versions 0)
  71. (setq delete-auto-save-files t)
  72. (setq trim-versions-without-asking t)
  73. (global-set-key "\C-X\C-s"
  74. '(lambda () (interactive) (save-buffer 16)))
  75.  
  76. ;; Framhävning, så mycket som möjligt!
  77. (global-font-lock-mode t)
  78. (setq font-lock-maximum-decoration t)
  79.  
  80. ;; Hantera svenska tecken korrekt.
  81. (set-language-environment "Latin-1")
  82. (set-terminal-coding-system 'latin-1)
  83.  
  84. ;; Rullningslist på rätt plats!
  85. (setq scroll-bar-mode-explicit t)
  86. (set-scroll-bar-mode 'right)
  87.  
  88. ;; Grundfärger.
  89. (set-background-color "White")
  90. (set-foreground-color "Black")
  91. (set-cursor-color "Black")
  92.  
  93. ;; Färger för nyckelord, etc.
  94. (custom-set-variables)
  95. (custom-set-faces
  96. '(font-lock-comment-face ((((class color) (background light))
  97. (:italic t :foreground "Firebrick"))))
  98. '(font-lock-function-name-face ((((class color) (background light))
  99. (:bold t :foreground "Blue"))))
  100. '(font-lock-keyword-face ((((class color) (background light))
  101. (:bold t :foreground "Black"))))
  102. '(font-lock-string-face ((((class color) (background light))
  103. (:italic t :foreground "ForestGreen"))))
  104. '(font-lock-type-face ((((class color) (background light))
  105. (:foreground "Blue"))))
  106. '(font-lock-variable-name-face ((((class color) (background light))
  107. (:foreground "Black"))))
  108. '(font-lock-reference-face ((((class color) (background light))
  109. (:foreground "ForestGreen")))))
  110.  
  111. ;; Framhäv markerat område genom invertering.
  112. (transient-mark-mode t)
  113.  
  114. ;; Markera matchande parenteser.
  115. (show-paren-mode 1)
  116.  
  117. ;; Diverse bra saker
  118. (setq next-line-add-newlines nil) ; Lägg inte till nya rader efter EOF.
  119. (setq line-number-mode t) ; Visa radnummer...
  120. (setq column-number-mode t) ; ...och kolumn.
  121. (setq-default indent-tabs-mode nil) ; Använd alltid mellanrumstecken, ej tab, för indrag.
  122. (setq c-basic-offset 3) ; Indragssdjup.
  123. (setq display-time-day-and-date t) ; Visa tid och datum...
  124. (setq display-time-24hr-format t) ; ...så att man fattar.
  125. (display-time) ; Visa tiden formaterad enligt ovan.
  126.  
  127. ;; Låt DEL-knappen klippa ut området (möjligheten att radera ordvis med DEL förloras).
  128. ;;(if (eq window-system 'x)
  129. ;; (pc-selection-mode))
  130.  
  131. ;; Emacs21-specifikt.
  132. ;; Tar bort "skräp".
  133. (if (string-match "^21" emacs-version)
  134. (progn
  135. (tool-bar-mode(custom-set-variables
  136. ;; custom-set-variables was added by Custom.
  137. ;; If you edit it by hand, you could mess it up, so be careful.
  138. ;; Your init file should contain only one such instance.
  139. ;; If there is more than one, they won't work right.
  140. '(custom-enabled-themes (quote (tsdh-dark)))
  141. '(inhibit-startup-screen t))
  142. (custom-set-faces
  143. ;; custom-set-faces was added by Custom.
  144. ;; If you edit it by hand, you could mess it up, so be careful.
  145. ;; Your init file should contain only one such instance.
  146. ;; If there is more than one, they won't work right.
  147. )
  148.  
  149. ;; Allmäna saker (tillägg av tao@ida.liu.se)
  150. (setq default-major-mode 'text-mode)
  151. (setq require-final-newline 1)
  152. (setq inhibit-startup-message t)
  153. (put 'downcase-region 'disabled nil)
  154.  
  155. ;; Reservkopiering (tillägg av tao@ida.liu.se)
  156. (setq version-control t)
  157. (setq backup-by-copying t)
  158. (setq backup-by-copying-when-linked t)
  159. (setq backup-by-copying-when-mismatch t)
  160. (setq kept-new-versions 99)
  161. (setq kept-old-versions 0)
  162. (setq delete-auto-save-files t)
  163. (setq trim-versions-without-asking t)
  164. (global-set-key "\C-X\C-s"
  165. '(lambda () (interactive) (save-buffer 16)))
  166.  
  167. ;; Framhävning, så mycket som möjligt!
  168. (global-font-lock-mode t)
  169. (setq font-lock-maximum-decoration t)
  170.  
  171. ;; Hantera svenska tecken korrekt.
  172. (set-language-environment "Latin-1")
  173. (set-terminal-coding-system 'latin-1)
  174.  
  175. ;; Rullningslist på rätt plats!
  176. (setq scroll-bar-mode-explicit t)
  177. (set-scroll-bar-mode 'right)
  178.  
  179. ;; Grundfärger.
  180. (set-background-color "White")
  181. (set-foreground-color "Black")
  182. (set-cursor-color "Black")
  183.  
  184. ;; Färger för nyckelord, etc.
  185. (custom-set-variables)
  186. (custom-set-faces
  187. '(font-lock-comment-face ((((class color) (background light))
  188. (:italic t :foreground "Firebrick"))))
  189. '(font-lock-function-name-face ((((class color) (background light))
  190. (:bold t :foreground "Blue"))))
  191. '(font-lock-keyword-face ((((class color) (background light))
  192. (:bold t :foreground "Black"))))
  193. '(font-lock-string-face ((((class color) (background light))
  194. (:italic t :foreground "ForestGreen"))))
  195. '(font-lock-type-face ((((class color) (background light))
  196. (:foreground "Blue"))))
  197. '(font-lock-variable-name-face ((((class color) (background light))
  198. (:foreground "Black"))))
  199. '(font-lock-reference-face ((((class color) (background light))
  200. (:foreground "ForestGreen")))))
  201.  
  202. ;; Framhäv markerat område genom invertering.
  203. (transient-mark-mode t)
  204.  
  205. ;; Markera matchande parenteser.
  206. (show-paren-mode 1)
  207.  
  208. ;; Diverse bra saker
  209. (setq next-line-add-newlines nil) ; Lägg inte till nya rader efter EOF.
  210. (setq line-number-mode t) ; Visa radnummer...
  211. (setq column-number-mode t) ; ...och kolumn.
  212. (setq-default indent-tabs-mode nil) ; Använd alltid mellanrumstecken, ej tab, för indrag.
  213. (setq c-basic-offset 3) ; Indragssdjup.
  214. (setq display-time-day-and-date t) ; Visa tid och datum...
  215. (setq display-time-24hr-format t) ; ...så att man fattar.
  216. (display-time) ; Visa tiden formaterad enligt ovan.
  217.  
  218. ;; Låt DEL-knappen klippa ut området (möjligheten att radera ordvis med DEL förloras).
  219. ;;(if (eq window-system 'x)
  220. ;; (pc-selection-mode))
  221.  
  222. ;; Emacs21-specifikt.
  223. ;; Tar bort "skräp".
  224. (if (string-match "^21" emacs-version)
  225. (progn
  226. (tool-bar-mode -1)
  227. (blink-cursor(custom-set-variables
  228. ;; custom-set-variables was added by Custom.
  229. ;; If you edit it by hand, you could mess it up, so be careful.
  230. ;; Your init file should contain only one such instance.
  231. ;; If there is more than one, they won't work right.
  232. '(custom-enabled-themes (quote (tsdh-dark)))
  233. '(inhibit-startup-screen t))
  234. (custom-set-faces
  235. ;; custom-set-faces was added by Custom.
  236. ;; If you edit it by hand, you could mess it up, so be careful.
  237. ;; Your init file should contain only one such instance.
  238. ;; If there is more than one, they won't work right.
  239. )
  240.  
  241. ;; Allmäna saker (tillägg av tao@ida.liu.se)
  242. (setq default-major-mode 'text-mode)
  243. (setq require-final-newline 1)
  244. (setq inhibit-startup-message t)
  245. (put 'downcase-region 'disabled nil)
  246.  
  247. ;; Reservkopiering (tillägg av tao@ida.liu.se)
  248. (setq version-control t)
  249. (setq backup-by-copying t)
  250. (setq backup-by-copying-when-linked t)
  251. (setq backup-by-copying-when-mismatch t)
  252. (setq kept-new-versions 99)
  253. (setq kept-old-versions 0)
  254. (setq delete-auto-save-files t)
  255. (setq trim-versions-without-asking t)
  256. (global-set-key "\C-X\C-s"
  257. '(lambda () (interactive) (save-buffer 16)))
  258.  
  259. ;; Framhävning, så mycket som möjligt!
  260. (global-font-lock-mode t)
  261. (setq font-lock-maximum-decoration t)
  262.  
  263. ;; Hantera svenska tecken korrekt.
  264. (set-language-environment "Latin-1")
  265. (set-terminal-coding-system 'latin-1)
  266.  
  267. ;; Rullningslist på rätt plats!
  268. (setq scroll-bar-mode-explicit t)
  269. (set-scroll-bar-mode 'right)
  270.  
  271. ;; Grundfärger.
  272. (set-background-color "White")
  273. (set-foreground-color "Black")
  274. (set-cursor-color "Black")
  275.  
  276. ;; Färger för nyckelord, etc.
  277. (custom-set-variables)
  278. (custom-set-faces
  279. '(font-lock-comment-face ((((class color) (background light))
  280. (:italic t :foreground "Firebrick"))))
  281. '(font-lock-function-name-face ((((class color) (background light))
  282. (:bold t :foreground "Blue"))))
  283. '(font-lock-keyword-face ((((class color) (background light))
  284. (:bold t :foreground "Black"))))
  285. '(font-lock-string-face ((((class color) (background light))
  286. (:italic t :foreground "ForestGreen"))))
  287. '(font-lock-type-face ((((class color) (background light))
  288. (:foreground "Blue"))))
  289. '(font-lock-variable-name-face ((((class color) (background light))
  290. (:foreground "Black"))))
  291. '(font-lock-reference-face ((((class color) (background light))
  292. (:foreground "ForestGreen")))))
  293.  
  294. ;; Framhäv markerat område genom invertering.
  295. (transient-mark-mode t)
  296.  
  297. ;; Markera matchande parenteser.
  298. (show-paren-mode 1)
  299.  
  300. ;; Diverse bra saker
  301. (setq next-line-add-newlines nil) ; Lägg inte till nya rader efter EOF.
  302. (setq line-number-mode t) ; Visa radnummer...
  303. (setq column-number-mode t) ; ...och kolumn.
  304. (setq-default indent-tabs-mode nil) ; Använd alltid mellanrumstecken, ej tab, för indrag.
  305. (setq c-basic-offset 3) ; Indragssdjup.
  306. (setq display-time-day-and-date t) ; Visa tid och datum...
  307. (setq display-time-24hr-format t) ; ...så att man fattar.
  308. (display-time) ; Visa tiden formaterad enligt ovan.
  309.  
  310. ;; Låt DEL-knappen klippa ut området (möjligheten att radera ordvis med DEL förloras).
  311. ;;(if (eq window-system 'x)
  312. ;; (pc-selection-mode))
  313.  
  314. ;; Emacs21-specifikt.
  315. ;; Tar bort "skräp".
  316. (if (string-match "^21" emacs-version)
  317. (progn(custom-set-variables
  318. ;; custom-set-variables was added by Custom.
  319. ;; If you edit it by hand, you could mess it up, so be careful.
  320. ;; Your init file should contain only one such instance.
  321. ;; If there is more than one, they won't work right.
  322. '(custom-enabled-themes (quote (tsdh-dark)))
  323. '(inhibit-startup-screen t))
  324. (custom-set-faces
  325. ;; custom-set-faces was added by Custom.
  326. ;; If you edit it by hand, you could mess it up, so be careful.
  327. ;; Your init file should contain only one such instance.
  328. ;; If there is more than one, they won't work right.
  329. )
  330.  
  331. ;; Allmäna saker (tillägg av tao@ida.liu.se)
  332. (setq default-major-mode 'text-mode)
  333. (setq require-final-newline 1)
  334. (setq inhibit-startup-message t)
  335. (put 'downcase-region 'disabled nil)
  336.  
  337. ;; Reservkopiering (tillägg av tao@ida.liu.se)
  338. (setq version-control t)
  339. (setq backup-by-copying t)
  340. (setq backup-by-copying-when-linked t)
  341. (setq backup-by-copying-when-mismatch t)
  342. (setq kept-new-versions 99)
  343. (setq kept-old-versions 0)
  344. (setq delete-auto-save-files t)
  345. (setq trim-versions-without-asking t)
  346. (global-set-key "\C-X\C-s"
  347. '(lambda () (interactive) (save-buffer 16)))
  348.  
  349. ;; Framhävning, så mycket som möjligt!
  350. (global-font-lock-mode t)
  351. (setq font-lock-maximum-decoration t)
  352.  
  353. ;; Hantera svenska tecken korrekt.
  354. (set-language-environment "Latin-1")
  355. (set-terminal-coding-system 'latin-1)
  356.  
  357. ;; Rullningslist på rätt plats!
  358. (setq scroll-bar-mode-explicit t)
  359. (set-scroll-bar-mode 'right)
  360.  
  361. ;; Grundfärger.
  362. (set-background-color "White")
  363. (set-foreground-color "Black")
  364. (set-cursor-color "Black")
  365.  
  366. ;; Färger för nyckelord, etc.
  367. (custom-set-variables)
  368. (custom-set-faces
  369. '(font-lock-comment-face ((((class color) (background light))
  370. (:italic t :foreground "Firebrick"))))
  371. '(font-lock-function-name-face ((((class color) (background light))
  372. (:bold t :foreground "Blue"))))
  373. '(font-lock-keyword-face ((((class color) (background light))
  374. (:bold t :foreground "Black"))))
  375. '(font-lock-string-face ((((class color) (background light))
  376. (:italic t :foreground "ForestGreen"))))
  377. '(font-lock-type-face ((((class color) (background light))
  378. (:foreground "Blue"))))
  379. '(font-lock-variable-name-face ((((class color) (background light))
  380. (:foreground "Black"))))
  381. '(font-lock-reference-face ((((class color) (background light))
  382. (:foreground "ForestGreen")))))
  383.  
  384. ;; Framhäv markerat område genom invertering.
  385. (transient-mark-mode t)
  386.  
  387. ;; Markera matchande parenteser.
  388. (show-paren-mode 1)
  389.  
  390. ;; Diverse bra saker
  391. (setq next-line-add-newlines nil) ; Lägg inte till nya rader efter EOF.
  392. (setq line-number-mode t) ; Visa radnummer...
  393. (setq column-number-mode t) ; ...och kolumn.
  394. (setq-default indent-tabs-mode nil) ; Använd alltid mellanrumstecken, ej tab, för indrag.
  395. (setq c-basic-offset 3) ; Indragssdjup.
  396. (setq display-time-day-and-date t) ; Visa tid och datum...
  397. (setq display-time-24hr-format t) ; ...så att man fattar.
  398. (display-time) ; Visa tiden formaterad enligt ovan.
  399.  
  400. ;; Låt DEL-knappen klippa ut området (möjligheten att radera ordvis med DEL förloras).
  401. ;;(if (eq window-system 'x)
  402. ;; (pc-selection-mode))
  403.  
  404. ;; Emacs21-specifikt.
  405. ;; Tar bort "skräp".
  406. (if (string-match "^21" emacs-version)
  407. (progn
  408. (tool-bar-mode -1)
  409. (blink-cursor-mode -1)))
  410.  
  411. ;; Byt ordning på CR/LF. Kommer att ge indrag på varje ny rad.
  412. (setq foo (global-key-binding "\C-m")) ; Spara CR.
  413. (global-set-key "\C-m" (global-key-binding "\C-j")) ; Sätt CR till LF.
  414. (global-set-key "\C-j" foo) ; Sätt LF till gamla CR.
  415.  
  416. ;; Bra tangentbindningar: F4 tar bort/fram menylisten:
  417. (global-set-key [f4] 'menu-bar-mode)
  418. ; F5 ändrar "line-wrap".
  419. (global-set-key [f5] 'toggle-truncate-lines)
  420.  
  421. ;; C++-specifikt.
  422. (add-to-list 'auto-mode-alist '("\\.h$" . c++-mode)) ; Behandla *.h-filer som C++ (ej C).
  423. (add-to-list 'auto-mode-alist '("\\.icc" . c++-mode)) ; Implementeringsfiler som inkluderas.
  424. (add-to-list 'auto-mode-alist '("\\.tcc" . c++-mode)) ; Filer med templatekod.
  425.  
  426. ;; Bra indrag.
  427. ;;(setq c-default-style "stroustrup")
  428. ;; Vissa föredrar denna ...
  429. (setq c-default-style "ellemtel")
  430.  
  431. (nconc load-path '("/home/TDP007/www-pub/material/ruby-1.9-emacs"))
  432. (require 'ruby-site)
  433. (tool-bar-mode -1)
  434. (blink-cursor-mode -1)))
  435.  
  436. ;; Byt ordning på CR/LF. Kommer att ge indrag på varje ny rad.
  437. (setq foo (global-key-binding "\C-m")) ; Spara CR.
  438. (global-set-key "\C-m" (global-key-binding "\C-j")) ; Sätt CR till LF.
  439. (global-set-key "\C-j" foo) ; Sätt LF till gamla CR.
  440.  
  441. ;; Bra tangentbindningar: F4 tar bort/fram menylisten:
  442. (global-set-key [f4] 'menu-bar-mode)
  443. ; F5 ändrar "line-wrap".
  444. (global-set-key [f5] 'toggle-truncate-lines)
  445.  
  446. ;; C++-specifikt.
  447. (add-to-list 'auto-mode-alist '("\\.h$" . c++-mode)) ; Behandla *.h-filer som C++ (ej C).
  448. (add-to-list 'auto-mode-alist '("\\.icc" . c++-mode)) ; Implementeringsfiler som inkluderas.
  449. (add-to-list 'auto-mode-alist '("\\.tcc" . c++-mode)) ; Filer med templatekod.
  450.  
  451. ;; Bra indrag.
  452. ;;(setq c-default-style "stroustrup")
  453. ;; Vissa föredrar denna ...
  454. (setq c-default-style "ellemtel")
  455.  
  456. (nconc load-path '("/home/TDP007/www-pub/material/ruby-1.9-emacs"))
  457. (require 'ruby-site)-mode -1)))
  458.  
  459. ;; Byt ordning på CR/LF. Kommer att ge indrag på varje ny rad.
  460. (setq foo (global-key-binding "\C-m")) ; Spara CR.
  461. (global-set-key "\C-m" (global-key-binding "\C-j")) ; Sätt CR till LF.
  462. (global-set-key "\C-j" foo) ; Sätt LF till gamla CR.
  463.  
  464. ;; Bra tangentbindningar: F4 tar bort/fram menylisten:
  465. (global-set-key [f4] 'menu-bar-mode)
  466. ; F5 ändrar "line-wrap".
  467. (global-set-key [f5] 'toggle-truncate-lines)
  468.  
  469. ;; C++-specifikt.
  470. (add-to-list 'auto-mode-alist '("\\.h$" . c++-mode)) ; Behandla *.h-filer som C++ (ej C).
  471. (add-to-list 'auto-mode-alist '("\\.icc" . c++-mode)) ; Implementeringsfiler som inkluderas.
  472. (add-to-list 'auto-mode-alist '("\\.tcc" . c++-mode)) ; Filer med templatekod.
  473.  
  474. ;; Bra indrag.
  475. ;;(setq c-default-style "stroustrup")
  476. ;; Vissa föredrar denna ...
  477. (setq c-default-style "ellemtel")
  478. (custom-set-variables
  479. ;; custom-set-variables was added by Custom.
  480. ;; If you edit it by hand, you could mess it up, so be careful.
  481. ;; Your init file should contain only one such instance.
  482. ;; If there is more than one, they won't work right.
  483. '(custom-enabled-themes (quote (tsdh-dark)))
  484. '(inhibit-startup-screen t))
  485. (custom-set-faces
  486. ;; custom-set-faces was added by Custom.
  487. ;; If you edit it by hand, you could mess it up, so be careful.
  488. ;; Your init file should contain only one such instance.
  489. ;; If there is more than one, they won't work right.
  490. )
  491.  
  492. ;; Allmäna saker (tillägg av tao@ida.liu.se)
  493. (setq default-major-mode 'text-mode)
  494. (setq require-final-newline 1)
  495. (setq inhibit-startup-message t)
  496. (put 'downcase-region 'disabled nil)
  497.  
  498. ;; Reservkopiering (tillägg av tao@ida.liu.se)
  499. (setq version-control t)
  500. (setq backup-by-copying t)
  501. (setq backup-by-copying-when-linked t)
  502. (setq backup-by-copying-when-mismatch t)
  503. (setq kept-new-versions 99)
  504. (setq kept-old-versions 0)
  505. (setq delete-auto-save-files t)
  506. (setq trim-versions-without-asking t)
  507. (global-set-key "\C-X\C-s"
  508. '(lambda () (interactive) (save-buffer 16)))
  509.  
  510. ;; Framhävning, så mycket som möjligt!
  511. (global-font-lock-mode t)
  512. (setq font-lock-maximum-decoration t)
  513.  
  514. ;; Hantera svenska tecken korrekt.
  515. (set-language-environment "Latin-1")
  516. (set-terminal-coding-system 'latin-1)
  517.  
  518. ;; Rullningslist på rätt plats!
  519. (setq scroll-bar-mode-explicit t)
  520. (set-scroll-bar-mode 'right)
  521.  
  522. ;; Grundfärger.
  523. (set-background-color "White")
  524. (set-foreground-color "Black")
  525. (set-cursor-color "Black")
  526.  
  527. ;; Färger för nyckelord, etc.
  528. (custom-set-variables)
  529. (custom-set-faces
  530. '(font-lock-comment-face ((((class color) (background light))
  531. (:italic t :foreground "Firebrick"))))
  532. '(font-lock-function-name-face ((((class color) (background light))
  533. (:bold t :foreground "Blue"))))
  534. '(font-lock-keyword-face ((((class color) (background light))
  535. (:bold t :foreground "Black"))))
  536. '(font-lock-string-face ((((class color) (background light))
  537. (:italic t :foreground "ForestGreen"))))
  538. '(font-lock-type-face ((((class color) (background light))
  539. (:foreground "Blue"))))
  540. '(font-lock-variable-name-face ((((class color) (background light))
  541. (:foreground "Black"))))
  542. '(font-lock-reference-face ((((class color) (background light))
  543. (:foreground "ForestGreen")))))
  544.  
  545. ;; Framhäv markerat område genom invertering.
  546. (transient-mark-mode t)
  547.  
  548. ;; Markera matchande parenteser.
  549. (show-paren-mode 1)
  550.  
  551. ;; Diverse bra saker
  552. (setq next-line-add-newlines nil) ; Lägg inte till nya rader efter EOF.
  553. (setq line-number-mode t) ; Visa radnummer...
  554. (setq column-number-mode t) ; ...och kolumn.
  555. (setq-default indent-tabs-mode nil) ; Använd alltid mellanrumstecken, ej tab, för indrag.
  556. (setq c-basic-offset 3) ; Indragssdjup.
  557. (setq display-time-day-and-date t) ; Visa tid och datum...
  558. (setq display-time-24hr-format t) ; ...så att man fattar.
  559. (display-time) ; Visa tiden formaterad enligt ovan.
  560.  
  561. ;; Låt DEL-knappen klippa ut området (möjligheten att radera ordvis med DEL förloras).
  562. ;;(if (eq window-system 'x)
  563. ;; (pc-selection-mode))
  564.  
  565. ;; Emacs21-specifikt.
  566. ;; Tar bort "skräp".
  567. (if (string-match "^21" emacs-version)
  568. (progn
  569. (tool-bar-mode -1)
  570. (blink-cursor-mode -1)))
  571.  
  572. ;; Byt ordning på CR/LF. Kommer att ge indrag på varje ny rad.
  573. (setq foo (global-key-binding "\C-m")) ; Spara CR.
  574. (global-set-key "\C-m" (global-key-binding "\C-j")) ; Sätt CR till LF.
  575. (global-set-key "\C-j" foo) ; Sätt LF till gamla CR.
  576.  
  577. ;; Bra tangentbindningar: F4 tar bort/fram menylisten:
  578. (global-set-key [f4] 'menu-bar-mode)
  579. ; F5 ändrar "line-wrap".
  580. (global-set-key [f5] 'toggle-truncate-lines)
  581.  
  582. ;; C++-specifikt.
  583. (add-to-list 'auto-mode-alist '("\\.h$" . c++-mode)) ; Behandla *.h-filer som C++ (ej C).
  584. (add-to-list 'auto-mode-alist '("\\.icc" . c++-mode)) ; Implementeringsfiler som inkluderas.
  585. (add-to-list 'auto-mode-alist '("\\.tcc" . c++-mode)) ; Filer med templatekod.
  586.  
  587. ;; Bra indrag.
  588. ;;(setq c-default-style "stroustrup")
  589. ;; Vissa föredrar denna ...
  590. (setq c-default-style "ellemtel")
  591.  
  592. (nconc load-path '("/home/TDP007/www-pub/material/ruby-1.9-emacs"))
  593. (require 'ruby-site)
  594. (nconc load-path '("/home/TDP007/www-pub/material/ruby-1.9-emacs"))
  595. (require 'ruby-site)(custom-set-variables
  596. ;; custom-set-variables was added by Custom.
  597. ;; If you edit it by hand, you could mess it up, so be careful.
  598. ;; Your init file should contain only one such instance.
  599. ;; If there is more than one, they won't work right.
  600. '(custom-enabled-themes (quote (tsdh-dark)))
  601. '(inhibit-startup-screen t))
  602. (custom-set-faces
  603. ;; custom-set-faces was added by Custom.
  604. ;; If you edit it by hand, you could mess it up, so be careful.
  605. ;; Your init file should contain only one such instance.
  606. ;; If there is more than one, they won't work right.
  607. )
  608.  
  609. ;; Allmäna saker (tillägg av tao@ida.liu.se)
  610. (setq default-major-mode 'text-mode)
  611. (setq require-final-newline 1)
  612. (setq inhibit-startup-message t)
  613. (put 'downcase-region 'disabled nil)
  614.  
  615. ;; Reservkopiering (tillägg av tao@ida.liu.se)
  616. (setq version-control t)
  617. (setq backup-by-copying t)
  618. (setq backup-by-copying-when-linked t)
  619. (setq backup-by-copying-when-mismatch t)
  620. (setq kept-new-versions 99)
  621. (setq kept-old-versions 0)
  622. (setq delete-auto-save-files t)
  623. (setq trim-versions-without-asking t)
  624. (global-set-key "\C-X\C-s"
  625. '(lambda () (interactive) (save-buffer 16)))
  626.  
  627. ;; Framhävning, så mycket som möjligt!
  628. (global-font-lock-mode t)
  629. (setq font-lock-maximum-decoration t)
  630.  
  631. ;; Hantera svenska tecken korrekt.
  632. (set-language-environment "Latin-1")
  633. (set-terminal-coding-system 'latin-1)
  634.  
  635. ;; Rullningslist på rätt plats!
  636. (setq scroll-bar-mode-explicit t)
  637. (set-scroll-bar-mode 'right)
  638.  
  639. ;; Grundfärger.
  640. (set-background-color "White")
  641. (set-foreground-color "Black")
  642. (set-cursor-color "Black")
  643.  
  644. ;; Färger för nyckelord, etc.
  645. (custom-set-variables)
  646. (custom-set-faces
  647. '(font-lock-comment-face ((((class color) (background light))
  648. (:italic t :foreground "Firebrick"))))
  649. '(font-lock-function-name-face ((((class color) (background light))
  650. (:bold t :foreground "Blue"))))
  651. '(font-lock-keyword-face ((((class color) (background light))
  652. (:bold t :foreground "Black"))))
  653. '(font-lock-string-face ((((class color) (background light))
  654. (:italic t :foreground "ForestGreen"))))
  655. '(font-lock-type-face ((((class color) (background light))
  656. (:foreground "Blue"))))
  657. '(font-lock-variable-name-face ((((class color) (background light))
  658. (:foreground "Black"))))
  659. '(font-lock-reference-face ((((class color) (background light))
  660. (:foreground "ForestGreen")))))
  661.  
  662. ;; Framhäv markerat område genom invertering.
  663. (transient-mark-mode t)
  664.  
  665. ;; Markera matchande parenteser.
  666. (show-paren-mode 1)
  667.  
  668. ;; Diverse bra saker
  669. (setq next-line-add-newlines nil) ; Lägg inte till nya rader efter EOF.
  670. (setq line-number-mode t) ; Visa radnummer...
  671. (setq column-number-mode t) ; ...och kolumn.
  672. (setq-default indent-tabs-mode nil) ; Använd alltid mellanrumstecken, ej tab, för indrag.
  673. (setq c-basic-offset 3) ; Indragssdjup.
  674. (setq display-time-day-and-date t) ; Visa tid och datum...
  675. (setq display-time-24hr-format t) ; ...så att man fattar.
  676. (display-time) ; Visa tiden formaterad enligt ovan.
  677.  
  678. ;; Låt DEL-knappen klippa ut området (möjligheten att radera ordvis med DEL förloras).
  679. ;;(if (eq window-system 'x)
  680. ;; (pc-selection-mode))
  681.  
  682. ;; Emacs21-specifikt.
  683. ;; Tar bort "skräp".
  684. (if (string-match "^21" emacs-version)
  685. (progn
  686. (tool-bar-(custom-set-variables
  687. ;; custom-set-variables was added by Custom.
  688. ;; If you edit it by hand, you could mess it up, so be careful.
  689. ;; Your init file should contain only one such instance.
  690. ;; If there is more than one, they won't work right.
  691. '(custom-enabled-themes (quote (tsdh-dark)))
  692. '(inhibit-startup-screen t))
  693. (custom-set-faces
  694. ;; custom-set-faces was added by Custom.
  695. ;; If you edit it by hand, you could mess it up, so be careful.
  696. ;; Your init file should contain only one such instance.
  697. ;; If there is more than one, they won't work right.
  698. )
  699.  
  700. ;; Allmäna saker (tillägg av tao@ida.liu.se)
  701. (setq default-major-mode 'text-mode)
  702. (setq require-final-newline 1)
  703. (setq inhibit-startup-message t)
  704. (put 'downcase-region 'disabled nil)
  705.  
  706. ;; Reservkopiering (tillägg av tao@ida.liu.se)
  707. (setq version-control t)
  708. (setq backup-by-copying t)
  709. (setq backup-by-copying-when-linked t)
  710. (setq backup-by-copying-when-mismatch t)
  711. (setq kept-new-versions 99)
  712. (setq kept-old-versions 0)
  713. (setq delete-auto-save-files t)
  714. (setq trim-versions-without-asking t)
  715. (global-set-key "\C-X\C-s"
  716. '(lambda () (interactive) (save-buffer 16)))
  717.  
  718. ;; Framhävning, så mycket som möjligt!
  719. (global-font-lock-mode t)
  720. (setq font-lock-maximum-decoration t)
  721.  
  722. ;; Hantera svenska tecken korrekt.
  723. (set-language-environment "Latin-1")
  724. (set-terminal-coding-system 'latin-1)
  725.  
  726. ;; Rullningslist på rätt plats!
  727. (setq scroll-bar-mode-explicit t)
  728. (set-scroll-bar-mode 'right)
  729.  
  730. ;; Grundfärger.
  731. (set-background-color "White")
  732. (set-foreground-color "Black")
  733. (set-cursor-color "Black")
  734.  
  735. ;; Färger för nyckelord, etc.
  736. (custom-set-variables)
  737. (custom-set-faces
  738. '(font-lock-comment-face ((((class color) (background light))
  739. (:italic t :foreground "Firebrick"))))
  740. '(font-lock-function-name-face ((((class color) (background light))
  741. (:bold t :foreground "Blue"))))
  742. '(font-lock-keyword-face ((((class color) (background light))
  743. (:bold t :foreground "Black"))))
  744. '(font-lock-string-face ((((class color) (background light))
  745. (:italic t :foreground "ForestGreen"))))
  746. '(font-lock-type-face ((((class color) (background light))
  747. (:foreground "Blue"))))
  748. '(font-lock-variable-name-face ((((class color) (background light))
  749. (:foreground "Black"))))
  750. '(font-lock-reference-face ((((class color) (background light))
  751. (:foreground "ForestGreen")))))
  752.  
  753. ;; Framhäv markerat område genom invertering.
  754. (transient-mark-mode t)
  755.  
  756. ;; Markera matchande parenteser.
  757. (show-paren-mode 1)
  758.  
  759. ;; Diverse bra saker
  760. (setq next-line-add-newlines nil) ; Lägg inte till nya rader efter EOF.
  761. (setq line-number-mode t) ; Visa radnummer...
  762. (setq column-number-mode t) ; ...och kolumn.
  763. (setq-default indent-tabs-mode nil) ; Använd alltid mellanrumstecken, ej tab, för indrag.
  764. (setq c-basic-offset 3) ; Indragssdjup.
  765. (setq display-time-day-and-date t) ; Visa tid och datum...
  766. (setq display-time-24hr-format t) ; ...så att man fattar.
  767. (display-time) ; Visa tiden formaterad enligt ovan.
  768.  
  769. ;; Låt DEL-knappen klippa ut området (möjligheten att radera ordvis med DEL förloras).
  770. ;;(if (eq window-system 'x)
  771. ;; (pc-selection-mode))
  772.  
  773. ;; Emacs21-specifikt.
  774. ;; Tar bort "skräp".
  775. (if (string-match "^21" emacs-version)
  776. (progn
  777. (tool-bar-mode -1)
  778. (blink-cursor-mode -1)))
  779.  
  780. ;; Byt ordning på CR/LF. Kommer att ge indrag på varje ny rad.
  781. (setq foo (global-key-binding "\C-m")) ; Spara CR.
  782. (global-set-key "\C-m" (global-key-binding "\C-j")) ; Sätt CR till LF.
  783. (global-set-key "\C-j" foo) ; Sätt LF till gamla CR.
  784.  
  785. ;; Bra tangentbindningar: F4 tar bort/fram menylisten:
  786. (global-set-key [f4] 'menu-bar-mode)
  787. ; F5 ändrar "line-wrap".
  788. (global-set-key [f5] 'toggle-truncate-lines)
  789.  
  790. ;; C++-specifikt.
  791. (add-to-list 'auto-mode-alist '("\\.h$" . c++-mode)) ; Behandla *.h-filer som C++ (ej C).
  792. (add-to-list 'auto-mode-alist '("\\.icc" . c++-mode)) ; Implementeringsfiler som inkluderas.
  793. (add-to-list 'auto-mode-alist '("\\.tcc" . c++-mode)) ; Filer med templatekod.
  794.  
  795. ;; Bra indrag.
  796. ;;(setq c-default-style "stroustrup")
  797. ;; Vissa föredrar denna ...
  798. (setq c-default-style "ellemtel")
  799.  
  800. (nconc load-path '("/home/TDP007/www-pub/material/ruby-1.9-emacs"))
  801. (require 'ruby-site)mode -1)
  802. (blink-cursor-mode -1)))
  803.  
  804. ;; Byt ordning på CR/LF. Kommer att ge indrag på varje ny rad.
  805. (setq foo (global-key-binding "\C-m")) ; Spara CR.
  806. (global-set-key "\C-m" (global-key-binding "\C-j")) ; Sätt CR till LF.
  807. (global-set-key "\C-j" foo) ; Sätt LF till gamla CR.
  808.  
  809. ;; Bra tangentbindningar: F4 tar bort/fram menylisten:
  810. (global-set-key [f4] 'menu-bar-mode)
  811. ; F5 ändrar "line-wrap".
  812. (global-set-key [f5] 'toggle-truncate-lines)
  813.  
  814. ;; C++-specifikt.
  815. (add-to-list 'auto-mode-alist '("\\.h$" . c++-mode)) ; Behandla *.h-filer som C++ (ej C).
  816. (add-to-list 'auto-mode-alist '("\\.icc" . c++-mode)) ; Implementeringsfiler som inkluderas.
  817. (add-to-list 'auto-mode-alist '("\\.tcc" . c++-mode)) ; Filer med templatekod.
  818.  
  819. ;; Bra indrag.
  820. ;;(setq c-default-style "stroustrup")
  821. ;; Vissa föredrar denna ...
  822. (setq c-default-style "ellemtel")
  823.  
  824. (nconc load-path '("/home/TDP007/www-pub/material/ruby-1.9-emacs"))
  825. (require 'ruby-site) -1)
  826. (blink-cursor-mode -1)))
  827.  
  828. ;; Byt ordning på CR/LF. Kommer att ge indrag på varje ny rad.
  829. (setq foo (global-key-binding "\C-m")) ; Spara CR.
  830. (global-set-key "\C-(custom-set-variables
  831. ;; custom-set-variables was added by Custom.
  832. ;; If you edit it by hand, you could mess it up, so be careful.
  833. ;; Your init file should contain only one such instance.
  834. ;; If there is more than one, they won't work right.
  835. '(custom-enabled-themes (quote (tsdh-dark)))
  836. '(inhibit-startup-screen t))
  837. (custom-set-faces
  838. ;; custom-set-faces was added by Custom.
  839. ;; If you edit it by hand, you could mess it up, so be careful.
  840. ;; Your init file should contain only one such instance.
  841. ;; If there is more than one, they won't work right.
  842. )
  843.  
  844. ;; Allmäna saker (tillägg av tao@ida.liu.se)
  845. (setq default-major-mode 'text-mode)
  846. (setq require-final-newline 1)
  847. (setq inhibit-startup-message t)
  848. (put 'downcase-region 'disabled nil)
  849.  
  850. ;; Reservkopiering (tillägg av tao@ida.liu.se)
  851. (setq version-control t)
  852. (setq backup-by-copying t)
  853. (setq backup-by-copying-when-linked t)
  854. (setq backup-by-copying-when-mismatch t)
  855. (setq kept-new-versions 99)
  856. (setq kept-old-versions 0)
  857. (setq delete-auto-save-files t)
  858. (setq trim-versions-without-asking t)
  859. (global-set-key "\C-X\C-s"
  860. '(lambda () (interactive) (save-buffer 16)))
  861.  
  862. ;; Framhävning, så mycket som möjligt!
  863. (global-font-lock-mode t)
  864. (setq font-lock-maximum-decoration t)
  865.  
  866. ;; Hantera svenska tecken korrekt.
  867. (set-language-environment "Latin-1")
  868. (set-terminal-coding-system 'latin-1)
  869.  
  870. ;; Rullningslist på rätt plats!
  871. (setq scroll-bar-mode-explicit t)
  872. (set-scroll-bar-mode 'right)
  873.  
  874. ;; Grundfärger.
  875. (set-background-color "White")
  876. (set-foreground-color "Black")
  877. (set-cursor-color "Black")
  878.  
  879. ;; Färger för nyckelord, etc.
  880. (custom-set-variables)
  881. (custom-set-faces
  882. '(font-lock-comment-face ((((class color) (background light))
  883. (:italic t :foreground "Firebrick"))))
  884. '(font-lock-function-name-face ((((class color) (background light))
  885. (:bold t :foreground "Blue"))))
  886. '(font-lock-keyword-face ((((class color) (background light))
  887. (:bold t :foreground "Black"))))
  888. '(font-lock-string-face ((((class color) (background light))
  889. (:italic t :foreground "ForestGreen"))))
  890. '(font-lock-type-face ((((class color) (background light))
  891. (:foreground "Blue"))))
  892. '(font-lock-variable-name-face ((((class color) (background light))
  893. (:foreground "Black"))))
  894. '(font-lock-reference-face ((((class color) (background light))
  895. (:foreground "ForestGreen")))))
  896.  
  897. ;; Framhäv markerat område genom invertering.
  898. (transient-mark-mode t)
  899.  
  900. ;; Markera matchande parenteser.
  901. (show-paren-mode 1)
  902.  
  903. ;; Diverse bra saker
  904. (setq next-line-add-newlines nil) ; Lägg inte till nya rader efter EOF.
  905. (setq line-number-mode t) ; Visa radnummer...
  906. (setq column-number-mode t) ; ...och kolumn.
  907. (setq-default indent-tabs-mode nil) ; Använd alltid mellanrumstecken, ej tab, för indrag.
  908. (setq c-basic-offset 3) ; Indragssdjup.
  909. (setq display-time-day-and-date t) ; Visa tid och datum...
  910. (setq display-time-24hr-format t) ; ...så att man fattar.
  911. (display-time) ; Visa tiden formaterad enligt ovan.
  912.  
  913. ;; Låt DEL-knappen klippa ut området (möjligheten att radera ordvis med DEL förloras).
  914. ;;(if (eq window-system 'x)
  915. ;; (pc-selection-mode))
  916.  
  917. ;; Emacs21-specifikt.
  918. ;; Tar bort "skräp".
  919. (if (string-match "^21" emacs-version)
  920. (progn
  921. (tool-bar-(custom-set-variables
  922. ;; custom-set-variables was added by Custom.
  923. ;; If you edit it by hand, you could mess it up, so be careful.
  924. ;; Your init file should contain only one such instance.
  925. ;; If there is more than one, they won't work right.
  926. '(custom-enabled-themes (quote (tsdh-dark)))
  927. '(inhibit-startup-screen t))
  928. (custom-set-faces
  929. ;; custom-set-faces was added by Custom.
  930. ;; If you edit it by hand, you could mess it up, so be careful.
  931. ;; Your init file should contain only one such instance.
  932. ;; If there is more than one, they won't work right.
  933. )
  934.  
  935. ;; Allmäna saker (tillägg av tao@ida.liu.se)
  936. (setq default-major-mode 'text-mode)
  937. (setq require-final-newline 1)
  938. (setq inhibit-startup-message t)
  939. (put 'downcase-region 'disabled nil)
  940.  
  941. ;; Reservkopiering (tillägg av tao@ida.liu.se)
  942. (setq version-control t)
  943. (setq backup-by-copying t)
  944. (setq backup-by-copying-when-linked t)
  945. (setq backup-by-copying-when-mismatch t)
  946. (setq kept-new-versions 99)
  947. (setq kept-old-versions 0)
  948. (setq delete-auto-save-files t)
  949. (setq trim-versions-without-asking t)
  950. (global-set-key "\C-X\C-s"
  951. '(lambda () (interactive) (save-buffer 16)))
  952.  
  953. ;; Framhävning, så mycket som möjligt!
  954. (global-font-lock-mode t)
  955. (setq font-lock-maximum-decoration t)
  956.  
  957. ;; Hantera svenska tecken korrekt.
  958. (set-language-environment "Latin-1")
  959. (set-terminal-coding-system 'latin-1)
  960.  
  961. ;; Rullningslist på rätt plats!
  962. (setq scroll-bar-mode-explicit t)
  963. (set-scroll-bar-mode 'right)
  964.  
  965. ;; Grundfärger.
  966. (set-background-color "White")
  967. (set-foreground-color "Black")
  968. (set-cursor-color "Black")
  969.  
  970. ;; Färger för nyckelord, etc.
  971. (custom-set-variables)
  972. (custom-set-faces
  973. '(font-lock-comment-face ((((class color) (background light))
  974. (:italic t :foreground "Firebrick"))))
  975. '(font-lock-function-name-face ((((class color) (background light))
  976. (:bold t :foreground "Blue"))))
  977. '(font-lock-keyword-face ((((class color) (background light))
  978. (:bold t :foreground "Black"))))
  979. '(font-lock-string-face ((((class color) (background light))
  980. (:italic t :foreground "ForestGreen"))))
  981. '(font-lock-type-face ((((class color) (background light))
  982. (:foreground "Blue"))))
  983. '(font-lock-variable-name-face ((((class color) (background light))
  984. (:foreground "Black"))))
  985. '(font-lock-reference-face ((((class color) (background light))
  986. (:foreground "ForestGreen")))))
  987.  
  988. ;; Framhäv markerat område genom invertering.
  989. (transient-mark-mode t)
  990.  
  991. ;; Markera matchande parenteser.
  992. (show-paren-mode 1)
  993.  
  994. ;; Diverse bra saker
  995. (setq next-line-add-newlines nil) ; Lägg inte till nya rader efter EOF.
  996. (setq line-number-mode t) ; Visa radnummer...
  997. (setq column-number-mode t) ; ...och kolumn.
  998. (setq-default indent-tabs-mode nil) ; Använd alltid mellanrumstecken, ej tab, för indrag.
  999. (setq c-basic-offset 3) ; Indragssdjup.
  1000. (setq display-time-day-and-date t) ; Visa tid och datum...
  1001. (setq display-time-24hr-format t) ; ...så att man fattar.
  1002. (display-time) ; Visa tiden formaterad enligt ovan.
  1003.  
  1004. ;; Låt DEL-knappen klippa ut området (möjligheten att radera ordvis med DEL förloras).
  1005. ;;(if (eq window-system 'x)
  1006. ;; (pc-selection-mode))
  1007.  
  1008. ;; Emacs21-specifikt.
  1009. ;; Tar bort "skräp".
  1010. (if (string-match "^21" emacs-version)
  1011. (progn(custom-set-variables
  1012. ;; custom-set-variables was added by Custom.
  1013. ;; If you edit it by hand, you could mess it up, so be careful.
  1014. ;; Your init file should contain only one such instance.
  1015. ;; If there is more than one, they won't work right.
  1016. '(custom-enabled-themes (quote (tsdh-dark)))
  1017. '(inhibit-startup-screen t))
  1018. (custom-set-faces
  1019. ;; custom-set-faces was added by Custom.
  1020. ;; If you edit it by hand, you could mess it up, so be careful.
  1021. ;; Your init file should contain only one such instance.
  1022. ;; If there is more than one, they won't work right.
  1023. )
  1024.  
  1025. ;; Allmäna saker (tillägg av tao@ida.liu.se)
  1026. (setq default-major-mode 'text-mode)
  1027. (setq require-final-newline 1)
  1028. (setq inhibit-startup-message t)
  1029. (put 'downcase-region 'disabled nil)
  1030.  
  1031. ;; Reservkopiering (tillägg av tao@ida.liu.se)
  1032. (setq version-control t)
  1033. (setq backup-by-copying t)
  1034. (setq backup-by-copying-when-linked t)
  1035. (setq backup-by-copying-when-mismatch t)
  1036. (setq kept-new-versions 99)
  1037. (setq kept-old-versions 0)
  1038. (setq delete-auto-save-files t)
  1039. (setq trim-versions-without-asking t)
  1040. (global-set-key "\C-X\C-s"
  1041. '(lambda () (interactive) (save-buffer 16)))
  1042.  
  1043. ;; Framhävning, så mycket som möjligt!
  1044. (global-font-lock-mode t)
  1045. (setq font-lock-maximum-decoration t)
  1046.  
  1047. ;; Hantera svenska tecken korrekt.
  1048. (set-language-environment "Latin-1")
  1049. (set-terminal-coding-system 'latin-1)
  1050.  
  1051. ;; Rullningslist på rätt plats!
  1052. (setq scroll-bar-mode-explicit t)
  1053. (set-scroll-bar-mode 'right)
  1054.  
  1055. ;; Grundfärger.
  1056. (set-background-color "White")
  1057. (set-foreground-color "Black")
  1058. (set-cursor-color "Black")
  1059.  
  1060. ;; Färger för nyckelord, etc.
  1061. (custom-set-variables)
  1062. (custom-set-faces
  1063. '(font-lock-comment-face ((((class color) (background light))
  1064. (:italic t :foreground "Firebrick"))))
  1065. '(font-lock-function-name-face ((((class color) (background light))
  1066. (:bold t :foreground "Blue"))))
  1067. '(font-lock-keyword-face ((((class color) (background light))
  1068. (:bold t :foreground "Black"))))
  1069. '(font-lock-string-face ((((class color) (background light))
  1070. (:italic t :foreground "ForestGreen"))))
  1071. '(font-lock-type-face ((((class color) (background light))
  1072. (:foreground "Blue"))))
  1073. '(font-lock-variable-name-face ((((class color) (background light))
  1074. (:foreground "Black"))))
  1075. '(font-lock-reference-face ((((class color) (background light))
  1076. (:foreground "ForestGreen")))))
  1077.  
  1078. ;; Framhäv markerat område genom invertering.
  1079. (transient-mark-mode t)
  1080.  
  1081. ;; Markera matchande parenteser.
  1082. (show-paren-mode 1)
  1083.  
  1084. ;; Diverse bra saker
  1085. (setq next-line-add-newlines nil) ; Lägg inte till nya rader efter EOF.
  1086. (setq line-number-mode t) ; Visa radnummer...
  1087. (setq column-number-mode t) ; ...och kolumn.
  1088. (setq-default indent-tabs-mode nil) ; Använd alltid mellanrumstecken, ej tab, för indrag.
  1089. (setq c-basic-offset 3) ; Indragssdjup.
  1090. (setq display-time-day-and-date t) ; Visa tid och datum...
  1091. (setq display-time-24hr-format t) ; ...så att man fattar.
  1092. (display-time) ; Visa tiden formaterad enligt ovan.
  1093.  
  1094. ;; Låt DEL-knappen klippa ut området (möjligheten att radera ordvis med DEL förloras).
  1095. ;;(if (eq window-system 'x)
  1096. ;; (pc-selection-mode))
  1097.  
  1098. ;; Emacs21-specifikt.
  1099. ;; Tar bort "skräp".
  1100. (if (string-match "^(custom-set-variables
  1101. ;; custom-set-variables was added by Custom.
  1102. ;; If you edit it by hand, you could mess it up, so be careful.
  1103. ;; Your init file should contain only one such instance.
  1104. ;; If there is more than one, they won't work right.
  1105. '(custom-enabled-themes (quote (tsdh-dark)))
  1106. '(inhibit-startup-screen t))
  1107. (custom-set-faces
  1108. ;; custom-set-faces was added by Custom.
  1109. ;; If you edit it by hand, you could mess it up, so be careful.
  1110. ;; Your init file should contain only one such instance.
  1111. ;; If there is more than one, they won't work right.
  1112. )
  1113.  
  1114. ;; Allmäna saker (tillägg av tao@ida.liu.se)
  1115. (setq default-major-mode 'text-mode)
  1116. (setq require-final-newline 1)
  1117. (setq inhibit-startup-message t)
  1118. (put 'downcase-region 'disabled nil)
  1119.  
  1120. ;; Reservkopiering (tillägg av tao@ida.liu.se)
  1121. (setq version-control t)
  1122. (setq backup-by-copying t)
  1123. (setq backup-by-copying-when-linked t)
  1124. (setq backup-by-copying-when-mismatch t)
  1125. (setq kept-new-versions 99)
  1126. (setq kept-old-versions 0)
  1127. (setq delete-auto-save-files t)
  1128. (setq trim-versions-without-asking t)
  1129. (global-set-key "\C-X\C-s"
  1130. '(lambda () (interactive) (save-buffer 16)))
  1131.  
  1132. ;; Framhävning, så mycket som möjligt!
  1133. (global-font-lock-mode t)
  1134. (setq font-lock-maximum-decoration t)
  1135.  
  1136. ;; Hantera svenska tecken korrekt.
  1137. (set-language-environment "Latin-1")
  1138. (set-terminal-coding-system 'latin-1)
  1139.  
  1140. ;; Rullningslist på rätt plats!
  1141. (setq scroll-bar-mode-explicit t)
  1142. (set-scroll-bar-mode 'right)
  1143.  
  1144. ;; Grundfärger.
  1145. (set-background-color "White")
  1146. (set-foreground-color "Black")
  1147. (set-cursor-color "Black")
  1148.  
  1149. ;; Färger för nyckelord, etc.
  1150. (custom-set-variables)
  1151. (custom-set-faces
  1152. '(font-lock-comment-face ((((class color) (background light))
  1153. (:italic t :foreground "Firebrick"))))
  1154. '(font-lock-function-name-face ((((class color) (background light))
  1155. (:bold t :foreground "Blue"))))
  1156. '(font-lock-keyword-face ((((class color) (background light))
  1157. (:bold t :foreground "Black"))))
  1158. '(font-lock-string-face ((((class color) (background light))
  1159. (:italic t :foreground "ForestGreen"))))
  1160. '(font-lock-type-face ((((class color) (background light))
  1161. (:foreground "Blue"))))
  1162. '(font-lock-variable-name-face ((((class color) (background light))
  1163. (:foreground "Black"))))
  1164. '(font-lock-reference-face ((((class color) (background light))
  1165. (:foreground "ForestGreen")))))
  1166.  
  1167. ;; Framhäv markerat område genom invertering.
  1168. (transient-mark-mode t)
  1169.  
  1170. ;; Markera matchande parenteser.
  1171. (show-paren-mode 1)
  1172.  
  1173. ;; Diverse bra saker
  1174. (setq next-line-add-newlines nil) ; Lägg inte till nya rader efter EOF.
  1175. (setq line-number-mode t) ; Visa radnummer...
  1176. (setq column-number-mode t) ; ...och kolumn.
  1177. (setq-default indent-tabs-mode nil) ; Använd alltid mellanrumstecken, ej tab, för indrag.
  1178. (setq c-basic-offset 3) ; Indragssdjup.
  1179. (setq display-time-day-and-date t) ; Visa tid och datum...
  1180. (setq display-time-24hr-format t) ; ...så att man fattar.
  1181. (display-time) ; Visa tiden formaterad enligt ovan.
  1182.  
  1183. ;; Låt DEL-knappen klippa ut området (möjligheten att radera ordvis med DEL förloras).
  1184. ;;(if (eq window-system 'x)
  1185. ;; (pc-selection-mode))
  1186.  
  1187. ;; Emacs21-specifikt.
  1188. ;; Tar bort "skräp".
  1189. (if (string-match "^(custom-set-variables
  1190. ;; custom-set-variables was added by Custom.
  1191. ;; If you edit it by hand, you could mess it up, so be careful.
  1192. ;; Your init file should contain only one such instance.
  1193. ;; If there is more than one, they won't work right.
  1194. '(custom-enabled-themes (quote (tsdh-dark)))
  1195. '(inhibit-startup-screen t))
  1196. (custom-set-faces
  1197. ;; custom-set-faces was added by Custom.
  1198. ;; If you edit it by hand, you could mess it up, so be careful.
  1199. ;; Your init file should contain only one such instance.
  1200. ;; If there is more than one, they won't work right.
  1201. )
  1202.  
  1203. ;; Allmäna saker (tillägg av tao@ida.liu.se)
  1204. (setq default-major-mode 'text-mode)
  1205. (setq require-final-newline 1)
  1206. (setq inhibit-startup-message t)
  1207. (put 'downcase-region 'disabled nil)
  1208.  
  1209. ;; Reservkopiering (tillägg av tao@ida.liu.se)
  1210. (setq version-control t)
  1211. (setq backup-by-copying t)
  1212. (setq backup-by-copying-when-linked t)
  1213. (setq backup-by-copying-when-mismatch t)
  1214. (setq kept-new-versions 99)
  1215. (setq kept-old-versions 0)
  1216. (setq delete-auto-save-files t)
  1217. (setq trim-versions-without-asking t)
  1218. (global-set-key "\C-X\C-s"
  1219. '(lambda () (interactive) (save-buffer 16)))
  1220.  
  1221. ;; Framhävning, så mycket som möjligt!
  1222. (global-font-lock-mode t)
  1223. (setq font-lock-maximum-decoration t)
  1224.  
  1225. ;; Hantera svenska tecken korrekt.
  1226. (set-language-environment "Latin-1")
  1227. (set-terminal-coding-system 'latin-1)
  1228.  
  1229. ;; Rullningslist på rätt plats!
  1230. (setq scroll-bar-mode-explicit t)
  1231. (set-scroll-bar-mode 'right)
  1232.  
  1233. ;; Grundfärger.
  1234. (set-background-color "White")
  1235. (set-foreground-color "Black")
  1236. (set-cursor-color "Black")
  1237.  
  1238. ;; Färger för nyckelord, etc.
  1239. (custom-set-variables)
  1240. (custom-set-faces
  1241. '(font-lock-comment-face ((((class color) (background light))
  1242. (:italic t :foreground "Firebrick"))))
  1243. '(font-lock-function-name-face ((((class color) (background light))
  1244. (:bold t :foreground "Blue"))))
  1245. '(font-lock-keyword-face ((((class color) (background light))
  1246. (:bold t :foreground "Black"))))
  1247. '(font-lock-string-face ((((class color) (background light))
  1248. (:italic t :foreground "ForestGreen"))))
  1249. '(font-lock-type-face ((((class color) (background light))
  1250. (:foreground "Blue"))))
  1251. '(font-lock-variable-name-face ((((class color) (background light))
  1252. (:foreground "Black"))))
  1253. '(font-lock-reference-face ((((class color) (background light))
  1254. (:foreground "ForestGreen")))))
  1255.  
  1256. ;; Framhäv markerat område genom invertering.
  1257. (transient-mark-mode t)
  1258.  
  1259. ;; Markera matchande parenteser.
  1260. (show-paren-mode 1)
  1261.  
  1262. ;; Diverse bra saker
  1263. (setq next-line-add-newlines nil) ; Lägg inte till nya rader efter EOF.
  1264. (setq line-number-mode t) ; Visa radnummer...
  1265. (setq column-number-mode t) ; ...och kolumn.
  1266. (setq-default indent-tabs-mode nil) ; Använd alltid mellanrumstecken, ej tab, för indrag.
  1267. (setq c-basic-offset 3) ; Indragssdjup.
  1268. (setq display-time-day-and-date t) ; Visa tid och datum...
  1269. (setq display-time-24hr-format t) ; ...så att man fattar.
  1270. (display-time) ; Visa tiden formaterad enligt ovan.
  1271.  
  1272. ;; Låt DEL-knappen klippa ut området (möjligheten att radera ordvis med DEL förloras).
  1273. ;;(if (eq window-system 'x)
  1274. ;; (pc-selection-mode))
  1275.  
  1276. ;; Emacs21-specifikt.
  1277. ;; Tar bort "skräp".
  1278. (if (string-match "^(custom-set-variables
  1279. ;; custom-set-variables was added by Custom.
  1280. ;; If you edit it by hand, you could mess it up, so be careful.
  1281. ;; Your init file should contain only one such instance.
  1282. ;; If there is more than one, they won't work right.
  1283. '(custom-enabled-themes (quote (tsdh-dark)))
  1284. '(inhibit-startup-screen t))
  1285. (custom-set-faces
  1286. ;; custom-set-faces was added by Custom.
  1287. ;; If you edit it by hand, you could mess it up, so be careful.
  1288. ;; Your init file should contain only one such instance.
  1289. ;; If there is more than one, they won't work right.
  1290. )
  1291.  
  1292. ;; Allmäna saker (tillägg av tao@ida.liu.se)
  1293. (setq default-major-mode 'text-mode)
  1294. (setq require-final-newline 1)
  1295. (setq inhibit-startup-message t)
  1296. (put 'downcase-region 'disabled nil)
  1297.  
  1298. ;; Reservkopiering (tillägg av tao@ida.liu.se)
  1299. (setq version-control t)
  1300. (setq backup-by-copying t)
  1301. (setq backup-by-copying-when-linked t)
  1302. (setq backup-by-copying-when-mismatch t)
  1303. (setq kept-new-versions 99)
  1304. (setq kept-old-versions 0)
  1305. (setq delete-auto-save-files t)
  1306. (setq trim-versions-without-asking t)
  1307. (global-set-key "\C-X\C-s"
  1308. '(lambda () (interactive) (save-buffer 16)))
  1309.  
  1310. ;; Framhävning, så mycket som möjligt!
  1311. (global-font-lock-mode t)
  1312. (setq font-lock-maximum-decoration t)
  1313.  
  1314. ;; Hantera svenska tecken korrekt.
  1315. (set-language-environment "Latin-1")
  1316. (set-terminal-coding-system 'latin-1)
  1317.  
  1318. ;; Rullningslist på rätt plats!
  1319. (setq scroll-bar-mode-explicit t)
  1320. (set-scroll-bar-mode 'right)
  1321.  
  1322. ;; Grundfärger.
  1323. (set-background-color "White")
  1324. (set-foreground-color "Black")
  1325. (set-cursor-color "Black")
  1326.  
  1327. ;; Färger för nyckelord, etc.
  1328. (custom-set-variables)
  1329. (custom-set-faces
  1330. '(font-lock-comment-face ((((class color) (background light))
  1331. (:italic t :foreground "Firebrick"))))
  1332. '(font-lock-function-name-face ((((class color) (background light))
  1333. (:bold t :foreground "Blue"))))
  1334. '(font-lock-keyword-face ((((class color) (background light))
  1335. (:bold t :foreground "Black"))))
  1336. '(font-lock-string-face ((((class color) (background light))
  1337. (:italic t :foreground "ForestGreen"))))
  1338. '(font-lock-type-face ((((class color) (background light))
  1339. (:foreground "Blue"))))
  1340. '(font-lock-variable-name-face ((((class color) (background light))
  1341. (:foreground "Black"))))
  1342. '(font-lock-reference-face ((((class color) (background light))
  1343. (:foreground "ForestGreen")))))
  1344.  
  1345. ;; Framhäv markerat område genom invertering.
  1346. (transient-mark-mode t)
  1347.  
  1348. ;; Markera matchande parenteser.
  1349. (show-paren-mode 1)
  1350.  
  1351. ;; Diverse bra saker
  1352. (setq next-line-add-newlines nil) ; Lägg inte till nya rader efter EOF.
  1353. (setq line-number-mode t) ; Visa radnummer...
  1354. (setq column-number-mode t) ; ...och kolumn.
  1355. (setq-default indent-tabs-mode nil) ; Använd alltid mellanrumstecken, ej tab, för indrag.
  1356. (setq c-basic-offset 3) ; Indragssdjup.
  1357. (setq display-time-day-and-date t) ; Visa tid och datum...
  1358. (setq display-time-24hr-format t) ; ...så att man fattar.
  1359. (display-time) ; Visa tiden formaterad enligt ovan.
  1360.  
  1361. ;; Låt DEL-knappen klippa ut området (möjligheten att radera ordvis med DEL förloras).
  1362. ;;(if (eq window-system 'x)
  1363. ;; (pc-selection-mode))
  1364.  
  1365. ;; Emacs21-specifikt.
  1366. ;; Tar bort "skräp".
  1367. (if (string-match "^21" emacs-version)
  1368. (progn
  1369. (tool-bar-mode -1)
  1370. (blink-cur(custom-set-variables
  1371. ;; custom-set-variables was added by Custom.
  1372. ;; If you edit it by hand, you could mess it up, so be careful.
  1373. ;; Your init file should contain only one such instance.
  1374. ;; If there is more than one, they won't work right.
  1375. '(custom-enabled-themes (quote (tsdh-dark)))
  1376. '(inhibit-startup-screen t))
  1377. (custom-set-faces
  1378. ;; custom-set-faces was added by Custom.
  1379. ;; If you edit it by hand, you could mess it up, so be careful.
  1380. ;; Your init file should contain only one such instance.
  1381. ;; If there is more than one, they won't work right.
  1382. )
  1383.  
  1384. ;; Allmäna saker (tillägg av tao@ida.liu.se)
  1385. (setq default-major-mode 'text-mode)
  1386. (setq require-final-newline 1)
  1387. (setq inhibit-startup-message t)
  1388. (put 'downcase-region 'disabled nil)
  1389.  
  1390. ;; Reservkopiering (tillägg av tao@ida.liu.se)
  1391. (setq version-control t)
  1392. (setq backup-by-copying t)
  1393. (setq backup-by-copying-when-linked t)
  1394. (setq backup-by-copying-when-mismatch t)
  1395. (setq kept-new-versions 99)
  1396. (setq kept-old-versions 0)
  1397. (setq delete-auto-save-files t)
  1398. (setq trim-versions-without-asking t)
  1399. (global-set-key "\C-X\C-s"
  1400. '(lambda () (interactive) (save-buffer 16)))
  1401.  
  1402. ;; Framhävning, så mycket som möjligt!
  1403. (global-font-lock-mode t)
  1404. (setq font-lock-maximum-decoration t)
  1405.  
  1406. ;; Hantera svenska tecken korrekt.
  1407. (set-language-environment "Latin-1")
  1408. (set-terminal-coding-system 'latin-1)
  1409.  
  1410. ;; Rullningslist på rätt plats!
  1411. (setq scroll-bar-mode-explicit t)
  1412. (set-scroll-bar-mode 'right)
  1413.  
  1414. ;; Grundfärger.
  1415. (set-background-color "White")
  1416. (set-foreground-color "Black")
  1417. (set-cursor-color "Black")
  1418.  
  1419. ;; Färger för nyckelord, etc.
  1420. (custom-set-variables)
  1421. (custom-set-faces
  1422. '(font-lock-comment-face ((((class color) (background light))
  1423. (:italic t :foreground "Firebrick"))))
  1424. '(font-lock-function-name-face ((((class color) (background light))
  1425. (:bold t :foreground "Blue"))))
  1426. '(font-lock-keyword-face ((((class color) (background light))
  1427. (:bold t :foreground "Black"))))
  1428. '(font-lock-string-face ((((class color) (background light))
  1429. (:italic t :foreground "ForestGreen"))))
  1430. '(font-lock-type-face ((((class color) (background light))
  1431. (:foreground "Blue"))))
  1432. '(font-lock-variable-name-face ((((class color) (background light))
  1433. (:foreground "Black"))))
  1434. '(font-lock-reference-face ((((class color) (background light))
  1435. (:foreground "ForestGreen")))))
  1436.  
  1437. ;; Framhäv markerat område genom invertering.
  1438. (transient-mark-mode t)
  1439.  
  1440. ;; Markera matchande parenteser.
  1441. (show-paren-mode 1)
  1442.  
  1443. ;; Diverse bra saker
  1444. (setq next-line-add-newlines nil) ; Lägg inte till nya rader efter EOF.
  1445. (setq line-number-mode t) ; Visa radnummer...
  1446. (setq column-number-mode t) ; ...och kolumn.
  1447. (setq-default indent-tabs-mode nil) ; Använd alltid mellanrumstecken, ej tab, för indrag.
  1448. (setq c-basic-offset 3) ; Indragssdjup.
  1449. (setq display-time-day-and-date t) ; Visa tid och datum...
  1450. (setq display-time-24hr-format t) ; ...så att man fattar.
  1451. (display-time) ; Visa tiden formaterad enligt ovan.
  1452.  
  1453. ;; Låt DEL-knappen klippa ut området (möjligheten att radera ordvis med DEL förloras).
  1454. ;;(if (eq window-system 'x)
  1455. ;; (pc-selection-mode))
  1456.  
  1457. ;; Emacs21-specifikt.
  1458. ;; Tar bort "skräp".
  1459. (if (string-match "^21" emacs-version)
  1460. (progn
  1461. (tool-bar-mode -1)
  1462. (blink-cursor-mode -1)))
  1463.  
  1464. ;; Byt ordning på CR/LF. Kommer att ge indrag på varje ny rad.
  1465. (setq foo (global-key-binding "\C-m")) ; Spara CR.
  1466. (global-set-key "\C-m" (global-key-binding "\C-j")) ; Sätt CR till LF.
  1467. (global-set-key "\C-j" foo) ; Sätt LF till gamla CR.
  1468.  
  1469. ;; Bra tangentbindningar: F4 tar bort/fram menylisten:
  1470. (global-set-key [f4] 'menu-bar-mode)
  1471. ; F5 ändrar "line-wrap".
  1472. (global-set-key [f5] 'toggle-truncate-lines)
  1473.  
  1474. ;; C++-specifikt.
  1475. (add-to-list 'auto-mode-alist '("\\.h$" . c++-mode)) ; Behandla *.h-filer som C++ (ej C).
  1476. (add-to-list 'auto-mode-alist '("\\.icc" . c++-mode)) ; Implementeringsfiler som inkluderas.
  1477. (add-to-list 'auto-mode-alist '("\\.tcc" . c++-mode)) ; Filer med templatekod.
  1478.  
  1479. ;; Bra indrag.
  1480. ;;(setq c-default-style "stroustrup")
  1481. ;; Vissa föredrar denna ...
  1482. (setq c-default-style "ellemtel")
  1483.  
  1484. (nconc load-path '("/home/TDP007/www-pub/material/ruby-1.9-emacs"))
  1485. (require 'ruby-site)sor-mode -1)))
  1486.  
  1487. ;; Byt ordning på CR/LF. Kommer att ge indrag på varje ny rad.
  1488. (setq foo (global-key-binding "\C-m")) ; Spara CR.
  1489. (global-set-key "\C-m" (global-key-binding "\C-j")) ; Sätt CR till LF.
  1490. (global-set-key "\C-j" foo) ; Sätt LF till gamla CR.
  1491.  
  1492. ;; Bra tangentbindningar: F4 tar bort/fram menylisten:
  1493. (global-set-key [f4] 'menu-bar-mode)
  1494. ; F5 ändrar "line-wrap".
  1495. (global-set-key [f5] 'toggle-truncate-lines)
  1496.  
  1497. ;; C++-specifikt.
  1498. (add-to-list 'auto-mode-alist '("\\.h$" . c++-mode)) ; Behandla *.h-filer som C++ (ej C).
  1499. (add-to-list 'auto-mode-alist '("\\.icc" . c++-mode)) ; Implementeringsfiler som inkluderas.
  1500. (add-to-list 'auto-mode-alist '("\\.tcc" . c++-mode)) ; Filer med templatekod.
  1501.  
  1502. ;; Bra indrag.
  1503. ;;(setq c-default-style "stroustrup")
  1504. ;; Vissa föredrar denna ...
  1505. (setq c-default-style "ellemtel")
  1506.  
  1507. (nconc load-path '("/home/TDP007/www-pub/material/ruby-1.9-emacs"))
  1508. (require 'ruby-site)21" emacs-version)
  1509. (progn
  1510. (tool-bar-mode -1)
  1511. (blink-cursor-mode -1)))
  1512.  
  1513. ;; Byt ordning på CR/LF. Kommer att ge indrag på varje ny rad.
  1514. (setq foo (global-key-binding "\C-m")) ; Spara CR.
  1515. (global-set-key "\C-m" (global-key-binding "\C-j")) ; Sätt CR till LF.
  1516. (global-set-key "\C-j" foo) ; Sätt LF till gamla CR.
  1517.  
  1518. ;; Bra tangentbindningar: F4 tar bort/fram menylisten:
  1519. (global-set-key [f4] 'menu-bar-mode)
  1520. ; F5 ändrar "line-wrap".
  1521. (global-set-key [f5] 'toggle-truncate-lines)
  1522.  
  1523. ;; C++-specifikt.
  1524. (add-to-list 'auto-mode-alist '("\\.h$" . c++-mode)) ; Behandla *.h-filer som C++ (ej C).
  1525. (add-to-list 'auto-mode-alist '("\\.icc" . c++-mode)) ; Implementeringsfiler som inkluderas.
  1526. (add-to-list 'auto-mode-alist '("\\.tcc" . c++-mode)) ; Filer med templatekod.
  1527.  
  1528. ;; Bra indrag.
  1529. ;;(setq c-default-style "stroustrup")
  1530. ;; Vissa föredrar denna ...
  1531. (setq c-default-style "ellemtel")
  1532.  
  1533. (nconc load-path '("/home/TDP007/www-pub/material/ruby-1.9-emacs"))
  1534. (require 'ruby-site)21" emacs-version)
  1535. (progn
  1536. (tool-bar-mode -1)
  1537. (blink-cursor-mode -1)))
  1538.  
  1539. ;; Byt ordning på CR/LF. Kommer att ge indrag på varje ny rad.
  1540. (setq foo (global-key-binding "\C-m")) ; Spara CR.
  1541. (global-set-key "\C-m" (global-key-binding "\C-j")) ; Sätt CR till LF.
  1542. (global-set-key "\C-j" foo) ; Sätt LF till gamla CR.
  1543.  
  1544. ;; Bra tangentbindningar: F4 tar bort/fram menylisten:
  1545. (global-set-key [f4] 'menu-bar-mode)
  1546. ; F5 ändrar "line-wrap".
  1547. (global-set-key [f5] 'toggle-truncate-lines)
  1548.  
  1549. ;; C++-specifikt.
  1550. (add-to-list 'auto-mode-alist '("\\.h$" . c++-mode)) ; Behandla *.h-filer som C++ (ej C).
  1551. (add-to-list 'auto-mode-alist '("\\.icc" . c++-mode)) ; Implementeringsfiler som inkluderas.
  1552. (add-to-list 'auto-mode-alist '("\\.tcc" . c++-mode)) ; Filer med templatekod.
  1553.  
  1554. ;; Bra indrag.
  1555. ;;(setq c-default-style "stroustrup")
  1556. ;; Vissa föredrar denna ...
  1557. (setq c-default-style "ellemtel")
  1558.  
  1559. (nconc load-path '("/home/TDP007/www-pub/material/ruby-1.9-emacs"))
  1560. (require 'ruby-site)21" emacs-version)
  1561. (progn
  1562. (tool-bar-mode -1)
  1563. (blink-cursor-mode -1)))
  1564.  
  1565. ;; Byt ordning på CR/LF. Kommer att ge indrag på varje ny rad.
  1566. (setq foo (global-key-binding "\C-m")) ; Spara CR.
  1567. (global-set-key "\C-m" (global-key-binding "\C-j")) ; Sätt CR till LF.
  1568. (global-set-key "\C-j" foo) ; Sätt LF till gamla CR.
  1569.  
  1570. ;; Bra tangentbindningar: F4 tar bort/fram menylisten:
  1571. (global-set-key [f4] 'menu-bar-mode)
  1572. ; F5 ändrar "line-wrap".
  1573. (global-set-key [f5] 'toggle-truncate-lines)
  1574.  
  1575. ;; C++-specifikt.
  1576. (add-to-list 'auto-mode-alist '("\\.h$" . c++-mode)) ; Behandla *.h-filer som C++ (ej C).
  1577. (add-to-list 'auto-mode-alist '("\\.icc" . c++-mode)) ; Implementeringsfiler som inkluderas.
  1578. (add-to-list 'auto-mode-alist '("\\.tcc" . c++-mode)) ; Filer med templatekod.
  1579.  
  1580. ;; Bra indrag.
  1581. ;;(setq c-default-style "stroustrup")
  1582. ;; Vissa föredrar denna ...
  1583. (setq c-default-style "ellemtel")
  1584.  
  1585. (nconc load-path '("/home/TDP007/www-pub/material/ruby-1.9-emacs"))
  1586. (require 'ruby-site)
  1587. (tool-bar-mode -1)
  1588. (blink-cursor-mode -1)))
  1589.  
  1590. ;; Byt ordning på CR/LF. Kommer att ge indrag på varje ny rad.
  1591. (setq foo (global-key-binding "\C-m")) ; Spara CR.
  1592. (global-set-key "\C-m" (global-key-binding "\C-j")) ; Sätt CR till LF.
  1593. (global-set-key "\C-j" foo) ; Sätt LF till gamla CR.
  1594.  
  1595. ;; Bra tangentbindningar: F4 tar bort/fram menylisten:
  1596. (global-set-key [f4] 'menu-bar-mode)
  1597. ; F5 ändrar "line-wrap".
  1598. (global-set-key [f5] 'toggle-truncate-lines)
  1599.  
  1600. ;; C++-specifikt.
  1601. (add-to-list 'auto-mode-alist '("\\.h$" . c++-mode)) ; Behandla *.h-filer som C++ (ej C).
  1602. (add-to-list 'auto-mode-alist '("\\.icc" . c++-mode)) ; Implementeringsfiler som inkluderas.
  1603. (add-to-list 'auto-mode-alist '("\\.tcc" . c++-mode)) ; Filer med templatekod.
  1604.  
  1605. ;; Bra indrag.
  1606. ;;(setq c-default-style "stroustrup")
  1607. ;; Vissa föredrar denna ...
  1608. (setq c-default-style "ellemtel")
  1609.  
  1610. (nconc load-path '("/home/TDP007/www-pub/material/ruby-1.9-emacs"))
  1611. (require 'ruby-site)mode -1)
  1612. (blink-cursor-mode -1)))
  1613.  
  1614. ;; Byt ordning på CR/LF. Kommer att ge indrag på varje ny rad.
  1615. (setq foo (global-key-binding "\C-m")) ; Spara CR.
  1616. (global-set-key "\C-m" (global-key-binding "\C-j")) ; Sätt CR till LF.
  1617. (global-set-key "\C-j" foo) ; Sätt LF till gamla CR.
  1618.  
  1619. ;; Bra tangentbindningar: F4 tar bort/fram menylisten:
  1620. (global-set-key [f4] 'menu-bar-mode)
  1621. ; F5 ändrar "line-wrap".
  1622. (global-set-key [f5] 'toggle-truncate-lines)
  1623.  
  1624. ;; C++-specifikt.
  1625. (add-to-list 'auto-mode-alist '("\\.h$" . c++-mode)) ; Behandla *.h-filer som C++ (ej C).
  1626. (add-to-list 'auto-mode-alist '("\\.icc" . c++-mode)) ; Implementeringsfiler som inkluderas.
  1627. (add-to-list 'auto-mode-alist '("\\.tcc" . c++-mode)) ; Filer med templatekod.
  1628.  
  1629. ;; Bra indrag.
  1630. ;;(setq c-default-style "stroustrup")
  1631. ;; Vissa föredrar denna ...
  1632. (setq c-default-style "ellemtel")
  1633.  
  1634. (nconc load-path '("/home/TDP007/www-pub/material/ruby-1.9-emacs"))
  1635. (require 'ruby-site)m" (global-key-binding "\C-j")) ; Sätt CR till LF.
  1636. (global-set-key "\C-j" foo) ; Sätt LF till gamla CR.
  1637.  
  1638. ;; Bra tangentbindningar: F4 tar bort/fram menylisten:
  1639. (global-set-key [f4] 'menu-bar-mode)
  1640. ; F5 ändrar "line-wrap".
  1641. (global-set-key [f5] 'toggle-truncate-lines)
  1642.  
  1643. ;; C++-specifikt.
  1644. (add-to-list 'auto-mode-alist '("\\.h$" . c++-mode)) ; Behandla *.h-filer som C++ (ej C).
  1645. (add-to-list 'auto-mode-alist '("\\.icc" . c++-mode)) ; Implementeringsfiler som inkluderas.
  1646. (add-to-list 'auto-mode-alist '("\\.tcc" . c++-mode)) ; Filer med templatekod.
  1647.  
  1648. ;; Bra indrag.
  1649. ;;(setq c-default-style "stroustrup")
  1650. ;; Vissa föredrar denna ...
  1651. (setq c-default-style "ellemtel")
  1652.  
  1653. (nconc load-path '("/home/TDP007/www-pub/material/ruby-1.9-emacs"))
  1654. (require 'ruby-site)
  1655. ;; Grundfärger.
  1656. (set-background-color "White")
  1657. (set-foreground-color "Black")
  1658. (set-cursor-color "Black")
  1659.  
  1660. ;; Färger för nyckelord, etc.
  1661. (custom-set-variables)
  1662. (custom-set-faces
  1663. '(font-lock-comment-face ((((class color) (background light))
  1664. (:italic t :foreground "Firebrick"))))
  1665. '(font-lock-function-name-face ((((class color) (background light))
  1666. (:bold t :foreground "Blue"))))
  1667. '(font-lock-keyword-face ((((class color) (background light))
  1668. (:bold t :foreground "Black"))))
  1669. '(font-lock-string-face ((((class color) (background light))
  1670. (:italic t :foreground "ForestGreen"))))
  1671. '(font-lock-type-face ((((class color) (background light))
  1672. (:foreground "Blue"))))
  1673. '(font-lock-variable-name-face ((((class color) (background light))
  1674. (:foreground "Black"))))
  1675. '(font-lock-reference-face ((((class color) (background light))
  1676. (:foreground "ForestGreen")))))
  1677.  
  1678. ;; Framhäv markerat område genom invertering.
  1679. (transient-mark-mode t)
  1680.  
  1681. ;; Markera matchande parenteser.
  1682. (show-paren-mode 1)
  1683.  
  1684. ;; Diverse bra saker
  1685. (setq next-line-add-newlines nil) ; Lägg inte till nya rader efter EOF.
  1686. (setq line-number-mode t) ; Visa radnummer...
  1687. (setq column-number-mode t) ; ...och kolumn.
  1688. (setq-default indent-tabs-mode nil) ; Använd alltid mellanrumstecken, ej tab, för indrag.
  1689. (setq c-basic-offset 3) ; Indragssdjup.
  1690. (setq display-time-day-and-date t) ; Visa tid och datum...
  1691. (setq display-time-24hr-format t) ; ...så att man fattar.
  1692. (display-time) ; Visa tiden formaterad enligt ovan.
  1693.  
  1694. ;; Låt DEL-knappen klippa ut området (möjligheten att radera ordvis med DEL förloras).
  1695. ;;(if (eq window-system 'x)
  1696. ;; (pc-selection-mode))
  1697.  
  1698. ;; Emacs21-specifikt.
  1699. ;; Tar bort "skräp".
  1700. (if (string-match "^21" emacs-version)
  1701. (progn
  1702. (tool-bar-mode -1)
  1703. (blink-cursor-mode -1)))
  1704.  
  1705. ;; Byt ordning på CR/LF. Kommer att ge indrag på varje ny rad.
  1706. (setq foo (global-key-binding "\C-m")) ; Spara CR.
  1707. (global-set-key "\C-m" (global-key-binding "\C-j")) ; Sätt CR till LF.
  1708. (global-set-key "\C-j" foo) ; Sätt LF till gamla CR.
  1709.  
  1710. ;; Bra tangentbindningar: F4 tar bort/fram menylisten:
  1711. (global-set-key [f4] 'menu-bar-mode)
  1712. ; F5 ändrar "line-wrap".
  1713. (global-set-key [f5] 'toggle-truncate-lines)
  1714.  
  1715. ;; C++-specifikt.
  1716. (add-to-list 'auto-mode-alist '("\\.h$" . c++-mode)) ; Behandla *.h-filer som C++ (ej C).
  1717. (add-to-list 'auto-mode-alist '("\\.icc" . c++-mode)) ; Implementeringsfiler som inkluderas.
  1718. (add-to-list 'auto-mode-alist '("\\.tcc" . c++-mode)) ; Filer med templatekod.
  1719.  
  1720. ;; Bra indrag.
  1721. ;;(setq c-default-style "stroustrup")
  1722. ;; Vissa föredrar denna ...
  1723. (setq c-default-style "ellemtel")
  1724.  
  1725. (nconc load-path '("/home/TDP007/www-pub/material/ruby-1.9-emacs"))
  1726. (require 'ruby-site)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement