Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* 'master' of https://github.com/bbatsov/prelude:
  [Fix bbatsov#902] Fix kill-region advice
  [Fix bbatsov#899] Make the kill-region advice play nice with rectangle-mark-mode
  Respect `delete-by-moving-to-trash`
  Add stylus-mode auto installation
  add json-mode auto installation
  Replace a couple of obsolete haskell-mode functions
  Use the current theme's faces for smart-mode-line
  Use ruby-mode for .cap files
  [Fix bbatsov#884] Adopt smart-mode-line
  Remove go-oracle-mode hook
  magit-blame-mode -> magit-blame
  magit-file-log -> magit-log-buffer-file
  isearch-occur is included in emacs core upstream
  Bind C-x M-g to magit-dispatch-popup
  Don't add COMMIT_EDITMSG to recentf-exclude
  Fix quotes in LaTeX
  use https when piping to sh for install
  • Loading branch information
Caleb Epstein committed Sep 24, 2015
2 parents 827b45a + 5b0c51d commit 00597ee
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 23 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ can skip the whole manual and just type in your favorite shell the
following command:

```bash
curl -L http://git.io/epre | sh
curl -L https://git.io/epre | sh
```

You can now power up your Emacs, sit back and enjoy Prelude,
Expand Down Expand Up @@ -278,6 +278,7 @@ Keybinding | Description
<kbd>F11</kbd> | Make the window full screen.
<kbd>F12</kbd> | Toggle the Emacs menu bar.
<kbd>C-x g</kbd> | Open Magit's status buffer.
<kbd>C-x M-g</kbd> | Open Magit's popup of popups.
<kbd>M-Z</kbd> | Zap up to char.
<kbd>C-=</kbd> | Run `expand-region` (incremental text selection).
<kbd>C-a</kbd> | Run `prelude-move-beginning-of-line`. Read [this](http://emacsredux.com/blog/2013/05/22/smarter-navigation-to-the-beginning-of-a-line/) for details.
Expand Down
2 changes: 1 addition & 1 deletion core/prelude-core.el
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ there's a region, all lines that region covers will be duplicated."
(if (vc-backend filename)
(vc-delete-file filename)
(when (y-or-n-p (format "Are you sure you want to delete %s? " filename))
(delete-file filename)
(delete-file filename delete-by-moving-to-trash)
(message "Deleted file %s" filename)
(kill-buffer))))))

Expand Down
5 changes: 2 additions & 3 deletions core/prelude-editor.el
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,6 @@
(mapcar 'file-truename (list prelude-savefile-dir package-user-dir)))))

(add-to-list 'recentf-exclude 'prelude-recentf-exclude-p)
;; ignore magit's commit message files
(add-to-list 'recentf-exclude "COMMIT_EDITMSG\\'")

(recentf-mode +1)

Expand Down Expand Up @@ -196,10 +194,11 @@ The body of the advice is in BODY."

;; note - this should be after volatile-highlights is required
;; add the ability to cut the current line, without marking it
(require 'rect)
(defadvice kill-region (before smart-cut activate compile)
"When called interactively with no active region, kill a single line instead."
(interactive
(if mark-active (list (region-beginning) (region-end))
(if mark-active (list (region-beginning) (region-end) rectangle-mark-mode)
(list (line-beginning-position)
(line-beginning-position 2)))))

Expand Down
8 changes: 2 additions & 6 deletions core/prelude-global-keybindings.el
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,7 @@
(global-set-key [remap kill-whole-line] 'prelude-kill-whole-line)

;; Activate occur easily inside isearch
(define-key isearch-mode-map (kbd "C-o")
(lambda () (interactive)
(let ((case-fold-search isearch-case-fold-search))
(occur (if isearch-regexp
isearch-string
(regexp-quote isearch-string))))))
(define-key isearch-mode-map (kbd "C-o") 'isearch-occur)

;; use hippie-expand instead of dabbrev
(global-set-key (kbd "M-/") 'hippie-expand)
Expand All @@ -109,6 +104,7 @@
(global-set-key (kbd "<f12>") 'menu-bar-mode)

(global-set-key (kbd "C-x g") 'magit-status)
(global-set-key (kbd "C-x M-g") 'magit-dispatch-popup)

(global-set-key (kbd "C-=") 'er/expand-region)

Expand Down
4 changes: 2 additions & 2 deletions core/prelude-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@
(define-key map (kbd "s-k") 'prelude-kill-whole-line)
(define-key map (kbd "s-m m") 'magit-status)
(define-key map (kbd "s-m l") 'magit-log)
(define-key map (kbd "s-m f") 'magit-file-log)
(define-key map (kbd "s-m b") 'magit-blame-mode)
(define-key map (kbd "s-m f") 'magit-log-buffer-file)
(define-key map (kbd "s-m b") 'magit-blame)
(define-key map (kbd "s-o") 'prelude-smart-open-line-above)

map)
Expand Down
3 changes: 3 additions & 0 deletions core/prelude-packages.el
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
magit
move-text
operate-on-number
smart-mode-line
smartparens
smartrep
undo-tree
Expand Down Expand Up @@ -142,6 +143,7 @@ PACKAGE is installed only if not already present. The file is opened in MODE."
("\\.groovy\\'" groovy-mode groovy-mode)
("\\.haml\\'" haml-mode haml-mode)
("\\.hs\\'" haskell-mode haskell-mode)
("\\.json\\'" json-mode json-mode)
("\\.kv\\'" kivy-mode kivy-mode)
("\\.latex\\'" auctex LaTeX-mode)
("\\.less\\'" less-css-mode less-css-mode)
Expand All @@ -161,6 +163,7 @@ PACKAGE is installed only if not already present. The file is opened in MODE."
("\\.scala\\'" scala-mode2 scala-mode)
("\\.scss\\'" scss-mode scss-mode)
("\\.slim\\'" slim-mode slim-mode)
("\\.styl\\'" stylus-mode stylus-mode)
("\\.swift\\'" swift-mode swift-mode)
("\\.textile\\'" textile-mode textile-mode)
("\\.thrift\\'" thrift thrift-mode)
Expand Down
6 changes: 6 additions & 0 deletions core/prelude-ui.el
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,11 @@
(when prelude-theme
(load-theme prelude-theme t))

(require 'smart-mode-line)
(setq sml/no-confirm-load-theme t)
;; delegate theming to the currently active theme
(setq sml/theme nil)
(add-hook 'after-init-hook #'sml/setup)

(provide 'prelude-ui)
;;; prelude-ui.el ends here
9 changes: 1 addition & 8 deletions modules/prelude-go.el
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,7 @@
(setq prelude-go-mode-hook 'prelude-go-mode-defaults)

(add-hook 'go-mode-hook (lambda ()
(run-hooks 'prelude-go-mode-hook)))

;; Enable go-oracle-mode if available
(let ((oracle (executable-find "oracle")))
(when oracle
(setq go-oracle-command oracle)
(autoload 'go-oracle-mode "oracle")
(add-hook 'go-mode-hook 'go-oracle-mode)))))
(run-hooks 'prelude-go-mode-hook)))))

(provide 'prelude-go)
;;; prelude-go.el ends here
4 changes: 2 additions & 2 deletions modules/prelude-haskell.el
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
'(progn
(defun prelude-haskell-mode-defaults ()
(subword-mode +1)
(turn-on-haskell-doc-mode)
(turn-on-haskell-indentation)
(haskell-doc-mode)
(haskell-indentation-mode)
(interactive-haskell-mode +1))

(setq prelude-haskell-mode-hook 'prelude-haskell-mode-defaults)
Expand Down
2 changes: 2 additions & 0 deletions modules/prelude-latex.el
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@
;; AUCTeX configuration
(setq TeX-auto-save t)
(setq TeX-parse-self t)
(setq TeX-close-quote "")
(setq TeX-open-quote "")

(setq-default TeX-master nil)

Expand Down
1 change: 1 addition & 0 deletions modules/prelude-ruby.el
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
(add-to-list 'auto-mode-alist '("Gemfile\\'" . ruby-mode))
(add-to-list 'auto-mode-alist '("Guardfile\\'" . ruby-mode))
(add-to-list 'auto-mode-alist '("Capfile\\'" . ruby-mode))
(add-to-list 'auto-mode-alist '("\\.cap\\'" . ruby-mode))
(add-to-list 'auto-mode-alist '("\\.thor\\'" . ruby-mode))
(add-to-list 'auto-mode-alist '("\\.rabl\\'" . ruby-mode))
(add-to-list 'auto-mode-alist '("Thorfile\\'" . ruby-mode))
Expand Down

0 comments on commit 00597ee

Please sign in to comment.