Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* 'master' of https://github.com/bbatsov/prelude:
  Disable the annoying bell ring
  Fix non dotted pair element issue
  Update the copyright years
  Replace prelude-goto-symbol with imenu-anywhere
  Update copyright
  Update cider-mode's hook
  Remove duplicated line
  Don't invoke set-fontset-font if it is void
  • Loading branch information
Caleb Epstein committed Mar 7, 2016
2 parents 30398e8 + 3053164 commit 174f5ad
Show file tree
Hide file tree
Showing 42 changed files with 54 additions and 89 deletions.
45 changes: 1 addition & 44 deletions core/prelude-core.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; prelude-core.el --- Emacs Prelude: Core Prelude functions.
;;
;; Copyright © 2011-2015 Bozhidar Batsov
;; Copyright © 2011-2016 Bozhidar Batsov
;;
;; Author: Bozhidar Batsov <[email protected]>
;; URL: https://github.com/bbatsov/prelude
Expand Down Expand Up @@ -499,48 +499,5 @@ With a prefix argument ARG, find the `user-init-file' instead."
(interactive "P")
(sp-wrap-with-pair ,s)))

;; needed for prelude-goto-symbol
(require 'imenu)

(defun prelude-goto-symbol (&optional symbol-list)
"Refresh imenu and jump to a place in the buffer using Ido."
(interactive)
(cond
((not symbol-list)
(let (name-and-pos symbol-names position)
(while (progn
(imenu--cleanup)
(setq imenu--index-alist nil)
(prelude-goto-symbol (imenu--make-index-alist))
(setq selected-symbol
(completing-read "Symbol? " (reverse symbol-names)))
(string= (car imenu--rescan-item) selected-symbol)))
(unless (and (boundp 'mark-active) mark-active)
(push-mark nil t nil))
(setq position (cdr (assoc selected-symbol name-and-pos)))
(cond
((overlayp position)
(goto-char (overlay-start position)))
(t
(goto-char position)))
(recenter)))
((listp symbol-list)
(dolist (symbol symbol-list)
(let (name position)
(cond
((and (listp symbol) (imenu--subalist-p symbol))
(prelude-goto-symbol symbol))
((listp symbol)
(setq name (car symbol))
(setq position (cdr symbol)))
((stringp symbol)
(setq name symbol)
(setq position
(get-text-property 1 'org-imenu-marker symbol))))
(unless (or (null position) (null name)
(string= (car imenu--rescan-item) name))
(add-to-list 'symbol-names (substring-no-properties name))
(add-to-list 'name-and-pos (cons (substring-no-properties name) position))))))))

(provide 'prelude-core)
;;; prelude-core.el ends here
2 changes: 1 addition & 1 deletion core/prelude-custom.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; prelude-custom.el --- Emacs Prelude: Prelude's customizable variables.
;;
;; Copyright © 2011-2015 Bozhidar Batsov
;; Copyright © 2011-2016 Bozhidar Batsov
;;
;; Author: Bozhidar Batsov <[email protected]>
;; URL: https://github.com/bbatsov/prelude
Expand Down
5 changes: 3 additions & 2 deletions core/prelude-editor.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; prelude-editor.el --- Emacs Prelude: enhanced core editing experience.
;;
;; Copyright © 2011-2015 Bozhidar Batsov
;; Copyright © 2011-2016 Bozhidar Batsov
;;
;; Author: Bozhidar Batsov <[email protected]>
;; URL: https://github.com/bbatsov/prelude
Expand Down Expand Up @@ -183,6 +183,8 @@ The body of the advice is in BODY."
"Set buffer major mode according to `auto-mode-alist'."
(let* ((name (buffer-name buffer))
(mode (assoc-default name auto-mode-alist 'string-match)))
(when (and mode (consp mode))
(setq mode (car mode)))
(with-current-buffer buffer (if mode (funcall mode)))))

;; highlight the current line
Expand Down Expand Up @@ -262,7 +264,6 @@ The body of the advice is in BODY."
(require 'avy)
(setq avy-background t)
(setq avy-style 'at-full)
(setq avy-style 'at-full)

;; anzu-mode enhances isearch & query-replace by showing total matches and current match position
(require 'anzu)
Expand Down
2 changes: 1 addition & 1 deletion core/prelude-global-keybindings.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; prelude-global-keybindings.el --- Emacs Prelude: some useful keybindings.
;;
;; Copyright © 2011-2015 Bozhidar Batsov
;; Copyright © 2011-2016 Bozhidar Batsov
;;
;; Author: Bozhidar Batsov <[email protected]>
;; URL: https://github.com/bbatsov/prelude
Expand Down
5 changes: 3 additions & 2 deletions core/prelude-mode.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; prelude-mode.el --- Emacs Prelude: minor mode
;;
;; Copyright © 2011-2015 Bozhidar Batsov
;; Copyright © 2011-2016 Bozhidar Batsov
;;
;; Author: Bozhidar Batsov <[email protected]>
;; URL: https://github.com/bbatsov/prelude
Expand Down Expand Up @@ -32,6 +32,7 @@

;;; Code:
(require 'easymenu)
(require 'imenu-anywhere)

(defvar prelude-mode-map
(let ((map (make-sparse-keymap)))
Expand Down Expand Up @@ -63,7 +64,7 @@
(define-key map (kbd "C-c TAB") 'prelude-indent-rigidly-and-copy-to-clipboard)
(define-key map (kbd "C-c I") 'prelude-find-user-init-file)
(define-key map (kbd "C-c S") 'prelude-find-shell-init-file)
(define-key map (kbd "C-c i") 'prelude-goto-symbol)
(define-key map (kbd "C-c i") 'imenu-anywhere)
;; extra prefix for projectile
(define-key map (kbd "s-p") 'projectile-command-map)
;; make some use of the Super key
Expand Down
6 changes: 4 additions & 2 deletions core/prelude-osx.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; prelude-osx.el --- Emacs Prelude: OSX specific settings.
;;
;; Copyright © 2011-2015 Bozhidar Batsov
;; Copyright © 2011-2016 Bozhidar Batsov
;;
;; Author: Bozhidar Batsov <[email protected]>
;; URL: https://github.com/bbatsov/prelude
Expand Down Expand Up @@ -67,7 +67,9 @@ Windows external keyboard from time to time."
(menu-bar-mode +1)

;; Enable emoji, and stop the UI from freezing when trying to display them.
(set-fontset-font t 'unicode "Apple Color Emoji" nil 'prepend)
(if (fboundp 'set-fontset-font)
(set-fontset-font t 'unicode "Apple Color Emoji" nil 'prepend))


(provide 'prelude-osx)
;;; prelude-osx.el ends here
3 changes: 2 additions & 1 deletion core/prelude-packages.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; prelude-packages.el --- Emacs Prelude: default package selection.
;;
;; Copyright © 2011-2015 Bozhidar Batsov
;; Copyright © 2011-2016 Bozhidar Batsov
;;
;; Author: Bozhidar Batsov <[email protected]>
;; URL: https://github.com/bbatsov/prelude
Expand Down Expand Up @@ -62,6 +62,7 @@
god-mode
grizzl
guru-mode
imenu-anywhere
ov
projectile
magit
Expand Down
5 changes: 4 additions & 1 deletion core/prelude-ui.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; prelude-ui.el --- Emacs Prelude: UI optimizations and tweaks.
;;
;; Copyright © 2011-2015 Bozhidar Batsov
;; Copyright © 2011-2016 Bozhidar Batsov
;;
;; Author: Bozhidar Batsov <[email protected]>
;; URL: https://github.com/bbatsov/prelude
Expand Down Expand Up @@ -44,6 +44,9 @@
;; the blinking cursor is nothing, but an annoyance
(blink-cursor-mode -1)

;; disable the annoying bell ring
(setq ring-bell-function 'ignore)

;; disable startup screen
(setq inhibit-startup-screen t)

Expand Down
2 changes: 1 addition & 1 deletion init.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; init.el --- Prelude's configuration entry point.
;;
;; Copyright (c) 2011 Bozhidar Batsov
;; Copyright (c) 2011-2016 Bozhidar Batsov
;;
;; Author: Bozhidar Batsov <[email protected]>
;; URL: http://batsov.com/prelude
Expand Down
2 changes: 1 addition & 1 deletion modules/prelude-c.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; prelude-c.el --- Emacs Prelude: cc-mode configuration.
;;
;; Copyright © 2011-2015 Bozhidar Batsov
;; Copyright © 2011-2016 Bozhidar Batsov
;;
;; Author: Bozhidar Batsov <[email protected]>
;; URL: https://github.com/bbatsov/prelude
Expand Down
4 changes: 2 additions & 2 deletions modules/prelude-clojure.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; prelude-clojure.el --- Emacs Prelude: Clojure programming configuration.
;;
;; Copyright © 2011-2015 Bozhidar Batsov
;; Copyright © 2011-2016 Bozhidar Batsov
;;
;; Author: Bozhidar Batsov <[email protected]>
;; URL: http://batsov.com/prelude
Expand Down Expand Up @@ -50,7 +50,7 @@
'(progn
(setq nrepl-log-messages t)

(add-hook 'cider-mode-hook 'cider-turn-on-eldoc-mode)
(add-hook 'cider-mode-hook 'eldoc-mode)

(defun prelude-cider-repl-mode-defaults ()
(subword-mode +1)
Expand Down
2 changes: 1 addition & 1 deletion modules/prelude-coffee.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; prelude-coffee.el --- Emacs Prelude: CoffeeScript programming support.
;;
;; Copyright © 2011-2015 Bozhidar Batsov
;; Copyright © 2011-2016 Bozhidar Batsov
;;
;; Author: Bozhidar Batsov <[email protected]>
;; URL: https://github.com/bbatsov/prelude
Expand Down
2 changes: 1 addition & 1 deletion modules/prelude-common-lisp.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; prelude-common-lisp.el --- Emacs Prelude: lisp-mode and SLIME config.
;;
;; Copyright © 2011-2015 Bozhidar Batsov
;; Copyright © 2011-2016 Bozhidar Batsov
;;
;; Author: Bozhidar Batsov <[email protected]>
;; URL: https://github.com/bbatsov/prelude
Expand Down
2 changes: 1 addition & 1 deletion modules/prelude-company.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; prelude-company.el --- company-mode setup
;;
;; Copyright © 2011-2015 Bozhidar Batsov
;; Copyright © 2011-2016 Bozhidar Batsov
;;
;; Author: Bozhidar Batsov <[email protected]>
;; URL: https://github.com/bbatsov/prelude
Expand Down
2 changes: 1 addition & 1 deletion modules/prelude-css.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; prelude-css.el --- Emacs Prelude: css support
;;
;; Copyright © 2011-2015 Bozhidar Batsov
;; Copyright © 2011-2016 Bozhidar Batsov
;;
;; Author: Bozhidar Batsov <[email protected]>
;; URL: http://www.batsov.com/emacs-prelude
Expand Down
2 changes: 1 addition & 1 deletion modules/prelude-elixir.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; prelude-elixir.el --- Emacs Prelude: Elixir programming support.
;;
;; Copyright © 2014-2015 Samuel Tonini
;; Copyright © 2014-2016 Samuel Tonini
;;
;; Author: Samuel Tonini <[email protected]>
;; Version: 1.0.0
Expand Down
2 changes: 1 addition & 1 deletion modules/prelude-emacs-lisp.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; prelude-emacs-lisp.el --- Emacs Prelude: Nice config for Elisp programming.
;;
;; Copyright © 2011-2015 Bozhidar Batsov
;; Copyright © 2011-2016 Bozhidar Batsov
;;
;; Author: Bozhidar Batsov <[email protected]>
;; URL: https://github.com/bbatsov/prelude
Expand Down
2 changes: 1 addition & 1 deletion modules/prelude-erc.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; prelude-erc.el --- Emacs Prelude: ERC mode configuration.
;;
;; Copyright © 2011-2015 Bozhidar Batsov
;; Copyright © 2011-2016 Bozhidar Batsov
;;
;; Author: Bozhidar Batsov <[email protected]>
;; URL: https://github.com/bbatsov/prelude
Expand Down
2 changes: 1 addition & 1 deletion modules/prelude-erlang.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; prelude-erlang.el --- Emacs Prelude: Erlang programming support.
;;
;; Copyright © 2011-2015 Gleb Peregud
;; Copyright © 2011-2016 Gleb Peregud
;;
;; Author: Gleb Peregud <[email protected]>
;; Version: 1.0.0
Expand Down
2 changes: 1 addition & 1 deletion modules/prelude-evil.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; prelude-evil.el --- Emacs Prelude: evil-mode configuration.
;;
;; Copyright © 2011-2015 Bozhidar Batsov
;; Copyright © 2011-2016 Bozhidar Batsov
;;
;; Author: Bozhidar Batsov <[email protected]>
;; URL: http://batsov.com/prelude
Expand Down
2 changes: 1 addition & 1 deletion modules/prelude-haskell.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; prelude-haskell.el --- Emacs Prelude: Nice config for Haskell programming.
;;
;; Copyright © 2011-2015 Bozhidar Batsov
;; Copyright © 2011-2016 Bozhidar Batsov
;;
;; Author: Bozhidar Batsov <[email protected]>
;; URL: https://github.com/bbatsov/prelude
Expand Down
2 changes: 1 addition & 1 deletion modules/prelude-helm-everywhere.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; prelude-helm-everywhere.el --- Enable Helm everywhere
;;
;; Copyright © 2014-2015 Tu, Do Hoang
;; Copyright © 2014-2016 Tu, Do Hoang
;;
;; Author: Tu, Do Hoang ([email protected])
;; URL: https://github.com/bbatsov/prelude
Expand Down
2 changes: 1 addition & 1 deletion modules/prelude-helm.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; prelude-helm.el --- Helm setup
;;
;; Copyright © 2011-2015 Bozhidar Batsov
;; Copyright © 2011-2016 Bozhidar Batsov
;;
;; Author: Bozhidar Batsov <[email protected]>
;; URL: https://github.com/bbatsov/prelude
Expand Down
2 changes: 1 addition & 1 deletion modules/prelude-ido.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; prelude-ido.el --- Ido setup
;;
;; Copyright © 2011-2015 Bozhidar Batsov
;; Copyright © 2011-2016 Bozhidar Batsov
;;
;; Author: Bozhidar Batsov <[email protected]>
;; URL: https://github.com/bbatsov/prelude
Expand Down
2 changes: 1 addition & 1 deletion modules/prelude-js.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; prelude-js.el --- Emacs Prelude: js-mode configuration.
;;
;; Copyright © 2011-2015 Bozhidar Batsov
;; Copyright © 2011-2016 Bozhidar Batsov
;;
;; Author: Bozhidar Batsov <[email protected]>
;; URL: https://github.com/bbatsov/prelude
Expand Down
2 changes: 1 addition & 1 deletion modules/prelude-key-chord.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; prelude-key-chord.el --- Key chord setup
;;
;; Copyright © 2011-2015 Bozhidar Batsov
;; Copyright © 2011-2016 Bozhidar Batsov
;;
;; Author: Bozhidar Batsov <[email protected]>
;; URL: https://github.com/bbatsov/prelude
Expand Down
2 changes: 1 addition & 1 deletion modules/prelude-latex.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; prelude-latex.el --- Emacs Prelude: Sane setup for LaTeX writers.
;;
;; Copyright © 2011-2015 Bozhidar Batsov
;; Copyright © 2011-2016 Bozhidar Batsov
;;
;; Author: Bozhidar Batsov <[email protected]>
;; URL: https://github.com/bbatsov/prelude
Expand Down
2 changes: 1 addition & 1 deletion modules/prelude-lisp.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; prelude-lisp.el --- Emacs Prelude: Configuration common to all lisp modes.
;;
;; Copyright © 2011-2015 Bozhidar Batsov
;; Copyright © 2011-2016 Bozhidar Batsov
;;
;; Author: Bozhidar Batsov <[email protected]>
;; URL: https://github.com/bbatsov/prelude
Expand Down
2 changes: 1 addition & 1 deletion modules/prelude-mediawiki.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; prelude-mediawiki.el --- Emacs Prelude: mediawiki editing config
;;
;; Copyright © 2011-2015 Bozhidar Batsov
;; Copyright © 2011-2016 Bozhidar Batsov
;;
;; Author: Bozhidar Batsov <[email protected]>
;; URL: https://github.com/bbatsov/prelude
Expand Down
2 changes: 1 addition & 1 deletion modules/prelude-ocaml.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; prelude-ocaml.el --- Emacs Prelude: decent Perl coding settings.
;;
;; Copyright © 2014-2015 Geoff Shannon
;; Copyright © 2014-2016 Geoff Shannon
;;
;; Author: Geoff Shannon <[email protected]>
;; URL: https://github.com/bbatsov/prelude
Expand Down
2 changes: 1 addition & 1 deletion modules/prelude-org.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; prelude-org.el --- Emacs Prelude: org-mode configuration.
;;
;; Copyright © 2011-2015 Bozhidar Batsov
;; Copyright © 2011-2016 Bozhidar Batsov
;;
;; Author: Bozhidar Batsov <[email protected]>
;; URL: https://github.com/bbatsov/prelude
Expand Down
2 changes: 1 addition & 1 deletion modules/prelude-perl.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; prelude-perl.el --- Emacs Prelude: decent Perl coding settings.
;;
;; Copyright © 2011-2015 Bozhidar Batsov
;; Copyright © 2011-2016 Bozhidar Batsov
;;
;; Author: Bozhidar Batsov <[email protected]>
;; URL: https://github.com/bbatsov/prelude
Expand Down
2 changes: 1 addition & 1 deletion modules/prelude-programming.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; prelude-programming.el --- Emacs Prelude: prog-mode configuration
;;
;; Copyright © 2011-2015 Bozhidar Batsov
;; Copyright © 2011-2016 Bozhidar Batsov
;;
;; Author: Bozhidar Batsov <[email protected]>
;; URL: https://github.com/bbatsov/prelude
Expand Down
2 changes: 1 addition & 1 deletion modules/prelude-python.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; prelude-python.el --- Emacs Prelude: python.el configuration.
;;
;; Copyright © 2011-2015 Bozhidar Batsov
;; Copyright © 2011-2016 Bozhidar Batsov
;;
;; Author: Bozhidar Batsov <[email protected]>
;; URL: https://github.com/bbatsov/prelude
Expand Down
Loading

0 comments on commit 174f5ad

Please sign in to comment.