diff --git a/core/prelude-core.el b/core/prelude-core.el index 32df536..bc4c0c8 100644 --- a/core/prelude-core.el +++ b/core/prelude-core.el @@ -1,9 +1,9 @@ -;;; prelude-core.el --- Emacs Prelude: core Prelude defuns. +;;; prelude-core.el --- Emacs Prelude: Core Prelude functions. ;; ;; Copyright © 2011-2013 Bozhidar Batsov ;; ;; Author: Bozhidar Batsov -;; URL: http://batsov.com/emacs-prelude +;; URL: https://github.com/bbatsov/prelude ;; Version: 1.0.0 ;; Keywords: convenience @@ -35,8 +35,7 @@ (require 'thingatpt) (defun prelude-open-with () - "Simple function that allows us to open the underlying -file of a buffer in an external program." + "Open visited file in external program." (interactive) (when buffer-file-name (shell-command (concat @@ -47,9 +46,11 @@ file of a buffer in an external program." buffer-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)) (defun prelude-visit-term-buffer () + "Create or visit a terminal buffer." (interactive) (if (not (get-buffer "*ansi-term*")) (progn @@ -112,12 +113,12 @@ the curson at its beginning, according to the current mode." (forward-line -1)) (defun prelude-indent-buffer () - "Indents the entire buffer." + "Indent the currently visited buffer." (interactive) (indent-region (point-min) (point-max))) (defun prelude-indent-region-or-buffer () - "Indents a region if selected, otherwise the whole buffer." + "Indent a region if selected, otherwise the whole buffer." (interactive) (save-excursion (if (region-active-p) @@ -152,7 +153,7 @@ the curson at its beginning, according to the current mode." (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 +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") (let (beg end (origin (point))) @@ -189,7 +190,7 @@ there's a region, all lines that region covers will be duplicated." (set-buffer-modified-p nil))))))) (defun prelude-delete-file-and-buffer () - "Kills the current buffer and deletes the file it is visiting" + "Kill the current buffer and deletes the file it is visiting." (interactive) (let ((filename (buffer-file-name))) (when filename @@ -209,6 +210,7 @@ there's a region, all lines that region covers will be duplicated." ((search-forward "> (buffer-list) @@ -293,31 +296,6 @@ there's a region, all lines that region covers will be duplicated." (--remove (eql (current-buffer) it))) #'kill-buffer)) -(require 'repeat) - -(defun make-repeatable-command (cmd) - "Returns a new command that is a repeatable version of CMD. -The new command is named CMD-repeat. CMD should be a quoted -command. - -This allows you to bind the command to a compound keystroke andб -repeat it with just the final key. For example: - - (global-set-key (kbd \"C-c a\") (make-repeatable-command 'foo)) - -will create a new command called foo-repeat. Typing C-c a will -just invoke foo. Typing C-c a a a will invoke foo three times, -and so on." - (fset (intern (concat (symbol-name cmd) "-repeat")) - `(lambda ,(help-function-arglist cmd) ;; arg list - ,(format "A repeatable version of `%s'." - (symbol-name cmd)) ;; doc string - ,(interactive-form cmd) ;; interactive form - ;; see also repeat-message-function - (setq last-repeatable-command ',cmd) - (repeat nil))) - (intern (concat (symbol-name cmd) "-repeat"))) - (defun prelude-create-scratch-buffer () "Create a new scratch buffer." (interactive) @@ -338,6 +316,7 @@ and so on." "Visit WikEmacs at http://wikemacs.org to find out even more about Emacs.")) (defun prelude-tip-of-the-day () + "Display a random entry from `prelude-tips'." (interactive) ;; pick a new random seed (random t) diff --git a/core/prelude-editor.el b/core/prelude-editor.el index 1f17bc8..9ddc66c 100644 --- a/core/prelude-editor.el +++ b/core/prelude-editor.el @@ -3,7 +3,7 @@ ;; Copyright © 2011-2013 Bozhidar Batsov ;; ;; Author: Bozhidar Batsov -;; URL: http://batsov.com/emacs-prelude +;; URL: https://github.com/bbatsov/prelude ;; Version: 1.0.0 ;; Keywords: convenience diff --git a/core/prelude-global-keybindings.el b/core/prelude-global-keybindings.el index 292f0d1..3593aba 100644 --- a/core/prelude-global-keybindings.el +++ b/core/prelude-global-keybindings.el @@ -3,7 +3,7 @@ ;; Copyright © 2011-2013 Bozhidar Batsov ;; ;; Author: Bozhidar Batsov -;; URL: http://batsov.com/emacs-prelude +;; URL: https://github.com/bbatsov/prelude ;; Version: 1.0.0 ;; Keywords: convenience @@ -92,7 +92,6 @@ (global-set-key (kbd "C-x g") 'magit-status) (global-set-key (kbd "C-=") 'er/expand-region) -(global-set-key (kbd "C-c w") (make-repeatable-command 'er/expand-region)) ;; make C-x C-x usable with transient-mark-mode (define-key global-map diff --git a/core/prelude-mode.el b/core/prelude-mode.el index 9d037ac..96bcc03 100644 --- a/core/prelude-mode.el +++ b/core/prelude-mode.el @@ -3,7 +3,7 @@ ;; Copyright © 2011-2013 Bozhidar Batsov ;; ;; Author: Bozhidar Batsov -;; URL: http://batsov.com/emacs-prelude +;; URL: https://github.com/bbatsov/prelude ;; Version: 1.0.0 ;; Keywords: convenience diff --git a/core/prelude-packages.el b/core/prelude-packages.el index d5f6a0e..0fa4b55 100644 --- a/core/prelude-packages.el +++ b/core/prelude-packages.el @@ -3,7 +3,7 @@ ;; Copyright © 2011-2013 Bozhidar Batsov ;; ;; Author: Bozhidar Batsov -;; URL: http://batsov.com/emacs-prelude +;; URL: https://github.com/bbatsov/prelude ;; Version: 1.0.0 ;; Keywords: convenience diff --git a/core/prelude-ui.el b/core/prelude-ui.el index d989572..ae7c6a4 100644 --- a/core/prelude-ui.el +++ b/core/prelude-ui.el @@ -3,7 +3,7 @@ ;; Copyright © 2011-2013 Bozhidar Batsov ;; ;; Author: Bozhidar Batsov -;; URL: http://batsov.com/emacs-prelude +;; URL: https://github.com/bbatsov/prelude ;; Version: 1.0.0 ;; Keywords: convenience diff --git a/modules/prelude-c.el b/modules/prelude-c.el index e92fca7..ab1a78b 100644 --- a/modules/prelude-c.el +++ b/modules/prelude-c.el @@ -3,7 +3,7 @@ ;; Copyright © 2011-2013 Bozhidar Batsov ;; ;; Author: Bozhidar Batsov -;; URL: http://batsov.com/emacs-prelude +;; URL: https://github.com/bbatsov/prelude ;; Version: 1.0.0 ;; Keywords: convenience diff --git a/modules/prelude-coffee.el b/modules/prelude-coffee.el index d9167e2..69e3c65 100644 --- a/modules/prelude-coffee.el +++ b/modules/prelude-coffee.el @@ -3,7 +3,7 @@ ;; Copyright © 2011-2013 Bozhidar Batsov ;; ;; Author: Bozhidar Batsov -;; URL: http://batsov.com/emacs-prelude +;; URL: https://github.com/bbatsov/prelude ;; Version: 1.0.0 ;; Keywords: convenience diff --git a/modules/prelude-common-lisp.el b/modules/prelude-common-lisp.el index 88d6e39..09a89b9 100644 --- a/modules/prelude-common-lisp.el +++ b/modules/prelude-common-lisp.el @@ -3,7 +3,7 @@ ;; Copyright © 2011-2013 Bozhidar Batsov ;; ;; Author: Bozhidar Batsov -;; URL: http://batsov.com/emacs-prelude +;; URL: https://github.com/bbatsov/prelude ;; Version: 1.0.0 ;; Keywords: convenience diff --git a/modules/prelude-emacs-lisp.el b/modules/prelude-emacs-lisp.el index 8bc9902..5f0425e 100644 --- a/modules/prelude-emacs-lisp.el +++ b/modules/prelude-emacs-lisp.el @@ -3,7 +3,7 @@ ;; Copyright © 2011-2013 Bozhidar Batsov ;; ;; Author: Bozhidar Batsov -;; URL: http://batsov.com/emacs-prelude +;; URL: https://github.com/bbatsov/prelude ;; Version: 1.0.0 ;; Keywords: convenience ;; Package-Requires: ((prelude-lisp "1.0.0")) diff --git a/modules/prelude-erc.el b/modules/prelude-erc.el index 5de8fcb..7e7a07e 100644 --- a/modules/prelude-erc.el +++ b/modules/prelude-erc.el @@ -3,7 +3,7 @@ ;; Copyright © 2011-2013 Bozhidar Batsov ;; ;; Author: Bozhidar Batsov -;; URL: http://batsov.com/emacs-prelude +;; URL: https://github.com/bbatsov/prelude ;; Version: 1.0.0 ;; Keywords: convenience diff --git a/modules/prelude-haskell.el b/modules/prelude-haskell.el index 30fca29..1183789 100644 --- a/modules/prelude-haskell.el +++ b/modules/prelude-haskell.el @@ -3,7 +3,7 @@ ;; Copyright © 2011-2013 Bozhidar Batsov ;; ;; Author: Bozhidar Batsov -;; URL: http://batsov.com/emacs-prelude +;; URL: https://github.com/bbatsov/prelude ;; Version: 1.0.0 ;; Keywords: convenience diff --git a/modules/prelude-js.el b/modules/prelude-js.el index 998f457..984b95e 100644 --- a/modules/prelude-js.el +++ b/modules/prelude-js.el @@ -3,7 +3,7 @@ ;; Copyright © 2011-2013 Bozhidar Batsov ;; ;; Author: Bozhidar Batsov -;; URL: http://batsov.com/emacs-prelude +;; URL: https://github.com/bbatsov/prelude ;; Version: 1.0.0 ;; Keywords: convenience diff --git a/modules/prelude-latex.el b/modules/prelude-latex.el index 2c52b7b..80e6465 100644 --- a/modules/prelude-latex.el +++ b/modules/prelude-latex.el @@ -3,7 +3,7 @@ ;; Copyright © 2011-2013 Bozhidar Batsov ;; ;; Author: Bozhidar Batsov -;; URL: http://batsov.com/emacs-prelude +;; URL: https://github.com/bbatsov/prelude ;; Version: 1.0.0 ;; Keywords: convenience diff --git a/modules/prelude-lisp.el b/modules/prelude-lisp.el index b00f37f..1dac0af 100644 --- a/modules/prelude-lisp.el +++ b/modules/prelude-lisp.el @@ -3,7 +3,7 @@ ;; Copyright © 2011-2013 Bozhidar Batsov ;; ;; Author: Bozhidar Batsov -;; URL: http://batsov.com/emacs-prelude +;; URL: https://github.com/bbatsov/prelude ;; Version: 1.0.0 ;; Keywords: convenience diff --git a/modules/prelude-mediawiki.el b/modules/prelude-mediawiki.el index 0fd9ce6..54519b3 100644 --- a/modules/prelude-mediawiki.el +++ b/modules/prelude-mediawiki.el @@ -3,7 +3,7 @@ ;; Copyright © 2011-2013 Bozhidar Batsov ;; ;; Author: Bozhidar Batsov -;; URL: http://batsov.com/emacs-prelude +;; URL: https://github.com/bbatsov/prelude ;; Version: 1.0.0 ;; Keywords: convenience diff --git a/modules/prelude-org.el b/modules/prelude-org.el index dac520c..d35a2fe 100644 --- a/modules/prelude-org.el +++ b/modules/prelude-org.el @@ -3,7 +3,7 @@ ;; Copyright © 2011-2013 Bozhidar Batsov ;; ;; Author: Bozhidar Batsov -;; URL: http://batsov.com/emacs-prelude +;; URL: https://github.com/bbatsov/prelude ;; Version: 1.0.0 ;; Keywords: convenience diff --git a/modules/prelude-perl.el b/modules/prelude-perl.el index 81067ef..a5b59ec 100644 --- a/modules/prelude-perl.el +++ b/modules/prelude-perl.el @@ -3,7 +3,7 @@ ;; Copyright © 2011-2013 Bozhidar Batsov ;; ;; Author: Bozhidar Batsov -;; URL: http://batsov.com/emacs-prelude +;; URL: https://github.com/bbatsov/prelude ;; Version: 1.0.0 ;; Keywords: convenience diff --git a/modules/prelude-programming.el b/modules/prelude-programming.el index fbdd4be..7a4e4de 100644 --- a/modules/prelude-programming.el +++ b/modules/prelude-programming.el @@ -3,7 +3,7 @@ ;; Copyright © 2011-2013 Bozhidar Batsov ;; ;; Author: Bozhidar Batsov -;; URL: http://batsov.com/emacs-prelude +;; URL: https://github.com/bbatsov/prelude ;; Version: 1.0.0 ;; Keywords: convenience diff --git a/modules/prelude-python.el b/modules/prelude-python.el index 698d63f..7d8a209 100644 --- a/modules/prelude-python.el +++ b/modules/prelude-python.el @@ -3,7 +3,7 @@ ;; Copyright © 2011-2013 Bozhidar Batsov ;; ;; Author: Bozhidar Batsov -;; URL: http://batsov.com/emacs-prelude +;; URL: https://github.com/bbatsov/prelude ;; Version: 1.0.0 ;; Keywords: convenience diff --git a/modules/prelude-ruby.el b/modules/prelude-ruby.el index 7b781c0..2b0bff3 100644 --- a/modules/prelude-ruby.el +++ b/modules/prelude-ruby.el @@ -3,7 +3,7 @@ ;; Copyright © 2011-2013 Bozhidar Batsov ;; ;; Author: Bozhidar Batsov -;; URL: http://batsov.com/emacs-prelude +;; URL: https://github.com/bbatsov/prelude ;; Version: 1.0.0 ;; Keywords: convenience diff --git a/modules/prelude-scala.el b/modules/prelude-scala.el index cee3cc9..d873f07 100644 --- a/modules/prelude-scala.el +++ b/modules/prelude-scala.el @@ -3,7 +3,7 @@ ;; Copyright © 2011-2013 Bozhidar Batsov ;; ;; Author: Bozhidar Batsov -;; URL: http://batsov.com/emacs-prelude +;; URL: https://github.com/bbatsov/prelude ;; Version: 1.0.0 ;; Keywords: convenience diff --git a/modules/prelude-scheme.el b/modules/prelude-scheme.el index a35a1f4..8752bf3 100644 --- a/modules/prelude-scheme.el +++ b/modules/prelude-scheme.el @@ -3,7 +3,7 @@ ;; Copyright © 2011-2013 Bozhidar Batsov ;; ;; Author: Bozhidar Batsov -;; URL: http://batsov.com/emacs-prelude +;; URL: https://github.com/bbatsov/prelude ;; Version: 1.0.0 ;; Keywords: convenience diff --git a/modules/prelude-xml.el b/modules/prelude-xml.el index d3d11a4..3326781 100644 --- a/modules/prelude-xml.el +++ b/modules/prelude-xml.el @@ -3,7 +3,7 @@ ;; Copyright © 2011-2013 Bozhidar Batsov ;; ;; Author: Bozhidar Batsov -;; URL: http://batsov.com/emacs-prelude +;; URL: https://github.com/bbatsov/prelude ;; Version: 1.0.0 ;; Keywords: convenience