| Paste number 3528: | my ~/.emacs |
| Pasted by: | thomas001 |
| 4 years, 2 months ago | |
| None | |
| Paste contents: |
| ;; set our user load-path (push "~/emacs/" load-path) (push "~/emacs/http-emacs/" load-path) ;; my rafb stuff (autoload 'rafb-paste "rafb-paste" "Paste region on rafb.net" t) ;; font-lock-mode always (global-font-lock-mode 1) ;; nice color theme (when window-system (require 'color-theme) (color-theme-midnight)) ;; tabs are evil (setq indent-tabs-mode nil) ;; logo suckz (setq inhibit-startup-message t) ;; C is case sensitive (defun disable-case-fold-search () (setq case-fold-search nil)) (add-hook 'c-mode-hook #'disable-case-fold-search) (add-hook 'c++-mode-hook #'disable-case-fold-search) ;;; ERC (push "~/cvs/erc" load-path) (autoload 'erc-select "erc" "" t) (eval-after-load "erc" '(progn (require 'erc-nets) (require 'erc-stamp) (erc-stamp-mode 1))) (add-hook 'erc-mode-hook 'erc-add-scroll-to-bottom) (add-hook 'erc-insert-post-hook 'erc-make-read-only) (add-hook 'erc-send-post-hook 'erc-make-read-only) ;; please no paren matching in erc (add-hook 'erc-mode-hook (lambda () (set (make-local-variable 'blink-matching-paren) nil))) ;; this is needed to make it work... (defun erc-make-read-only-rear-nonsticky () (let ((inhibit-read-only t)) ;; does not work,why? (remove-text-properties (point-min) (point-max) '(rear-nonsticky nil))) (put-text-property (1- (point-max)) (point-max) 'rear-nonsticky '(read-only))) (add-hook 'erc-insert-post-hook 'erc-make-read-only-rear-nonsticky) (add-hook 'erc-send-post-hook 'erc-make-read-only-rear-nonsticky) ;; some settings (setq erc-auto-query 'buffer erc-insert-timestamp-function 'erc-insert-timestamp-left erc-timestamp-format "%H:%M " erc-timestamp-only-if-changed-flag nil erc-nick "thomas001") ;; ajoin and nickserv (defun on-irc-connect (server nick) (case erc-network (freenode (erc-cmd-MSG "Nickserv identify 123456") (erc-cmd-JOIN "#pro-linux")) (euIRCnet (erc-cmd-MSG "Nickserv identify 112358") (erc-cmd-JOIN "#game-developers.net")))) (add-hook 'erc-after-connect 'on-irc-connect) (defmacro irc-make-connect (network server) `(defun ,(intern (concat "irc-" network)) () (interactive) (erc-select :server ,server))) (defmacro irc-make-connects (&rest connects) (cons 'progn (mapcar (lambda (c) (cons 'irc-make-connect c)) connects))) (defun erc-cmd-DOSERVERS (line) (dolist (i (erc-buffer-list #'erc-server-buffer-p)) (with-current-buffer i (erc-send-input line)))) (irc-make-connects ("euirc" "irc.ffm.de.euirc.net") ("freenode" "irc.freenode.net") ("ircnet" "irc.fu-berlin.de")) ;; fency xterm title stuff (defun my-set-xterm-title () (xterm-set-window-title (concat "emacs - " (buffer-name)))) ;; (when (and (not window-system) ;; (string-match "^\\(xterm\\)\\|\\(rxvt\\)" (getenv "TERM"))) ;; (when (not window-system) ; i hope linux console won't kill me (let ((term (getenv "TERM"))) (when (and (not window-system) (or (string= term "xterm") (string= term "rxvt"))) (require 'xterm-frobs) (add-hook 'window-configuration-change-hook 'my-set-xterm-title) (add-hook 'emacs-startup-hook 'my-set-xterm-title))) ;;; iswitchb is cool (iswitchb-mode 1) (setq-default iswitchb-cannot-complete-hook nil) (add-hook 'iswitchb-cannot-complete-hook 'iswitchb-next-match) (setq-default iswitchb-max-to-show 4) ;;; i use firefox (setq-default browse-url-mozilla-program "firefox") ;; don't want extra gui stuff (menu-bar-mode 0) (tool-bar-mode 0) (scroll-bar-mode -1) ;; gentoo (require 'gentoo-ebuild) ;; ocaml is nice (push "~/emacs/tuareg-mode-1.41.5" load-path) (autoload 'tuareg-mode "tuareg" "Major mode for editing ocaml programs" t) (push '("\\.ml\\w?\\'" . tuareg-mode) auto-mode-alist) ;; octave automode (push '("\\.oct$" . octave-mode) auto-mode-alist) (custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(compilation-scroll-output t) '(compilation-window-height 10)) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. ) |
This paste has no annotations.