From aafe4156ed90f62ade3f55b24b46cf2b49704e3e Mon Sep 17 00:00:00 2001 From: Eric Zhang Date: Tue, 19 Apr 2016 00:19:06 +0800 Subject: [PATCH 01/43] Fix some auto-pairing issues when editing erb file with web-mode (#805) --- modules/prelude-web.el | 3 --- 1 file changed, 3 deletions(-) diff --git a/modules/prelude-web.el b/modules/prelude-web.el index 41b7ea8f6e..d2d5fc0c4e 100644 --- a/modules/prelude-web.el +++ b/modules/prelude-web.el @@ -57,9 +57,6 @@ (just-one-space) (save-excursion (insert " "))) "SPC" "=" "#"))) - (sp-local-pair "<% " " %>" :insert "C-c %") - (sp-local-pair "<%= " " %>" :insert "C-c =") - (sp-local-pair "<%# " " %>" :insert "C-c #") (sp-local-tag "%" "<% " " %>") (sp-local-tag "=" "<%= " " %>") (sp-local-tag "#" "<%# " " %>")) From 7628e0bdb573203521c8970ae500b279b43ad175 Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Thu, 28 Apr 2016 11:39:40 -0700 Subject: [PATCH 02/43] [Fix #989] Use eldoc-mode instead of haskell-doc-mode --- modules/prelude-haskell.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/prelude-haskell.el b/modules/prelude-haskell.el index 01da6aa838..a4022a8bb8 100644 --- a/modules/prelude-haskell.el +++ b/modules/prelude-haskell.el @@ -39,7 +39,7 @@ '(progn (defun prelude-haskell-mode-defaults () (subword-mode +1) - (haskell-doc-mode) + (eldoc-mode +1) (haskell-indentation-mode) (interactive-haskell-mode +1)) From 567907abe6d2173b76520d999d3aa88ead05b86e Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Thu, 28 Apr 2016 11:40:28 -0700 Subject: [PATCH 03/43] Improve code style a bit --- modules/prelude-haskell.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/prelude-haskell.el b/modules/prelude-haskell.el index a4022a8bb8..cd30dc16b6 100644 --- a/modules/prelude-haskell.el +++ b/modules/prelude-haskell.el @@ -40,7 +40,7 @@ (defun prelude-haskell-mode-defaults () (subword-mode +1) (eldoc-mode +1) - (haskell-indentation-mode) + (haskell-indentation-mode +1) (interactive-haskell-mode +1)) (setq prelude-haskell-mode-hook 'prelude-haskell-mode-defaults) From 3fef1527745c6c483b8b0384a543a587da362ff4 Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Thu, 28 Apr 2016 16:12:53 -0700 Subject: [PATCH 04/43] [#956] Mention that Emacs 24.4 is required Some packages are now depending on Emacs 24.4 (e.g. magit). --- README.md | 2 +- init.el | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2bb6ccf0db..32dfcc3d95 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ library to the mix. The final product offers an easy to use Emacs configuration for Emacs newcomers and lots of additional power for Emacs power users. -Prelude is compatible **ONLY with GNU Emacs 24.x**. In general you're +Prelude is compatible **ONLY with GNU Emacs 24.4+**. In general you're advised to always run Prelude with the latest Emacs - currently **24.5**. diff --git a/init.el b/init.el index b019411bfa..b1f223f200 100644 --- a/init.el +++ b/init.el @@ -38,8 +38,8 @@ (message "Prelude is powering up... Be patient, Master %s!" current-user) -(when (version< emacs-version "24.1") - (error "Prelude requires at least GNU Emacs 24.1, but you're running %s" emacs-version)) +(when (version< emacs-version "24.4") + (error "Prelude requires at least GNU Emacs 24.4, but you're running %s" emacs-version)) ;; Always load newest byte code (setq load-prefer-newer t) From ec56b3584d18efc174b28cd307e9d2bf5c39071b Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Thu, 28 Apr 2016 18:42:14 -0700 Subject: [PATCH 05/43] Replace some of the bundled code with the crux package --- core/prelude-core.el | 325 --------------------------------------- core/prelude-mode.el | 47 +++--- core/prelude-packages.el | 1 + 3 files changed, 25 insertions(+), 348 deletions(-) diff --git a/core/prelude-core.el b/core/prelude-core.el index ac7b46e3c4..4fe5fe3ad6 100644 --- a/core/prelude-core.el +++ b/core/prelude-core.el @@ -36,40 +36,11 @@ (require 'dash) (require 'ov) -(defun prelude-open-with (arg) - "Open visited file in default external program. -When in dired mode, open file under the cursor. - -With a prefix ARG always prompt for command to use." - (interactive "P") - (let* ((current-file-name - (if (eq major-mode 'dired-mode) - (dired-get-file-for-visit) - buffer-file-name)) - (open (pcase system-type - (`darwin "open") - ((or `gnu `gnu/linux `gnu/kfreebsd) "xdg-open"))) - (program (if (or arg (not open)) - (read-shell-command "Open current file with: ") - open))) - (start-process "prelude-open-with-process" nil program current-file-name))) - (defun prelude-buffer-mode (buffer-or-name) "Retrieve the `major-mode' of BUFFER-OR-NAME." (with-current-buffer buffer-or-name major-mode)) -(defvar prelude-term-buffer-name "ansi" - "The default `ansi-term' name used by `prelude-visit-term-buffer'. -This variable can be set via .dir-locals.el to provide multi-term support.") - -(defun prelude-visit-term-buffer () - "Create or visit a terminal buffer." - (interactive) - (prelude-start-or-switch-to (lambda () - (ansi-term prelude-shell (concat prelude-term-buffer-name "-term"))) - (format "*%s-term*" prelude-term-buffer-name))) - (defun prelude-search (query-url prompt) "Open the search url constructed with the QUERY-URL. PROMPT sets the `read-string prompt." @@ -92,82 +63,6 @@ PROMPT sets the `read-string prompt." (prelude-install-search-engine "github" "https://github.com/search?q=" "Search GitHub: ") (prelude-install-search-engine "duckduckgo" "https://duckduckgo.com/?t=lm&q=" "Search DuckDuckGo: ") -(defun prelude-indent-rigidly-and-copy-to-clipboard (begin end arg) - "Indent region between BEGIN and END by ARG columns and copy to clipboard." - (interactive "r\nP") - (let ((arg (or arg 4)) - (buffer (current-buffer))) - (with-temp-buffer - (insert-buffer-substring-no-properties buffer begin end) - (indent-rigidly (point-min) (point-max) arg) - (clipboard-kill-ring-save (point-min) (point-max))))) - -(defun prelude-smart-open-line-above () - "Insert an empty line above the current line. -Position the cursor at it's beginning, according to the current mode." - (interactive) - (move-beginning-of-line nil) - (newline-and-indent) - (forward-line -1) - (indent-according-to-mode)) - -(defun prelude-smart-open-line (arg) - "Insert an empty line after the current line. -Position the cursor at its beginning, according to the current mode. - -With a prefix ARG open line above the current line." - (interactive "P") - (if arg - (prelude-smart-open-line-above) - (progn - (move-end-of-line nil) - (newline-and-indent)))) - -(defun prelude-top-join-line () - "Join the current line with the line beneath it." - (interactive) - (delete-indentation 1)) - -(defun prelude-kill-whole-line (&optional arg) - "A simple wrapper around command `kill-whole-line' that respects indentation. -Passes ARG to command `kill-whole-line' when provided." - (interactive "p") - (kill-whole-line arg) - (back-to-indentation)) - -(defun prelude-move-beginning-of-line (arg) - "Move point back to indentation of beginning of line. - -Move point to the first non-whitespace character on this line. -If point is already there, move to the beginning of the line. -Effectively toggle between the first non-whitespace character and -the beginning of the line. - -If ARG is not nil or 1, move forward ARG - 1 lines first. If -point reaches the beginning or end of the buffer, stop there." - (interactive "^p") - (setq arg (or arg 1)) - - ;; Move lines first - (when (/= arg 1) - (let ((line-move-visual nil)) - (forward-line (1- arg)))) - - (let ((orig-point (point))) - (back-to-indentation) - (when (= orig-point (point)) - (move-beginning-of-line 1)))) - -(global-set-key [remap move-beginning-of-line] - 'prelude-move-beginning-of-line) - -(defun prelude-indent-defun () - "Indent the current defun." - (interactive) - (save-excursion - (mark-defun) - (indent-region (region-beginning) (region-end)))) - (defun prelude-todo-ov-evaporate (_ov _after _beg _end &optional _length) (let ((inhibit-modification-hooks t)) (if _after (ov-reset _ov)))) @@ -181,214 +76,11 @@ point reaches the beginning or end of the buffer, stop there." 'display '(left-fringe right-triangle)) 'modification-hooks '(prelude-todo-ov-evaporate))) -(defun prelude-get-positions-of-line-or-region () - "Return positions (beg . end) of the current line -or region." - (let (beg end) - (if (and mark-active (> (point) (mark))) - (exchange-point-and-mark)) - (setq beg (line-beginning-position)) - (if mark-active - (exchange-point-and-mark)) - (setq end (line-end-position)) - (cons beg end))) - -(defun prelude-duplicate-current-line-or-region (arg) - "Duplicates the current line or region ARG times. -If there's no region, the current line will be duplicated. However, if -there's a region, all lines that region covers will be duplicated." - (interactive "p") - (pcase-let* ((origin (point)) - (`(,beg . ,end) (prelude-get-positions-of-line-or-region)) - (region (buffer-substring-no-properties beg end))) - (-dotimes arg - (lambda (n) - (goto-char end) - (newline) - (insert region) - (setq end (point)))) - (goto-char (+ origin (* (length region) arg) arg)))) - -(defun prelude-duplicate-and-comment-current-line-or-region (arg) - "Duplicates and comments the current line or region ARG times. -If there's no region, the current line will be duplicated. However, if -there's a region, all lines that region covers will be duplicated." - (interactive "p") - (pcase-let* ((origin (point)) - (`(,beg . ,end) (prelude-get-positions-of-line-or-region)) - (region (buffer-substring-no-properties beg end))) - (comment-or-uncomment-region beg end) - (setq end (line-end-position)) - (-dotimes arg - (lambda (n) - (goto-char end) - (newline) - (insert region) - (setq end (point)))) - (goto-char (+ origin (* (length region) arg) arg)))) - -(defun prelude-rename-buffer-and-file () - "Rename current buffer and if the buffer is visiting a file, rename it too." - (interactive) - (let ((filename (buffer-file-name))) - (if (not (and filename (file-exists-p filename))) - (rename-buffer (read-from-minibuffer "New name: " (buffer-name))) - (let ((new-name (read-file-name "New name: " filename))) - (cond - ((vc-backend filename) (vc-rename-file filename new-name)) - (t - (rename-file filename new-name t) - (set-visited-file-name new-name t t))))))) - -(defun prelude-delete-file-and-buffer () - "Kill the current buffer and deletes the file it is visiting." - (interactive) - (let ((filename (buffer-file-name))) - (when filename - (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-by-moving-to-trash) - (message "Deleted file %s" filename) - (kill-buffer)))))) - -(defun prelude-view-url () - "Open a new buffer containing the contents of URL." - (interactive) - (let* ((default (thing-at-point-url-at-point)) - (url (read-from-minibuffer "URL: " default))) - (switch-to-buffer (url-retrieve-synchronously url)) - (rename-buffer url t) - (goto-char (point-min)) - (re-search-forward "^$") - (delete-region (point-min) (point)) - (delete-blank-lines) - (set-auto-mode))) - -(defun prelude-cleanup-buffer-or-region () - "Cleanup a region if selected, otherwise the whole buffer." - (interactive) - (call-interactively 'untabify) - (unless (member major-mode prelude-indent-sensitive-modes) - (call-interactively 'indent-region)) - (whitespace-cleanup)) - -(defun prelude-eval-and-replace () - "Replace the preceding sexp with its value." - (interactive) - (let ((value (eval (preceding-sexp)))) - (backward-kill-sexp) - (insert (format "%s" value)))) - (defun prelude-recompile-init () "Byte-compile all your dotfiles again." (interactive) (byte-recompile-directory prelude-dir 0)) -(defun prelude-file-owner-uid (filename) - "Return the UID of the FILENAME as an integer. - -See `file-attributes' for more info." - (nth 2 (file-attributes filename 'integer))) - -(defun prelude-file-owned-by-user-p (filename) - "Return t if file FILENAME is owned by the currently logged in user." - (equal (prelude-file-owner-uid filename) - (user-uid))) - -(defun prelude-find-alternate-file-as-root (filename) - "Wraps `find-alternate-file' with opening a file as root." - (find-alternate-file (concat "/sudo:root@localhost:" filename))) - -(require 'ido) -(defun prelude-sudo-edit (&optional arg) - "Edit currently visited file as root. - -With a prefix ARG prompt for a file to visit. -Will also prompt for a file to visit if current -buffer is not visiting a file." - (interactive "P") - (if (or arg (not buffer-file-name)) - (find-file (concat "/sudo:root@localhost:" - (ido-read-file-name "Find file(as root): "))) - (prelude-find-alternate-file-as-root buffer-file-name))) - -(defun prelude-reopen-as-root () - "Find file as root if necessary." - (unless (or (tramp-tramp-file-p buffer-file-name) - (equal major-mode 'dired-mode) - (not (file-exists-p (file-name-directory buffer-file-name))) - (file-writable-p buffer-file-name) - (prelude-file-owned-by-user-p buffer-file-name)) - (prelude-find-alternate-file-as-root buffer-file-name))) -(add-hook 'find-file-hook 'prelude-reopen-as-root) - -(defun prelude-start-or-switch-to (function buffer-name) - "Invoke FUNCTION if there is no buffer with BUFFER-NAME. -Otherwise switch to the buffer named BUFFER-NAME. Don't clobber -the current buffer." - (if (not (get-buffer buffer-name)) - (progn - (split-window-sensibly (selected-window)) - (other-window 1) - (funcall function)) - (switch-to-buffer-other-window buffer-name))) - -(defun prelude-insert-date () - "Insert a timestamp according to locale's date and time format." - (interactive) - (insert (format-time-string "%c" (current-time)))) - -(defun prelude-recentf-ido-find-file () - "Find a recent file using ido." - (interactive) - (let ((file (ido-completing-read "Choose recent file: " - (-map 'abbreviate-file-name recentf-list) - nil t))) - (when file - (find-file file)))) - -(defun prelude-swap-windows () - "If you have 2 windows, it swaps them." - (interactive) - (if (/= (count-windows) 2) - (message "You need exactly 2 windows to do this.") - (let* ((w1 (car (window-list))) - (w2 (cadr (window-list))) - (b1 (window-buffer w1)) - (b2 (window-buffer w2)) - (s1 (window-start w1)) - (s2 (window-start w2))) - (set-window-buffer w1 b2) - (set-window-buffer w2 b1) - (set-window-start w1 s2) - (set-window-start w2 s1))) - (other-window 1)) - -(defun prelude-switch-to-previous-buffer () - "Switch to previously open buffer. -Repeated invocations toggle between the two most recently open buffers." - (interactive) - (switch-to-buffer (other-buffer (current-buffer) 1))) - -(defun prelude-kill-other-buffers () - "Kill all buffers but the current one. -Doesn't mess with special buffers." - (interactive) - (when (y-or-n-p "Are you sure you want to kill all buffers but the current one? ") - (-each - (->> (buffer-list) - (-filter #'buffer-file-name) - (--remove (eql (current-buffer) it))) - #'kill-buffer))) - -(defun prelude-create-scratch-buffer () - "Create a new scratch buffer." - (interactive) - (let ((buf (generate-new-buffer "*scratch*"))) - (switch-to-buffer buf) - (funcall initial-major-mode))) - (defvar prelude-tips '("Press to open a file with external program." "Press to navigate a project's files with ido." @@ -476,23 +168,6 @@ This follows freedesktop standards, should work in X servers." '(2 "_NET_WM_STATE_FULLSCREEN" 0)) (error "Only X server is supported"))) -(defun prelude-find-user-init-file (&optional arg) - "Edit the `prelude-user-init-file', in another window. -With a prefix argument ARG, find the `user-init-file' instead." - (interactive "P") - (if arg (find-file-other-window user-init-file) - (find-file-other-window prelude-user-init-file))) - -(defun prelude-find-shell-init-file () - "Edit the shell init file in another window." - (interactive) - (let* ((shell (car (reverse (s-split "/" (getenv "SHELL"))))) - (shell-init-file (cond - ((s-equals? "zsh" shell) ".zshrc") - ((s-equals? "bash" shell) ".bashrc") - (t (error "Unknown shell"))))) - (find-file-other-window (expand-file-name shell-init-file (getenv "HOME"))))) - (defun prelude-wrap-with (s) "Create a wrapper function for smartparens using S." `(lambda (&optional arg) diff --git a/core/prelude-mode.el b/core/prelude-mode.el index b134c16b71..b291e70861 100644 --- a/core/prelude-mode.el +++ b/core/prelude-mode.el @@ -33,50 +33,51 @@ ;;; Code: (require 'easymenu) (require 'imenu-anywhere) +(require 'crux) (defvar prelude-mode-map (let ((map (make-sparse-keymap))) - (define-key map (kbd "C-c o") 'prelude-open-with) + (define-key map (kbd "C-c o") 'crux-open-with) (define-key map (kbd "C-c g") 'prelude-google) (define-key map (kbd "C-c G") 'prelude-github) (define-key map (kbd "C-c y") 'prelude-youtube) (define-key map (kbd "C-c U") 'prelude-duckduckgo) ;; mimic popular IDEs binding, note that it doesn't work in a terminal session - (define-key map [(shift return)] 'prelude-smart-open-line) - (define-key map (kbd "M-o") 'prelude-smart-open-line) - (define-key map [(control shift return)] 'prelude-smart-open-line-above) + (define-key map [(shift return)] 'crux-smart-open-line) + (define-key map (kbd "M-o") 'crux-smart-open-line) + (define-key map [(control shift return)] 'crux-smart-open-line-above) (define-key map [(control shift up)] 'move-text-up) (define-key map [(control shift down)] 'move-text-down) (define-key map [(meta shift up)] 'move-text-up) (define-key map [(meta shift down)] 'move-text-down) - (define-key map (kbd "C-c n") 'prelude-cleanup-buffer-or-region) - (define-key map (kbd "C-c f") 'prelude-recentf-ido-find-file) - (define-key map (kbd "C-M-z") 'prelude-indent-defun) - (define-key map (kbd "C-c u") 'prelude-view-url) - (define-key map (kbd "C-c e") 'prelude-eval-and-replace) - (define-key map (kbd "C-c s") 'prelude-swap-windows) - (define-key map (kbd "C-c D") 'prelude-delete-file-and-buffer) - (define-key map (kbd "C-c d") 'prelude-duplicate-current-line-or-region) - (define-key map (kbd "C-c M-d") 'prelude-duplicate-and-comment-current-line-or-region) - (define-key map (kbd "C-c r") 'prelude-rename-buffer-and-file) - (define-key map (kbd "C-c t") 'prelude-visit-term-buffer) - (define-key map (kbd "C-c k") 'prelude-kill-other-buffers) - (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 n") 'crux-cleanup-buffer-or-region) + (define-key map (kbd "C-c f") 'crux-recentf-ido-find-file) + (define-key map (kbd "C-M-z") 'crux-indent-defun) + (define-key map (kbd "C-c u") 'crux-view-url) + (define-key map (kbd "C-c e") 'crux-eval-and-replace) + (define-key map (kbd "C-c s") 'crux-swap-windows) + (define-key map (kbd "C-c D") 'crux-delete-file-and-buffer) + (define-key map (kbd "C-c d") 'crux-duplicate-current-line-or-region) + (define-key map (kbd "C-c M-d") 'crux-duplicate-and-comment-current-line-or-region) + (define-key map (kbd "C-c r") 'crux-rename-buffer-and-file) + (define-key map (kbd "C-c t") 'crux-visit-term-buffer) + (define-key map (kbd "C-c k") 'crux-kill-other-buffers) + (define-key map (kbd "C-c TAB") 'crux-indent-rigidly-and-copy-to-clipboard) + (define-key map (kbd "C-c I") 'crux-find-user-init-file) + (define-key map (kbd "C-c S") 'crux-find-shell-init-file) (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 (define-key map (kbd "s-g") 'god-local-mode) - (define-key map (kbd "s-r") 'prelude-recentf-ido-find-file) - (define-key map (kbd "s-j") 'prelude-top-join-line) - (define-key map (kbd "s-k") 'prelude-kill-whole-line) + (define-key map (kbd "s-r") 'crux-recentf-ido-find-file) + (define-key map (kbd "s-j") 'crux-top-join-line) + (define-key map (kbd "s-k") 'crux-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-log-buffer-file) (define-key map (kbd "s-m b") 'magit-blame) - (define-key map (kbd "s-o") 'prelude-smart-open-line-above) + (define-key map (kbd "s-o") 'crux-smart-open-line-above) map) "Keymap for Prelude mode.") diff --git a/core/prelude-packages.el b/core/prelude-packages.el index e523a81db3..86bfe8e918 100644 --- a/core/prelude-packages.el +++ b/core/prelude-packages.el @@ -47,6 +47,7 @@ anzu beacon browse-kill-ring + crux dash discover-my-major diff-hl From 2b85871805526261b6c3600a4fd103538ebee96f Mon Sep 17 00:00:00 2001 From: Initial Zuo Date: Sat, 30 Apr 2016 01:39:05 +0800 Subject: [PATCH 06/43] Fix C-a behavior (#991) --- core/prelude-mode.el | 1 + 1 file changed, 1 insertion(+) diff --git a/core/prelude-mode.el b/core/prelude-mode.el index b291e70861..8320332244 100644 --- a/core/prelude-mode.el +++ b/core/prelude-mode.el @@ -43,6 +43,7 @@ (define-key map (kbd "C-c y") 'prelude-youtube) (define-key map (kbd "C-c U") 'prelude-duckduckgo) ;; mimic popular IDEs binding, note that it doesn't work in a terminal session + (define-key map (kbd "C-a") 'crux-move-beginning-of-line) (define-key map [(shift return)] 'crux-smart-open-line) (define-key map (kbd "M-o") 'crux-smart-open-line) (define-key map [(control shift return)] 'crux-smart-open-line-above) From 0447086cc26f8fc651a3101360e4525a3adafb01 Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Fri, 29 Apr 2016 18:01:59 -0700 Subject: [PATCH 07/43] Auto-install cask-mode when needed --- core/prelude-packages.el | 1 + 1 file changed, 1 insertion(+) diff --git a/core/prelude-packages.el b/core/prelude-packages.el index 86bfe8e918..5c9b170e99 100644 --- a/core/prelude-packages.el +++ b/core/prelude-packages.el @@ -136,6 +136,7 @@ PACKAGE is installed only if not already present. The file is opened in MODE." ("\\.coffee\\'" coffee-mode coffee-mode) ("\\.css\\'" css-mode css-mode) ("\\.csv\\'" csv-mode csv-mode) + ("Cask" cask-mode cask-mode) ("\\.d\\'" d-mode d-mode) ("\\.dart\\'" dart-mode dart-mode) ("\\.elm\\'" elm-mode elm-mode) From 61dfff4b9ee00cba9324a74ef376d7debaaad9e7 Mon Sep 17 00:00:00 2001 From: wscisme Date: Sun, 1 May 2016 19:01:42 -0700 Subject: [PATCH 08/43] Change function name to crux (#992) --- modules/prelude-key-chord.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/prelude-key-chord.el b/modules/prelude-key-chord.el index 395ef603ec..6083411fde 100644 --- a/modules/prelude-key-chord.el +++ b/modules/prelude-key-chord.el @@ -38,7 +38,7 @@ (key-chord-define-global "jj" 'avy-goto-word-1) (key-chord-define-global "jl" 'avy-goto-line) (key-chord-define-global "jk" 'avy-goto-char) -(key-chord-define-global "JJ" 'prelude-switch-to-previous-buffer) +(key-chord-define-global "JJ" 'crux-switch-to-previous-buffer) (key-chord-define-global "uu" 'undo-tree-visualize) (key-chord-define-global "xx" 'execute-extended-command) (key-chord-define-global "yy" 'browse-kill-ring) From 32354c79c5ecebabf8d9ca5efa7c10f2cae4be4a Mon Sep 17 00:00:00 2001 From: Huang Bin Date: Tue, 3 May 2016 11:14:31 +0800 Subject: [PATCH 09/43] Fix the crux-like changes (#995) --- README.md | 4 ++-- core/prelude-custom.el | 4 ++-- core/prelude-global-keybindings.el | 5 ++--- core/prelude-mode.el | 22 +++++++++++----------- modules/prelude-programming.el | 2 +- 5 files changed, 18 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 32dfcc3d95..ecc7aa4151 100644 --- a/README.md +++ b/README.md @@ -265,7 +265,7 @@ Keybinding | Description C-+ | Increase font size(`text-scale-increase`). C-- | Decrease font size(`text-scale-decrease`). C-x O | Go back to previous window (the inverse of `other-window` (`C-x o`)). -C-^ | Join two lines into one(`prelude-top-join-line`). +C-^ | Join two lines into one(`crux-top-join-line`). C-x p | Start `proced` (manage processes from Emacs; works only in Linux). C-x m | Start `eshell`. C-x M-m | Start your default shell. @@ -432,7 +432,7 @@ Keybinding | Description jj | Jump to the beginning of a word(`avy-goto-word-1`) jk | Jump to a character(`avy-goto-char`) jl | Jump to the beginning of a line(`avy-goto-line`) -JJ | Jump back to previous buffer(`prelude-switch-to-previous-buffer`) +JJ | Jump back to previous buffer(`crux-switch-to-previous-buffer`) uu | View edits as a tree(`undo-tree-visualize`) xx | Executed extended command(`execute-extended-command`) yy | Browse the kill ring(`browse-kill-ring`) diff --git a/core/prelude-custom.el b/core/prelude-custom.el index 07b7c02e22..74759cfda8 100644 --- a/core/prelude-custom.el +++ b/core/prelude-custom.el @@ -70,7 +70,7 @@ Will only occur if `prelude-whitespace' is also enabled." Prelude recommends you only put personal customizations in the personal folder. This variable allows you to specify a specific folder as the one that should be visited when running -`prelude-find-user-init-file'. This can be easily set to the desired buffer +`crux-find-user-init-file'. This can be easily set to the desired buffer in lisp by putting `(setq prelude-user-init-file load-file-name)' in the desired elisp file." :type 'string @@ -99,7 +99,7 @@ Only modes that don't derive from `prog-mode' should be listed here." :group 'prelude) (defcustom prelude-shell (getenv "SHELL") - "The default shell to run with `prelude-visit-term-buffer'" + "The default shell to run with `crux-visit-term-buffer'" :type 'string :group 'prelude) diff --git a/core/prelude-global-keybindings.el b/core/prelude-global-keybindings.el index b17295f8af..c50c5d4c83 100644 --- a/core/prelude-global-keybindings.el +++ b/core/prelude-global-keybindings.el @@ -45,8 +45,7 @@ (other-window -1))) ;; back one ;; Indentation help -(global-set-key (kbd "C-^") 'prelude-top-join-line) - +(global-set-key (kbd "C-^") 'crux-top-join-line) ;; Start proced in a similar manner to dired (unless (eq system-type 'darwin) (global-set-key (kbd "C-x p") 'proced)) @@ -86,7 +85,7 @@ (kill-line 0) (indent-according-to-mode))) -(global-set-key [remap kill-whole-line] 'prelude-kill-whole-line) +(global-set-key [remap kill-whole-line] 'crux-kill-whole-line) ;; Activate occur easily inside isearch (define-key isearch-mode-map (kbd "C-o") 'isearch-occur) diff --git a/core/prelude-mode.el b/core/prelude-mode.el index 8320332244..6f5ca8a0e0 100644 --- a/core/prelude-mode.el +++ b/core/prelude-mode.el @@ -88,31 +88,31 @@ (easy-menu-add-item nil '("Tools") '("Prelude" ("Files" - ["Open with..." prelude-open-with] - ["Delete file and buffer" prelude-delete-file-and-buffer] - ["Rename buffer and file" prelude-rename-buffer-and-file]) + ["Open with..." crux-open-with] + ["Delete file and buffer" crux-delete-file-and-buffer] + ["Rename buffer and file" crux-rename-buffer-and-file]) ("Buffers" - ["Clean up buffer or region" prelude-cleanup-buffer-or-region] - ["Kill other buffers" prelude-kill-other-buffers]) + ["Clean up buffer or region" crux-cleanup-buffer-or-region] + ["Kill other buffers" crux-kill-other-buffers]) ("Editing" ["Insert empty line" prelude-insert-empty-line] ["Move line up" prelude-move-line-up] ["Move line down" prelude-move-line-down] ["Duplicate line or region" prelude-duplicate-current-line-or-region] - ["Indent rigidly and copy to clipboard" prelude-indent-rigidly-and-copy-to-clipboard] - ["Insert date" prelude-insert-date] - ["Eval and replace" prelude-eval-and-replace] + ["Indent rigidly and copy to clipboard" crux-indent-rigidly-and-copy-to-clipboard] + ["Insert date" crux-insert-date] + ["Eval and replace" crux-eval-and-replace] ) ("Windows" - ["Swap windows" prelude-swap-windows]) + ["Swap windows" crux-swap-windows]) ("General" - ["Visit term buffer" prelude-visit-term-buffer] + ["Visit term buffer" crux-visit-term-buffer] ["Search in Google" prelude-google] - ["View URL" prelude-view-url])) + ["View URL" crux-view-url])) "Search Files (Grep)...") (easy-menu-add-item nil '("Tools") '("--") "Search Files (Grep)...")) diff --git a/modules/prelude-programming.el b/modules/prelude-programming.el index 9af55a7170..dd16ac0fca 100644 --- a/modules/prelude-programming.el +++ b/modules/prelude-programming.el @@ -60,7 +60,7 @@ This functions should be added to the hooks of major modes for programming." ;; smart curly braces (sp-pair "{" nil :post-handlers '(((lambda (&rest _ignored) - (prelude-smart-open-line-above)) "RET"))) + (crux-smart-open-line-above)) "RET"))) ;; enlist a more liberal guru (setq guru-warn-only t) From 233d29c4d70bc27a4e68c234cca7d653da06966d Mon Sep 17 00:00:00 2001 From: Huang Bin Date: Fri, 6 May 2016 15:05:49 +0800 Subject: [PATCH 10/43] Update README.md (#996) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ecc7aa4151..83f66c6d09 100644 --- a/README.md +++ b/README.md @@ -281,7 +281,7 @@ Keybinding | Description C-x M-g | Open Magit's popup of popups. M-Z | Zap up to char. C-= | Run `expand-region` (incremental text selection). -C-a | 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. +C-a | Run `crux-move-beginning-of-line`. Read [this](http://emacsredux.com/blog/2013/05/22/smarter-navigation-to-the-beginning-of-a-line/) for details. #### Prelude Mode From 0e223d22b6a6aa61b2116db67d06c3c4b4b8a2ba Mon Sep 17 00:00:00 2001 From: Aaron Hu Date: Tue, 24 May 2016 22:56:33 -0400 Subject: [PATCH 11/43] Replace `scala-mode2` with the `ensime` package (#1001) `scala-mode2` is no longer available on MELPA and it's not maintained anymore. * the `ensime` package depends on `scala-mode` and `sbt-mode`. --- modules/prelude-scala.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/prelude-scala.el b/modules/prelude-scala.el index a2d15ad7d1..53c5794f1f 100644 --- a/modules/prelude-scala.el +++ b/modules/prelude-scala.el @@ -33,10 +33,10 @@ ;;; Code: (require 'prelude-programming) -(prelude-require-packages '(scala-mode2)) +(prelude-require-packages '(ensime)) (defun prelude-scala-mode-defaults () - (subword-mode +1)) + (ensime-mode)) (setq prelude-scala-mode-hook 'prelude-scala-mode-defaults) From 5e60495735202adeefb5721f6a8447781fa36869 Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Sat, 28 May 2016 14:30:42 +0300 Subject: [PATCH 12/43] Update the donation options --- README.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 83f66c6d09..8fe9c2336a 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,4 @@ [![License GPL 3][badge-license]](http://www.gnu.org/licenses/gpl-3.0.txt) -[![Gratipay](http://img.shields.io/gratipay/bbatsov.svg)](https://gratipay.com/bbatsov/) Emacs Prelude ============= @@ -17,6 +16,12 @@ Prelude is compatible **ONLY with GNU Emacs 24.4+**. In general you're advised to always run Prelude with the latest Emacs - currently **24.5**. +You can support the development of Prelude via +[Salt](https://salt.bountysource.com/teams/prelude) and +[Gratipay](https://www.gratipay.com/prelude). + +[![Support via Gratipay](https://cdn.rawgit.com/gratipay/gratipay-badge/2.1.3/dist/gratipay.png)](https://gratipay.com/prelude) + **Table of Contents** - [Fast Forward](#fast-forward) @@ -689,10 +694,6 @@ development of Emacs Prelude. Bug reports and suggestions for improvements are always welcome. GitHub pull requests are even better! :-) -I'm also accepting financial contributions via [gittip](https://www.gittip.com/bbatsov). - -[![Support via Gittip](https://rawgithub.com/twolfson/gittip-badge/0.2.0/dist/gittip.png)](https://www.gittip.com/bbatsov) - Cheers,
[Bozhidar](https://twitter.com/bbatsov) From 01c3d5153f415033af2cf331ef3e4f76d35a75c8 Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Wed, 1 Jun 2016 23:47:03 +0300 Subject: [PATCH 13/43] Remove a mention of scala-mode2 --- core/prelude-packages.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/prelude-packages.el b/core/prelude-packages.el index 5c9b170e99..75d29145d8 100644 --- a/core/prelude-packages.el +++ b/core/prelude-packages.el @@ -166,7 +166,7 @@ PACKAGE is installed only if not already present. The file is opened in MODE." ("PKGBUILD\\'" pkgbuild-mode pkgbuild-mode) ("\\.rs\\'" rust-mode rust-mode) ("\\.sass\\'" sass-mode sass-mode) - ("\\.scala\\'" scala-mode2 scala-mode) + ("\\.scala\\'" scala-mode scala-mode) ("\\.scss\\'" scss-mode scss-mode) ("\\.slim\\'" slim-mode slim-mode) ("\\.styl\\'" stylus-mode stylus-mode) From 8c4b939fa599aea11c18e2abdffa4ad4cc4359c6 Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Wed, 1 Jun 2016 23:47:21 +0300 Subject: [PATCH 14/43] Make the scala-mode dependency explicit This commit also adds back the auto-enabling of subword-mode together with scala-mode. --- modules/prelude-scala.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/prelude-scala.el b/modules/prelude-scala.el index 53c5794f1f..3150ac8671 100644 --- a/modules/prelude-scala.el +++ b/modules/prelude-scala.el @@ -33,10 +33,11 @@ ;;; Code: (require 'prelude-programming) -(prelude-require-packages '(ensime)) +(prelude-require-packages '(scala-mode ensime)) (defun prelude-scala-mode-defaults () - (ensime-mode)) + (subword-mode +1) + (ensime-mode +1)) (setq prelude-scala-mode-hook 'prelude-scala-mode-defaults) From f27de9705ca92a790693ff7354ff5e19af94feb9 Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Thu, 2 Jun 2016 16:43:18 +0300 Subject: [PATCH 15/43] Add a gratipay badge --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 8fe9c2336a..7aedc6ff65 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ [![License GPL 3][badge-license]](http://www.gnu.org/licenses/gpl-3.0.txt) +[![Gratipay Team](https://img.shields.io/gratipay/team/prelude.svg?maxAge=2592000)](https://gratipay.com/prelude/) Emacs Prelude ============= From 74b2b766180793409df77d65b8bf0115f3df45f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Novak=20Bo=C5=A1kov?= Date: Sat, 4 Jun 2016 00:27:45 +0200 Subject: [PATCH 16/43] Fix a broken link in README.md (#1007) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7aedc6ff65..0aa36dd029 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ You can support the development of Prelude via - [Problems with flyspell-mode](#problems-with-flyspell-mode) - [Ugly colors in the terminal Emacs version](#ugly-colors-in-the-terminal-emacs-version) - [MELPA error on initial startup](#melpa-error-on-initial-startup) - - [Warnings on arrow navigation in editor buffers](#warnings-on-navigation-in-editor-buffers) + - [Warnings on arrow navigation in editor buffers](#warnings-on-arrow-navigation-in-editor-buffers) - [Customized C-a behavior](#customized-c-a-behavior) - [Poor ido matching performance on large datasets](#poor-ido-matching-performance-on-large-datasets) - [Windows compatibility](#windows-compatibility) From f5f4d773f301dd80d0551055f6e3efdb0b5390b2 Mon Sep 17 00:00:00 2001 From: Gregg Hernandez Date: Sat, 23 Jul 2016 10:17:40 -0600 Subject: [PATCH 17/43] Add kotlin-mode to the auto-install list (#1016) --- core/prelude-packages.el | 1 + 1 file changed, 1 insertion(+) diff --git a/core/prelude-packages.el b/core/prelude-packages.el index 75d29145d8..484beae4a2 100644 --- a/core/prelude-packages.el +++ b/core/prelude-packages.el @@ -150,6 +150,7 @@ PACKAGE is installed only if not already present. The file is opened in MODE." ("\\.haml\\'" haml-mode haml-mode) ("\\.hs\\'" haskell-mode haskell-mode) ("\\.json\\'" json-mode json-mode) + ("\\.kt\\'" kotlin-mode kotlin-mode) ("\\.kv\\'" kivy-mode kivy-mode) ("\\.latex\\'" auctex LaTeX-mode) ("\\.less\\'" less-css-mode less-css-mode) From e8a0f5e8334f97a8f3f96a8256ca7ff56e9327fa Mon Sep 17 00:00:00 2001 From: Gaelan D'costa Date: Thu, 22 Sep 2016 02:21:27 -0400 Subject: [PATCH 18/43] pretzo -> prezto (#1034) --- modules/prelude-shell.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/prelude-shell.el b/modules/prelude-shell.el index 1d00a3181b..8ab6823af4 100644 --- a/modules/prelude-shell.el +++ b/modules/prelude-shell.el @@ -34,17 +34,17 @@ (require 'sh-script) -;; recognize pretzo files as zsh scripts -(defvar prelude-pretzo-files '("zlogin" "zlogin" "zlogout" "zpretzorc" "zprofile" "zshenv" "zshrc")) +;; recognize prezto files as zsh scripts +(defvar prelude-prezto-files '("zlogin" "zlogin" "zlogout" "zpreztorc" "zprofile" "zshenv" "zshrc")) (mapc (lambda (file) (add-to-list 'auto-mode-alist `(,(format "\\%s\\'" file) . sh-mode))) - prelude-pretzo-files) + prelude-prezto-files) (add-hook 'sh-mode-hook (lambda () (if (and buffer-file-name - (member (file-name-nondirectory buffer-file-name) prelude-pretzo-files)) + (member (file-name-nondirectory buffer-file-name) prelude-prezto-files)) (sh-set-shell "zsh")))) (provide 'prelude-shell) From 7551ed6e33b1fced1c3cf81f66268dcaa76bb2cb Mon Sep 17 00:00:00 2001 From: Rahiel Kasim Date: Sun, 25 Sep 2016 06:58:06 +0200 Subject: [PATCH 19/43] Wrap kill-region with defadvice from crux (#1035) --- core/prelude-editor.el | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/core/prelude-editor.el b/core/prelude-editor.el index 7829e55959..a6fb141458 100644 --- a/core/prelude-editor.el +++ b/core/prelude-editor.el @@ -197,12 +197,7 @@ 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) rectangle-mark-mode) - (list (line-beginning-position) - (line-beginning-position 2))))) +(crux-with-region-or-line kill-region) ;; tramp, for sudo access (require 'tramp) From ccedc7728554504a96c8d6ab5b6af99712cc9539 Mon Sep 17 00:00:00 2001 From: ken-olstad Date: Sat, 24 Sep 2016 23:58:47 -0500 Subject: [PATCH 20/43] Add helm-occur-from-isearch to isearch-mode-map (#1030) --- modules/prelude-helm-everywhere.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/prelude-helm-everywhere.el b/modules/prelude-helm-everywhere.el index 0ae3db9c10..d3cf742cd7 100644 --- a/modules/prelude-helm-everywhere.el +++ b/modules/prelude-helm-everywhere.el @@ -50,6 +50,8 @@ (define-key minibuffer-local-map (kbd "C-c C-l") 'helm-minibuffer-history) +(define-key isearch-mode-map (kbd "C-o") 'helm-occur-from-isearch) + ;; shell history. (define-key shell-mode-map (kbd "C-c C-l") 'helm-comint-input-ring) From 086c389b1d7c7deec674120aec6a12163402656e Mon Sep 17 00:00:00 2001 From: Karl Erik Holter Date: Sun, 2 Oct 2016 07:19:01 +0200 Subject: [PATCH 21/43] Rename .emacs if it exists in the installer(#1037) If user has a $HOME/.emacs file, the prelude installer script will install just fine, but when starting emacs, nothing will take effect because emacs doesn't load .emacs.d/init.el if .emacs exists. Because this is confusing for new users, the installer should default to renaming this file to make emacs actually load prelude. --- utils/installer.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/utils/installer.sh b/utils/installer.sh index d5a351e07c..392ebd97e5 100755 --- a/utils/installer.sh +++ b/utils/installer.sh @@ -179,6 +179,13 @@ then printf "$YELLOW WARNING:$RESET Prelude depends on emacs $RED 24$RESET !\n" fi +if [ -f "$HOME/.emacs" ] +then + ## If $HOME/.emacs exists, emacs ignores prelude's init.el, so remove it + printf " Backing up the existing $HOME/.emacs to $HOME/.emacs.pre-prelude\n" + mv $HOME/.emacs $HOME/.emacs.pre-prelude +fi + if [ -d "$PRELUDE_INSTALL_DIR" ] || [ -f "$PRELUDE_INSTALL_DIR" ] then # Existing file/directory found -> backup From b05126e41ef0359f8cbe3ae7fae7902ffc6366de Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Mon, 3 Oct 2016 08:58:09 +0300 Subject: [PATCH 22/43] Update the README for Emacs 25 --- README.md | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 0aa36dd029..c579109983 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Emacs power users. Prelude is compatible **ONLY with GNU Emacs 24.4+**. In general you're advised to always run Prelude with the latest Emacs - currently -**24.5**. +**25.1**. You can support the development of Prelude via [Salt](https://salt.bountysource.com/teams/prelude) and @@ -26,7 +26,7 @@ You can support the development of Prelude via **Table of Contents** - [Fast Forward](#fast-forward) -- [Installing Emacs 24](#installing-emacs-24) +- [Installing Emacs](#installing-emacs) - [Installation](#installation) - [Automated](#automated) - [Via Curl](#via-curl) @@ -71,7 +71,7 @@ You can support the development of Prelude via ## Fast Forward Assuming you're using an Unix-like OS (`*BSD`, `GNU/Linux`, `OS X`, `Solaris`, -etc), you already have Emacs 24 installed, as well as `git` & `curl` you +etc), you already have Emacs 24.4+ installed, as well as `git` & `curl` you can skip the whole manual and just type in your favorite shell the following command: @@ -104,10 +104,12 @@ or back up your existing `.emacs.d` directory manually. Don't forget to adjust your `prelude-modules.el` file once the installation is done. By default most of the modules that ship with Prelude are not loaded. -## Installing Emacs 24 +## Installing Emacs -Obviously to use the Emacs Prelude you have to install Emacs 24 -first. Have a look at the [WikEmacs articles on installing Emacs](http://wikemacs.org/index.php/Installing_Emacs). +Obviously to use the Emacs Prelude you have to install Emacs +first. Have a look at +the +[WikEmacs articles on installing Emacs](http://wikemacs.org/index.php/Installing_Emacs). ## Installation @@ -477,17 +479,17 @@ You can, of course, install anything you wish manually as well. ### Color Themes -Emacs 24 ships with a new theming facility that effectively renders -the old color-theme package obsolete. Emacs 24 provides a dozen of +Emacs provides a dozen of built-in themes you can use out-of-the-box by invoking the `M-x load-theme` command. -[Zenburn](https://github.com/bbatsov/zenburn-emacs) is the default color theme in Prelude, but you can change it -at your discretion. Why Zenburn? I (and lots of hackers around the -world) find it pretty neat for some reason. Personally I find the -default theme pretty tiresome for the eyes, that's why I took that -"controversial" decision to replace it. You can, of course, easily go -back to the default (or select another theme entirely). +[Zenburn](https://github.com/bbatsov/zenburn-emacs) is the default +color theme in Prelude, but you can change it at your discretion. Why +Zenburn? I (and lots of hackers around the world) find it pretty neat +for some reason. Personally I find the default theme pretty tiresome +for the eyes, that's why I took that "controversial" decision to +replace it. You can, of course, easily go back to the default (or +select another theme entirely). To disable Zenburn just put in your personal config the following line: @@ -669,7 +671,7 @@ You can always disable the improved sorting algorithm all together like this: ### Windows compatibility While everything in Prelude should work fine in Windows, I test it only -with Linux & OSX, so there are Windows related problems from time to +with Linux & OS X, so there are Windows related problems from time to time. This situation will probably improve over time. ## Known issues From 7bb58b8e86dadb8d672350ecaae1c7fbae8baefc Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Thu, 6 Oct 2016 13:23:22 +0300 Subject: [PATCH 23/43] [Fix #1012] Update a reference to a crux function --- modules/prelude-emacs-lisp.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/prelude-emacs-lisp.el b/modules/prelude-emacs-lisp.el index 18555b0a7a..27d98139cf 100644 --- a/modules/prelude-emacs-lisp.el +++ b/modules/prelude-emacs-lisp.el @@ -34,6 +34,7 @@ ;;; Code: (require 'prelude-lisp) +(require 'crux) (prelude-require-packages '(elisp-slime-nav rainbow-mode)) @@ -52,7 +53,7 @@ "Switch to default `ielm' buffer. Start `ielm' if it's not already running." (interactive) - (prelude-start-or-switch-to 'ielm "*ielm*")) + (crux-start-or-switch-to 'ielm "*ielm*")) (define-key emacs-lisp-mode-map (kbd "C-c C-z") 'prelude-visit-ielm) (define-key emacs-lisp-mode-map (kbd "C-c C-c") 'eval-defun) From d16c121c684d9280fb9e7eb00d5f751a7db7a129 Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Thu, 6 Oct 2016 13:26:07 +0300 Subject: [PATCH 24/43] [Fix #1004] Correct the Salt link in the README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c579109983..39af136fa2 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ advised to always run Prelude with the latest Emacs - currently **25.1**. You can support the development of Prelude via -[Salt](https://salt.bountysource.com/teams/prelude) and +[Salt](https://bountysource.com/teams/prelude) and [Gratipay](https://www.gratipay.com/prelude). [![Support via Gratipay](https://cdn.rawgit.com/gratipay/gratipay-badge/2.1.3/dist/gratipay.png)](https://gratipay.com/prelude) From 8f014589a79c67e6608026519badc8da612584b1 Mon Sep 17 00:00:00 2001 From: Ben Denham Date: Mon, 24 Oct 2016 19:08:45 +1300 Subject: [PATCH 25/43] Ignore emacs desktop files (#1044) --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 74b5863f2f..8c58fc019d 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,5 @@ session* .cask tramp /var/pcache +.emacs.desktop +.emacs.desktop.lock From 2a49600680520da691cf752b93922ad247baf38d Mon Sep 17 00:00:00 2001 From: Joel Holder Date: Wed, 26 Oct 2016 02:36:17 -0400 Subject: [PATCH 26/43] Update saveplace to work with Emacs 25 (#1046) --- core/prelude-editor.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/prelude-editor.el b/core/prelude-editor.el index a6fb141458..93ec4bcaaa 100644 --- a/core/prelude-editor.el +++ b/core/prelude-editor.el @@ -108,10 +108,12 @@ (setq uniquify-ignore-buffers-re "^\\*") ; don't muck with special buffers ;; saveplace remembers your location in a file when saving files -(require 'saveplace) (setq save-place-file (expand-file-name "saveplace" prelude-savefile-dir)) ;; activate it for all buffers -(setq-default save-place t) +(if (< emacs-major-version 25) + (progn (require 'saveplace) + (setq-default save-place t)) + (save-place-mode 1)) ;; savehist keeps track of some history (require 'savehist) From 252f42833ed0fda5d50e3b76d4dac98b3475b5d5 Mon Sep 17 00:00:00 2001 From: Neurolit Date: Sun, 6 Nov 2016 21:56:28 +0100 Subject: [PATCH 27/43] Don't alter C-a binding in orgmode --- modules/prelude-org.el | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/prelude-org.el b/modules/prelude-org.el index b23a720250..3bc42b23b4 100644 --- a/modules/prelude-org.el +++ b/modules/prelude-org.el @@ -44,6 +44,7 @@ (set-keymap-parent newmap oldmap) (define-key newmap (kbd "C-c +") nil) (define-key newmap (kbd "C-c -") nil) + (define-key newmap (kbd "C-a") nil) (make-local-variable 'minor-mode-overriding-map-alist) (push `(prelude-mode . ,newmap) minor-mode-overriding-map-alist)) ) From 7b4fdcaa0dd12070fdb0cd1c2ddbe4b558f9b700 Mon Sep 17 00:00:00 2001 From: Jan Ehrhardt Date: Wed, 4 Jan 2017 00:07:37 +0100 Subject: [PATCH 28/43] Use settings from .editorconfig file (#1008) When an .editorconfig file is present in the project, it should be used. --- core/prelude-editor.el | 4 ++++ core/prelude-packages.el | 1 + 2 files changed, 5 insertions(+) diff --git a/core/prelude-editor.el b/core/prelude-editor.el index 93ec4bcaaa..1e924bfb7a 100644 --- a/core/prelude-editor.el +++ b/core/prelude-editor.el @@ -431,6 +431,10 @@ and file 'filename' will be opened and cursor set on line 'linenumber'" (string-to-number (or (match-string 3 name) "")))) fn))) files))) +;; use settings from .editorconfig file when present +(require 'editorconfig) +(editorconfig-mode 1) + (provide 'prelude-editor) ;;; prelude-editor.el ends here diff --git a/core/prelude-packages.el b/core/prelude-packages.el index 484beae4a2..e5d805b64d 100644 --- a/core/prelude-packages.el +++ b/core/prelude-packages.el @@ -53,6 +53,7 @@ diff-hl diminish easy-kill + editorconfig epl expand-region flycheck From 6d1569289ec05471b0895d3f1d985861a6b91212 Mon Sep 17 00:00:00 2001 From: Joe DeVivo Date: Sat, 22 Oct 2016 07:33:48 -0700 Subject: [PATCH 29/43] Disable Flycheck warnings for `personal` * Modified the regex so prelude won't load any .el files that start with a `.`, spefically for `.dir-locals.el`. This file does not play nice with `load` * Added a `personal/.dir-locals.el` to disable the flychecker --- init.el | 4 ++-- personal/.dir-locals.el | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 personal/.dir-locals.el diff --git a/init.el b/init.el index b1f223f200..8666e9b067 100644 --- a/init.el +++ b/init.el @@ -93,7 +93,7 @@ by Prelude.") ;; preload the personal settings from `prelude-personal-preload-dir' (when (file-exists-p prelude-personal-preload-dir) (message "Loading personal configuration files in %s..." prelude-personal-preload-dir) - (mapc 'load (directory-files prelude-personal-preload-dir 't "^[^#].*el$"))) + (mapc 'load (directory-files prelude-personal-preload-dir 't "^[^#\.].*el$"))) (message "Loading Prelude's core...") @@ -124,7 +124,7 @@ by Prelude.") ;; load the personal settings (this includes `custom-file') (when (file-exists-p prelude-personal-dir) (message "Loading personal configuration files in %s..." prelude-personal-dir) - (mapc 'load (directory-files prelude-personal-dir 't "^[^#].*el$"))) + (mapc 'load (directory-files prelude-personal-dir 't "^[^#\.].*el$"))) (message "Prelude is ready to do thy bidding, Master %s!" current-user) diff --git a/personal/.dir-locals.el b/personal/.dir-locals.el new file mode 100644 index 0000000000..69fa3caf67 --- /dev/null +++ b/personal/.dir-locals.el @@ -0,0 +1,5 @@ +;; This will make sure that nothing in your personal directory will be +;; forced through the emacs-lisp-checkdoc flychecker. That's a great +;; checker for real modules, but these are just config files, and you +;; deserve not to get warnings all the time +((emacs-lisp-mode . ((flycheck-disabled-checkers . (emacs-lisp-checkdoc))))) From fbc6d1559a95dcc0da118c725c0122125ab80054 Mon Sep 17 00:00:00 2001 From: Neurolit Date: Tue, 8 Nov 2016 18:39:21 +0100 Subject: [PATCH 30/43] Use http protocol instead of https for ELPA on Windows --- core/prelude-packages.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/core/prelude-packages.el b/core/prelude-packages.el index e5d805b64d..68a34193bd 100644 --- a/core/prelude-packages.el +++ b/core/prelude-packages.el @@ -35,8 +35,12 @@ (require 'cl) (require 'package) -(add-to-list 'package-archives - '("melpa" . "https://melpa.org/packages/") t) +(if (eq system-type 'windows-nt) + (add-to-list 'package-archives + '("melpa" . "http://melpa.org/packages/") t) + (add-to-list 'package-archives + '("melpa" . "https://melpa.org/packages/") t) + ) ;; set package-user-dir to be relative to Prelude install path (setq package-user-dir (expand-file-name "elpa" prelude-dir)) (package-initialize) From 4ab668ddefe064ac6d357b8bd347b94c71b62793 Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Wed, 4 Jan 2017 01:18:41 +0200 Subject: [PATCH 31/43] Code style --- core/prelude-packages.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/prelude-packages.el b/core/prelude-packages.el index 68a34193bd..19859eb5a8 100644 --- a/core/prelude-packages.el +++ b/core/prelude-packages.el @@ -35,12 +35,14 @@ (require 'cl) (require 'package) +;; accessing a package repo over https on Windows is a no go, so we +;; fallback to http there (if (eq system-type 'windows-nt) (add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/") t) (add-to-list 'package-archives - '("melpa" . "https://melpa.org/packages/") t) - ) + '("melpa" . "https://melpa.org/packages/") t)) + ;; set package-user-dir to be relative to Prelude install path (setq package-user-dir (expand-file-name "elpa" prelude-dir)) (package-initialize) From e0ca7c700389e70df457177ea75b0936dbe254e0 Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Wed, 4 Jan 2017 01:20:26 +0200 Subject: [PATCH 32/43] Update the copyright years --- core/prelude-core.el | 2 +- core/prelude-custom.el | 2 +- core/prelude-editor.el | 2 +- core/prelude-global-keybindings.el | 2 +- core/prelude-mode.el | 2 +- core/prelude-osx.el | 2 +- core/prelude-packages.el | 2 +- core/prelude-ui.el | 2 +- init.el | 6 +++--- modules/prelude-c.el | 2 +- modules/prelude-clojure.el | 2 +- modules/prelude-coffee.el | 2 +- modules/prelude-common-lisp.el | 2 +- modules/prelude-company.el | 2 +- modules/prelude-css.el | 2 +- modules/prelude-elixir.el | 2 +- modules/prelude-emacs-lisp.el | 2 +- modules/prelude-erc.el | 2 +- modules/prelude-erlang.el | 2 +- modules/prelude-evil.el | 2 +- modules/prelude-haskell.el | 2 +- modules/prelude-helm-everywhere.el | 2 +- modules/prelude-helm.el | 2 +- modules/prelude-ido.el | 2 +- modules/prelude-js.el | 2 +- modules/prelude-key-chord.el | 2 +- modules/prelude-latex.el | 2 +- modules/prelude-lisp.el | 2 +- modules/prelude-mediawiki.el | 2 +- modules/prelude-ocaml.el | 2 +- modules/prelude-org.el | 2 +- modules/prelude-perl.el | 2 +- modules/prelude-programming.el | 2 +- modules/prelude-python.el | 2 +- modules/prelude-ruby.el | 2 +- modules/prelude-scala.el | 2 +- modules/prelude-scheme.el | 2 +- modules/prelude-scss.el | 2 +- modules/prelude-shell.el | 2 +- modules/prelude-web.el | 2 +- modules/prelude-xml.el | 2 +- modules/prelude-yaml.el | 2 +- 42 files changed, 44 insertions(+), 44 deletions(-) diff --git a/core/prelude-core.el b/core/prelude-core.el index 4fe5fe3ad6..33584cb25d 100644 --- a/core/prelude-core.el +++ b/core/prelude-core.el @@ -1,6 +1,6 @@ ;;; prelude-core.el --- Emacs Prelude: Core Prelude functions. ;; -;; Copyright © 2011-2016 Bozhidar Batsov +;; Copyright © 2011-2017 Bozhidar Batsov ;; ;; Author: Bozhidar Batsov ;; URL: https://github.com/bbatsov/prelude diff --git a/core/prelude-custom.el b/core/prelude-custom.el index 74759cfda8..be6f74ce94 100644 --- a/core/prelude-custom.el +++ b/core/prelude-custom.el @@ -1,6 +1,6 @@ ;;; prelude-custom.el --- Emacs Prelude: Prelude's customizable variables. ;; -;; Copyright © 2011-2016 Bozhidar Batsov +;; Copyright © 2011-2017 Bozhidar Batsov ;; ;; Author: Bozhidar Batsov ;; URL: https://github.com/bbatsov/prelude diff --git a/core/prelude-editor.el b/core/prelude-editor.el index 1e924bfb7a..d6f5917527 100644 --- a/core/prelude-editor.el +++ b/core/prelude-editor.el @@ -1,6 +1,6 @@ ;;; prelude-editor.el --- Emacs Prelude: enhanced core editing experience. ;; -;; Copyright © 2011-2016 Bozhidar Batsov +;; Copyright © 2011-2017 Bozhidar Batsov ;; ;; Author: Bozhidar Batsov ;; URL: https://github.com/bbatsov/prelude diff --git a/core/prelude-global-keybindings.el b/core/prelude-global-keybindings.el index c50c5d4c83..6eb64670f2 100644 --- a/core/prelude-global-keybindings.el +++ b/core/prelude-global-keybindings.el @@ -1,6 +1,6 @@ ;;; prelude-global-keybindings.el --- Emacs Prelude: some useful keybindings. ;; -;; Copyright © 2011-2016 Bozhidar Batsov +;; Copyright © 2011-2017 Bozhidar Batsov ;; ;; Author: Bozhidar Batsov ;; URL: https://github.com/bbatsov/prelude diff --git a/core/prelude-mode.el b/core/prelude-mode.el index 6f5ca8a0e0..8ea8101e8b 100644 --- a/core/prelude-mode.el +++ b/core/prelude-mode.el @@ -1,6 +1,6 @@ ;;; prelude-mode.el --- Emacs Prelude: minor mode ;; -;; Copyright © 2011-2016 Bozhidar Batsov +;; Copyright © 2011-2017 Bozhidar Batsov ;; ;; Author: Bozhidar Batsov ;; URL: https://github.com/bbatsov/prelude diff --git a/core/prelude-osx.el b/core/prelude-osx.el index faacbd0299..0c4d418e5a 100644 --- a/core/prelude-osx.el +++ b/core/prelude-osx.el @@ -1,6 +1,6 @@ ;;; prelude-osx.el --- Emacs Prelude: OSX specific settings. ;; -;; Copyright © 2011-2016 Bozhidar Batsov +;; Copyright © 2011-2017 Bozhidar Batsov ;; ;; Author: Bozhidar Batsov ;; URL: https://github.com/bbatsov/prelude diff --git a/core/prelude-packages.el b/core/prelude-packages.el index 19859eb5a8..2c766c13c1 100644 --- a/core/prelude-packages.el +++ b/core/prelude-packages.el @@ -1,6 +1,6 @@ ;;; prelude-packages.el --- Emacs Prelude: default package selection. ;; -;; Copyright © 2011-2016 Bozhidar Batsov +;; Copyright © 2011-2017 Bozhidar Batsov ;; ;; Author: Bozhidar Batsov ;; URL: https://github.com/bbatsov/prelude diff --git a/core/prelude-ui.el b/core/prelude-ui.el index 076790b180..60051d1fc0 100644 --- a/core/prelude-ui.el +++ b/core/prelude-ui.el @@ -1,6 +1,6 @@ ;;; prelude-ui.el --- Emacs Prelude: UI optimizations and tweaks. ;; -;; Copyright © 2011-2016 Bozhidar Batsov +;; Copyright © 2011-2017 Bozhidar Batsov ;; ;; Author: Bozhidar Batsov ;; URL: https://github.com/bbatsov/prelude diff --git a/init.el b/init.el index 8666e9b067..f22c96073b 100644 --- a/init.el +++ b/init.el @@ -1,6 +1,6 @@ ;;; init.el --- Prelude's configuration entry point. ;; -;; Copyright (c) 2011-2016 Bozhidar Batsov +;; Copyright (c) 2011-2017 Bozhidar Batsov ;; ;; Author: Bozhidar Batsov ;; URL: http://batsov.com/prelude @@ -33,8 +33,8 @@ ;;; Code: (defvar current-user - (getenv - (if (equal system-type 'windows-nt) "USERNAME" "USER"))) + (getenv + (if (equal system-type 'windows-nt) "USERNAME" "USER"))) (message "Prelude is powering up... Be patient, Master %s!" current-user) diff --git a/modules/prelude-c.el b/modules/prelude-c.el index a434e5b043..f71bf36f74 100644 --- a/modules/prelude-c.el +++ b/modules/prelude-c.el @@ -1,6 +1,6 @@ ;;; prelude-c.el --- Emacs Prelude: cc-mode configuration. ;; -;; Copyright © 2011-2016 Bozhidar Batsov +;; Copyright © 2011-2017 Bozhidar Batsov ;; ;; Author: Bozhidar Batsov ;; URL: https://github.com/bbatsov/prelude diff --git a/modules/prelude-clojure.el b/modules/prelude-clojure.el index c3462f0538..f15481cb9f 100644 --- a/modules/prelude-clojure.el +++ b/modules/prelude-clojure.el @@ -1,6 +1,6 @@ ;;; prelude-clojure.el --- Emacs Prelude: Clojure programming configuration. ;; -;; Copyright © 2011-2016 Bozhidar Batsov +;; Copyright © 2011-2017 Bozhidar Batsov ;; ;; Author: Bozhidar Batsov ;; URL: http://batsov.com/prelude diff --git a/modules/prelude-coffee.el b/modules/prelude-coffee.el index 78e69dd0e3..71353de1d9 100644 --- a/modules/prelude-coffee.el +++ b/modules/prelude-coffee.el @@ -1,6 +1,6 @@ ;;; prelude-coffee.el --- Emacs Prelude: CoffeeScript programming support. ;; -;; Copyright © 2011-2016 Bozhidar Batsov +;; Copyright © 2011-2017 Bozhidar Batsov ;; ;; Author: Bozhidar Batsov ;; URL: https://github.com/bbatsov/prelude diff --git a/modules/prelude-common-lisp.el b/modules/prelude-common-lisp.el index 0cac1c0cf2..0269013ead 100644 --- a/modules/prelude-common-lisp.el +++ b/modules/prelude-common-lisp.el @@ -1,6 +1,6 @@ ;;; prelude-common-lisp.el --- Emacs Prelude: lisp-mode and SLIME config. ;; -;; Copyright © 2011-2016 Bozhidar Batsov +;; Copyright © 2011-2017 Bozhidar Batsov ;; ;; Author: Bozhidar Batsov ;; URL: https://github.com/bbatsov/prelude diff --git a/modules/prelude-company.el b/modules/prelude-company.el index 8d83d03e99..8b10441dc8 100644 --- a/modules/prelude-company.el +++ b/modules/prelude-company.el @@ -1,6 +1,6 @@ ;;; prelude-company.el --- company-mode setup ;; -;; Copyright © 2011-2016 Bozhidar Batsov +;; Copyright © 2011-2017 Bozhidar Batsov ;; ;; Author: Bozhidar Batsov ;; URL: https://github.com/bbatsov/prelude diff --git a/modules/prelude-css.el b/modules/prelude-css.el index 2807d10e38..aa90063d71 100644 --- a/modules/prelude-css.el +++ b/modules/prelude-css.el @@ -1,6 +1,6 @@ ;;; prelude-css.el --- Emacs Prelude: css support ;; -;; Copyright © 2011-2016 Bozhidar Batsov +;; Copyright © 2011-2017 Bozhidar Batsov ;; ;; Author: Bozhidar Batsov ;; URL: http://www.batsov.com/emacs-prelude diff --git a/modules/prelude-elixir.el b/modules/prelude-elixir.el index 8dbe0ae1c1..6e09decf3c 100644 --- a/modules/prelude-elixir.el +++ b/modules/prelude-elixir.el @@ -1,6 +1,6 @@ ;;; prelude-elixir.el --- Emacs Prelude: Elixir programming support. ;; -;; Copyright © 2014-2016 Samuel Tonini +;; Copyright © 2014-2017 Samuel Tonini ;; ;; Author: Samuel Tonini ;; Version: 1.0.0 diff --git a/modules/prelude-emacs-lisp.el b/modules/prelude-emacs-lisp.el index 27d98139cf..f80a02fd30 100644 --- a/modules/prelude-emacs-lisp.el +++ b/modules/prelude-emacs-lisp.el @@ -1,6 +1,6 @@ ;;; prelude-emacs-lisp.el --- Emacs Prelude: Nice config for Elisp programming. ;; -;; Copyright © 2011-2016 Bozhidar Batsov +;; Copyright © 2011-2017 Bozhidar Batsov ;; ;; Author: Bozhidar Batsov ;; URL: https://github.com/bbatsov/prelude diff --git a/modules/prelude-erc.el b/modules/prelude-erc.el index d8583077f4..7a807713fc 100644 --- a/modules/prelude-erc.el +++ b/modules/prelude-erc.el @@ -1,6 +1,6 @@ ;;; prelude-erc.el --- Emacs Prelude: ERC mode configuration. ;; -;; Copyright © 2011-2016 Bozhidar Batsov +;; Copyright © 2011-2017 Bozhidar Batsov ;; ;; Author: Bozhidar Batsov ;; URL: https://github.com/bbatsov/prelude diff --git a/modules/prelude-erlang.el b/modules/prelude-erlang.el index 02fe5d461c..edc4a7d946 100644 --- a/modules/prelude-erlang.el +++ b/modules/prelude-erlang.el @@ -1,6 +1,6 @@ ;;; prelude-erlang.el --- Emacs Prelude: Erlang programming support. ;; -;; Copyright © 2011-2016 Gleb Peregud +;; Copyright © 2011-2017 Gleb Peregud ;; ;; Author: Gleb Peregud ;; Version: 1.0.0 diff --git a/modules/prelude-evil.el b/modules/prelude-evil.el index f5298fe281..0f8bd7c045 100644 --- a/modules/prelude-evil.el +++ b/modules/prelude-evil.el @@ -1,6 +1,6 @@ ;;; prelude-evil.el --- Emacs Prelude: evil-mode configuration. ;; -;; Copyright © 2011-2016 Bozhidar Batsov +;; Copyright © 2011-2017 Bozhidar Batsov ;; ;; Author: Bozhidar Batsov ;; URL: http://batsov.com/prelude diff --git a/modules/prelude-haskell.el b/modules/prelude-haskell.el index cd30dc16b6..d3f3b65a3e 100644 --- a/modules/prelude-haskell.el +++ b/modules/prelude-haskell.el @@ -1,6 +1,6 @@ ;;; prelude-haskell.el --- Emacs Prelude: Nice config for Haskell programming. ;; -;; Copyright © 2011-2016 Bozhidar Batsov +;; Copyright © 2011-2017 Bozhidar Batsov ;; ;; Author: Bozhidar Batsov ;; URL: https://github.com/bbatsov/prelude diff --git a/modules/prelude-helm-everywhere.el b/modules/prelude-helm-everywhere.el index d3cf742cd7..49c739d3a5 100644 --- a/modules/prelude-helm-everywhere.el +++ b/modules/prelude-helm-everywhere.el @@ -1,6 +1,6 @@ ;;; prelude-helm-everywhere.el --- Enable Helm everywhere ;; -;; Copyright © 2014-2016 Tu, Do Hoang +;; Copyright © 2014-2017 Tu, Do Hoang ;; ;; Author: Tu, Do Hoang (tuhdo1710@gmail.com) ;; URL: https://github.com/bbatsov/prelude diff --git a/modules/prelude-helm.el b/modules/prelude-helm.el index 347346e737..253484e6fd 100644 --- a/modules/prelude-helm.el +++ b/modules/prelude-helm.el @@ -1,6 +1,6 @@ ;;; prelude-helm.el --- Helm setup ;; -;; Copyright © 2011-2016 Bozhidar Batsov +;; Copyright © 2011-2017 Bozhidar Batsov ;; ;; Author: Bozhidar Batsov ;; URL: https://github.com/bbatsov/prelude diff --git a/modules/prelude-ido.el b/modules/prelude-ido.el index 157c160d7b..649991a2b6 100644 --- a/modules/prelude-ido.el +++ b/modules/prelude-ido.el @@ -1,6 +1,6 @@ ;;; prelude-ido.el --- Ido setup ;; -;; Copyright © 2011-2016 Bozhidar Batsov +;; Copyright © 2011-2017 Bozhidar Batsov ;; ;; Author: Bozhidar Batsov ;; URL: https://github.com/bbatsov/prelude diff --git a/modules/prelude-js.el b/modules/prelude-js.el index 28c28dcdf1..fd46dca900 100644 --- a/modules/prelude-js.el +++ b/modules/prelude-js.el @@ -1,6 +1,6 @@ ;;; prelude-js.el --- Emacs Prelude: js-mode configuration. ;; -;; Copyright © 2011-2016 Bozhidar Batsov +;; Copyright © 2011-2017 Bozhidar Batsov ;; ;; Author: Bozhidar Batsov ;; URL: https://github.com/bbatsov/prelude diff --git a/modules/prelude-key-chord.el b/modules/prelude-key-chord.el index 6083411fde..814f4cce94 100644 --- a/modules/prelude-key-chord.el +++ b/modules/prelude-key-chord.el @@ -1,6 +1,6 @@ ;;; prelude-key-chord.el --- Key chord setup ;; -;; Copyright © 2011-2016 Bozhidar Batsov +;; Copyright © 2011-2017 Bozhidar Batsov ;; ;; Author: Bozhidar Batsov ;; URL: https://github.com/bbatsov/prelude diff --git a/modules/prelude-latex.el b/modules/prelude-latex.el index c681feef6b..3ae0af3143 100644 --- a/modules/prelude-latex.el +++ b/modules/prelude-latex.el @@ -1,6 +1,6 @@ ;;; prelude-latex.el --- Emacs Prelude: Sane setup for LaTeX writers. ;; -;; Copyright © 2011-2016 Bozhidar Batsov +;; Copyright © 2011-2017 Bozhidar Batsov ;; ;; Author: Bozhidar Batsov ;; URL: https://github.com/bbatsov/prelude diff --git a/modules/prelude-lisp.el b/modules/prelude-lisp.el index d49450fcec..65ca5283b0 100644 --- a/modules/prelude-lisp.el +++ b/modules/prelude-lisp.el @@ -1,6 +1,6 @@ ;;; prelude-lisp.el --- Emacs Prelude: Configuration common to all lisp modes. ;; -;; Copyright © 2011-2016 Bozhidar Batsov +;; Copyright © 2011-2017 Bozhidar Batsov ;; ;; Author: Bozhidar Batsov ;; URL: https://github.com/bbatsov/prelude diff --git a/modules/prelude-mediawiki.el b/modules/prelude-mediawiki.el index a804da6398..5796ad9f96 100644 --- a/modules/prelude-mediawiki.el +++ b/modules/prelude-mediawiki.el @@ -1,6 +1,6 @@ ;;; prelude-mediawiki.el --- Emacs Prelude: mediawiki editing config ;; -;; Copyright © 2011-2016 Bozhidar Batsov +;; Copyright © 2011-2017 Bozhidar Batsov ;; ;; Author: Bozhidar Batsov ;; URL: https://github.com/bbatsov/prelude diff --git a/modules/prelude-ocaml.el b/modules/prelude-ocaml.el index 653b2398cc..a354d48678 100644 --- a/modules/prelude-ocaml.el +++ b/modules/prelude-ocaml.el @@ -1,6 +1,6 @@ ;;; prelude-ocaml.el --- Emacs Prelude: decent Perl coding settings. ;; -;; Copyright © 2014-2016 Geoff Shannon +;; Copyright © 2014-2017 Geoff Shannon ;; ;; Author: Geoff Shannon ;; URL: https://github.com/bbatsov/prelude diff --git a/modules/prelude-org.el b/modules/prelude-org.el index 3bc42b23b4..d810caca26 100644 --- a/modules/prelude-org.el +++ b/modules/prelude-org.el @@ -1,6 +1,6 @@ ;;; prelude-org.el --- Emacs Prelude: org-mode configuration. ;; -;; Copyright © 2011-2016 Bozhidar Batsov +;; Copyright © 2011-2017 Bozhidar Batsov ;; ;; Author: Bozhidar Batsov ;; URL: https://github.com/bbatsov/prelude diff --git a/modules/prelude-perl.el b/modules/prelude-perl.el index e609cd3ccc..b9a2f4d9b3 100644 --- a/modules/prelude-perl.el +++ b/modules/prelude-perl.el @@ -1,6 +1,6 @@ ;;; prelude-perl.el --- Emacs Prelude: decent Perl coding settings. ;; -;; Copyright © 2011-2016 Bozhidar Batsov +;; Copyright © 2011-2017 Bozhidar Batsov ;; ;; Author: Bozhidar Batsov ;; URL: https://github.com/bbatsov/prelude diff --git a/modules/prelude-programming.el b/modules/prelude-programming.el index dd16ac0fca..f4876527d0 100644 --- a/modules/prelude-programming.el +++ b/modules/prelude-programming.el @@ -1,6 +1,6 @@ ;;; prelude-programming.el --- Emacs Prelude: prog-mode configuration ;; -;; Copyright © 2011-2016 Bozhidar Batsov +;; Copyright © 2011-2017 Bozhidar Batsov ;; ;; Author: Bozhidar Batsov ;; URL: https://github.com/bbatsov/prelude diff --git a/modules/prelude-python.el b/modules/prelude-python.el index 2e12453ad5..49a43ffa88 100644 --- a/modules/prelude-python.el +++ b/modules/prelude-python.el @@ -1,6 +1,6 @@ ;;; prelude-python.el --- Emacs Prelude: python.el configuration. ;; -;; Copyright © 2011-2016 Bozhidar Batsov +;; Copyright © 2011-2017 Bozhidar Batsov ;; ;; Author: Bozhidar Batsov ;; URL: https://github.com/bbatsov/prelude diff --git a/modules/prelude-ruby.el b/modules/prelude-ruby.el index ec1355cd9a..13ba6b46c0 100644 --- a/modules/prelude-ruby.el +++ b/modules/prelude-ruby.el @@ -1,6 +1,6 @@ ;;; prelude-ruby.el --- Emacs Prelude: A nice setup for Ruby (and Rails) devs. ;; -;; Copyright © 2011-2016 Bozhidar Batsov +;; Copyright © 2011-2017 Bozhidar Batsov ;; ;; Author: Bozhidar Batsov ;; URL: https://github.com/bbatsov/prelude diff --git a/modules/prelude-scala.el b/modules/prelude-scala.el index 3150ac8671..6270bea276 100644 --- a/modules/prelude-scala.el +++ b/modules/prelude-scala.el @@ -1,6 +1,6 @@ ;;; prelude-scala.el --- Emacs Prelude: scala-mode configuration. ;; -;; Copyright © 2011-2016 Bozhidar Batsov +;; Copyright © 2011-2017 Bozhidar Batsov ;; ;; Author: Bozhidar Batsov ;; URL: https://github.com/bbatsov/prelude diff --git a/modules/prelude-scheme.el b/modules/prelude-scheme.el index b23558942a..a429c3d8ec 100644 --- a/modules/prelude-scheme.el +++ b/modules/prelude-scheme.el @@ -1,6 +1,6 @@ ;;; prelude-scheme.el --- Emacs Prelude: Some defaults for Scheme. ;; -;; Copyright © 2011-2016 Bozhidar Batsov +;; Copyright © 2011-2017 Bozhidar Batsov ;; ;; Author: Bozhidar Batsov ;; URL: https://github.com/bbatsov/prelude diff --git a/modules/prelude-scss.el b/modules/prelude-scss.el index aa4b6f2299..be92668ac6 100644 --- a/modules/prelude-scss.el +++ b/modules/prelude-scss.el @@ -1,6 +1,6 @@ ;;; prelude-scss.el --- Emacs Prelude: scss support ;; -;; Copyright © 2011-2016 Bozhidar Batsov +;; Copyright © 2011-2017 Bozhidar Batsov ;; ;; Author: Bozhidar Batsov ;; URL: http://www.batsov.com/emacs-prelude diff --git a/modules/prelude-shell.el b/modules/prelude-shell.el index 8ab6823af4..8d15547247 100644 --- a/modules/prelude-shell.el +++ b/modules/prelude-shell.el @@ -1,6 +1,6 @@ ;;; prelude-shell.el --- Emacs Prelude: sh-mode configuration. ;; -;; Copyright © 2011-2016 Bozhidar Batsov +;; Copyright © 2011-2017 Bozhidar Batsov ;; ;; Author: Bozhidar Batsov ;; URL: https://github.com/bbatsov/prelude diff --git a/modules/prelude-web.el b/modules/prelude-web.el index d2d5fc0c4e..665f9033fe 100644 --- a/modules/prelude-web.el +++ b/modules/prelude-web.el @@ -1,6 +1,6 @@ ;;; prelude-web.el --- Emacs Prelude: web template support ;; -;; Copyright © 2011-2016 Bozhidar Batsov +;; Copyright © 2011-2017 Bozhidar Batsov ;; ;; Author: Bozhidar Batsov ;; URL: http://www.batsov.com/emacs-prelude diff --git a/modules/prelude-xml.el b/modules/prelude-xml.el index edf4c702a1..d6248d3722 100644 --- a/modules/prelude-xml.el +++ b/modules/prelude-xml.el @@ -1,6 +1,6 @@ ;;; prelude-xml.el --- Emacs Prelude: XML editing configuration. ;; -;; Copyright © 2011-2016 Bozhidar Batsov +;; Copyright © 2011-2017 Bozhidar Batsov ;; ;; Author: Bozhidar Batsov ;; URL: https://github.com/bbatsov/prelude diff --git a/modules/prelude-yaml.el b/modules/prelude-yaml.el index eca554b2ff..3e11508c2a 100644 --- a/modules/prelude-yaml.el +++ b/modules/prelude-yaml.el @@ -1,6 +1,6 @@ ;;; prelude-yaml.el --- Emacs Prelude: YAML programming support. ;; -;; Copyright © 2011-2016 Bozhidar Batsov +;; Copyright © 2011-2017 Bozhidar Batsov ;; ;; Author: ToBeReplaced ;; URL: http://batsov.com/prelude From e0a86fcb02504b86a9f1fbe35bdbd837a47bd63e Mon Sep 17 00:00:00 2001 From: Jennifer Page Date: Wed, 4 Jan 2017 02:17:48 -0500 Subject: [PATCH 33/43] [Fix #743] Add support for package pinning (#1048) --- README.md | 9 ++ core/prelude-packages.el | 5 ++ sample/prelude-pinned-packages.el | 135 ++++++++++++++++++++++++++++++ 3 files changed, 149 insertions(+) create mode 100644 sample/prelude-pinned-packages.el diff --git a/README.md b/README.md index 39af136fa2..05b23786dc 100644 --- a/README.md +++ b/README.md @@ -174,6 +174,15 @@ there are such). Simply run M-x prelude-update from Emacs itself and restart Emacs afterwards. +## Pinning packages + +By default, Prelude will install packages from the melpa and gnu package +repositories. Occasionally package integration can break when upgrading packages. +This can be avoided by pinning packages to stable versions in other repositories. +To do so, copy `prelude-pinned-packages.el` from the sample directory to +Prelude's root directory and adjust the [variables](https://www.gnu.org/software/emacs/manual/html_node/emacs/Package-Installation.html) +inside accordingly. + ## Enabling additional modules By default most of the modules that ship with Prelude are not loaded. For more information on the functionality provided by these modules visit the [docs](modules/doc/README.md). diff --git a/core/prelude-packages.el b/core/prelude-packages.el index 2c766c13c1..195ea4f929 100644 --- a/core/prelude-packages.el +++ b/core/prelude-packages.el @@ -43,6 +43,11 @@ (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)) +;; load the pinned packages +(let ((prelude-pinned-packages-file (expand-file-name "prelude-pinned-packages.el" prelude-dir))) + (if (file-exists-p prelude-pinned-packages-file) + (load prelude-pinned-packages-file))) + ;; set package-user-dir to be relative to Prelude install path (setq package-user-dir (expand-file-name "elpa" prelude-dir)) (package-initialize) diff --git a/sample/prelude-pinned-packages.el b/sample/prelude-pinned-packages.el new file mode 100644 index 0000000000..011b39475b --- /dev/null +++ b/sample/prelude-pinned-packages.el @@ -0,0 +1,135 @@ +(add-to-list 'package-archives + '("melpa-stable" . "https://stable.melpa.org/packages/") t) + +(setq package-pinned-packages + '( + (ace-window . "melpa-stable") + (alchemist . "melpa-stable") + (anaconda-mode . "melpa-stable") + (anzu . "melpa-stable") + (async . "melpa-stable") + (avy . "melpa-stable") + (browse-kill-ring . "melpa-stable") + (caml . "melpa-stable") + (cask-mode . "melpa-stable") + (cdlatex . "melpa-stable") + (cider . "melpa-stable") + (clojure-mode . "melpa-stable") + (cmake-mode . "melpa-stable") + (coffee-mode . "melpa-stable") + (company . "melpa-stable") + (company-anaconda . "melpa-stable") + (company-auctex . "melpa-stable") + (company-go . "melpa-stable") + (crux . "melpa-stable") + (cython-mode . "melpa-stable") + (d-mode . "melpa-stable") + (dart-mode . "melpa-stable") + (dash . "melpa-stable") + (diff-hl . "melpa-stable") + (diminish . "melpa-stable") + (discover-my-major . "melpa-stable") + (dockerfile-mode . "melpa-stable") + (easy-kill . "melpa-stable") + (elisp-slime-nav . "melpa-stable") + (elixir-mode . "melpa-stable") + (elm-mode . "melpa-stable") + (ensime . "melpa-stable") + (epl . "melpa-stable") + (erlang . "melpa-stable") + (evil . "melpa-stable") + (evil-numbers . "melpa-stable") + (evil-surround . "melpa-stable") + (evil-visualstar . "melpa-stable") + (exec-path-from-shell . "melpa-stable") + (expand-region . "melpa-stable") + (f . "melpa-stable") + (feature-mode . "melpa-stable") + (flx . "melpa-stable") + (flx-ido . "melpa-stable") + (flycheck . "melpa-stable") + (flycheck-ocaml . "melpa-stable") + (geiser . "melpa-stable") + (gh . "melpa-stable") + (gist . "melpa-stable") + (git-commit . "melpa-stable") + (git-timemachine . "melpa-stable") + (gitconfig-mode . "melpa-stable") + (gitignore-mode . "melpa-stable") + (go-eldoc . "melpa-stable") + (go-guru . "melpa-stable") + (go-mode . "melpa-stable") + (go-projectile . "melpa-stable") + (go-rename . "melpa-stable") + (gotest . "melpa-stable") + (goto-chg . "melpa-stable") + (grizzl . "melpa-stable") + (groovy-mode . "melpa-stable") + (guru-mode . "melpa-stable") + (haml-mode . "melpa-stable") + (haskell-mode . "melpa-stable") + (helm . "melpa-stable") + (helm-ag . "melpa-stable") + (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") + (json-mode . "melpa-stable") + (json-reformat . "melpa-stable") + (json-snatcher . "melpa-stable") + (kivy-mode . "melpa-stable") + (less-css-mode . "melpa-stable") + (logito . "melpa-stable") + (lua-mode . "melpa-stable") + (macrostep . "melpa-stable") + (magit . "melpa-stable") + (magit-popup . "melpa-stable") + (makey . "melpa-stable") + (markdown-mode . "melpa-stable") + (marshal . "melpa-stable") + (mediawiki . "melpa-stable") + (merlin . "melpa-stable") + (operate-on-number . "melpa-stable") + (ov . "melpa-stable") + (pcache . "melpa-stable") + (php-mode . "melpa-stable") + (pkg-info . "melpa-stable") + (pkgbuild-mode . "melpa-stable") + (popup . "melpa-stable") + (projectile . "melpa-stable") + (protobuf-mode . "melpa-stable") + (puppet-mode . "melpa-stable") + (pythonic . "melpa-stable") + (queue . "melpa-stable") + (rich-minority . "melpa-stable") + (ruby-tools . "melpa-stable") + (s . "melpa-stable") + (sass-mode . "melpa-stable") + (sbt-mode . "melpa-stable") + (scala-mode . "melpa-stable") + (scss-mode . "melpa-stable") + (slim-mode . "melpa-stable") + (slime . "melpa-stable") + (smart-mode-line . "melpa-stable") + (smartparens . "melpa-stable") + (smartrep . "melpa-stable") + (smex . "melpa-stable") + (spinner . "melpa-stable") + (stylus-mode . "melpa-stable") + (swift-mode . "melpa-stable") + (thrift . "melpa-stable") + (tuareg . "melpa-stable") + (utop . "melpa-stable") + (volatile-highlights . "melpa-stable") + (web-mode . "melpa-stable") + (which-key . "melpa-stable") + (with-editor . "melpa-stable") + (yaml-mode . "melpa-stable") + (yasnippet . "melpa-stable") + (zenburn-theme . "melpa-stable") + (zop-to-char . "melpa-stable") + )) From ab09e984d1bae22c7c2d2267ebfcd079d45a8bf8 Mon Sep 17 00:00:00 2001 From: Johannes Choo Date: Sun, 4 Dec 2016 17:23:48 +0800 Subject: [PATCH 34/43] Add stanza inserted by Package.el cf. bbatsov#1056 Add obnoxious stanza auto-inserted by Package.el to prevent it generating its own whenever Emacs is started. cf. bbatsov#1056 --- init.el | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/init.el b/init.el index f22c96073b..294939212d 100644 --- a/init.el +++ b/init.el @@ -32,6 +32,13 @@ ;; Boston, MA 02110-1301, USA. ;;; Code: + +;; Added by Package.el. This must come before configurations of +;; installed packages. Don't delete this line. If you don't want it, +;; just comment it out by adding a semicolon to the start of the line. +;; You may delete these explanatory comments. +;(package-initialize) + (defvar current-user (getenv (if (equal system-type 'windows-nt) "USERNAME" "USER"))) From 7dbf9686b72f979287e1197c477046a040ca7c8d Mon Sep 17 00:00:00 2001 From: Szymon Wrozynski Date: Mon, 9 Jan 2017 17:24:21 +0100 Subject: [PATCH 35/43] Use elpa repository for 'queue' and 'spinner' packages --- sample/prelude-pinned-packages.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sample/prelude-pinned-packages.el b/sample/prelude-pinned-packages.el index 011b39475b..719cf99401 100644 --- a/sample/prelude-pinned-packages.el +++ b/sample/prelude-pinned-packages.el @@ -104,7 +104,7 @@ (protobuf-mode . "melpa-stable") (puppet-mode . "melpa-stable") (pythonic . "melpa-stable") - (queue . "melpa-stable") + (queue . "gnu") (rich-minority . "melpa-stable") (ruby-tools . "melpa-stable") (s . "melpa-stable") @@ -118,7 +118,7 @@ (smartparens . "melpa-stable") (smartrep . "melpa-stable") (smex . "melpa-stable") - (spinner . "melpa-stable") + (spinner . "gnu") (stylus-mode . "melpa-stable") (swift-mode . "melpa-stable") (thrift . "melpa-stable") From 743519f418e25b020b4273a3b6b8c6cfffc669c7 Mon Sep 17 00:00:00 2001 From: Florian D Date: Sun, 7 May 2017 23:41:38 +0200 Subject: [PATCH 36/43] Emacs latest release is 25.2 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 05b23786dc..259a88f857 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Emacs power users. Prelude is compatible **ONLY with GNU Emacs 24.4+**. In general you're advised to always run Prelude with the latest Emacs - currently -**25.1**. +**25.2**. You can support the development of Prelude via [Salt](https://bountysource.com/teams/prelude) and From 7667ee4ba0165c8c6e8b3a156e8fb5e9933601b6 Mon Sep 17 00:00:00 2001 From: max thomas Date: Wed, 10 May 2017 18:00:00 -0500 Subject: [PATCH 37/43] Fix message about location of prelude-modules.el after install --- utils/installer.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/installer.sh b/utils/installer.sh index 392ebd97e5..15f6e7ed11 100755 --- a/utils/installer.sh +++ b/utils/installer.sh @@ -243,4 +243,4 @@ printf "$BBLUE | |_) | __/ _ \ | | | |/ _ |/ _ \ \n" printf "$BBLUE | __/| | | __/ | |_| | (_| | __/ \n" printf "$BBLUE |_| |_| \___|_|\__,_|\__,_|\___| \n\n" printf "$GREEN ... is now installed and ready to do thy bidding, Master $USER!$RESET\n" -printf "$GREEN Don't forget to adjust the modules you want to use in $PRELUDE_INSTALL_DIR/prelude-modules.el!$RESET\n" +printf "$GREEN Don't forget to adjust the modules you want to use in $PRELUDE_INSTALL_DIR/sample/prelude-modules.el!$RESET\n" From 2ed8800e292b675096df3da212f6e0cfdf76b151 Mon Sep 17 00:00:00 2001 From: Jack Date: Sat, 8 Jul 2017 07:28:57 +0100 Subject: [PATCH 38/43] Refine missing bundled example file warning (#1094) --- init.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.el b/init.el index 294939212d..bee0f12bc6 100644 --- a/init.el +++ b/init.el @@ -123,7 +123,7 @@ by Prelude.") (if (file-exists-p prelude-modules-file) (load prelude-modules-file) (message "Missing modules file %s" prelude-modules-file) - (message "You can get started by copying the bundled example 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 (setq custom-file (expand-file-name "custom.el" prelude-personal-dir)) From 67b1a54e537a97f2171da5f56d6d88cbffca5b62 Mon Sep 17 00:00:00 2001 From: Koustubh Sinkar Date: Tue, 14 Jun 2016 11:52:27 +0530 Subject: [PATCH 39/43] Making the prelude-erc module more modular 1. Introduces the `my-fav-irc` list for custom autojoining your favorite channels 2. Introduces the `bye-erc-message` variable for customizing the Last Quit Message 3. Adds documentation so that users can take advantage of these features --- modules/doc/README.md | 2 +- modules/doc/prelude-erc.md | 31 +++++++++++++++++++++++++++++++ modules/prelude-erc.el | 23 +++++++++++++++++------ 3 files changed, 49 insertions(+), 7 deletions(-) create mode 100644 modules/doc/prelude-erc.md diff --git a/modules/doc/README.md b/modules/doc/README.md index 6e6da7260c..d1025e5cf0 100644 --- a/modules/doc/README.md +++ b/modules/doc/README.md @@ -11,7 +11,7 @@ following links. - Common-Lisp - CSS - Emacs-Lisp -- ERC +- [ERC](prelude-erc.md) - Erlang - Elixir - Haskell diff --git a/modules/doc/prelude-erc.md b/modules/doc/prelude-erc.md new file mode 100644 index 0000000000..539c725bb7 --- /dev/null +++ b/modules/doc/prelude-erc.md @@ -0,0 +1,31 @@ +# Prelude ERC Quickstart + +## 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 + +``` emacs-lisp +(setq my-fav-irc '( "irc.freenode.net" + "irc.oftc.net" + "irc.mozilla.org" + "irc.gnome.org")) +``` + +## 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 + +``` emacs-lisp +(setq bye-erc-message "adios") +``` + +## 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 + +``` 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 + diff --git a/modules/prelude-erc.el b/modules/prelude-erc.el index 7a807713fc..fb5f2c99de 100644 --- a/modules/prelude-erc.el +++ b/modules/prelude-erc.el @@ -112,11 +112,24 @@ that can occur between two notifications. The default is ;; utf-8 always and forever (setq erc-server-coding-system '(utf-8 . utf-8)) + +(defvar my-fav-irc '( "irc.freenode.net" ) + "Stores the list of IRC servers that you want to connect to with start-irc.") + +(defvar bye-irc-message "Asta la vista" + "Message string to be sent while quitting IRC.") + +(defun connect-to-erc (server) + "Connects securely to IRC SERVER over TLS at port 6697." + (erc-tls :server server + :port 6697 + :nick erc-nick )) + (defun start-irc () - "Connect to IRC." + "Connect to IRC?" (interactive) (when (y-or-n-p "Do you want to start IRC? ") - (erc :server "irc.freenode.net" :port 6667 :nick erc-nick))) + (mapcar 'connect-to-erc my-fav-irc))) (defun filter-server-buffers () (delq nil @@ -125,14 +138,12 @@ that can occur between two notifications. The default is (buffer-list)))) (defun stop-irc () - "Disconnects from all irc servers" + "Disconnects from all irc servers." (interactive) (dolist (buffer (filter-server-buffers)) (message "Server buffer: %s" (buffer-name buffer)) (with-current-buffer buffer - (erc-quit-server "Asta la vista")))) - -(setq erc-autojoin-channels-alist '(("freenode.net" "#prelude-emacs" "#projectile"))) + (erc-quit-server bye-irc-message)))) (provide 'prelude-erc) From 3f5b2e39db3283b5ee80f5e204a575dba576df07 Mon Sep 17 00:00:00 2001 From: Manoel Vilela Date: Sun, 16 Jul 2017 05:03:29 -0300 Subject: [PATCH 40/43] [Fix #1096] Remove ido-ubiquitous and add ido-completing-read+ (#1100) After version 4.0, ido-ubiquitous was merged into ido-completing-read+. So ido-ubiquitous is no longer necessary. --- modules/prelude-ido.el | 4 ++-- sample/prelude-pinned-packages.el | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/prelude-ido.el b/modules/prelude-ido.el index 649991a2b6..768bf74f9e 100644 --- a/modules/prelude-ido.el +++ b/modules/prelude-ido.el @@ -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 diff --git a/sample/prelude-pinned-packages.el b/sample/prelude-pinned-packages.el index 719cf99401..b632b07704 100644 --- a/sample/prelude-pinned-packages.el +++ b/sample/prelude-pinned-packages.el @@ -74,7 +74,6 @@ (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") From 41775b9b6b2cc3bd06b369b0a07913f4890fea0f Mon Sep 17 00:00:00 2001 From: Manoel Vilela Date: Sun, 16 Jul 2017 09:14:02 -0300 Subject: [PATCH 41/43] Upgrade prelude-common-lisp.el (#1099) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Remove TAB remap This will fix the warning for each TAB: > "‘slime-indent-and-complete-symbol’ is an obsolete command (as of 2015-10-18); * Add slime-cl-indent to slime-contribs This will ensure that lisp-indent-function will be used correctly for Common Lisp (not Emacs Lisp). --- modules/prelude-common-lisp.el | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/prelude-common-lisp.el b/modules/prelude-common-lisp.el index 0269013ead..4829f0235a 100644 --- a/modules/prelude-common-lisp.el +++ b/modules/prelude-common-lisp.el @@ -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) From 8b390fbf34d3fd8c77c1a2d9300454dd18ea3d88 Mon Sep 17 00:00:00 2001 From: Chris Stryczynski Date: Sun, 16 Jul 2017 12:33:25 +0100 Subject: [PATCH 42/43] Mentioned requirement of having no ~/.emacs file. Saves runninng into https://github.com/bbatsov/prelude/issues/1089 --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 259a88f857..00fc05c431 100644 --- a/README.md +++ b/README.md @@ -136,6 +136,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 From bfee53643c26c9a8623b7617ce5c46aea13d3bcd Mon Sep 17 00:00:00 2001 From: Manoel Vilela Date: Mon, 17 Jul 2017 11:07:48 -0300 Subject: [PATCH 43/43] Add the prelude-rust.el module (#1102) The module uses the following packages: * rust-mode (general utilities for rust development) * flycheck-rust (syntax checking) * cargo (keybinding as minor-mode for using cargo package manager) * racer (wrapper for the race code completion tool using company-mode) --- modules/prelude-rust.el | 66 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 modules/prelude-rust.el diff --git a/modules/prelude-rust.el b/modules/prelude-rust.el new file mode 100644 index 0000000000..bb4c4a8451 --- /dev/null +++ b/modules/prelude-rust.el @@ -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