diff options
Diffstat (limited to '.emacs.d/init.el')
-rw-r--r-- | .emacs.d/init.el | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 6c217e1..7840248 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -818,7 +818,26 @@ If no direction is given, don't split." "Get the hook name for MODE." (intern (concat (symbol-name mode) "-mode-hook")))) -;;;; aliases +;;;;; Advice + +(defadvice org-agenda-redo (after ext:org-agenda-redo-add-appts) + "Pressing `r' on the agenda will also add appointments." + (progn + (setq appt-time-msg-list nil) + (org-agenda-to-appt))) + +(defadvice term-handle-exit (after oni:kill-buffer-after-exit activate) + "Kill the term buffer if the process finished." + (kill-buffer (current-buffer))) + +(defadvice windmove-do-window-select + (around init-windmove-stumpwm activate) + "If no window can be moved to, move stumpwm." + (condition-case err + ad-do-it + (error (stumpwm-command (format "move-focus %s" (ad-get-arg 0)))))) + +;;;; Aliases (defalias 'yes-or-no-p 'y-or-n-p) (defalias 'dabbrev-expand 'hippie-expand) @@ -1258,13 +1277,6 @@ If no direction is given, don't split." "~/.emacs.d/vendor-lisp/mozrepl" "~/.emacs.d/vendor-lisp/eap" "/usr/share/emacs/site-lisp"))) -(defadvice windmove-do-window-select - (around init-windmove-stumpwm activate) - "If no window can be moved to, move stumpwm." - (condition-case err - ad-do-it - (error (stumpwm-command (format "move-focus %s" (ad-get-arg 0)))))) - (global-set-key (kbd "C-c S") #'split-window-right) (global-set-key (kbd "C-c s") #'split-window-below) (global-set-key (kbd "C-c Q") #'delete-other-windows) @@ -1277,16 +1289,6 @@ If no direction is given, don't split." (global-set-key (kbd "C-c -") #'decrease-number-at-point) (global-set-key (kbd "C-c +") #'increase-number-at-point) -(defadvice org-agenda-redo (after ext:org-agenda-redo-add-appts) - "Pressing `r' on the agenda will also add appointments." - (progn - (setq appt-time-msg-list nil) - (org-agenda-to-appt))) - -(defadvice term-handle-exit (after oni:kill-buffer-after-exit activate) - "Kill the term buffer if the process finished." - (kill-buffer (current-buffer))) - (add-to-list 'debug-ignored-errors "^Can't shift all lines enough") (enable '(downcase-region narrow-to-page narrow-to-region scroll-left |