Download
(setq durdn-conf-folder "~/.emacs.durdn/")
(setq durdn-env-emacs-conf "EMACSCONF")
(let ((config (concat durdn-conf-folder (getenv durdn-env-emacs-conf) ".el")))
(if (file-exists-p config)
(load-file config)))
(setq url-proxy-services '(("http" . "130.144.19.70:8080")))
(fset 'yes-or-no-p 'y-or-n-p)
(setq gnuserv-frame (selected-frame))
(setq font-lock-maximum-decoration t)
(setq initial-frame-alist '((minibuffer . t) (width . 80) (height . 58)
(left . 0) (top . 0)))
(setq default-frame-alist '((minibuffer . t) (menu-bar-lines . 1) ))
(setq-default inhibit-startup-message t)
(setq-default truncate-lines t)
(setq scroll-step 1)
(setq default-tab-width 4)
(setq make-backup-files nil)
(setq diff-switches "-u")
(put 'dired-find-alternate-file 'disabled nil)
(setq tramp-default-method "plink")
(setq ring-bell-function (lambda () ()))
(setq auto-mode-alist
(cons '("\\.\\(env\\|sh\\|bash\\|env1\\)\\'" . shell-script-mode)
auto-mode-alist))
(setq auto-mode-alist
(cons '("\\.\\(jhtml\\|jsp\\)\\'" . html-mode)
auto-mode-alist))
(setq auto-mode-alist
(cons '("\\.\\(py\\|pyw\\)$" . python-mode) auto-mode-alist))
(setq interpreter-mode-alist
(cons '("python" . python-mode)
interpreter-mode-alist))
(setq auto-mode-alist
(append '(("\\.rst$" . rst-mode)
("\\.rest$" . rst-mode)) auto-mode-alist))
(setq auto-mode-alist
(cons '("\\.\\(xml\\|xsl\\|rng\\|xhtml\\)\\'" . nxml-mode)
auto-mode-alist))
(add-to-list
'tramp-multi-connection-function-alist
'("gateway-andover" tramp-multi-connect-rlogin "plink -ssh -A -l %u %h %n"))
(setq ls-lisp-dirs-first t)
(setq frame-title-format
(list (format "%s %%S: %%j " (system-name))
'(buffer-file-name "%f" (dired-directory dired-directory "%b"))))
(defun list-buffers-other-win ()
"Opens list-buffers and put focus on it"
(interactive)
(list-buffers)
(other-window 1)
(goto-char (+ 4 (point))))
(defun open-shell-window (&optional n)
(interactive)
(split-window-vertically -10)
(other-window 1)
(shell))
(defun match-paren ()
"Go to the matching parenthesis if on parenthesis otherwise insert %."
(interactive)
(cond ((looking-at "\\s\(") (forward-list 1) (backward-char 1))
((looking-at "\\s\)") (forward-char 1) (backward-list 1))
((progn (backward-char 1) (looking-at "\\s\)")) (forward-char 1) (backward-list 1))
(t (forward-char) (message "Não está sobre ( ou )"))))
(defun line-to-top ()
"Move current line to top of window."
(interactive)
(recenter 0))
(defun point-to-top ()
(interactive)
(move-to-window-line 0))
(defun point-to-bottom ()
"Move current line to top of window."
(interactive)
(move-to-window-line -1))
(defun kill-buffer-file-name (&optional n)
(interactive "P")
(kill-new
(if n
(file-name-directory (buffer-file-name))
(buffer-file-name))))
(defun load-dot-emacs-file ()
(interactive)
(load-file "~/.emacs"))
(defun open-init-dot-el-file ()
(interactive)
(find-file "~/.emacs"))
(global-set-key "\C-ce" 'open-init-dot-el-file)
(global-set-key "\C-c\C-r" 'load-dot-emacs-file)
(global-set-key "\C-cn" 'kill-buffer-file-name)
(global-set-key "\M-p" 'line-to-top)
(global-set-key '[(control ,)] 'point-to-top)
(global-set-key '[(control .)] 'point-to-bottom)
(global-set-key "\C-cD" 'desktop-read)
(global-set-key "\C-cG" 'goto-line)
(global-set-key "\C-cl" 'goto-line)
(global-set-key "\C-c#" 'comment-or-uncomment-region)
(global-set-key "\C-cs" 'open-shell-window)
(global-set-key "\C-c]" 'match-paren)
(global-set-key "\C-x\C-b" 'list-buffers-other-win)
(custom-set-faces
'(custom-group-tag-face-1 ((((class color) (background light)) (:foreground "red" :bold t))))
'(font-lock-comment-face ((t (:foreground "green4"))))
'(font-lock-doc-string-face ((((class color) (background light)) (:foreground "yellow4"))))
'(font-lock-function-name-face ((t (:foreground "red4" :underline t :weight bold))))
'(font-lock-keyword-face ((t (:foreground "blue4" :weight bold))))
'(font-lock-string-face ((((class color) (background light)) (:foreground "yellow4"))))
'(font-lock-type-face ((((class color) (background light)) (:foreground "blue" :bold t))))
'(vhdl-font-lock-attribute-face ((((class color) (background light)) (:foreground "CadetBlue" :weight bold))))
'(vhdl-font-lock-function-face ((((class color) (background light)) (:foreground "CadetBlue" :weight bold)))))
(custom-set-variables
'(auto-raise-tool-bar-buttons t t)
'(auto-resize-tool-bars t t)
'(bar-cursor nil)
'(browse-url-browser-function (quote browse-url-w3))
'(buffers-menu-grouping-function nil)
'(buffer-tab-filter-functions nil)
'(buffers-tab-max-buffer-line-length 20)
'(buffers-tab-max-size 15)
'(case-fold-search t)
'(column-number-mode t)
'(current-language-environment "Latin-1")
'(default-input-method "latin-1-prefix")
'(global-font-lock-mode t nil (font-lock))
'(gnuserv-frame t t)
'(indent-tabs-mode nil)
'(line-number-mode t)
'(paren-mode (quote paren) nil (paren))
'(pc-selection-mode t nil (pc-select))
'(py-python-command "C:\\Python24\\python.exe")
'(recent-files-number-of-entries 30)
'(save-place t nil (saveplace))
'(show-paren-mode t nil (paren))
'(tab-width 4)
'(tool-bar-button-margin 4 t)
'(tool-bar-button-relief 1 t)
'(tool-bar-mode nil nil (tool-bar))
'(toolbar-visible-p nil)
'(tramp-methods (quote (("ftp") ("rcp" (tramp-connection-function tramp-open-connection-rsh) (tramp-login-program "rsh") (tramp-copy-program "rcp") (tramp-remote-sh "/bin/sh") (tramp-login-args nil) (tramp-copy-args nil) (tramp-copy-keep-date-arg "-p") (tramp-password-end-of-line nil)) ("scp" (tramp-connection-function tramp-open-connection-rsh) (tramp-login-program "ssh") (tramp-copy-program "scp") (tramp-remote-sh "/bin/sh") (tramp-login-args ("-e" "none")) (tramp-copy-args nil) (tramp-copy-keep-date-arg "-p") (tramp-password-end-of-line nil)) ("scp1" (tramp-connection-function tramp-open-connection-rsh) (tramp-login-program "ssh") (tramp-copy-program "scp") (tramp-remote-sh "/bin/sh") (tramp-login-args ("-1" "-e" "none")) (tramp-copy-args ("-1")) (tramp-copy-keep-date-arg "-p") (tramp-password-end-of-line nil)) ("scp2" (tramp-connection-function tramp-open-connection-rsh) (tramp-login-program "ssh") (tramp-copy-program "scp") (tramp-remote-sh "/bin/sh") (tramp-login-args ("-2" "-e" "none")) (tramp-copy-args ("-2")) (tramp-copy-keep-date-arg "-p") (tramp-password-end-of-line nil)) ("scp1_old" (tramp-connection-function tramp-open-connection-rsh) (tramp-login-program "ssh1") (tramp-copy-program "scp1") (tramp-remote-sh "/bin/sh") (tramp-login-args ("-e" "none")) (tramp-copy-args nil) (tramp-copy-keep-date-arg "-p") (tramp-password-end-of-line nil)) ("scp2_old" (tramp-connection-function tramp-open-connection-rsh) (tramp-login-program "ssh2") (tramp-copy-program "scp2") (tramp-remote-sh "/bin/sh") (tramp-login-args ("-e" "none")) (tramp-copy-args nil) (tramp-copy-keep-date-arg "-p") (tramp-password-end-of-line nil)) ("rsync" (tramp-connection-function tramp-open-connection-rsh) (tramp-login-program "ssh") (tramp-copy-program "rsync") (tramp-remote-sh "/bin/sh") (tramp-login-args ("-e" "none")) (tramp-copy-args ("-e" "ssh")) (tramp-copy-keep-date-arg "-t") (tramp-password-end-of-line nil)) ("remcp" (tramp-connection-function tramp-open-connection-rsh) (tramp-login-program "remsh") (tramp-copy-program "rcp") (tramp-remote-sh "/bin/sh") (tramp-login-args nil) (tramp-copy-args nil) (tramp-copy-keep-date-arg "-p") (tramp-password-end-of-line nil)) ("rsh" (tramp-connection-function tramp-open-connection-rsh) (tramp-login-program "rsh") (tramp-copy-program nil) (tramp-remote-sh "/bin/sh") (tramp-login-args nil) (tramp-copy-args nil) (tramp-copy-keep-date-arg nil) (tramp-password-end-of-line nil)) ("ssh" (tramp-connection-function tramp-open-connection-rsh) (tramp-login-program "ssh") (tramp-copy-program nil) (tramp-remote-sh "/bin/sh") (tramp-login-args ("-e" "none")) (tramp-copy-args nil) (tramp-copy-keep-date-arg nil) (tramp-password-end-of-line nil)) ("ssh1" (tramp-connection-function tramp-open-connection-rsh) (tramp-login-program "ssh") (tramp-copy-program nil) (tramp-remote-sh "/bin/sh") (tramp-login-args ("-1" "-e" "none")) (tramp-copy-args ("-1")) (tramp-copy-keep-date-arg nil) (tramp-password-end-of-line nil)) ("ssh2" (tramp-connection-function tramp-open-connection-rsh) (tramp-login-program "ssh") (tramp-copy-program nil) (tramp-remote-sh "/bin/sh") (tramp-login-args ("-2" "-e" "none")) (tramp-copy-args ("-2")) (tramp-copy-keep-date-arg nil) (tramp-password-end-of-line nil)) ("ssh1_old" (tramp-connection-function tramp-open-connection-rsh) (tramp-login-program "ssh1") (tramp-copy-program nil) (tramp-remote-sh "/bin/sh") (tramp-login-args ("-e" "none")) (tramp-copy-args nil) (tramp-copy-keep-date-arg nil) (tramp-password-end-of-line nil)) ("ssh2_old" (tramp-connection-function tramp-open-connection-rsh) (tramp-login-program "ssh2") (tramp-copy-program nil) (tramp-remote-sh "/bin/sh") (tramp-login-args ("-e" "none")) (tramp-copy-args nil) (tramp-copy-keep-date-arg nil) (tramp-password-end-of-line nil)) ("remsh" (tramp-connection-function tramp-open-connection-rsh) (tramp-login-program "remsh") (tramp-copy-program nil) (tramp-remote-sh "/bin/sh") (tramp-login-args nil) (tramp-copy-args nil) (tramp-copy-keep-date-arg nil) (tramp-password-end-of-line nil)) ("telnet" (tramp-connection-function tramp-open-connection-telnet) (tramp-login-program "telnet") (tramp-copy-program nil) (tramp-remote-sh "/bin/sh") (tramp-login-args nil) (tramp-copy-args nil) (tramp-copy-keep-date-arg nil) (tramp-password-end-of-line nil)) ("su" (tramp-connection-function tramp-open-connection-su) (tramp-login-program "su") (tramp-copy-program nil) (tramp-remote-sh "/bin/sh") (tramp-login-args ("-" "%u")) (tramp-copy-args nil) (tramp-copy-keep-date-arg nil) (tramp-password-end-of-line nil)) ("sudo" (tramp-connection-function tramp-open-connection-su) (tramp-login-program "sudo") (tramp-copy-program nil) (tramp-remote-sh "/bin/sh") (tramp-login-args ("-u" "%u" "-s" "-p" "Password:")) (tramp-copy-args nil) (tramp-copy-keep-date-arg nil) (tramp-password-end-of-line nil)) ("sudo2" (tramp-connection-function tramp-open-connection-su) (tramp-login-program "sudo") (tramp-copy-program nil) (tramp-remote-sh "/bin/sh") (tramp-login-args ("su" "-" "%u")) (tramp-copy-args nil) (tramp-copy-keep-date-arg nil) (tramp-password-end-of-line nil)) ("multi" (tramp-connection-function tramp-open-connection-multi) (tramp-login-program nil) (tramp-copy-program nil) (tramp-remote-sh "/bin/sh") (tramp-login-args nil) (tramp-copy-args nil) (tramp-copy-keep-date-arg nil) (tramp-password-end-of-line nil)) ("scpx" (tramp-connection-function tramp-open-connection-rsh) (tramp-login-program "ssh") (tramp-copy-program "scp") (tramp-remote-sh "/bin/sh") (tramp-login-args ("-e" "none" "-t" "-t" "/bin/sh")) (tramp-copy-args nil) (tramp-copy-keep-date-arg "-p") (tramp-password-end-of-line nil)) ("sshx" (tramp-connection-function tramp-open-connection-rsh) (tramp-login-program "ssh") (tramp-copy-program nil) (tramp-remote-sh "/bin/sh") (tramp-login-args ("-e" "none" "-t" "-t" "/bin/sh")) (tramp-copy-args nil) (tramp-copy-keep-date-arg nil) (tramp-password-end-of-line nil)) ("krlogin" (tramp-connection-function tramp-open-connection-rsh) (tramp-login-program "krlogin") (tramp-copy-program nil) (tramp-remote-sh "/bin/sh") (tramp-login-args ("-x")) (tramp-copy-args nil) (tramp-copy-keep-date-arg nil) (tramp-password-end-of-line nil)) ("plink" (tramp-connection-function tramp-open-connection-rsh) (tramp-login-program "plink") (tramp-copy-program nil) (tramp-remote-sh "/bin/sh") (tramp-login-args ("-ssh" "-A")) (tramp-copy-args nil) (tramp-copy-keep-date-arg nil) (tramp-password-end-of-line "xy")) ("psess" (tramp-connection-function tramp-open-connection-rsh) (tramp-login-program "plink") (tramp-copy-program nil) (tramp-remote-sh "/bin/sh") (tramp-login-args ("-v" "-load" "nick@durdn.yi.org")) (tramp-copy-args nil) (tramp-copy-keep-date-arg nil) (tramp-password-end-of-line "xy")) ("plink1" (tramp-connection-function tramp-open-connection-rsh) (tramp-login-program "plink") (tramp-copy-program nil) (tramp-remote-sh "/bin/sh") (tramp-login-args ("-1" "-ssh")) (tramp-copy-args nil) (tramp-copy-keep-date-arg nil) (tramp-password-end-of-line "xy")) ("pscp" (tramp-connection-function tramp-open-connection-rsh) (tramp-login-program "plink") (tramp-copy-program "pscp") (tramp-remote-sh "/bin/sh") (tramp-login-args ("-ssh")) (tramp-copy-args nil) (tramp-copy-keep-date-arg "-p") (tramp-password-end-of-line "xy")) ("fcp" (tramp-connection-function tramp-open-connection-rsh) (tramp-login-program "fsh") (tramp-copy-program "fcp") (tramp-remote-sh "/bin/sh -i") (tramp-login-args ("sh" "-i")) (tramp-copy-args nil) (tramp-copy-keep-date-arg "-p") (tramp-password-end-of-line nil)))))
'(transient-mark-mode t)
'(truncate-lines t)
)