Replace usages of eval-after-load with with-eval-after-load
`with-eval-after-load` was introduced in Emacs 24.4 and its usage results in a cleaner code. `eval-after-load` is considered ill-behaved because it is a function, not a macro, and thus requires the code inside it to be quoted, which means that it cannot be byte-compiled. It also accepts only one form, so if you have more than one, you need to use `progn`. More details - https://stackoverflow.com/questions/21880139/what-is-with-eval-after-load-in-emacs-lisp
This commit is contained in:
parent
0ce648b699
commit
cecae9ca19
15 changed files with 145 additions and 160 deletions
modules
|
@ -41,17 +41,16 @@
|
|||
|
||||
(define-key 'help-command (kbd "R") 'yari)
|
||||
|
||||
(eval-after-load 'ruby-mode
|
||||
'(progn
|
||||
(defun prelude-ruby-mode-defaults ()
|
||||
(inf-ruby-minor-mode +1)
|
||||
;; CamelCase aware editing operations
|
||||
(subword-mode +1))
|
||||
(with-eval-after-load 'ruby-mode
|
||||
(defun prelude-ruby-mode-defaults ()
|
||||
(inf-ruby-minor-mode +1)
|
||||
;; CamelCase aware editing operations
|
||||
(subword-mode +1))
|
||||
|
||||
(setq prelude-ruby-mode-hook 'prelude-ruby-mode-defaults)
|
||||
(setq prelude-ruby-mode-hook 'prelude-ruby-mode-defaults)
|
||||
|
||||
(add-hook 'ruby-mode-hook (lambda ()
|
||||
(run-hooks 'prelude-ruby-mode-hook)))))
|
||||
(add-hook 'ruby-mode-hook (lambda ()
|
||||
(run-hooks 'prelude-ruby-mode-hook))))
|
||||
|
||||
(provide 'prelude-ruby)
|
||||
;;; prelude-ruby.el ends here
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue