Merge branch 'master' of github.com:bbatsov/prelude

This commit is contained in:
Bozhidar Batsov 2017-12-29 19:22:24 +02:00
commit a661862c38
13 changed files with 135 additions and 35 deletions

1
.gitignore vendored
View file

@ -23,3 +23,4 @@ tramp
/var/pcache
.emacs.desktop
.emacs.desktop.lock
network-security.data

View file

@ -139,6 +139,8 @@ wget --no-check-certificate https://github.com/bbatsov/prelude/raw/master/utils/
### Manual
Make sure you do not have any `~/.emacs` file present.
```bash
git clone git://github.com/bbatsov/prelude.git path/to/local/repo
ln -s path/to/local/repo ~/.emacs.d
@ -257,7 +259,7 @@ alias vi='emacsclient -t'
The last two aliases are helpful if you're used to editing files from
the command line using `vi(m)`.
Also you can open a file with cursor on choosen line:
You can also open a file with the cursor positioned directly on a specific line:
```bash
emacsclient somefile:1234
@ -695,10 +697,12 @@ and send me a pull request. :-)
## Support
Support is available via the Prelude Google Group <emacs-prelude@googlegroups.com>.
There's also a Freenode channel you can visit - `#prelude-emacs`.
Support is available via several channels:
* Prelude's Google Group <emacs-prelude@googlegroups.com>
* Prelude's Freenode channel (`#prelude-emacs`)
* [Gitter](https://gitter.im/bbatsov/prelude)
.
## Contributors
Here's a [list](https://github.com/bbatsov/prelude/contributors) of all the people who have contributed to the

View file

@ -68,7 +68,7 @@ PROMPT sets the `read-string prompt."
(if _after (ov-reset _ov))))
(defun prelude-annotate-todo ()
"Put fringe marker on TODO: lines in the curent buffer."
"Put fringe marker on TODO: lines in the current buffer."
(interactive)
(ov-set (format "[[:space:]]*%s+[[:space:]]*TODO:" comment-start)
'before-string

View file

@ -98,11 +98,6 @@ Only modes that don't derive from `prog-mode' should be listed here."
:type 'symbol
:group 'prelude)
(defcustom prelude-shell (getenv "SHELL")
"The default shell to run with `crux-visit-term-buffer'"
:type 'string
:group 'prelude)
(provide 'prelude-custom)
;;; prelude-custom.el ends here

View file

@ -75,7 +75,7 @@
(define-key 'help-command (kbd "C-i") 'info-display-manual)
;; replace zap-to-char functionaity with the more powerful zop-to-char
;; replace zap-to-char functionality with the more powerful zop-to-char
(global-set-key (kbd "M-z") 'zop-up-to-char)
(global-set-key (kbd "M-Z") 'zop-to-char)

View file

@ -125,7 +125,7 @@ by Prelude.")
(message "Missing modules file %s" prelude-modules-file)
(message "You can get started by copying the bundled example file from sample/prelude-modules.el"))
;; config changes made through the customize UI will be store here
;; config changes made through the customize UI will be stored here
(setq custom-file (expand-file-name "custom.el" prelude-personal-dir))
;; load the personal settings (this includes `custom-file')
@ -135,6 +135,12 @@ by Prelude.")
(message "Prelude is ready to do thy bidding, Master %s!" current-user)
;; Patch security vulnerability in Emacs versions older than 25.3
(when (version< emacs-version "25.3")
(eval-after-load "enriched"
'(defun enriched-decode-display-prop (start end &optional param)
(list start end))))
(prelude-eval-after-init
;; greet the use with some useful tip
(run-at-time 5 nil 'prelude-tip-of-the-day))

View file

@ -2,7 +2,9 @@
## Customizing Server list
If you want to join a list of servers on `M-x start-irc`, other than the default list, please redefine the variable `my-fav-irc` as follows in your personal config
If you want to join a list of servers on `M-x start-irc`, other than
the default list, please redefine the variable `my-fav-irc` as follows
in your personal config
``` emacs-lisp
(setq my-fav-irc '("irc.freenode.net"
@ -13,7 +15,9 @@ If you want to join a list of servers on `M-x start-irc`, other than the default
## Customizing Last Quit Message
If you want to customize your IRC Last Quit Message from *Asta la vista* to something more funkier, please redefine `bye-irc-message` as follows
If you want to customize your IRC Last Quit Message from *Asta la
vista* to something more funkier, please redefine `bye-irc-message` as
follows
``` emacs-lisp
(setq bye-erc-message "adios")
@ -21,11 +25,26 @@ If you want to customize your IRC Last Quit Message from *Asta la vista* to some
## Reading NickServ passwords from auth-source plugin
If you want to automatically authenticate while logging into IRC servers set the `erc-prompt-for-password` to nil as follows
If you want to automatically authenticate while logging into IRC
servers set the `erc-prompt-for-password` to nil as follows
``` emacs-lisp
(setq erc-prompt-for-password nil)
```
Now you can set password in plaintext in .authinfo file in the netRC format or you it encrypted in .authinfo.gpg file after setting up gpg in emacs
Now you can set password in plaintext in .authinfo file in the netRC
format or you it encrypted in .authinfo.gpg file after setting up gpg
in emacs
## Opening all ERC buffers in a new perspective
Many a time when we start IRC with the `start-irc` command, all the
channels open in our existing workspace, which can be annoying to
some; especially to those who like to organize their buffers into
separate groups (perspectives). To avoid this scenario, it is better
to group all the ERC buffers into one perspective called `IRC` when
`start-irc` is called. To enable this set the `prelude-new-irc-persp`
variable to true as follows
``` emacs-lisp
(setq prelude-new-irc-persp t)
```

View file

@ -62,7 +62,7 @@
(setq slime-default-lisp 'sbcl))
;; Add fancy slime contribs
(setq slime-contribs '(slime-fancy))
(setq slime-contribs '(slime-fancy slime-cl-indent))
(add-hook 'lisp-mode-hook (lambda () (run-hooks 'prelude-lisp-coding-hook)))
;; rainbow-delimeters messes up colors in slime-repl, and doesn't seem to work
@ -78,8 +78,6 @@
slime-enable-evaluate-in-emacs t
slime-autodoc-use-multiline-p t
slime-auto-start 'always)
(define-key slime-mode-map (kbd "TAB") 'slime-indent-and-complete-symbol)
(define-key slime-mode-map (kbd "C-c C-s") 'slime-selector)))
(provide 'prelude-common-lisp)

View file

@ -119,6 +119,12 @@ that can occur between two notifications. The default is
(defvar bye-irc-message "Asta la vista"
"Message string to be sent while quitting IRC.")
(defcustom prelude-new-irc-persp nil
"True (t) means start IRC in new perspective."
:type 'boolean
:require 'prelude-erc
:group 'prelude)
(defun connect-to-erc (server)
"Connects securely to IRC SERVER over TLS at port 6697."
(erc-tls :server server
@ -129,6 +135,8 @@ that can occur between two notifications. The default is
"Connect to IRC?"
(interactive)
(when (y-or-n-p "Do you want to start IRC? ")
(when prelude-new-irc-persp
(persp-switch "IRC"))
(mapcar 'connect-to-erc my-fav-irc)))
(defun filter-server-buffers ()
@ -140,10 +148,14 @@ that can occur between two notifications. The default is
(defun stop-irc ()
"Disconnects from all irc servers."
(interactive)
(when prelude-new-irc-persp
(persp-switch "IRC"))
(dolist (buffer (filter-server-buffers))
(message "Server buffer: %s" (buffer-name buffer))
(with-current-buffer buffer
(erc-quit-server bye-irc-message))))
(erc-quit-server bye-irc-message)))
(when prelude-new-irc-persp
(persp-kill "IRC")))
(provide 'prelude-erc)

View file

@ -31,10 +31,10 @@
;; Boston, MA 02110-1301, USA.
;;; Code:
(prelude-require-packages '(flx-ido ido-ubiquitous smex))
(prelude-require-packages '(flx-ido ido-completing-read+ smex))
(require 'ido)
(require 'ido-ubiquitous)
(require 'ido-completing-read+)
(require 'flx-ido)
(setq ido-enable-prefix nil

66
modules/prelude-rust.el Normal file
View file

@ -0,0 +1,66 @@
;;; prelude-rust.el --- Emacs Prelude: Rust programming support.
;;
;; Authors: Doug MacEachern, Manoel Vilela
;; Version: 1.0.1
;; Keywords: convenience rust
;; This file is not part of GNU Emacs.
;;; Commentary:
;; Prelude configuration for Rust
;;; License:
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License
;; as published by the Free Software Foundation; either version 3
;; of the License, or (at your option) any later version.
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;;; Code:
(require 'prelude-programming)
;; You may need installing the following packages on your system:
;; * rustc (Rust Compiler)
;; * cargo (Rust Package Manager)
;; * racer (Rust Completion Tool)
;; * rustfmt (Rust Tool for formatting code)
(prelude-require-packages '(rust-mode
racer
flycheck-rust
cargo))
(setq rust-format-on-save t)
(eval-after-load 'rust-mode
'(progn
(add-hook 'rust-mode-hook 'racer-mode)
(add-hook 'racer-mode-hook 'eldoc-mode)
(add-hook 'rust-mode-hook 'cargo-minor-mode)
(add-hook 'rust-mode-hook 'flycheck-rust-setup)
(add-hook 'flycheck-mode-hook 'flycheck-rust-setup)
(defun prelude-rust-mode-defaults ()
(local-set-key (kbd "C-c C-d") 'racer-describe)
;; CamelCase aware editing operations
(subword-mode +1))
(setq prelude-rust-mode-hook 'prelude-rust-mode-defaults)
(add-hook 'rust-mode-hook (lambda ()
(run-hooks 'prelude-rust-mode-hook)))))
(provide 'prelude-rust)
;;; prelude-rust.el ends here

View file

@ -29,6 +29,7 @@
(require 'prelude-perl)
;; (require 'prelude-python)
;; (require 'prelude-ruby)
;; (require 'prelude-rust)
;; (require 'prelude-scala)
(require 'prelude-scheme)
(require 'prelude-shell)

View file

@ -73,8 +73,6 @@
(helm-core . "melpa-stable")
(helm-descbinds . "melpa-stable")
(helm-projectile . "melpa-stable")
(ido-completing-read+ . "melpa-stable")
(ido-ubiquitous . "melpa-stable")
(imenu-anywhere . "melpa-stable")
(inf-ruby . "melpa-stable")
(js2-mode . "melpa-stable")