Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lisp 1.99 KB | None | 0 0
  1. ;;
  2. ;; More sane ERC defaults
  3. ;;
  4. (require 'erc)
  5.  
  6. ;;
  7. ;; ERC flyspell
  8. ;;
  9. (add-to-list 'erc-modules 'spelling)
  10.  
  11. ;;
  12. ;; This makes erc scroll more like a real IRC client
  13. ;;
  14. (erc-scrolltobottom-mode)
  15. (setq erc-input-line-position -1)
  16.  
  17. ;;
  18. ;; Covering more should-be-on-by-defaults for ERC
  19. ;;
  20. (setq erc-beep-p t)
  21. (setq erc-interpret-controls-p t)
  22. (setq erc-interpret-mirc-color t)
  23. (setq erc-modules
  24.    (quote
  25.     (autojoin completion dcc fill irccontrols list menu move-to-prompt netsplit networks page readonly ring scrolltobottom stamp spelling)))
  26. (setq erc-spelling-mode t)
  27.  
  28.  
  29. ;;
  30. ;; Fix width issues with ERC
  31. ;;
  32. (make-variable-buffer-local 'erc-fill-column)
  33.  (add-hook 'window-configuration-change-hook
  34.        '(lambda ()
  35.           (save-excursion
  36.             (walk-windows
  37.          (lambda (w)
  38.            (let ((buffer (window-buffer w)))
  39.              (set-buffer buffer)
  40.              (when (eq major-mode 'erc-mode)
  41.                (setq erc-fill-column (- (window-width w) 2)))))))))
  42.  
  43. ;;
  44. ;; ERC should be UTF-8 aware by default
  45. ;;
  46. (setq erc-server-coding-system 'utf-8)
  47.  
  48. ;; Turn off the mode line in ERC
  49. (defun erc-disable-modeline ()
  50.   (interactive)
  51.   (setq mode-line-format nil))
  52. (add-hook 'erc-mode-hook 'erc-disable-modeline)
  53.  
  54. ;; Since we have global-autopair-mode set to 1
  55. ;; this actually *disables* pair for ERC.
  56. (defun erc-disable-autopair ()
  57.   (interactive)
  58.   (autopair-mode -1))
  59. (add-hook 'erc-mode-hook 'erc-disable-autopair)
  60.  
  61. ;; erc-header-line is just redundant information
  62. (setq erc-header-line-format nil)
  63.  
  64. ;; Turn off the time stamp in ERC buffers
  65. (setq erc-hide-timestamps t)
  66. (setq erc-timestamp-format nil)
  67.  
  68. ;;
  69. ;; Fixes some scrolling issues with ERC
  70. ;;
  71. (add-to-list 'erc-mode-hook (lambda ()
  72.                               (set (make-local-variable 'scroll-conservatively) 100)))
  73.  
  74. ;; Hide join/part messages in ERC.
  75. (setq erc-lurker-hide-list '("JOIN" "PART" "QUIT"))
  76. (setq erc-lurker-threshold-time 3600)
  77.  
  78. ;;
  79. ;; No ERC flood control please
  80. ;;
  81. (setq erc-server-flood-penalty 0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement