about summary refs log tree commit diff stats
path: root/.emacs.d/lisp/init-kill.el
diff options
context:
space:
mode:
Diffstat (limited to '.emacs.d/lisp/init-kill.el')
-rw-r--r--.emacs.d/lisp/init-kill.el42
1 files changed, 21 insertions, 21 deletions
diff --git a/.emacs.d/lisp/init-kill.el b/.emacs.d/lisp/init-kill.el
index f442fda..37103e3 100644
--- a/.emacs.d/lisp/init-kill.el
+++ b/.emacs.d/lisp/init-kill.el
@@ -15,32 +15,32 @@
   ("C-=" . easy-mark)
   (:map easy-kill-base-map ("C-=" . easy-kill-expand)))
 
-(use-package emacs
+(use-feature emacs
   :hook
-  (emacs-startup . (lambda ()
-                     ;; Based on code in prelude-editor.el
-                     (defun yank-advised-indent-function (beg end)
-                       "Do indentation, as long as the region isn't too large."
-                       (if (<= (- end beg) 10000)
-                           (indent-region beg end nil)))
+  (elpaca-after-init . (lambda ()
+                         ;; Based on code in prelude-editor.el
+                         (defun yank-advised-indent-function (beg end)
+                           "Do indentation, as long as the region isn't too large."
+                           (if (<= (- end beg) 10000)
+                               (indent-region beg end nil)))
 
-                     (defmacro advise-commands (advice-name commands class &rest body)
-                       "Apply advice named ADVICE-NAME to multiple COMMANDS.
+                         (defmacro advise-commands (advice-name commands class &rest body)
+                           "Apply advice named ADVICE-NAME to multiple COMMANDS.
 
 The body of the advice is in BODY."
-                       `(progn
-                          ,@(mapcar (lambda (command)
-                                      `(defadvice ,command (,class ,(intern (concat (symbol-name command) "-" advice-name)) activate)
-                                         ,@body))
-                                    commands)))
+                           `(progn
+                              ,@(mapcar (lambda (command)
+                                          `(defadvice ,command (,class ,(intern (concat (symbol-name command) "-" advice-name)) activate)
+                                             ,@body))
+                                        commands)))
 
-                     (advise-commands "indent" (yank yank-pop) after
-                                      (if (and (not (ad-get-arg 0))
-                                               (not (member major-mode '(conf-mode coffee-mode haml-mode python-mode slim-mode yaml-mode)))
-                                               (or (derived-mode-p 'prog-mode)
-                                                   (member major-mode '(LaTeX-mode TeX-mode))))
-                                          (let ((transient-mark-mode nil))
-                                            (yank-advised-indent-function (region-beginning) (region-end))))))))
+                         (advise-commands "indent" (yank yank-pop) after
+                                          (if (and (not (ad-get-arg 0))
+                                                   (not (member major-mode '(conf-mode coffee-mode haml-mode python-mode slim-mode yaml-mode)))
+                                                   (or (derived-mode-p 'prog-mode)
+                                                       (member major-mode '(LaTeX-mode TeX-mode))))
+                                              (let ((transient-mark-mode nil))
+                                                (yank-advised-indent-function (region-beginning) (region-end))))))))
 
 (provide 'init-kill)
 ;;; init-kill.el ends here