-
Notifications
You must be signed in to change notification settings - Fork 8
/
emacs-own-minibuf.el
100 lines (83 loc) · 3.16 KB
/
emacs-own-minibuf.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
;;; Minimal-emacs.el --- Minimal config for Emacs.
;; Use own frame for minibuffer.
;; Just for testing purpose, really buggy.
;;; Code:
(blink-cursor-mode -1)
(show-paren-mode 1)
(setq inhibit-startup-message t)
(add-to-list 'load-path "~/elisp/")
(add-to-list 'load-path "~/elisp/helm")
(add-to-list 'load-path "/usr/local/share/emacs/site-lisp/emacs-async")
(add-to-list 'load-path "~/elisp/helm-extensions")
(add-to-list 'load-path "~/.emacs.d/emacs-config")
;;; Frames setting for own minibuffer frame.
;;
(setq initial-frame-alist
'((name . "emacs-1")
(foreground-color . "Wheat")
(background-color . "Black")
(vertical-scroll-bars . nil)
(menu-bar-lines . 0)
(tool-bar-lines . 0)
(font . "-unknown-DejaVu Sans Mono-bold-normal-normal-*-14-*-*-*-m-0-iso10646-1")
(cursor-color . "red")
(minibuffer . nil)
(width . 157)
(height . 40)
(fullscreen . maximized)
))
(setq default-frame-alist '((foreground-color . "Wheat")
(background-color . "DarkSlateGray")
(vertical-scroll-bars . nil)
(menu-bar-lines . 0)
(tool-bar-lines . 0)
(alpha . nil)
(font . "-unknown-DejaVu Sans Mono-bold-normal-normal-*-14-*-*-*-m-0-iso10646-1")
(cursor-color . "red")
(minibuffer . nil)
))
(setq minibuffer-frame-alist
`((top . -40)
(left . 1)
(vertical-scroll-bars . nil)
(width . ,(frame-width))
(height . 1)
(menu-bar-lines . 0)
(tool-bar-lines . 0)
(name . "Emacs minibuffer")
(background-color . "DarkGoldenrod")
(foreground-color . "Black")
))
(setq minibuffer-prompt-properties '(read-only t face ((:foreground "ForestGreen"))))
(setq minibuffer-auto-raise t) ; This is evil.
(setq eldoc-in-minibuffer-own-frame-p t)
(add-hook 'window-setup-hook #'(lambda ()
(other-window 1 t)
(select-frame-set-input-focus (last-nonminibuffer-frame))))
(add-hook 'minibuffer-exit-hook #'(lambda ()
(select-frame-set-input-focus (last-nonminibuffer-frame))))
;; Push the mouse out of the way.
(mouse-avoidance-mode 'banish)
;; Don't-fucking-split-this-windows-horizontally
(setq split-width-threshold nil)
;; Enable recursive buffers
(require 'mb-depth)
(setq enable-recursive-minibuffers t)
(minibuffer-depth-indicate-mode 1)
(setq completion-cycle-threshold t)
;; Helm
(require 'init-helm)
(helm-mode 1)
(require 'helm-descbinds)
(helm-descbinds-install) ; C-h b, C-x C-h
(fset 'yes-or-no-p 'y-or-n-p)
(require 'tv-utils)
;; Eldoc
(require 'eldoc-eval)
(eldoc-in-minibuffer-mode 1)
(add-hook 'emacs-lisp-mode-hook 'turn-on-eldoc-mode)
(add-hook 'lisp-interaction-mode-hook 'turn-on-eldoc-mode)
(with-current-buffer "*scratch*" (lisp-interaction-mode))
(add-hook 'ielm-mode-hook 'turn-on-eldoc-mode)
(add-hook 'eshell-mode-hook 'turn-on-eldoc-mode)
;;; minimal-emacs.el ends here