[ELPA] Update

This commit is contained in:
Daniel - 2017-12-17 10:22:15 +01:00
parent 3840768b15
commit a3b7c3069c
Signed by: dbo
GPG Key ID: 4F63DB96D45AA9C6
23 changed files with 3651 additions and 1757 deletions

View File

@ -1,2 +0,0 @@
;;; -*- no-byte-compile: t -*-
(define-package "bind-key" "20171129.2144" "A simple way to manage personal keybindings" 'nil :commit "fe5d8a9f501d9151efd633c0e16f42932969f1fc" :url "https://github.com/jwiegley/use-package" :keywords '("keys" "keybinding" "config" "dotemacs"))

View File

@ -3,8 +3,8 @@
;;; Code:
(add-to-list 'load-path (directory-file-name (or (file-name-directory #$) (car load-path))))
;;;### (autoloads nil "bind-key" "bind-key.el" (23074 63739 689897
;;;;;; 354000))
;;;### (autoloads nil "bind-key" "bind-key.el" (23094 13992 105416
;;;;;; 163000))
;;; Generated autoloads from bind-key.el
(autoload 'bind-key "bind-key" "\
@ -15,6 +15,13 @@ KEY-NAME may be a vector, in which case it is passed straight to
spelled-out keystrokes, e.g., \"C-c C-z\". See documentation of
`edmacro-mode' for details.
COMMAND must be an interactive function or lambda form.
KEYMAP, if present, should be a keymap and not a quoted symbol.
For example:
(bind-key \"M-h\" #'some-interactive-function my-mode-map)
If PREDICATE is non-nil, it is a form evaluated to determine when
a key should be bound. It must return non-nil in such cases.
Emacs can evaluate this form at any time that it does redisplay

View File

@ -0,0 +1,2 @@
;;; -*- no-byte-compile: t -*-
(define-package "bind-key" "20171210.2125" "A simple way to manage personal keybindings" 'nil :commit "33e9a4b74042e46161bff70e19b87317b1781fc5" :url "https://github.com/jwiegley/use-package" :keywords '("keys" "keybinding" "config" "dotemacs"))

View File

@ -7,13 +7,13 @@
;; Created: 16 Jun 2012
;; Modified: 29 Nov 2017
;; Version: 2.4
;; Package-Version: 20171129.2144
;; Package-Version: 20171210.2125
;; Keywords: keys keybinding config dotemacs
;; URL: https://github.com/jwiegley/use-package
;; 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 2, or (at
;; published by the free software foundation; either version 3, or (at
;; your option) any later version.
;; This program is distributed in the hope that it will be useful, but
@ -147,6 +147,13 @@ KEY-NAME may be a vector, in which case it is passed straight to
spelled-out keystrokes, e.g., \"C-c C-z\". See documentation of
`edmacro-mode' for details.
COMMAND must be an interactive function or lambda form.
KEYMAP, if present, should be a keymap and not a quoted symbol.
For example:
(bind-key \"M-h\" #'some-interactive-function my-mode-map)
If PREDICATE is non-nil, it is a form evaluated to determine when
a key should be bound. It must return non-nil in such cases.
Emacs can evaluate this form at any time that it does redisplay
@ -198,7 +205,7 @@ See `bind-key' for more details."
"Similar to `bind-key', but overrides any mode-specific bindings."
`(bind-key ,key-name ,command override-global-map ,predicate))
(defun bind-keys-form (args)
(defun bind-keys-form (args keymap)
"Bind multiple keys at once.
Accepts keyword arguments:
@ -213,30 +220,48 @@ Accepts keyword arguments:
The rest of the arguments are conses of keybinding string and a
function symbol (unquoted)."
;; jww (2016-02-26): This is a hack; this whole function needs to be
;; rewritten to normalize arguments the way that use-package.el does.
(if (and (eq (car args) :package)
(not (eq (car (cdr (cdr args))) :map)))
(setq args (cons :map (cons 'global-map args))))
(let* ((map (plist-get args :map))
(doc (plist-get args :prefix-docstring))
(prefix-map (plist-get args :prefix-map))
(prefix (plist-get args :prefix))
(filter (plist-get args :filter))
(menu-name (plist-get args :menu-name))
(pkg (plist-get args :package))
(key-bindings (progn
(while (keywordp (car args))
(pop args)
(pop args))
args)))
(let (map
doc
prefix-map
prefix
filter
menu-name
pkg)
;; Process any initial keyword arguments
(let ((cont t))
(while (and cont args)
(if (cond ((and (eq :map (car args))
(not prefix-map))
(setq map (cadr args)))
((eq :prefix-docstring (car args))
(setq doc (cadr args)))
((and (eq :prefix-map (car args))
(not (memq map '(global-map
override-global-map))))
(setq prefix-map (cadr args)))
((eq :prefix (car args))
(setq prefix (cadr args)))
((eq :filter (car args))
(setq filter (cadr args)) t)
((eq :menu-name (car args))
(setq menu-name (cadr args)))
((eq :package (car args))
(setq pkg (cadr args))))
(setq args (cddr args))
(setq cont nil))))
(when (or (and prefix-map (not prefix))
(and prefix (not prefix-map)))
(error "Both :prefix-map and :prefix must be supplied"))
(when (and menu-name (not prefix))
(error "If :menu-name is supplied, :prefix must be too"))
(let ((args key-bindings)
saw-map first next)
(unless map (setq map keymap))
;; Process key binding arguments
(let (first next)
(while args
(if (keywordp (car args))
(progn
@ -246,15 +271,18 @@ function symbol (unquoted)."
(nconc first (list (car args)))
(setq first (list (car args))))
(setq args (cdr args))))
(cl-flet
((wrap (map bindings)
(if (and map pkg (not (eq map 'global-map)))
(if (and map pkg (not (memq map '(global-map
override-global-map))))
`((if (boundp ',map)
(progn ,@bindings)
,(macroexp-progn bindings)
(eval-after-load
,(if (symbolp pkg) `',pkg pkg)
'(progn ,@bindings))))
',(macroexp-progn bindings))))
bindings)))
(append
(when prefix-map
`((defvar ,prefix-map)
@ -276,10 +304,9 @@ function symbol (unquoted)."
`((bind-key ,(car form) ,fun nil ,filter))))))
first))
(when next
(bind-keys-form
(if pkg
(bind-keys-form (if pkg
(cons :package (cons pkg next))
next))))))))
next) map)))))))
;;;###autoload
(defmacro bind-keys (&rest args)
@ -297,12 +324,11 @@ Accepts keyword arguments:
The rest of the arguments are conses of keybinding string and a
function symbol (unquoted)."
(macroexp-progn (bind-keys-form args)))
(macroexp-progn (bind-keys-form args nil)))
;;;###autoload
(defmacro bind-keys* (&rest args)
(macroexp-progn
(bind-keys-form `(:map override-global-map ,@args))))
(macroexp-progn (bind-keys-form args 'override-global-map)))
(defun get-binding-description (elem)
(cond

View File

@ -1,2 +0,0 @@
;;; -*- no-byte-compile: t -*-
(define-package "page-break-lines" "20171020.108" "Display ^L page breaks as tidy horizontal lines" '((emacs "24.4")) :commit "ae1c0065984429c7364a667abb9180e80134c4c0" :url "https://github.com/purcell/page-break-lines" :keywords '("convenience" "faces"))

View File

@ -3,8 +3,8 @@
;;; Code:
(add-to-list 'load-path (directory-file-name (or (file-name-directory #$) (car load-path))))
;;;### (autoloads nil "page-break-lines" "page-break-lines.el" (23028
;;;;;; 47890 302341 377000))
;;;### (autoloads nil "page-break-lines" "page-break-lines.el" (23094
;;;;;; 13927 449089 481000))
;;; Generated autoloads from page-break-lines.el
(defvar page-break-lines-char 9472 "\

View File

@ -0,0 +1,2 @@
;;; -*- no-byte-compile: t -*-
(define-package "page-break-lines" "20171210.31" "Display ^L page breaks as tidy horizontal lines" '((emacs "24.4")) :commit "fd3b7e38ad8747cd009ead7ef1bb150849ccc693" :url "https://github.com/purcell/page-break-lines" :keywords '("convenience" "faces"))

View File

@ -4,7 +4,7 @@
;; Author: Steve Purcell <steve@sanityinc.com>
;; URL: https://github.com/purcell/page-break-lines
;; Package-Version: 20171020.108
;; Package-Version: 20171210.31
;; Package-X-Original-Version: 0
;; Package-Requires: ((emacs "24.4"))
;; Keywords: convenience, faces
@ -169,7 +169,6 @@ When `major-mode' is listed in `page-break-lines-modes', then
;; Local Variables:
;; coding: utf-8
;; byte-compile-warnings: (not cl-functions)
;; checkdoc-minor-mode: t
;; End:

View File

@ -1,90 +0,0 @@
;;; use-package-autoloads.el --- automatically extracted autoloads
;;
;;; Code:
(add-to-list 'load-path (directory-file-name (or (file-name-directory #$) (car load-path))))
;;;### (autoloads nil "use-package" "use-package.el" (23074 63646
;;;;;; 149414 588000))
;;; Generated autoloads from use-package.el
(autoload 'use-package-autoload-keymap "use-package" "\
Loads PACKAGE and then binds the key sequence used to invoke
this function to KEYMAP-SYMBOL. It then simulates pressing the
same key sequence a again, so that the next key pressed is routed
to the newly loaded keymap.
This function supports use-package's :bind-keymap keyword. It
works by binding the given key sequence to an invocation of this
function for a particular keymap. The keymap is expected to be
defined by the package. In this way, loading the package is
deferred until the prefix key sequence is pressed.
\(fn KEYMAP-SYMBOL PACKAGE OVERRIDE)" nil nil)
(autoload 'use-package "use-package" "\
Declare an Emacs package by specifying a group of configuration options.
For full documentation, please see the README file that came with
this file. Usage:
(use-package package-name
[:keyword [option]]...)
:init Code to run before PACKAGE-NAME has been loaded.
:config Code to run after PACKAGE-NAME has been loaded. Note that
if loading is deferred for any reason, this code does not
execute until the lazy load has occurred.
:preface Code to be run before everything except `:disabled'; this
can be used to define functions for use in `:if', or that
should be seen by the byte-compiler.
:mode Form to be added to `auto-mode-alist'.
:magic Form to be added to `magic-mode-alist'.
:magic-fallback Form to be added to `magic-fallback-mode-alist'.
:interpreter Form to be added to `interpreter-mode-alist'.
:commands Define autoloads for commands that will be defined by the
package. This is useful if the package is being lazily
loaded, and you wish to conditionally call functions in your
`:init' block that are defined in the package.
:bind Bind keys, and define autoloads for the bound commands.
:bind* Bind keys, and define autoloads for the bound commands,
*overriding all minor mode bindings*.
:bind-keymap Bind a key prefix to an auto-loaded keymap defined in the
package. This is like `:bind', but for keymaps.
:bind-keymap* Like `:bind-keymap', but overrides all minor mode bindings
:defer Defer loading of a package -- this is implied when using
`:commands', `:bind', `:bind*', `:mode', `:magic',
`:magic-fallback', or `:interpreter'. This can be an integer,
to force loading after N seconds of idle time, if the package
has not already been loaded.
:after Defer loading of a package until after any of the named
features are loaded.
:demand Prevent deferred loading in all cases.
:if EXPR Initialize and load only if EXPR evaluates to a non-nil value.
:disabled The package is ignored completely if this keyword is present.
:defines Declare certain variables to silence the byte-compiler.
:functions Declare certain functions to silence the byte-compiler.
:load-path Add to the `load-path' before attempting to load the package.
:diminish Support for diminish.el (if installed).
:delight Support for delight.el (if installed).
:custom Call `customize-set-variable' with each variable definition.
:custom-face Call `customize-set-faces' with each face definition.
:ensure Loads the package using package.el if necessary.
:pin Pin the package to an archive.
\(fn NAME &rest ARGS)" nil t)
(function-put 'use-package 'lisp-indent-function '1)
;;;***
;; Local Variables:
;; version-control: never
;; no-byte-compile: t
;; no-update-autoloads: t
;; End:
;;; use-package-autoloads.el ends here

View File

@ -1,2 +0,0 @@
;;; -*- no-byte-compile: t -*-
(define-package "use-package" "20171201.1339" "A use-package declaration for simplifying your .emacs" '((emacs "24.3") (bind-key "2.4")) :commit "e8a3fdcc2e4c1557b64df25bec26851ec319d912" :url "https://github.com/jwiegley/use-package" :keywords '("dotemacs" "startup" "speed" "config" "package"))

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,18 @@
This is the file .../info/dir, which contains the
topmost node of the Info hierarchy, called (dir)Top.
The first time you invoke Info you start off looking at this node.

File: dir, Node: Top This is the top of the INFO tree
This (the Directory node) gives a menu of major topics.
Typing "q" exits, "?" lists all Info commands, "d" returns here,
"h" gives a primer for first-timers,
"mEmacs<Return>" visits the Emacs manual, etc.
In Emacs, you can click mouse button 2 on a menu item or cross reference
to select it.
* Menu:
Emacs
* use-package: (use-package). Declarative package configuration for Emacs.

View File

@ -0,0 +1,209 @@
;;; use-package-autoloads.el --- automatically extracted autoloads
;;
;;; Code:
(add-to-list 'load-path (directory-file-name (or (file-name-directory #$) (car load-path))))
;;;### (autoloads nil "use-package-bind-key" "use-package-bind-key.el"
;;;;;; (23094 13913 221017 92000))
;;; Generated autoloads from use-package-bind-key.el
(autoload 'use-package-autoload-keymap "use-package-bind-key" "\
Loads PACKAGE and then binds the key sequence used to invoke
this function to KEYMAP-SYMBOL. It then simulates pressing the
same key sequence a again, so that the next key pressed is routed
to the newly loaded keymap.
This function supports use-package's :bind-keymap keyword. It
works by binding the given key sequence to an invocation of this
function for a particular keymap. The keymap is expected to be
defined by the package. In this way, loading the package is
deferred until the prefix key sequence is pressed.
\(fn KEYMAP-SYMBOL PACKAGE OVERRIDE)" nil nil)
(autoload 'use-package-normalize-binder "use-package-bind-key" "\
\(fn NAME KEYWORD ARGS)" nil nil)
(defalias 'use-package-normalize/:bind 'use-package-normalize-binder)
(defalias 'use-package-normalize/:bind* 'use-package-normalize-binder)
(defalias 'use-package-autoloads/:bind 'use-package-autoloads-mode)
(defalias 'use-package-autoloads/:bind* 'use-package-autoloads-mode)
(autoload 'use-package-handler/:bind "use-package-bind-key" "\
\(fn NAME KEYWORD ARGS REST STATE &optional BIND-MACRO)" nil nil)
(defalias 'use-package-normalize/:bind-keymap 'use-package-normalize-binder)
(defalias 'use-package-normalize/:bind-keymap* 'use-package-normalize-binder)
(autoload 'use-package-handler/:bind-keymap "use-package-bind-key" "\
\(fn NAME KEYWORD ARGS REST STATE &optional OVERRIDE)" nil nil)
(autoload 'use-package-handler/:bind-keymap* "use-package-bind-key" "\
\(fn NAME KEYWORD ARG REST STATE)" nil nil)
;;;***
;;;### (autoloads nil "use-package-core" "use-package-core.el" (23094
;;;;;; 13913 161016 787000))
;;; Generated autoloads from use-package-core.el
(autoload 'use-package "use-package-core" "\
Declare an Emacs package by specifying a group of configuration options.
For full documentation, please see the README file that came with
this file. Usage:
(use-package package-name
[:keyword [option]]...)
:init Code to run before PACKAGE-NAME has been loaded.
:config Code to run after PACKAGE-NAME has been loaded. Note that
if loading is deferred for any reason, this code does not
execute until the lazy load has occurred.
:preface Code to be run before everything except `:disabled'; this
can be used to define functions for use in `:if', or that
should be seen by the byte-compiler.
:mode Form to be added to `auto-mode-alist'.
:magic Form to be added to `magic-mode-alist'.
:magic-fallback Form to be added to `magic-fallback-mode-alist'.
:interpreter Form to be added to `interpreter-mode-alist'.
:commands Define autoloads for commands that will be defined by the
package. This is useful if the package is being lazily
loaded, and you wish to conditionally call functions in your
`:init' block that are defined in the package.
:bind Bind keys, and define autoloads for the bound commands.
:bind* Bind keys, and define autoloads for the bound commands,
*overriding all minor mode bindings*.
:bind-keymap Bind a key prefix to an auto-loaded keymap defined in the
package. This is like `:bind', but for keymaps.
:bind-keymap* Like `:bind-keymap', but overrides all minor mode bindings
:defer Defer loading of a package -- this is implied when using
`:commands', `:bind', `:bind*', `:mode', `:magic',
`:magic-fallback', or `:interpreter'. This can be an integer,
to force loading after N seconds of idle time, if the package
has not already been loaded.
:after Defer loading of a package until after any of the named
features are loaded.
:demand Prevent deferred loading in all cases.
:if EXPR Initialize and load only if EXPR evaluates to a non-nil value.
:disabled The package is ignored completely if this keyword is present.
:defines Declare certain variables to silence the byte-compiler.
:functions Declare certain functions to silence the byte-compiler.
:load-path Add to the `load-path' before attempting to load the package.
:diminish Support for diminish.el (if installed).
:delight Support for delight.el (if installed).
:custom Call `customize-set-variable' with each variable definition.
:custom-face Call `customize-set-faces' with each face definition.
:ensure Loads the package using package.el if necessary.
:pin Pin the package to an archive.
\(fn NAME &rest ARGS)" nil t)
(function-put 'use-package 'lisp-indent-function '1)
;;;***
;;;### (autoloads nil "use-package-delight" "use-package-delight.el"
;;;;;; (23094 13913 181016 889000))
;;; Generated autoloads from use-package-delight.el
(autoload 'use-package-normalize/:delight "use-package-delight" "\
Normalize arguments to delight.
\(fn NAME KEYWORD ARGS)" nil nil)
(autoload 'use-package-handler/:delight "use-package-delight" "\
\(fn NAME KEYWORD ARGS REST STATE)" nil nil)
;;;***
;;;### (autoloads nil "use-package-diminish" "use-package-diminish.el"
;;;;;; (23094 13913 205017 10000))
;;; Generated autoloads from use-package-diminish.el
(autoload 'use-package-normalize/:diminish "use-package-diminish" "\
\(fn NAME KEYWORD ARGS)" nil nil)
(autoload 'use-package-handler/:diminish "use-package-diminish" "\
\(fn NAME KEYWORD ARG REST STATE)" nil nil)
;;;***
;;;### (autoloads nil "use-package-ensure" "use-package-ensure.el"
;;;;;; (23094 13913 177016 868000))
;;; Generated autoloads from use-package-ensure.el
(autoload 'use-package-normalize/:ensure "use-package-ensure" "\
\(fn NAME KEYWORD ARGS)" nil nil)
(autoload 'use-package-handler/:ensure "use-package-ensure" "\
\(fn NAME KEYWORD ENSURE REST STATE)" nil nil)
;;;***
;;;### (autoloads nil "use-package-jump" "use-package-jump.el" (23094
;;;;;; 13913 213017 52000))
;;; Generated autoloads from use-package-jump.el
(autoload 'use-package-jump-to-package-form "use-package-jump" "\
Attempt to find and jump to the `use-package' form that loaded
PACKAGE. This will only find the form if that form actually
required PACKAGE. If PACKAGE was previously required then this
function will jump to the file that originally required PACKAGE
instead.
\(fn PACKAGE)" t nil)
;;;***
;;;### (autoloads nil "use-package-lint" "use-package-lint.el" (23094
;;;;;; 13913 189016 929000))
;;; Generated autoloads from use-package-lint.el
(autoload 'use-package-lint "use-package-lint" "\
Check for errors in use-package declarations.
For example, if the module's `:if' condition is met, but even
with the specified `:load-path' the module cannot be found.
\(fn)" t nil)
;;;***
;;;### (autoloads nil nil ("use-package-pkg.el" "use-package.el")
;;;;;; (23094 13913 209017 32000))
;;;***
;; Local Variables:
;; version-control: never
;; no-byte-compile: t
;; no-update-autoloads: t
;; End:
;;; use-package-autoloads.el ends here

View File

@ -0,0 +1,169 @@
;;; use-package-bind-key.el --- Support for the :bind/:bind-keymap keywords
;; Copyright (C) 2012-2017 John Wiegley
;; Author: John Wiegley <johnw@newartisans.com>
;; Maintainer: John Wiegley <johnw@newartisans.com>
;; Created: 17 Jun 2012
;; Modified: 4 Dec 2017
;; Version: 1.0
;; Package-Requires: ((emacs "24.3") (use-package "2.4") (bind-key "2.4"))
;; Keywords: dotemacs startup speed config package
;; URL: https://github.com/jwiegley/use-package
;; 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, 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., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.
;;; Commentary:
;; Provides support for the :bind, :bind*, :bind-keymap and :bind-keymap*
;; keywords. Note that these are currently still baked into
;; `use-package-keywords' and `use-package-deferring-keywords', although this
;; is harmless if they are never used.
;;; Code:
(require 'use-package-core)
(require 'bind-key)
;;;###autoload
(defun use-package-autoload-keymap (keymap-symbol package override)
"Loads PACKAGE and then binds the key sequence used to invoke
this function to KEYMAP-SYMBOL. It then simulates pressing the
same key sequence a again, so that the next key pressed is routed
to the newly loaded keymap.
This function supports use-package's :bind-keymap keyword. It
works by binding the given key sequence to an invocation of this
function for a particular keymap. The keymap is expected to be
defined by the package. In this way, loading the package is
deferred until the prefix key sequence is pressed."
(if (not (require package nil t))
(use-package-error (format "Cannot load package.el: %s" package))
(if (and (boundp keymap-symbol)
(keymapp (symbol-value keymap-symbol)))
(let* ((kv (this-command-keys-vector))
(key (key-description kv))
(keymap (symbol-value keymap-symbol)))
(if override
(bind-key* key keymap)
(bind-key key keymap))
(setq unread-command-events
(listify-key-sequence kv)))
(use-package-error
(format "package.el %s failed to define keymap %s"
package keymap-symbol)))))
;;;###autoload
(defun use-package-normalize-binder (name keyword args)
(let ((arg args)
args*)
(while arg
(let ((x (car arg)))
(cond
;; (KEY . COMMAND)
((and (consp x)
(or (stringp (car x))
(vectorp (car x)))
(or (use-package-recognize-function (cdr x) t #'stringp)))
(setq args* (nconc args* (list x)))
(setq arg (cdr arg)))
;; KEYWORD
;; :map KEYMAP
;; :prefix-docstring STRING
;; :prefix-map SYMBOL
;; :prefix STRING
;; :filter SEXP
;; :menu-name STRING
((or (and (eq x :map) (symbolp (cadr arg)))
(and (eq x :prefix) (stringp (cadr arg)))
(and (eq x :prefix-map) (symbolp (cadr arg)))
(and (eq x :prefix-docstring) (stringp (cadr arg)))
(eq x :filter)
(and (eq x :menu-name) (stringp (cadr arg))))
(setq args* (nconc args* (list x (cadr arg))))
(setq arg (cddr arg)))
((listp x)
(setq args*
(nconc args* (use-package-normalize-binder name keyword x)))
(setq arg (cdr arg)))
(t
;; Error!
(use-package-error
(concat (symbol-name name)
" wants arguments acceptable to the `bind-keys' macro,"
" or a list of such values"))))))
args*))
;;;; :bind, :bind*
;;;###autoload
(defalias 'use-package-normalize/:bind 'use-package-normalize-binder)
;;;###autoload
(defalias 'use-package-normalize/:bind* 'use-package-normalize-binder)
;; jww (2017-12-07): This is too simplistic. It will fail to determine
;; autoloads in this situation:
;; (use-package foo
;; :bind (:map foo-map (("C-a" . func))))
;;;###autoload
(defalias 'use-package-autoloads/:bind 'use-package-autoloads-mode)
;;;###autoload
(defalias 'use-package-autoloads/:bind* 'use-package-autoloads-mode)
;;;###autoload
(defun use-package-handler/:bind
(name keyword args rest state &optional bind-macro)
(use-package-concat
(use-package-process-keywords name rest state)
`(,@(mapcar
#'(lambda (xs)
`(,(if bind-macro bind-macro 'bind-keys)
:package ,name ,@(use-package-normalize-commands xs)))
(use-package-split-list-at-keys :break args)))))
(defun use-package-handler/:bind* (name keyword arg rest state)
(use-package-handler/:bind name keyword arg rest state 'bind-keys*))
;;;; :bind-keymap, :bind-keymap*
;;;###autoload
(defalias 'use-package-normalize/:bind-keymap 'use-package-normalize-binder)
;;;###autoload
(defalias 'use-package-normalize/:bind-keymap* 'use-package-normalize-binder)
;;;###autoload
(defun use-package-handler/:bind-keymap
(name keyword args rest state &optional override)
(use-package-concat
(use-package-process-keywords name rest state)
(mapcar
#'(lambda (binding)
`(,(if override 'bind-key* 'bind-key)
,(car binding)
#'(lambda ()
(interactive)
(use-package-autoload-keymap
',(cdr binding) ',(use-package-as-symbol name)
,override))))
args)))
;;;###autoload
(defun use-package-handler/:bind-keymap* (name keyword arg rest state)
(use-package-handler/:bind-keymap name keyword arg rest state t))
(provide 'use-package-bind-key)
;;; use-package-bind-key.el ends here

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,91 @@
;;; use-package-delight.el --- Support for the :delight keyword
;; Copyright (C) 2012-2017 John Wiegley
;; Author: John Wiegley <johnw@newartisans.com>
;; Maintainer: John Wiegley <johnw@newartisans.com>
;; Created: 17 Jun 2012
;; Modified: 3 Dec 2017
;; Version: 1.0
;; Package-Requires: ((emacs "24.3") (use-package "2.4"))
;; Keywords: dotemacs startup speed config package
;; URL: https://github.com/jwiegley/use-package
;; 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, 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., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.
;;; Commentary:
;; Provides support for the :delight keyword, which is made available by
;; default by requiring `use-package'.
;;; Code:
(require 'use-package-core)
(defun use-package-normalize-delight (name args)
"Normalize ARGS for a single call to `delight'."
(when (eq :eval (car args))
;; Handle likely common mistake.
(use-package-error ":delight mode line constructs must be quoted"))
(cond ((and (= (length args) 1)
(use-package-non-nil-symbolp (car args)))
`(,(nth 0 args) nil ,name))
((= (length args) 2)
`(,(nth 0 args) ,(nth 1 args) ,name))
((= (length args) 3)
args)
(t
(use-package-error
":delight expects `delight' arguments or a list of them"))))
;;;###autoload
(defun use-package-normalize/:delight (name keyword args)
"Normalize arguments to delight."
(cond ((null args)
`((,(use-package-as-mode name) nil ,name)))
((and (= (length args) 1)
(use-package-non-nil-symbolp (car args)))
`((,(car args) nil ,name)))
((and (= (length args) 1)
(stringp (car args)))
`((,(use-package-as-mode name) ,(car args) ,name)))
((and (= (length args) 1)
(listp (car args))
(eq 'quote (caar args)))
`((,(use-package-as-mode name) ,@(cdar args) ,name)))
((and (= (length args) 2)
(listp (nth 1 args))
(eq 'quote (car (nth 1 args))))
`((,(car args) ,@(cdr (nth 1 args)) ,name)))
(t (mapcar
(apply-partially #'use-package-normalize-delight name)
(if (use-package-non-nil-symbolp (car args))
(list args)
args)))))
;;;###autoload
(defun use-package-handler/:delight (name keyword args rest state)
(let ((body (use-package-process-keywords name rest state)))
(use-package-concat
body
`((if (fboundp 'delight)
(delight '(,@args)))))))
(add-to-list 'use-package-keywords :delight t)
(provide 'use-package-delight)
;;; use-package-delight.el ends here

View File

@ -0,0 +1,80 @@
;;; use-package-diminish.el --- Support for the :diminish keyword
;; Copyright (C) 2012-2017 John Wiegley
;; Author: John Wiegley <johnw@newartisans.com>
;; Maintainer: John Wiegley <johnw@newartisans.com>
;; Created: 17 Jun 2012
;; Modified: 3 Dec 2017
;; Version: 1.0
;; Package-Requires: ((emacs "24.3") (use-package "2.4"))
;; Keywords: dotemacs startup speed config package
;; URL: https://github.com/jwiegley/use-package
;; 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, 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., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.
;;; Commentary:
;; Provides support for the :diminish keyword, which is made available by
;; default by requiring `use-package'.
;;; Code:
(require 'use-package-core)
(defun use-package-normalize-diminish (name label arg &optional recursed)
"Normalize the arguments to diminish down to a list of one of two forms:
SYMBOL
(SYMBOL . STRING)"
(cond
((not arg)
(list (use-package-as-mode name)))
((use-package-non-nil-symbolp arg)
(list arg))
((stringp arg)
(list (cons (use-package-as-mode name) arg)))
((and (consp arg) (stringp (cdr arg)))
(list arg))
((and (not recursed) (listp arg) (listp (cdr arg)))
(mapcar #'(lambda (x) (car (use-package-normalize-diminish
name label x t))) arg))
(t
(use-package-error
(concat label " wants a string, symbol, "
"(symbol . string) or list of these")))))
;;;###autoload
(defun use-package-normalize/:diminish (name keyword args)
(use-package-as-one (symbol-name keyword) args
(apply-partially #'use-package-normalize-diminish name) t))
;;;###autoload
(defun use-package-handler/:diminish (name keyword arg rest state)
(let ((body (use-package-process-keywords name rest state)))
(use-package-concat
(mapcar #'(lambda (var)
`(if (fboundp 'diminish)
,(if (consp var)
`(diminish ',(car var) ,(cdr var))
`(diminish ',var))))
arg)
body)))
(add-to-list 'use-package-keywords :diminish t)
(provide 'use-package-diminish)
;;; use-package-diminish.el ends here

View File

@ -0,0 +1,214 @@
;;; use-package-ensure.el --- Support for the :ensure and :pin keywords
;; Copyright (C) 2012-2017 John Wiegley
;; Author: John Wiegley <johnw@newartisans.com>
;; Maintainer: John Wiegley <johnw@newartisans.com>
;; Created: 17 Jun 2012
;; Modified: 3 Dec 2017
;; Version: 1.0
;; Package-Requires: ((emacs "24.3") (use-package "2.4"))
;; Keywords: dotemacs startup speed config package
;; URL: https://github.com/jwiegley/use-package
;; 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, 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., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.
;;; Commentary:
;; Provides support for the :ensure and :pin keywords, which is made available
;; by default by requiring `use-package'.
;;; Code:
(require 'cl-lib)
(require 'use-package-core)
(defgroup use-package-ensure nil
"Support for :ensure and :pin keywords in use-package declarations."
:group 'use-package)
(eval-when-compile
(declare-function package-installed-p "package")
(declare-function package-read-all-archive-contents "package" ()))
(defcustom use-package-always-ensure nil
"Treat every package as though it had specified using `:ensure SEXP'.
See also `use-package-defaults', which uses this value."
:type 'sexp
:group 'use-package-ensure)
(defcustom use-package-always-pin nil
"Treat every package as though it had specified using `:pin SYM'.
See also `use-package-defaults', which uses this value."
:type 'symbol
:group 'use-package-ensure)
(defcustom use-package-ensure-function 'use-package-ensure-elpa
"Function that ensures a package is installed.
This function is called with three arguments: the name of the
package declared in the `use-package' form; the arguments passed
to all `:ensure' keywords (always a list, even if only one); and
the current `state' plist created by previous handlers.
Note that this function is called whenever `:ensure' is provided,
even if it is nil. It is up to the function to decide on the
semantics of the various values for `:ensure'.
This function should return non-nil if the package is installed.
The default value uses package.el to install the package."
:type '(choice (const :tag "package.el" use-package-ensure-elpa)
(function :tag "Custom"))
:group 'use-package-ensure)
;;;; :pin
(defun use-package-normalize/:pin (name keyword args)
(use-package-only-one (symbol-name keyword) args
#'(lambda (label arg)
(cond
((stringp arg) arg)
((use-package-non-nil-symbolp arg) (symbol-name arg))
(t
(use-package-error
":pin wants an archive name (a string)"))))))
(eval-when-compile
(defvar package-pinned-packages)
(defvar package-archives))
(defun use-package-archive-exists-p (archive)
"Check if a given ARCHIVE is enabled.
ARCHIVE can be a string or a symbol or 'manual to indicate a
manually updated package."
(if (member archive '(manual "manual"))
't
(let ((valid nil))
(dolist (pa package-archives)
(when (member archive (list (car pa) (intern (car pa))))
(setq valid 't)))
valid)))
(defun use-package-pin-package (package archive)
"Pin PACKAGE to ARCHIVE."
(unless (boundp 'package-pinned-packages)
(setq package-pinned-packages ()))
(let ((archive-symbol (if (symbolp archive) archive (intern archive)))
(archive-name (if (stringp archive) archive (symbol-name archive))))
(if (use-package-archive-exists-p archive-symbol)
(add-to-list 'package-pinned-packages (cons package archive-name))
(error "Archive '%s' requested for package '%s' is not available."
archive-name package))
(unless (bound-and-true-p package--initialized)
(package-initialize t))))
(defun use-package-handler/:pin (name keyword archive-name rest state)
(let ((body (use-package-process-keywords name rest state))
(pin-form (if archive-name
`(use-package-pin-package ',(use-package-as-symbol name)
,archive-name))))
;; Pinning should occur just before ensuring
;; See `use-package-handler/:ensure'.
(if (bound-and-true-p byte-compile-current-file)
(eval pin-form) ; Eval when byte-compiling,
(push pin-form body)) ; or else wait until runtime.
body))
;;;; :ensure
(defvar package-archive-contents)
;;;###autoload
(defun use-package-normalize/:ensure (name keyword args)
(if (null args)
(list t)
(use-package-only-one (symbol-name keyword) args
#'(lambda (label arg)
(cond
((symbolp arg)
(list arg))
((and (listp arg) (= 3 (length arg))
(symbolp (nth 0 arg))
(eq :pin (nth 1 arg))
(or (stringp (nth 2 arg))
(symbolp (nth 2 arg))))
(list (cons (nth 0 arg) (nth 2 arg))))
(t
(use-package-error
(concat ":ensure wants an optional package name "
"(an unquoted symbol name), or (<symbol> :pin <string>)"))))))))
(defun use-package-ensure-elpa (name args state &optional no-refresh)
(dolist (ensure args)
(let ((package
(or (and (eq ensure t) (use-package-as-symbol name))
ensure)))
(when package
(require 'package)
(when (consp package)
(use-package-pin-package (car package) (cdr package))
(setq package (car package)))
(unless (package-installed-p package)
(condition-case-unless-debug err
(progn
(when (assoc package (bound-and-true-p
package-pinned-packages))
(package-read-all-archive-contents))
(if (assoc package package-archive-contents)
(package-install package)
(package-refresh-contents)
(when (assoc package (bound-and-true-p
package-pinned-packages))
(package-read-all-archive-contents))
(package-install package))
t)
(error
(display-warning 'use-package
(format "Failed to install %s: %s"
name (error-message-string err))
:error))))))))
;;;###autoload
(defun use-package-handler/:ensure (name keyword ensure rest state)
(let* ((body (use-package-process-keywords name rest state)))
;; We want to avoid installing packages when the `use-package' macro is
;; being macro-expanded by elisp completion (see `lisp--local-variables'),
;; but still install packages when byte-compiling, to avoid requiring
;; `package' at runtime.
(if (bound-and-true-p byte-compile-current-file)
;; Eval when byte-compiling,
(funcall use-package-ensure-function name ensure state)
;; or else wait until runtime.
(push `(,use-package-ensure-function ',name ',ensure ',state)
body))
body))
(add-to-list 'use-package-defaults
'(:ensure (list use-package-always-ensure)
(lambda (name args)
(and use-package-always-ensure
(not (plist-member args :load-path))))) t)
(add-to-list 'use-package-defaults
'(:pin use-package-always-pin use-package-always-pin) t)
(add-to-list 'use-package-keywords :ensure)
(add-to-list 'use-package-keywords :pin)
(provide 'use-package-ensure)
;;; use-package-ensure.el ends here

View File

@ -0,0 +1,79 @@
;;; use-package-jump.el --- Attempt to jump to a use-package declaration
;; Copyright (C) 2012-2017 John Wiegley
;; Author: John Wiegley <johnw@newartisans.com>
;; Maintainer: John Wiegley <johnw@newartisans.com>
;; Created: 17 Jun 2012
;; Modified: 3 Dec 2017
;; Version: 1.0
;; Package-Requires: ((emacs "24.3") (use-package "2.4"))
;; Keywords: dotemacs startup speed config package
;; URL: https://github.com/jwiegley/use-package
;; 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, 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., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.
;;; Commentary:
;; Provides the command `M-x use-package-jump-to-package-form', however it
;; only works if the package being jumped to was required during
;; initialization. If it was delay-loaded, it will not work. Improvements are
;; needed.
;;; Code:
(require 'use-package-core)
(defun use-package-find-require (package)
"Find file that required PACKAGE by searching `load-history'.
Returns an absolute file path or nil if none is found."
(catch 'suspect
(dolist (filespec load-history)
(dolist (entry (cdr filespec))
(when (equal entry (cons 'require package))
(throw 'suspect (car filespec)))))))
;;;###autoload
(defun use-package-jump-to-package-form (package)
"Attempt to find and jump to the `use-package' form that loaded
PACKAGE. This will only find the form if that form actually
required PACKAGE. If PACKAGE was previously required then this
function will jump to the file that originally required PACKAGE
instead."
(interactive (list (completing-read "Package: " features)))
(let* ((package (if (stringp package) (intern package) package))
(requiring-file (use-package-find-require package))
file location)
(if (null requiring-file)
(user-error "Can't find file requiring file; may have been autoloaded")
(setq file (if (string= (file-name-extension requiring-file) "elc")
(concat (file-name-sans-extension requiring-file) ".el")
requiring-file))
(when (file-exists-p file)
(find-file-other-window file)
(save-excursion
(goto-char (point-min))
(setq location
(re-search-forward
(format (eval use-package-form-regexp-eval) package) nil t)))
(if (null location)
(message "No use-package form found.")
(goto-char location)
(beginning-of-line))))))
(provide 'use-package-jump)
;;; use-package-jump.el ends here

View File

@ -0,0 +1,84 @@
;;; use-package-lint.el --- Attempt to find errors in use-package declarations
;; Copyright (C) 2012-2017 John Wiegley
;; Author: John Wiegley <johnw@newartisans.com>
;; Maintainer: John Wiegley <johnw@newartisans.com>
;; Created: 17 Jun 2012
;; Modified: 3 Dec 2017
;; Version: 1.0
;; Package-Requires: ((emacs "24.3") (use-package "2.4"))
;; Keywords: dotemacs startup speed config package
;; URL: https://github.com/jwiegley/use-package
;; 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, 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., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.
;;; Commentary:
;; Provides the command `M-x use-package-lint'.
;;; Code:
(require 'cl-lib)
(require 'use-package-core)
(defun use-package-lint-declaration (name plist)
(dolist (path (plist-get plist :load-path))
(unless (file-exists-p path)
(display-warning
'use-package
(format "%s :load-path does not exist: %s"
name path) :error)))
(unless (or (plist-member plist :disabled)
(plist-get plist :no-require)
(locate-library (use-package-as-string name) nil
(plist-get plist :load-path)))
(display-warning
'use-package
(format "%s module cannot be located" name) :error))
;; (dolist (command (plist-get plist :commands))
;; (unless (string= (find-lisp-object-file-name command nil)
;; (locate-library (use-package-as-string name) nil
;; (plist-get plist :load-path)))
;; (display-warning
;; 'use-package
;; (format "%s :command is from different path: %s"
;; name (symbol-name command)) :error)))
)
;;;###autoload
(defun use-package-lint ()
"Check for errors in use-package declarations.
For example, if the module's `:if' condition is met, but even
with the specified `:load-path' the module cannot be found."
(interactive)
(save-excursion
(goto-char (point-min))
(let ((re (eval use-package-form-regexp-eval)))
(while (re-search-forward re nil t)
(goto-char (match-beginning 0))
(let ((decl (read (current-buffer))))
(when (eq (car decl) 'use-package)
(use-package-lint-declaration
(use-package-as-string (cadr decl))
(use-package-normalize-keywords
(cadr decl) (cddr decl)))))))))
(provide 'use-package-lint)
;;; use-package-lint.el ends here

View File

@ -0,0 +1,8 @@
(define-package "use-package" "20171215.2248" "A configuration macro for simplifying your .emacs"
'((emacs "24.3")
(bind-key "2.4"))
:url "https://github.com/jwiegley/use-package" :keywords
'("dotemacs" "startup" "speed" "config" "package"))
;; Local Variables:
;; no-byte-compile: t
;; End:

View File

@ -0,0 +1,54 @@
;;; use-package.el --- A configuration macro for simplifying your .emacs
;; Copyright (C) 2012-2017 John Wiegley
;; Author: John Wiegley <johnw@newartisans.com>
;; Maintainer: John Wiegley <johnw@newartisans.com>
;; Created: 17 Jun 2012
;; Modified: 29 Nov 2017
;; Version: 2.4
;; Package-Requires: ((emacs "24.3") (bind-key "2.4"))
;; Keywords: dotemacs startup speed config package
;; URL: https://github.com/jwiegley/use-package
;; 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, 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., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.
;;; Commentary:
;; The `use-package' declaration macro allows you to isolate package
;; configuration in your ".emacs" in a way that is performance-oriented and,
;; well, just tidy. I created it because I have over 80 packages that I use
;; in Emacs, and things were getting difficult to manage. Yet with this
;; utility my total load time is just under 1 second, with no loss of
;; functionality!
;;
;; Please see README.md from the same repository for documentation.
;;; Code:
(require 'use-package-core)
(require 'use-package-bind-key)
(require 'use-package-diminish)
(require 'use-package-delight)
(require 'use-package-ensure)
(declare-function use-package-jump-to-package-form "use-package-jump")
(autoload #'use-package-jump-to-package-form "use-package-jump" nil t)
(provide 'use-package)
;;; use-package.el ends here

File diff suppressed because it is too large Load Diff