daily pastebin goal


lbkvu Dec 29th, 2018 4 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. * Notes
  2. ** 20180814
  3. *** Emacs
  4. **** use-package
  5.      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.
  7.      declare that .txt, .rst and .rest files must use rst-mode:
  8.      #+BEGIN_SRC emacs-lisp
  9.      (use-package rst
  10.        :mode (("\\.txt$" . rst-mode)
  11.               ("\\.rst$" . rst-mode)
  12.               ("\\.rest$" . rst-mode)))
  13.      #+END_SRC
  15.      *:preface* keyword is there so the Emacs byte compiler and the lisp evaluator know about things like function and symbol declarations.
  16.      #+BEGIN_SRC emacs-lisp
  17.      (use-package term
  18.        :preface
  19.        (defun mp-term-custom-settings ()
  20.          (local-set-key (kbd "M-p") 'term-send-up)
  21.          (local-set-key (kbd "M-n") 'term-send-down))
  22.        :config
  23.        (add-hook 'term-load-hook 'mp-term-custom-settings)
  24.        (define-key term-raw-map (kbd "M-o") 'other-window)
  25.        (define-key term-raw-map (kbd "M-p") 'term-send-up)
  26.        (define-key term-raw-map (kbd "M-n") 'term-send-down))
  27.      #+END_SRC
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand