summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--init.el42
1 files changed, 21 insertions, 21 deletions
diff --git a/init.el b/init.el
index 40654bf..0456577 100644
--- a/init.el
+++ b/init.el
@@ -54,7 +54,7 @@
;; C-d on an empty line in the shell terminates the process.
-(defun comint-delchar-or-eof-or-kill-buffer (arg)
+(defun my/comint-delchar-or-eof-or-kill-buffer (arg)
(interactive "p")
(if (null (get-buffer-process (current-buffer)))
(kill-buffer)
@@ -63,12 +63,12 @@
(add-hook 'shell-mode-hook
(lambda ()
(define-key shell-mode-map
- (kbd "C-d") 'comint-delchar-or-eof-or-kill-buffer)))
+ (kbd "C-d") 'my/comint-delchar-or-eof-or-kill-buffer)))
;; TODO: this isn't working
(add-hook 'term-mode-hook
(lambda ()
(define-key term-mode-map
- (kbd "C-d") 'comint-delchar-or-eof-or-kill-buffer)))
+ (kbd "C-d") 'my/comint-delchar-or-eof-or-kill-buffer)))
(add-hook 'haskell-mode-hook
(lambda ()
@@ -78,21 +78,21 @@
;; jump to first or last file in dired, not to the very top or bottom
(require 'dired)
(require 'dired+)
-(defun dired-back-to-top ()
+(defun my/dired-back-to-top ()
(interactive)
(beginning-of-buffer)
(dired-next-line 4))
(define-key dired-mode-map
- (vector 'remap 'beginning-of-buffer) 'dired-back-to-top)
+ (vector 'remap 'beginning-of-buffer) 'my/dired-back-to-top)
-(defun dired-jump-to-bottom ()
+(defun my/dired-jump-to-bottom ()
(interactive)
(end-of-buffer)
(dired-next-line -1))
(define-key dired-mode-map
- (vector 'remap 'end-of-buffer) 'dired-jump-to-bottom)
+ (vector 'remap 'end-of-buffer) 'my/dired-jump-to-bottom)
(define-key dired-mode-map
(kbd "<return>") 'dired-find-alternate-file) ; was dired-advertised-find-file
(define-key dired-mode-map
@@ -141,33 +141,33 @@
ad-do-it
(delete-other-windows))
-(defun magit-quit-session ()
+(defun my/magit-quit-session ()
"Restores the previous window configuration and kills the magit buffer"
(interactive)
(kill-buffer)
(jump-to-register :magit-fullscreen))
-(defun magit-toggle-whitespace ()
+(defun my/magit-toggle-whitespace ()
"Toggles git option -w"
(interactive)
(if (member "-w" magit-diff-options)
- (magit-dont-ignore-whitespace)
- (magit-ignore-whitespace)))
+ (my/magit-dont-ignore-whitespace)
+ (my/magit-ignore-whitespace)))
-(defun magit-ignore-whitespace ()
+(defun my/magit-ignore-whitespace ()
"Adds git option -w"
(interactive)
(add-to-list 'magit-diff-options "-w")
(magit-refresh))
-(defun magit-dont-ignore-whitespace ()
+(defun my/magit-dont-ignore-whitespace ()
"Removes git option -w"
(interactive)
(setq magit-diff-options (remove "-w" magit-diff-options))
(magit-refresh))
-(define-key magit-status-mode-map (kbd "q") 'magit-quit-session)
-(define-key magit-status-mode-map (kbd "W") 'magit-toggle-whitespace)
+(define-key magit-status-mode-map (kbd "q") 'my/magit-quit-session)
+(define-key magit-status-mode-map (kbd "W") 'my/magit-toggle-whitespace)
;; ido mode
@@ -242,7 +242,7 @@
;; http://blog.vivekhaldar.com/post/4809065853/dotemacs-extract-interactively-change-font-size
-(defun zoom-in ()
+(defun my/zoom-in ()
"Increase font size by 10 points"
(interactive)
(set-face-attribute 'default nil
@@ -250,7 +250,7 @@
(+ (face-attribute 'default :height)
10)))
-(defun zoom-out ()
+(defun my/zoom-out ()
"Decrease font size by 10 points"
(interactive)
(set-face-attribute 'default nil
@@ -259,8 +259,8 @@
10)))
;; change font size, interactively
-(global-set-key (kbd "C-.") 'zoom-in)
-(global-set-key (kbd "C-,") 'zoom-out)
+(global-set-key (kbd "C-.") 'my/zoom-in)
+(global-set-key (kbd "C-,") 'my/zoom-out)
;; easier way to jump to other window
(global-set-key (kbd "M-o") 'other-window)
@@ -307,7 +307,7 @@
;; convenience function to input the remote root when in a directory
;; on a remote host
-(defun rekado-tramp-root ()
+(defun my/tramp-root ()
"Print root directory on the remote host."
(interactive)
(let ((pieces (split-string (eshell/pwd) ":/")))
@@ -316,7 +316,7 @@
"/"))))
(add-hook 'eshell-mode-hook
- '(lambda () (define-key eshell-mode-map (kbd "C-c /") 'rekado-tramp-root)))
+ '(lambda () (define-key eshell-mode-map (kbd "C-c /") 'my/tramp-root)))
;; start a hidden eshell on startup