summaryrefslogtreecommitdiffhomepage
path: root/init.org
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2021-03-27 03:55:21 +0000
committerjao <jao@gnu.org>2021-03-27 03:55:21 +0000
commit8a438d164f17f5261da39231cd0e903b85f62d8d (patch)
tree613d3f44c11e9872413997f7f4eb676e9b09c206 /init.org
parent3d1d6772f410ddc0ae7c36442f5be43847a8e432 (diff)
downloadelibs-8a438d164f17f5261da39231cd0e903b85f62d8d.tar.gz
elibs-8a438d164f17f5261da39231cd0e903b85f62d8d.tar.bz2
clean-ups
Diffstat (limited to 'init.org')
-rw-r--r--init.org55
1 files changed, 18 insertions, 37 deletions
diff --git a/init.org b/init.org
index 2b1a695..9e1669b 100644
--- a/init.org
+++ b/init.org
@@ -231,10 +231,6 @@
(string-trim))))
#+end_src
-*** Memory usage
- #+begin_src emacs-lisp
- (use-package memory-usage :ensure t)
- #+end_src
*** Keyboard and hydra
#+begin_src emacs-lisp
@@ -872,18 +868,13 @@
(setq company-require-match #'company-explicit-action-p)
(defun jao-complete-at-point ()
+ "Complete using company unless we're in the minibuffer."
(interactive)
(if (window-minibuffer-p) (completion-at-point) (company-manual-begin)))
- :bind (;; Remap the standard Emacs keybindings for invoking
- ;; completion to instead use Company. You might think this
- ;; could be put in the `:bind*' declaration below, but it
- ;; seems that `bind-key*' does not work with remappings.
- ([remap completion-at-point] . #'jao-complete-at-point)
+ :bind (([remap completion-at-point] . #'jao-complete-at-point)
([remap complete-symbol] . #'jao-complete-at-point)
- ("C-c ." . company-complete)
-
;; The following are keybindings that take effect whenever
;; the completions menu is visible, even if the user has not
;; explicitly interacted with Company.
@@ -894,35 +885,25 @@
("<tab>" . #'company-complete-selection)
("TAB" . #'company-complete-selection)
- ;; When was the last time you used the C-s binding for
- ;; searching candidates? It conflicts with buffer search,
- ;; anyway. Same for the scroll commands.
- ("C-s" . nil)
- ([remap scroll-down-command] . nil)
- ([remap scroll-up-command] . nil)
-
- ("C-h" . company-show-doc-buffer)
- ("M-." . company-show-location)
+ ("C-h" . #'company-show-doc-buffer)
+ ("M-." . #'company-show-location)
- ;; The following are keybindings that only take effect if the
- ;; user has explicitly interacted with Company. Note that
- ;; `:map' from above is "sticky", and applies also below: see
- ;; https://github.com/jwiegley/use-package/issues/334#issuecomment-349473819.
+ ;; The following are keybindings that only take effect
+ ;; if not in eshell. Note that `:map' from above is
+ ;; "sticky", and applies also below.
+ ;; Another interesting :filter (company-explicit-action-p)
- :filter (company-explicit-action-p)
-
- ;; Make RET trigger a completion if and only if the user has
- ;; explicitly interacted with Company, instead of always
- ;; doing so.
+ :filter (not (derived-mode-p 'eshell-mode))
("<return>" . #'company-complete-selection)
("RET" . #'company-complete-selection))
- :bind* (;; The default keybinding for `completion-at-point' and
- ;; `complete-symbol' is M-TAB or equivalently C-M-i. We
- ;; already remapped those bindings to `company-manual-begin'
- ;; above. Here we make sure that they definitely invoke
- ;; `company-manual-begin' even if a minor mode binds M-TAB
- ;; directly.
- ("M-TAB" . #'jao-complete-at-point))
+
+ :bind* (;; The default keybinding for `completion-at-point' and
+ ;; `complete-symbol' is M-TAB or equivalently C-M-i. We
+ ;; already remapped those bindings to `company-manual-begin'
+ ;; above. Here we make sure that they definitely invoke
+ ;; `company-manual-begin' even if a minor mode binds M-TAB
+ ;; directly.
+ ("M-TAB" . #'jao-complete-at-point))
:diminish)
@@ -1751,7 +1732,7 @@
***** Attach image to message
Use ~C-c C-p~ in message-mode.
***** Org-mime
- #+BEGIN_SRC emacs-lisp
+ #+BEGIN_SRC emacs-lisp :load no
(use-package org-mime :ensure t
:init (setq org-mime-beautify-quoted-mail t)
:bind (:map message-mode-map ("C-c M-o" . org-mime-htmlize)))