Skip to content

Commit 3cdb7f3

Browse files
author
Bozhidar Batsov
committed
[Fix #447] Extract ido config into a module
This should make it simpler to disable ido completely if you want to use an alternative library (like `icomplete` or `icicles` for instance).
1 parent d4a5224 commit 3cdb7f3

File tree

5 files changed

+72
-31
lines changed

5 files changed

+72
-31
lines changed

Diff for: .projectile

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
/elpa
2-
/savefile
2+
/savefile
3+
/.cask

Diff for: core/prelude-editor.el

-26
Original file line numberDiff line numberDiff line change
@@ -211,32 +211,6 @@ The body of the advice is in BODY."
211211
;; keep in mind known issues with zsh - see emacs wiki
212212
(setq tramp-default-method "ssh")
213213

214-
;; ido-mode
215-
(require 'ido)
216-
(require 'ido-ubiquitous)
217-
(require 'flx-ido)
218-
(setq ido-enable-prefix nil
219-
ido-enable-flex-matching t
220-
ido-create-new-buffer 'always
221-
ido-use-filename-at-point 'guess
222-
ido-max-prospects 10
223-
ido-save-directory-list-file (expand-file-name "ido.hist" prelude-savefile-dir)
224-
ido-default-file-method 'selected-window
225-
ido-auto-merge-work-directories-length -1)
226-
(ido-mode +1)
227-
(ido-ubiquitous-mode +1)
228-
;; smarter fuzzy matching for ido
229-
(flx-ido-mode +1)
230-
;; disable ido faces to see flx highlights
231-
(setq ido-use-faces nil)
232-
233-
;; smex, remember recently and most frequently used commands
234-
(require 'smex)
235-
(setq smex-save-file (expand-file-name ".smex-items" prelude-savefile-dir))
236-
(smex-initialize)
237-
(global-set-key (kbd "M-x") 'smex)
238-
(global-set-key (kbd "M-X") 'smex-major-mode-commands)
239-
240214
(set-default 'imenu-auto-rescan t)
241215

242216
;; flyspell-mode does spell-checking on the fly as you type

Diff for: core/prelude-packages.el

+3-3
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@
4343

4444
(defvar prelude-packages
4545
'(ace-jump-mode ack-and-a-half anzu dash diminish elisp-slime-nav
46-
epl expand-region flx-ido flycheck gist
46+
epl expand-region flycheck gist
4747
gitconfig-mode gitignore-mode grizzl
48-
guru-mode projectile ido-ubiquitous
48+
guru-mode projectile
4949
magit move-text rainbow-mode
50-
smartparens smex undo-tree
50+
smartparens undo-tree
5151
volatile-highlights zenburn-theme)
5252
"A list of packages to ensure are installed at launch.")
5353

Diff for: modules/prelude-ido.el

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
;;; prelude-ido.el --- Ido setup
2+
;;
3+
;; Copyright © 2011-2013 Bozhidar Batsov
4+
;;
5+
;; Author: Bozhidar Batsov <[email protected]>
6+
;; URL: https://github.com/bbatsov/prelude
7+
;; Version: 1.0.0
8+
;; Keywords: convenience
9+
10+
;; This file is not part of GNU Emacs.
11+
12+
;;; Commentary:
13+
14+
;; Ido-related config.
15+
16+
;;; License:
17+
18+
;; This program is free software; you can redistribute it and/or
19+
;; modify it under the terms of the GNU General Public License
20+
;; as published by the Free Software Foundation; either version 3
21+
;; of the License, or (at your option) any later version.
22+
;;
23+
;; This program is distributed in the hope that it will be useful,
24+
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
25+
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26+
;; GNU General Public License for more details.
27+
;;
28+
;; You should have received a copy of the GNU General Public License
29+
;; along with GNU Emacs; see the file COPYING. If not, write to the
30+
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
31+
;; Boston, MA 02110-1301, USA.
32+
33+
;;; Code:
34+
(prelude-require-package '(flx-ido ido-ubiquitous smex))
35+
36+
(require 'ido)
37+
(require 'ido-ubiquitous)
38+
(require 'flx-ido)
39+
40+
(setq ido-enable-prefix nil
41+
ido-enable-flex-matching t
42+
ido-create-new-buffer 'always
43+
ido-use-filename-at-point 'guess
44+
ido-max-prospects 10
45+
ido-save-directory-list-file (expand-file-name "ido.hist" prelude-savefile-dir)
46+
ido-default-file-method 'selected-window
47+
ido-auto-merge-work-directories-length -1)
48+
(ido-mode +1)
49+
(ido-ubiquitous-mode +1)
50+
51+
;;; smarter fuzzy matching for ido
52+
(flx-ido-mode +1)
53+
;; disable ido faces to see flx highlights
54+
(setq ido-use-faces nil)
55+
56+
;;; smex, remember recently and most frequently used commands
57+
(require 'smex)
58+
(setq smex-save-file (expand-file-name ".smex-items" prelude-savefile-dir))
59+
(smex-initialize)
60+
(global-set-key (kbd "M-x") 'smex)
61+
(global-set-key (kbd "M-X") 'smex-major-mode-commands)
62+
63+
(provide 'prelude-ido)
64+
;;; prelude-ido.el ends here

Diff for: sample/prelude-modules.el

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
;;; Uncomment the modules you'd like to use and restart Prelude afterwards
22

3+
(require 'prelude-ido)
4+
;; (require 'prelude-helm)
5+
36
(require 'prelude-c)
47
;; (require 'prelude-clojure)
58
;; (require 'prelude-coffee)
@@ -9,7 +12,6 @@
912
(require 'prelude-erc)
1013
;; (require 'prelude-erlang)
1114
;; (require 'prelude-haskell)
12-
;; (require 'prelude-helm)
1315
(require 'prelude-js)
1416
;; (require 'prelude-key-chord)
1517
;; (require 'prelude-latex)

0 commit comments

Comments
 (0)