Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- * Notes
- ** 20180814
- *** Emacs
- **** use-package
- put most things into :config (as you probably want to initialize your own settings after the package has loaded its own defaults) and only toy with :init and :preface if you have a good reason to.
- declare that .txt, .rst and .rest files must use rst-mode:
- #+BEGIN_SRC emacs-lisp
- (use-package rst
- :mode (("\\.txt$" . rst-mode)
- ("\\.rst$" . rst-mode)
- ("\\.rest$" . rst-mode)))
- #+END_SRC
- *:preface* keyword is there so the Emacs byte compiler and the lisp evaluator know about things like function and symbol declarations.
- #+BEGIN_SRC emacs-lisp
- (use-package term
- :preface
- (defun mp-term-custom-settings ()
- (local-set-key (kbd "M-p") 'term-send-up)
- (local-set-key (kbd "M-n") 'term-send-down))
- :config
- (add-hook 'term-load-hook 'mp-term-custom-settings)
- (define-key term-raw-map (kbd "M-o") 'other-window)
- (define-key term-raw-map (kbd "M-p") 'term-send-up)
- (define-key term-raw-map (kbd "M-n") 'term-send-down))
- #+END_SRC
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement