Compare commits

..

No commits in common. "cbd97e8c3eeb3117b02be900c7f86edfe16512b6" and "d6ffc0ba40ac664e43396bb85d57a55d58c3d9a7" have entirely different histories.

33 changed files with 1262 additions and 1676 deletions

View File

@ -0,0 +1,84 @@
;;; bind-key-autoloads.el --- automatically extracted autoloads
;;
;;; Code:
(add-to-list 'load-path (directory-file-name
(or (file-name-directory #$) (car load-path))))
;;;### (autoloads nil "bind-key" "bind-key.el" (0 0 0 0))
;;; Generated autoloads from bind-key.el
(autoload 'bind-key "bind-key" "\
Bind KEY-NAME to COMMAND in KEYMAP (`global-map' if not passed).
KEY-NAME may be a vector, in which case it is passed straight to
`define-key'. Or it may be a string to be interpreted as
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 variable or symbol.
For example:
(bind-key \"M-h\" #'some-interactive-function my-mode-map)
(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
or operates on menu data structures, so you should write it so it
can safely be called at any time.
\(fn KEY-NAME COMMAND &optional KEYMAP PREDICATE)" nil t)
(autoload 'unbind-key "bind-key" "\
Unbind the given KEY-NAME, within the KEYMAP (if specified).
See `bind-key' for more details.
\(fn KEY-NAME &optional KEYMAP)" nil t)
(autoload 'bind-key* "bind-key" "\
Similar to `bind-key', but overrides any mode-specific bindings.
\(fn KEY-NAME COMMAND &optional PREDICATE)" nil t)
(autoload 'bind-keys "bind-key" "\
Bind multiple keys at once.
Accepts keyword arguments:
:map MAP - a keymap into which the keybindings should be
added
:prefix KEY - prefix key for these bindings
:prefix-map MAP - name of the prefix map that should be created
for these bindings
:prefix-docstring STR - docstring for the prefix-map variable
:menu-name NAME - optional menu string for prefix map
:filter FORM - optional form to determine when bindings apply
The rest of the arguments are conses of keybinding string and a
function symbol (unquoted).
\(fn &rest ARGS)" nil t)
(autoload 'bind-keys* "bind-key" "\
\(fn &rest ARGS)" nil t)
(autoload 'describe-personal-keybindings "bind-key" "\
Display all the personal keybindings defined by `bind-key'." t nil)
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "bind-key" '("bind-key" "compare-keybindings" "get-binding-description" "override-global-m" "personal-keybindings")))
;;;***
;; Local Variables:
;; version-control: never
;; no-byte-compile: t
;; no-update-autoloads: t
;; coding: utf-8
;; End:
;;; bind-key-autoloads.el ends here

View File

@ -0,0 +1,2 @@
;;; Generated package description from bind-key-2.4.1/bind-key.el -*- no-byte-compile: t -*-
(define-package "bind-key" "2.4.1" "A simple way to manage personal keybindings" 'nil :commit "caa92f1d64fc25480551757d854b4b49981dfa6b" :keywords '("keys" "keybinding" "config" "dotemacs") :authors '(("John Wiegley" . "johnw@newartisans.com")) :maintainer '("John Wiegley" . "johnw@newartisans.com") :url "https://github.com/jwiegley/use-package")

View File

@ -1,33 +1,37 @@
;;; bind-key.el --- A simple way to manage personal keybindings -*- lexical-binding: t; -*- ;;; bind-key.el --- A simple way to manage personal keybindings
;; Copyright (c) 2012-2022 Free Software Foundation, Inc. ;; Copyright (c) 2012-2017 John Wiegley
;; Author: John Wiegley <johnw@newartisans.com> ;; Author: John Wiegley <johnw@newartisans.com>
;; Maintainer: John Wiegley <johnw@newartisans.com> ;; Maintainer: John Wiegley <johnw@newartisans.com>
;; Created: 16 Jun 2012 ;; Created: 16 Jun 2012
;; Version: 2.4.1 ;; Modified: 29 Nov 2017
;; Package-Requires: ((emacs "24.3")) ;; Version: 2.4
;; Keywords: keys keybinding config dotemacs extensions ;; Package-Version: 2.4.1
;; Package-Commit: caa92f1d64fc25480551757d854b4b49981dfa6b
;; Keywords: keys keybinding config dotemacs
;; URL: https://github.com/jwiegley/use-package ;; URL: https://github.com/jwiegley/use-package
;; This program is free software; you can redistribute it and/or modify ;; This program is free software; you can redistribute it and/or
;; it under the terms of the GNU General Public License as published by ;; modify it under the terms of the gnu general public license as
;; the Free Software Foundation, either version 3 of the License, or ;; published by the free software foundation; either version 3, or (at
;; (at your option) any later version. ;; your option) any later version.
;; This program is distributed in the hope that it will be useful, ;; This program is distributed in the hope that it will be useful, but
;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; without any warranty; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; merchantability or fitness for a particular purpose. see the gnu
;; GNU General Public License for more details. ;; general public license for more details.
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <https://www.gnu.org/licenses/>.
;; 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: ;;; Commentary:
;; If you have lots of keybindings set in your .emacs file, it can be hard to ;; If you have lots of keybindings set in your .emacs file, it can be hard to
;; know which ones you haven't set yet, and which may now be overriding some ;; know which ones you haven't set yet, and which may now be overriding some
;; new default in a new Emacs version. This module aims to solve that ;; new default in a new emacs version. This module aims to solve that
;; problem. ;; problem.
;; ;;
;; Bind keys as follows in your .emacs: ;; Bind keys as follows in your .emacs:
@ -102,7 +106,7 @@
(require 'easy-mmode) (require 'easy-mmode)
(defgroup bind-key nil (defgroup bind-key nil
"A simple way to manage personal keybindings." "A simple way to manage personal keybindings"
:group 'emacs) :group 'emacs)
(defcustom bind-key-column-widths '(18 . 40) (defcustom bind-key-column-widths '(18 . 40)
@ -125,12 +129,11 @@
;; Create override-global-mode to force key remappings ;; Create override-global-mode to force key remappings
(defvar override-global-map (make-keymap) (defvar override-global-map (make-keymap)
"Keymap for `override-global-mode'.") "override-global-mode keymap")
(define-minor-mode override-global-mode (define-minor-mode override-global-mode
"A minor mode so that keymap settings override other modes." "A minor mode so that keymap settings override other modes."
:init-value t t "")
:lighter "")
;; the keymaps in `emulation-mode-map-alists' take precedence over ;; the keymaps in `emulation-mode-map-alists' take precedence over
;; `minor-mode-map-alist' ;; `minor-mode-map-alist'
@ -148,7 +151,7 @@ Elements have the form ((KEY . [MAP]) CMD ORIGINAL-CMD)")
KEY-NAME may be a vector, in which case it is passed straight to KEY-NAME may be a vector, in which case it is passed straight to
`define-key'. Or it may be a string to be interpreted as `define-key'. Or it may be a string to be interpreted as
spelled-out keystrokes, e.g., `C-c C-z'. See documentation of spelled-out keystrokes, e.g., \"C-c C-z\". See documentation of
`edmacro-mode' for details. `edmacro-mode' for details.
COMMAND must be an interactive function or lambda form. COMMAND must be an interactive function or lambda form.
@ -156,9 +159,9 @@ COMMAND must be an interactive function or lambda form.
KEYMAP, if present, should be a keymap variable or symbol. KEYMAP, if present, should be a keymap variable or symbol.
For example: For example:
(bind-key \"M-h\" #\\='some-interactive-function my-mode-map) (bind-key \"M-h\" #'some-interactive-function my-mode-map)
(bind-key \"M-h\" #\\='some-interactive-function \\='my-mode-map) (bind-key \"M-h\" #'some-interactive-function 'my-mode-map)
If PREDICATE is non-nil, it is a form evaluated to determine when 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. a key should be bound. It must return non-nil in such cases.
@ -167,20 +170,16 @@ or operates on menu data structures, so you should write it so it
can safely be called at any time." can safely be called at any time."
(let ((namevar (make-symbol "name")) (let ((namevar (make-symbol "name"))
(keyvar (make-symbol "key")) (keyvar (make-symbol "key"))
(kmapvar (make-symbol "kmap"))
(kdescvar (make-symbol "kdesc")) (kdescvar (make-symbol "kdesc"))
(bindingvar (make-symbol "binding"))) (bindingvar (make-symbol "binding")))
`(let* ((,namevar ,key-name) `(let* ((,namevar ,key-name)
(,keyvar ,(if (stringp key-name) (read-kbd-macro key-name) (,keyvar (if (vectorp ,namevar) ,namevar
`(if (vectorp ,namevar) ,namevar (read-kbd-macro ,namevar)))
(read-kbd-macro ,namevar)))) (kmap (if (and ,keymap (symbolp ,keymap)) (symbol-value ,keymap) ,keymap))
(,kmapvar (or (if (and ,keymap (symbolp ,keymap))
(symbol-value ,keymap) ,keymap)
global-map))
(,kdescvar (cons (if (stringp ,namevar) ,namevar (,kdescvar (cons (if (stringp ,namevar) ,namevar
(key-description ,namevar)) (key-description ,namevar))
(if (symbolp ,keymap) ,keymap (quote ,keymap)))) (if (symbolp ,keymap) ,keymap (quote ,keymap))))
(,bindingvar (lookup-key ,kmapvar ,keyvar))) (,bindingvar (lookup-key (or kmap global-map) ,keyvar)))
(let ((entry (assoc ,kdescvar personal-keybindings)) (let ((entry (assoc ,kdescvar personal-keybindings))
(details (list ,command (details (list ,command
(unless (numberp ,bindingvar) (unless (numberp ,bindingvar)
@ -189,57 +188,27 @@ can safely be called at any time."
(setcdr entry details) (setcdr entry details)
(add-to-list 'personal-keybindings (cons ,kdescvar details)))) (add-to-list 'personal-keybindings (cons ,kdescvar details))))
,(if predicate ,(if predicate
`(define-key ,kmapvar ,keyvar `(define-key (or kmap global-map) ,keyvar
'(menu-item "" nil :filter (lambda (&optional _) '(menu-item "" nil :filter (lambda (&optional _)
(when ,predicate (when ,predicate
,command)))) ,command))))
`(define-key ,kmapvar ,keyvar ,command))))) `(define-key (or kmap global-map) ,keyvar ,command)))))
;;;###autoload ;;;###autoload
(defmacro unbind-key (key-name &optional keymap) (defmacro unbind-key (key-name &optional keymap)
"Unbind the given KEY-NAME, within the KEYMAP (if specified). "Unbind the given KEY-NAME, within the KEYMAP (if specified).
See `bind-key' for more details." See `bind-key' for more details."
(let ((namevar (make-symbol "name")) `(progn
(kdescvar (make-symbol "kdesc"))) (bind-key ,key-name nil ,keymap)
`(let* ((,namevar ,key-name) (setq personal-keybindings
(,kdescvar (cons (if (stringp ,namevar) ,namevar (cl-delete-if #'(lambda (k)
(key-description ,namevar)) ,(if keymap
(if (symbolp ,keymap) ,keymap (quote ,keymap))))) `(and (consp (car k))
(bind-key--remove (if (vectorp ,namevar) ,namevar (string= (caar k) ,key-name)
(read-kbd-macro ,namevar)) (eq (cdar k) ',keymap))
(or (if (and ,keymap (symbolp ,keymap)) `(and (stringp (car k))
(symbol-value ,keymap) ,keymap) (string= (car k) ,key-name))))
global-map)) personal-keybindings))))
(setq personal-keybindings
(cl-delete-if (lambda (k) (equal (car k) ,kdescvar))
personal-keybindings))
nil)))
(defun bind-key--remove (key keymap)
"Remove KEY from KEYMAP.
In contrast to `define-key', this function removes the binding from the keymap."
(define-key keymap key nil)
;; Split M-key in ESC key
(setq key (cl-mapcan (lambda (k)
(if (and (integerp k) (/= (logand k ?\M-\0) 0))
(list ?\e (logxor k ?\M-\0))
(list k)))
key))
;; Delete single keys directly
(if (= (length key) 1)
(delete key keymap)
;; Lookup submap and delete key from there
(let* ((prefix (vconcat (butlast key)))
(submap (lookup-key keymap prefix)))
(unless (keymapp submap)
(error "Not a keymap for %s" key))
(when (symbolp submap)
(setq submap (symbol-function submap)))
(delete (last key) submap)
;; Delete submap if it is empty
(when (= 1 (length submap))
(bind-key--remove prefix keymap)))))
;;;###autoload ;;;###autoload
(defmacro bind-key* (key-name command &optional predicate) (defmacro bind-key* (key-name command &optional predicate)
@ -257,60 +226,30 @@ Accepts keyword arguments:
for these bindings for these bindings
:prefix-docstring STR - docstring for the prefix-map variable :prefix-docstring STR - docstring for the prefix-map variable
:menu-name NAME - optional menu string for prefix map :menu-name NAME - optional menu string for prefix map
:repeat-docstring STR - docstring for the repeat-map variable
:repeat-map MAP - name of the repeat map that should be created
for these bindings. If specified, the
`repeat-map' property of each command bound
(within the scope of the `:repeat-map' keyword)
is set to this map.
:exit BINDINGS - Within the scope of `:repeat-map' will bind the
key in the repeat map, but will not set the
`repeat-map' property of the bound command.
:continue BINDINGS - Within the scope of `:repeat-map' forces the
same behaviour as if no special keyword had
been used (that is, the command is bound, and
it's `repeat-map' property set)
:filter FORM - optional form to determine when bindings apply :filter FORM - optional form to determine when bindings apply
The rest of the arguments are conses of keybinding string and a The rest of the arguments are conses of keybinding string and a
function symbol (unquoted)." function symbol (unquoted)."
(let (map (let (map
prefix-doc doc
prefix-map prefix-map
prefix prefix
repeat-map
repeat-doc
repeat-type ;; Only used internally
filter filter
menu-name menu-name
pkg) pkg)
;; Process any initial keyword arguments ;; Process any initial keyword arguments
(let ((cont t) (let ((cont t))
(arg-change-func 'cddr))
(while (and cont args) (while (and cont args)
(if (cond ((and (eq :map (car args)) (if (cond ((and (eq :map (car args))
(not prefix-map)) (not prefix-map))
(setq map (cadr args))) (setq map (cadr args)))
((eq :prefix-docstring (car args)) ((eq :prefix-docstring (car args))
(setq prefix-doc (cadr args))) (setq doc (cadr args)))
((and (eq :prefix-map (car args)) ((and (eq :prefix-map (car args))
(not (memq map '(global-map (not (memq map '(global-map
override-global-map)))) override-global-map))))
(setq prefix-map (cadr args))) (setq prefix-map (cadr args)))
((eq :repeat-docstring (car args))
(setq repeat-doc (cadr args)))
((and (eq :repeat-map (car args))
(not (memq map '(global-map
override-global-map))))
(setq repeat-map (cadr args))
(setq map repeat-map))
((eq :continue (car args))
(setq repeat-type :continue
arg-change-func 'cdr))
((eq :exit (car args))
(setq repeat-type :exit
arg-change-func 'cdr))
((eq :prefix (car args)) ((eq :prefix (car args))
(setq prefix (cadr args))) (setq prefix (cadr args)))
((eq :filter (car args)) ((eq :filter (car args))
@ -319,17 +258,13 @@ function symbol (unquoted)."
(setq menu-name (cadr args))) (setq menu-name (cadr args)))
((eq :package (car args)) ((eq :package (car args))
(setq pkg (cadr args)))) (setq pkg (cadr args))))
(setq args (funcall arg-change-func args)) (setq args (cddr args))
(setq cont nil)))) (setq cont nil))))
(when (or (and prefix-map (not prefix)) (when (or (and prefix-map (not prefix))
(and prefix (not prefix-map))) (and prefix (not prefix-map)))
(error "Both :prefix-map and :prefix must be supplied")) (error "Both :prefix-map and :prefix must be supplied"))
(when repeat-type
(unless repeat-map
(error ":continue and :exit require specifying :repeat-map")))
(when (and menu-name (not prefix)) (when (and menu-name (not prefix))
(error "If :menu-name is supplied, :prefix must be too")) (error "If :menu-name is supplied, :prefix must be too"))
@ -361,16 +296,13 @@ function symbol (unquoted)."
(append (append
(when prefix-map (when prefix-map
`((defvar ,prefix-map) `((defvar ,prefix-map)
,@(when prefix-doc `((put ',prefix-map 'variable-documentation ,prefix-doc))) ,@(when doc `((put ',prefix-map 'variable-documentation ,doc)))
,@(if menu-name ,@(if menu-name
`((define-prefix-command ',prefix-map nil ,menu-name)) `((define-prefix-command ',prefix-map nil ,menu-name))
`((define-prefix-command ',prefix-map))) `((define-prefix-command ',prefix-map)))
,@(if (and map (not (eq map 'global-map))) ,@(if (and map (not (eq map 'global-map)))
(wrap map `((bind-key ,prefix ',prefix-map ,map ,filter))) (wrap map `((bind-key ,prefix ',prefix-map ,map ,filter)))
`((bind-key ,prefix ',prefix-map nil ,filter))))) `((bind-key ,prefix ',prefix-map nil ,filter)))))
(when repeat-map
`((defvar ,repeat-map (make-sparse-keymap)
,@(when repeat-doc `(,repeat-doc)))))
(wrap map (wrap map
(cl-mapcan (cl-mapcan
(lambda (form) (lambda (form)
@ -378,19 +310,13 @@ function symbol (unquoted)."
(if prefix-map (if prefix-map
`((bind-key ,(car form) ,fun ,prefix-map ,filter)) `((bind-key ,(car form) ,fun ,prefix-map ,filter))
(if (and map (not (eq map 'global-map))) (if (and map (not (eq map 'global-map)))
;; Only needed in this branch, since when `((bind-key ,(car form) ,fun ,map ,filter))
;; repeat-map is non-nil, map is always
;; non-nil
`(,@(when (and repeat-map (not (eq repeat-type :exit)))
`((put ,fun 'repeat-map ',repeat-map)))
(bind-key ,(car form) ,fun ,map ,filter))
`((bind-key ,(car form) ,fun nil ,filter)))))) `((bind-key ,(car form) ,fun nil ,filter))))))
first)) first))
(when next (when next
(bind-keys-form `(,@(when repeat-map `(:repeat-map ,repeat-map)) (bind-keys-form (if pkg
,@(if pkg (cons :package (cons pkg next))
(cons :package (cons pkg next)) next) map)))))))
next)) map)))))))
;;;###autoload ;;;###autoload
(defmacro bind-keys (&rest args) (defmacro bind-keys (&rest args)
@ -404,19 +330,6 @@ Accepts keyword arguments:
for these bindings for these bindings
:prefix-docstring STR - docstring for the prefix-map variable :prefix-docstring STR - docstring for the prefix-map variable
:menu-name NAME - optional menu string for prefix map :menu-name NAME - optional menu string for prefix map
:repeat-docstring STR - docstring for the repeat-map variable
:repeat-map MAP - name of the repeat map that should be created
for these bindings. If specified, the
`repeat-map' property of each command bound
(within the scope of the `:repeat-map' keyword)
is set to this map.
:exit BINDINGS - Within the scope of `:repeat-map' will bind the
key in the repeat map, but will not set the
`repeat-map' property of the bound command.
:continue BINDINGS - Within the scope of `:repeat-map' forces the
same behaviour as if no special keyword had
been used (that is, the command is bound, and
it's `repeat-map' property set)
:filter FORM - optional form to determine when bindings apply :filter FORM - optional form to determine when bindings apply
The rest of the arguments are conses of keybinding string and a The rest of the arguments are conses of keybinding string and a
@ -517,7 +430,8 @@ function symbol (unquoted)."
(command-desc (get-binding-description command)) (command-desc (get-binding-description command))
(was-command-desc (and was-command (was-command-desc (and was-command
(get-binding-description was-command))) (get-binding-description was-command)))
(at-present-desc (get-binding-description at-present))) (at-present-desc (get-binding-description at-present))
)
(let ((line (let ((line
(format (format
(format "%%-%ds%%-%ds%%s\n" (car bind-key-column-widths) (format "%%-%ds%%-%ds%%s\n" (car bind-key-column-widths)
@ -539,6 +453,7 @@ function symbol (unquoted)."
;; Local Variables: ;; Local Variables:
;; outline-regexp: ";;;\\(;* [^\s\t\n]\\|###autoload\\)\\|(" ;; outline-regexp: ";;;\\(;* [^\s\t\n]\\|###autoload\\)\\|("
;; indent-tabs-mode: nil
;; End: ;; End:
;;; bind-key.el ends here ;;; bind-key.el ends here

View File

@ -1,97 +0,0 @@
;;; bind-key-autoloads.el --- automatically extracted autoloads (do not edit) -*- lexical-binding: t -*-
;; Generated by the `loaddefs-generate' function.
;; This file is part of GNU Emacs.
;;; Code:
(add-to-list 'load-path (or (and load-file-name (directory-file-name (file-name-directory load-file-name))) (car load-path)))
;;; Generated autoloads from bind-key.el
(autoload 'bind-key "bind-key" "\
Bind KEY-NAME to COMMAND in KEYMAP (`global-map' if not passed).
KEY-NAME may be a vector, in which case it is passed straight to
`define-key'. Or it may be a string to be interpreted as
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 variable or symbol.
For example:
(bind-key \"M-h\" #\\='some-interactive-function my-mode-map)
(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
or operates on menu data structures, so you should write it so it
can safely be called at any time.
(fn KEY-NAME COMMAND &optional KEYMAP PREDICATE)" nil t)
(autoload 'unbind-key "bind-key" "\
Unbind the given KEY-NAME, within the KEYMAP (if specified).
See `bind-key' for more details.
(fn KEY-NAME &optional KEYMAP)" nil t)
(autoload 'bind-key* "bind-key" "\
Similar to `bind-key', but overrides any mode-specific bindings.
(fn KEY-NAME COMMAND &optional PREDICATE)" nil t)
(autoload 'bind-keys "bind-key" "\
Bind multiple keys at once.
Accepts keyword arguments:
:map MAP - a keymap into which the keybindings should be
added
:prefix KEY - prefix key for these bindings
:prefix-map MAP - name of the prefix map that should be created
for these bindings
:prefix-docstring STR - docstring for the prefix-map variable
:menu-name NAME - optional menu string for prefix map
:repeat-docstring STR - docstring for the repeat-map variable
:repeat-map MAP - name of the repeat map that should be created
for these bindings. If specified, the
`repeat-map' property of each command bound
(within the scope of the `:repeat-map' keyword)
is set to this map.
:exit BINDINGS - Within the scope of `:repeat-map' will bind the
key in the repeat map, but will not set the
`repeat-map' property of the bound command.
:continue BINDINGS - Within the scope of `:repeat-map' forces the
same behaviour as if no special keyword had
been used (that is, the command is bound, and
it's `repeat-map' property set)
:filter FORM - optional form to determine when bindings apply
The rest of the arguments are conses of keybinding string and a
function symbol (unquoted).
(fn &rest ARGS)" nil t)
(autoload 'bind-keys* "bind-key" "\
(fn &rest ARGS)" nil t)
(autoload 'describe-personal-keybindings "bind-key" "\
Display all the personal keybindings defined by `bind-key'." t)
(register-definition-prefixes "bind-key" '("bind-key" "compare-keybindings" "get-binding-description" "override-global-m" "personal-keybindings"))
;;; End of scraped data
(provide 'bind-key-autoloads)
;; Local Variables:
;; version-control: never
;; no-byte-compile: t
;; no-update-autoloads: t
;; no-native-compile: t
;; coding: utf-8-emacs-unix
;; End:
;;; bind-key-autoloads.el ends here

View File

@ -1,14 +0,0 @@
(define-package "bind-key" "2.4.4" "A simple way to manage personal keybindings"
'((emacs "24.3"))
:commit "9090080b15486c3e337be254226efe7e5fde4c99" :authors
'(("John Wiegley" . "johnw@newartisans.com"))
:maintainers
'(("John Wiegley" . "johnw@newartisans.com"))
:maintainer
'("John Wiegley" . "johnw@newartisans.com")
:keywords
'("keys" "keybinding" "config" "dotemacs" "extensions")
:url "https://github.com/jwiegley/use-package")
;; Local Variables:
;; no-byte-compile: t
;; End:

View File

@ -1,29 +1,17 @@
;;; dash-autoloads.el --- automatically extracted autoloads (do not edit) -*- lexical-binding: t -*- ;;; dash-autoloads.el --- automatically extracted autoloads -*- lexical-binding: t -*-
;; Generated by the `loaddefs-generate' function. ;;
;; This file is part of GNU Emacs.
;;; Code: ;;; Code:
(add-to-list 'load-path (or (and load-file-name (directory-file-name (file-name-directory load-file-name))) (car load-path))) (add-to-list 'load-path (directory-file-name
(or (file-name-directory #$) (car load-path))))
;;;### (autoloads nil "dash" "dash.el" (0 0 0 0))
;;; Generated autoloads from dash.el ;;; Generated autoloads from dash.el
(autoload 'dash-fontify-mode "dash" "\ (autoload 'dash-fontify-mode "dash" "\
Toggle fontification of Dash special variables. Toggle fontification of Dash special variables.
Dash-Fontify mode is a buffer-local minor mode intended for Emacs
Lisp buffers. Enabling it causes the special variables bound in
anaphoric Dash macros to be fontified. These anaphoras include
`it', `it-index', `acc', and `other'. In older Emacs versions
which do not dynamically detect macros, Dash-Fontify mode
additionally fontifies Dash macro calls.
See also `dash-fontify-mode-lighter' and
`global-dash-fontify-mode'.
This is a minor mode. If called interactively, toggle the This is a minor mode. If called interactively, toggle the
`Dash-Fontify mode' mode. If the prefix argument is positive, `Dash-Fontify mode' mode. If the prefix argument is positive,
enable the mode, and if it is zero or negative, disable the mode. enable the mode, and if it is zero or negative, disable the mode.
@ -38,8 +26,20 @@ evaluate `dash-fontify-mode'.
The mode's hook is called both when the mode is enabled and when The mode's hook is called both when the mode is enabled and when
it is disabled. it is disabled.
(fn &optional ARG)" t) Dash-Fontify mode is a buffer-local minor mode intended for Emacs
Lisp buffers. Enabling it causes the special variables bound in
anaphoric Dash macros to be fontified. These anaphoras include
`it', `it-index', `acc', and `other'. In older Emacs versions
which do not dynamically detect macros, Dash-Fontify mode
additionally fontifies Dash macro calls.
See also `dash-fontify-mode-lighter' and
`global-dash-fontify-mode'.
\(fn &optional ARG)" t nil)
(put 'global-dash-fontify-mode 'globalized-minor-mode t) (put 'global-dash-fontify-mode 'globalized-minor-mode t)
(defvar global-dash-fontify-mode nil "\ (defvar global-dash-fontify-mode nil "\
Non-nil if Global Dash-Fontify mode is enabled. Non-nil if Global Dash-Fontify mode is enabled.
See the `global-dash-fontify-mode' command See the `global-dash-fontify-mode' command
@ -47,7 +47,9 @@ for a description of this minor mode.
Setting this variable directly does not take effect; Setting this variable directly does not take effect;
either customize it (see the info node `Easy Customization') either customize it (see the info node `Easy Customization')
or call the function `global-dash-fontify-mode'.") or call the function `global-dash-fontify-mode'.")
(custom-autoload 'global-dash-fontify-mode "dash" nil) (custom-autoload 'global-dash-fontify-mode "dash" nil)
(autoload 'global-dash-fontify-mode "dash" "\ (autoload 'global-dash-fontify-mode "dash" "\
Toggle Dash-Fontify mode in all buffers. Toggle Dash-Fontify mode in all buffers.
With prefix ARG, enable Global Dash-Fontify mode if ARG is positive; otherwise, With prefix ARG, enable Global Dash-Fontify mode if ARG is positive; otherwise,
@ -62,22 +64,24 @@ would do it.
See `dash-fontify-mode' for more information on Dash-Fontify mode. See `dash-fontify-mode' for more information on Dash-Fontify mode.
(fn &optional ARG)" t) \(fn &optional ARG)" t nil)
(autoload 'dash-register-info-lookup "dash" "\ (autoload 'dash-register-info-lookup "dash" "\
Register the Dash Info manual with `info-lookup-symbol'. Register the Dash Info manual with `info-lookup-symbol'.
This allows Dash symbols to be looked up with \\[info-lookup-symbol]." t) This allows Dash symbols to be looked up with \\[info-lookup-symbol]." t nil)
(register-definition-prefixes "dash" '("!cdr" "!cons" "--" "->" "-a" "-butlast" "-c" "-d" "-e" "-f" "-gr" "-i" "-juxt" "-keep" "-l" "-m" "-no" "-o" "-p" "-r" "-s" "-t" "-u" "-value-to-list" "-when-let" "-zip" "dash-")) (register-definition-prefixes "dash" '("!cdr" "!cons" "--" "->" "-a" "-butlast" "-c" "-d" "-e" "-f" "-gr" "-i" "-juxt" "-keep" "-l" "-m" "-no" "-o" "-p" "-r" "-s" "-t" "-u" "-value-to-list" "-when-let" "-zip" "dash-"))
;;;***
;;; End of scraped data ;;;### (autoloads nil nil ("dash-pkg.el") (0 0 0 0))
(provide 'dash-autoloads)
;;;***
;; Local Variables: ;; Local Variables:
;; version-control: never ;; version-control: never
;; no-byte-compile: t ;; no-byte-compile: t
;; no-update-autoloads: t ;; no-update-autoloads: t
;; no-native-compile: t ;; coding: utf-8
;; coding: utf-8-emacs-unix
;; End: ;; End:
;;; dash-autoloads.el ends here ;;; dash-autoloads.el ends here

View File

@ -1,8 +1,6 @@
(define-package "dash" "20230714.723" "A modern list library for Emacs" (define-package "dash" "20221013.836" "A modern list library for Emacs"
'((emacs "24")) '((emacs "24"))
:commit "f46268c75cb7c18361d3cee942cd4dc14a03aef4" :authors :commit "3df46d7d9fe74f52a661565888e4d31fd760f0df" :authors
'(("Magnar Sveen" . "magnars@gmail.com"))
:maintainers
'(("Magnar Sveen" . "magnars@gmail.com")) '(("Magnar Sveen" . "magnars@gmail.com"))
:maintainer :maintainer
'("Magnar Sveen" . "magnars@gmail.com") '("Magnar Sveen" . "magnars@gmail.com")

View File

@ -2,7 +2,7 @@ This is dash.info, produced by makeinfo version 6.7 from dash.texi.
This manual is for Dash version 2.19.1. This manual is for Dash version 2.19.1.
Copyright © 20122023 Free Software Foundation, Inc. Copyright © 20122021 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation License, document under the terms of the GNU Free Documentation License,
@ -24,7 +24,7 @@ Dash
This manual is for Dash version 2.19.1. This manual is for Dash version 2.19.1.
Copyright © 20122023 Free Software Foundation, Inc. Copyright © 20122021 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation License, document under the terms of the GNU Free Documentation License,
@ -767,42 +767,31 @@ Functions returning a modified copy of the input list.
⇒ ("foo" "bar" 3 "quux") ⇒ ("foo" "bar" 3 "quux")
-- Function: -remove-at (n list) -- Function: -remove-at (n list)
Return LIST with its element at index N removed. That is, remove Return a list with element at Nth position in LIST removed.
any element selected as (nth N LIST) from LIST and return the
result.
This is a non-destructive operation: parts of LIST (but not
necessarily all of it) are copied as needed to avoid destructively
modifying it.
See also: -remove-at-indices (*note -remove-at-indices::), See also: -remove-at-indices (*note -remove-at-indices::),
-remove (*note -remove::). -remove (*note -remove::)
(-remove-at 0 '(a b c)) (-remove-at 0 '("0" "1" "2" "3" "4" "5"))
⇒ (b c) ⇒ ("1" "2" "3" "4" "5")
(-remove-at 1 '(a b c)) (-remove-at 1 '("0" "1" "2" "3" "4" "5"))
⇒ (a c) ⇒ ("0" "2" "3" "4" "5")
(-remove-at 2 '(a b c)) (-remove-at 2 '("0" "1" "2" "3" "4" "5"))
⇒ (a b) ⇒ ("0" "1" "3" "4" "5")
-- Function: -remove-at-indices (indices list) -- Function: -remove-at-indices (indices list)
Return LIST with its elements at INDICES removed. That is, for Return a list whose elements are elements from LIST without
each index I in INDICES, remove any element selected as (nth I elements selected as (nth i list) for all i from INDICES.
LIST) from LIST.
This is a non-destructive operation: parts of LIST (but not
necessarily all of it) are copied as needed to avoid destructively
modifying it.
See also: -remove-at (*note -remove-at::), -remove (*note See also: -remove-at (*note -remove-at::), -remove (*note
-remove::). -remove::)
(-remove-at-indices '(0) '(a b c d e)) (-remove-at-indices '(0) '("0" "1" "2" "3" "4" "5"))
⇒ (b c d e) ⇒ ("1" "2" "3" "4" "5")
(-remove-at-indices '(1 3) '(a b c d e)) (-remove-at-indices '(0 2 4) '("0" "1" "2" "3" "4" "5"))
⇒ (a c e) ⇒ ("1" "3" "5")
(-remove-at-indices '(4 0 2) '(a b c d e)) (-remove-at-indices '(0 5) '("0" "1" "2" "3" "4" "5"))
⇒ (b d) ⇒ ("1" "2" "3" "4")
 
File: dash.info, Node: Reductions, Next: Unfolding, Prev: List to list, Up: Functions File: dash.info, Node: Reductions, Next: Unfolding, Prev: List to list, Up: Functions
@ -1037,7 +1026,7 @@ Functions reducing lists to a single value (which may also be a list).
⇒ (nil (1)) ⇒ (nil (1))
-- Function: -tails (list) -- Function: -tails (list)
Return all suffixes of LIST. Return all suffixes of LIST
(-tails '(1 2 3 4)) (-tails '(1 2 3 4))
⇒ ((1 2 3 4) (2 3 4) (3 4) (4) nil) ⇒ ((1 2 3 4) (2 3 4) (3 4) (4) nil)
@ -1196,8 +1185,8 @@ than consuming a list to produce a single value.
⇒ (1 2 3 1 2) ⇒ (1 2 3 1 2)
(-take 7 (-cycle '(1 "and" 3))) (-take 7 (-cycle '(1 "and" 3)))
⇒ (1 "and" 3 1 "and" 3 1) ⇒ (1 "and" 3 1 "and" 3 1)
(-zip-lists (-cycle '(3)) '(1 2)) (-zip (-cycle '(1 2 3)) '(1 2))
⇒ ((3 1) (3 2)) ⇒ ((1 . 1) (2 . 2))
 
File: dash.info, Node: Predicates, Next: Partitioning, Prev: Unfolding, Up: Functions File: dash.info, Node: Predicates, Next: Partitioning, Prev: Unfolding, Up: Functions
@ -1882,52 +1871,56 @@ Other list functions not fit to be classified elsewhere.
error→ Wrong type argument: natnump, -1 error→ Wrong type argument: natnump, -1
-- Function: -zip-with (fn list1 list2) -- Function: -zip-with (fn list1 list2)
Zip LIST1 and LIST2 into a new list using the function FN. That Zip the two lists LIST1 and LIST2 using a function FN. This
is, apply FN pairwise taking as first argument the next element of function is applied pairwise taking as first argument element of
LIST1 and as second argument the next element of LIST2 at the LIST1 and as second argument element of LIST2 at corresponding
corresponding position. The result is as long as the shorter list. position.
This functions anaphoric counterpart is --zip-with. The anaphoric form --zip-with binds the elements from LIST1 as
symbol it, and the elements from LIST2 as symbol other.
For other zips, see also -zip-lists (*note -zip-lists::) and (-zip-with '+ '(1 2 3) '(4 5 6))
-zip-fill (*note -zip-fill::). ⇒ (5 7 9)
(-zip-with 'cons '(1 2 3) '(4 5 6))
(-zip-with #'+ '(1 2 3 4) '(5 6 7))
⇒ (6 8 10)
(-zip-with #'cons '(1 2 3) '(4 5 6 7))
⇒ ((1 . 4) (2 . 5) (3 . 6)) ⇒ ((1 . 4) (2 . 5) (3 . 6))
(--zip-with (format "%s & %s" it other) '(Batman Jekyll) '(Robin Hyde)) (--zip-with (concat it " and " other) '("Batman" "Jekyll") '("Robin" "Hyde"))
⇒ ("Batman & Robin" "Jekyll & Hyde") ⇒ ("Batman and Robin" "Jekyll and Hyde")
-- Function: -zip-pair (list1 list2) -- Function: -zip (&rest lists)
Zip LIST1 and LIST2 together. Zip LISTS together. Group the head of each list, followed by the
second elements of each list, and so on. The lengths of the
returned groupings are equal to the length of the shortest input
list.
Make a pair with the head of each list, followed by a pair with the If two lists are provided as arguments, return the groupings as a
second element of each list, and so on. The number of pairs list of cons cells. Otherwise, return the groupings as a list of
returned is equal to the length of the shorter input list. lists.
See also: -zip-lists (*note -zip-lists::). Use -zip-lists (*note -zip-lists::) if you need the return value
to always be a list of lists.
(-zip-pair '(1 2 3 4) '(5 6 7)) Alias: -zip-pair
⇒ ((1 . 5) (2 . 6) (3 . 7))
(-zip-pair '(1 2 3) '(4 5 6)) See also: -zip-lists (*note -zip-lists::)
(-zip '(1 2 3) '(4 5 6))
⇒ ((1 . 4) (2 . 5) (3 . 6)) ⇒ ((1 . 4) (2 . 5) (3 . 6))
(-zip-pair '(1 2) '(3)) (-zip '(1 2 3) '(4 5 6 7))
⇒ ((1 . 3)) ⇒ ((1 . 4) (2 . 5) (3 . 6))
(-zip '(1 2) '(3 4 5) '(6))
⇒ ((1 3 6))
-- Function: -zip-lists (&rest lists) -- Function: -zip-lists (&rest lists)
Zip LISTS together. Zip LISTS together. Group the head of each list, followed by the
second elements of each list, and so on. The lengths of the
returned groupings are equal to the length of the shortest input
list.
Group the head of each list, followed by the second element of each The return value is always list of lists, which is a difference
list, and so on. The number of returned groupings is equal to the from -zip-pair which returns a cons-cell in case two input lists
length of the shortest input list, and the length of each grouping are provided.
is equal to the number of input LISTS.
The return value is always a list of proper lists, in contrast to See also: -zip (*note -zip::)
-zip (*note -zip::) which returns a list of dotted pairs when
only two input LISTS are provided.
See also: -zip-pair (*note -zip-pair::).
(-zip-lists '(1 2 3) '(4 5 6)) (-zip-lists '(1 2 3) '(4 5 6))
⇒ ((1 4) (2 5) (3 6)) ⇒ ((1 4) (2 5) (3 6))
@ -1936,111 +1929,35 @@ Other list functions not fit to be classified elsewhere.
(-zip-lists '(1 2) '(3 4 5) '(6)) (-zip-lists '(1 2) '(3 4 5) '(6))
⇒ ((1 3 6)) ⇒ ((1 3 6))
-- Function: -zip-lists-fill (fill-value &rest lists)
Zip LISTS together, padding shorter lists with FILL-VALUE. This is
like -zip-lists (*note -zip-lists::) (which see), except it
retains all elements at positions beyond the end of the shortest
list. The number of returned groupings is equal to the length of
the longest input list, and the length of each grouping is equal to
the number of input LISTS.
(-zip-lists-fill 0 '(1 2) '(3 4 5) '(6))
⇒ ((1 3 6) (2 4 0) (0 5 0))
(-zip-lists-fill 0 '(1 2) '(3 4) '(5 6))
⇒ ((1 3 5) (2 4 6))
(-zip-lists-fill 0 '(1 2 3) nil)
⇒ ((1 0) (2 0) (3 0))
-- Function: -zip (&rest lists)
Zip LISTS together.
Group the head of each list, followed by the second element of each
list, and so on. The number of returned groupings is equal to the
length of the shortest input list, and the number of items in each
grouping is equal to the number of input LISTS.
If only two LISTS are provided as arguments, return the groupings
as a list of dotted pairs. Otherwise, return the groupings as a
list of proper lists.
Since the return value changes form depending on the number of
arguments, it is generally recommended to use -zip-lists (*note
-zip-lists::) instead, or -zip-pair (*note -zip-pair::) if a list
of dotted pairs is desired.
See also: -unzip (*note -unzip::).
(-zip '(1 2 3 4) '(5 6 7) '(8 9))
⇒ ((1 5 8) (2 6 9))
(-zip '(1 2 3) '(4 5 6) '(7 8 9))
⇒ ((1 4 7) (2 5 8) (3 6 9))
(-zip '(1 2 3))
⇒ ((1) (2) (3))
-- Function: -zip-fill (fill-value &rest lists) -- Function: -zip-fill (fill-value &rest lists)
Zip LISTS together, padding shorter lists with FILL-VALUE. This is Zip LISTS, with FILL-VALUE padded onto the shorter lists. The
like -zip (*note -zip::) (which see), except it retains all lengths of the returned groupings are equal to the length of the
elements at positions beyond the end of the shortest list. The longest input list.
number of returned groupings is equal to the length of the longest
input list, and the length of each grouping is equal to the number
of input LISTS.
Since the return value changes form depending on the number of (-zip-fill 0 '(1 2 3 4 5) '(6 7 8 9))
arguments, it is generally recommended to use -zip-lists-fill ⇒ ((1 . 6) (2 . 7) (3 . 8) (4 . 9) (5 . 0))
(*note -zip-lists-fill::) instead, unless a list of dotted pairs is
explicitly desired.
(-zip-fill 0 '(1 2 3) '(4 5))
⇒ ((1 . 4) (2 . 5) (3 . 0))
(-zip-fill 0 () '(1 2 3))
⇒ ((0 . 1) (0 . 2) (0 . 3))
(-zip-fill 0 '(1 2) '(3 4) '(5 6))
⇒ ((1 3 5) (2 4 6))
-- Function: -unzip-lists (lists)
Unzip LISTS.
This works just like -zip-lists (*note -zip-lists::) (which see),
but takes a list of lists instead of a variable number of
arguments, such that
(-unzip-lists (-zip-lists ARGS...))
is identity (given that the lists comprising ARGS are of the same
length).
(-unzip-lists (-zip-lists '(1 2) '(3 4) '(5 6)))
⇒ ((1 2) (3 4) (5 6))
(-unzip-lists '((1 2 3) (4 5) (6 7) (8 9)))
⇒ ((1 4 6 8) (2 5 7 9))
(-unzip-lists '((1 2 3) (4 5 6)))
⇒ ((1 4) (2 5) (3 6))
-- Function: -unzip (lists) -- Function: -unzip (lists)
Unzip LISTS. Unzip LISTS.
This works just like -zip (*note -zip::) (which see), but takes a This works just like -zip (*note -zip::) but takes a list of
list of lists instead of a variable number of arguments, such that lists instead of a variable number of arguments, such that
(-unzip (-zip L1 L2 L3 ...)) (-unzip (-zip L1 L2 L3 ...))
is identity (given that the lists are of the same length, and that is identity (given that the lists are the same length).
-zip (*note -zip::) is not called with two arguments, because of
the caveat described in its docstring).
Note in particular that calling -unzip (*note -unzip::) on a list Note in particular that calling this on a list of two lists will
of two lists will return a list of dotted pairs. return a list of cons-cells such that the above identity works.
Since the return value changes form depending on the number of See also: -zip (*note -zip::)
LISTS, it is generally recommended to use -unzip-lists (*note
-unzip-lists::) instead.
(-unzip (-zip '(1 2) '(3 4) '(5 6))) (-unzip (-zip '(1 2 3) '(a b c) '("e" "f" "g")))
⇒ ((1 . 2) (3 . 4) (5 . 6)) ⇒ ((1 2 3) (a b c) ("e" "f" "g"))
(-unzip '((1 2 3) (4 5 6))) (-unzip '((1 2) (3 4) (5 6) (7 8) (9 10)))
⇒ ((1 . 4) (2 . 5) (3 . 6)) ⇒ ((1 3 5 7 9) (2 4 6 8 10))
(-unzip '((1 2 3) (4 5) (6 7) (8 9))) (-unzip '((1 2) (3 4)))
⇒ ((1 4 6 8) (2 5 7 9)) ⇒ ((1 . 3) (2 . 4))
-- Function: -pad (fill-value &rest lists) -- Function: -pad (fill-value &rest lists)
Pad each of LISTS with FILL-VALUE until they all have equal Pad each of LISTS with FILL-VALUE until they all have equal
@ -2222,9 +2139,9 @@ Other list functions not fit to be classified elsewhere.
called with two elements of LIST, and should return non-nil if called with two elements of LIST, and should return non-nil if
the first element should sort before the second. the first element should sort before the second.
(-sort #'< '(3 1 2)) (-sort '< '(3 1 2))
⇒ (1 2 3) ⇒ (1 2 3)
(-sort #'> '(3 1 2)) (-sort '> '(3 1 2))
⇒ (3 2 1) ⇒ (3 2 1)
(--sort (< it other) '(3 1 2)) (--sort (< it other) '(3 1 2))
⇒ (1 2 3) ⇒ (1 2 3)
@ -2384,8 +2301,8 @@ Functions pretending lists are trees.
structure but all cons are replaced with new ones. This is useful structure but all cons are replaced with new ones. This is useful
when you need to clone a structure such as plist or alist. when you need to clone a structure such as plist or alist.
(let* ((a (list (list 1))) (b (-clone a))) (setcar (car a) 2) b) (let* ((a '(1 2 3)) (b (-clone a))) (nreverse a) b)
⇒ ((1)) ⇒ (1 2 3)
 
File: dash.info, Node: Threading macros, Next: Binding, Prev: Tree operations, Up: Functions File: dash.info, Node: Threading macros, Next: Binding, Prev: Tree operations, Up: Functions
@ -3194,12 +3111,12 @@ Functions that manipulate and compose other functions.
(-compose (-partial #nth n) (-prod f1 f2 ...)) = (-compose fn (-compose (-partial #nth n) (-prod f1 f2 ...)) = (-compose fn
(-partial #nth n)) (-partial #nth n))
(funcall (-prodfn #'1+ #'1- #'number-to-string) '(1 2 3)) (funcall (-prodfn '1+ '1- 'number-to-string) '(1 2 3))
⇒ (2 1 "3") ⇒ (2 1 "3")
(-map (-prodfn #'1- #'1+) '((1 2) (3 4) (5 6))) (-map (-prodfn '1+ '1-) '((1 2) (3 4) (5 6) (7 8)))
⇒ ((0 3) (2 5) (4 7)) ⇒ ((2 1) (4 3) (6 5) (8 7))
(apply #'+ (funcall (-prodfn #'length #'string-to-number) '((t) "5"))) (apply '+ (funcall (-prodfn 'length 'string-to-number) '((1 2 3) "15")))
6 18
 
File: dash.info, Node: Development, Next: FDL, Prev: Functions, Up: Top File: dash.info, Node: Development, Next: FDL, Prev: Functions, Up: Top
@ -4507,7 +4424,7 @@ Index
(line 63) (line 63)
* -as->: Threading macros. (line 49) * -as->: Threading macros. (line 49)
* -butlast: Other list operations. * -butlast: Other list operations.
(line 405) (line 333)
* -clone: Tree operations. (line 123) * -clone: Tree operations. (line 123)
* -common-prefix: Reductions. (line 242) * -common-prefix: Reductions. (line 242)
* -common-suffix: Reductions. (line 252) * -common-suffix: Reductions. (line 252)
@ -4541,17 +4458,17 @@ Index
* -elem-indices: Indexing. (line 23) * -elem-indices: Indexing. (line 23)
* -every: Predicates. (line 23) * -every: Predicates. (line 23)
* -fifth-item: Other list operations. * -fifth-item: Other list operations.
(line 380) (line 308)
* -filter: Sublist selection. (line 8) * -filter: Sublist selection. (line 8)
* -find-index: Indexing. (line 35) * -find-index: Indexing. (line 35)
* -find-indices: Indexing. (line 73) * -find-indices: Indexing. (line 73)
* -find-last-index: Indexing. (line 54) * -find-last-index: Indexing. (line 54)
* -first: Other list operations. * -first: Other list operations.
(line 300) (line 228)
* -first-item: Other list operations. * -first-item: Other list operations.
(line 328) (line 256)
* -fix: Other list operations. * -fix: Other list operations.
(line 445) (line 373)
* -fixfn: Function combinators. * -fixfn: Function combinators.
(line 224) (line 224)
* -flatten: List to list. (line 38) * -flatten: List to list. (line 38)
@ -4559,7 +4476,7 @@ Index
* -flip: Function combinators. * -flip: Function combinators.
(line 95) (line 95)
* -fourth-item: Other list operations. * -fourth-item: Other list operations.
(line 367) (line 295)
* -frequencies: Reductions. (line 310) * -frequencies: Reductions. (line 310)
* -grade-down: Indexing. (line 103) * -grade-down: Indexing. (line 103)
* -grade-up: Indexing. (line 93) * -grade-up: Indexing. (line 93)
@ -4586,13 +4503,13 @@ Index
* -keep: List to list. (line 8) * -keep: List to list. (line 8)
* -lambda: Binding. (line 247) * -lambda: Binding. (line 247)
* -last: Other list operations. * -last: Other list operations.
(line 318) (line 246)
* -last-item: Other list operations. * -last-item: Other list operations.
(line 393) (line 321)
* -let: Binding. (line 61) * -let: Binding. (line 61)
* -let*: Binding. (line 227) * -let*: Binding. (line 227)
* -list: Other list operations. * -list: Other list operations.
(line 428) (line 356)
* -map: Maps. (line 10) * -map: Maps. (line 10)
* -map-first: Maps. (line 38) * -map-first: Maps. (line 38)
* -map-indexed: Maps. (line 68) * -map-indexed: Maps. (line 68)
@ -4613,7 +4530,7 @@ Index
* -orfn: Function combinators. * -orfn: Function combinators.
(line 167) (line 167)
* -pad: Other list operations. * -pad: Other list operations.
(line 241) (line 169)
* -partial: Function combinators. * -partial: Function combinators.
(line 8) (line 8)
* -partition: Partitioning. (line 90) * -partition: Partitioning. (line 90)
@ -4641,7 +4558,7 @@ Index
* -reductions-r-from: Reductions. (line 118) * -reductions-r-from: Reductions. (line 118)
* -remove: Sublist selection. (line 26) * -remove: Sublist selection. (line 26)
* -remove-at: List to list. (line 151) * -remove-at: List to list. (line 151)
* -remove-at-indices: List to list. (line 170) * -remove-at-indices: List to list. (line 164)
* -remove-first: Sublist selection. (line 44) * -remove-first: Sublist selection. (line 44)
* -remove-item: Sublist selection. (line 84) * -remove-item: Sublist selection. (line 84)
* -remove-last: Sublist selection. (line 65) * -remove-last: Sublist selection. (line 65)
@ -4660,7 +4577,7 @@ Index
* -running-sum: Reductions. (line 190) * -running-sum: Reductions. (line 190)
* -same-items?: Set operations. (line 88) * -same-items?: Set operations. (line 88)
* -second-item: Other list operations. * -second-item: Other list operations.
(line 341) (line 269)
* -select-by-indices: Sublist selection. (line 211) * -select-by-indices: Sublist selection. (line 211)
* -select-column: Sublist selection. (line 241) * -select-column: Sublist selection. (line 241)
* -select-columns: Sublist selection. (line 222) * -select-columns: Sublist selection. (line 222)
@ -4674,7 +4591,7 @@ Index
* -some->: Threading macros. (line 62) * -some->: Threading macros. (line 62)
* -some->>: Threading macros. (line 74) * -some->>: Threading macros. (line 74)
* -sort: Other list operations. * -sort: Other list operations.
(line 415) (line 343)
* -splice: Maps. (line 102) * -splice: Maps. (line 102)
* -splice-list: Maps. (line 127) * -splice-list: Maps. (line 127)
* -split-at: Partitioning. (line 8) * -split-at: Partitioning. (line 8)
@ -4683,15 +4600,15 @@ Index
* -split-with: Partitioning. (line 23) * -split-with: Partitioning. (line 23)
* -sum: Reductions. (line 180) * -sum: Reductions. (line 180)
* -table: Other list operations. * -table: Other list operations.
(line 256) (line 184)
* -table-flat: Other list operations. * -table-flat: Other list operations.
(line 275) (line 203)
* -tails: Reductions. (line 232) * -tails: Reductions. (line 232)
* -take: Sublist selection. (line 121) * -take: Sublist selection. (line 121)
* -take-last: Sublist selection. (line 135) * -take-last: Sublist selection. (line 135)
* -take-while: Sublist selection. (line 177) * -take-while: Sublist selection. (line 177)
* -third-item: Other list operations. * -third-item: Other list operations.
(line 354) (line 282)
* -tree-map: Tree operations. (line 28) * -tree-map: Tree operations. (line 28)
* -tree-map-nodes: Tree operations. (line 39) * -tree-map-nodes: Tree operations. (line 39)
* -tree-mapreduce: Tree operations. (line 85) * -tree-mapreduce: Tree operations. (line 85)
@ -4702,22 +4619,16 @@ Index
* -unfold: Unfolding. (line 25) * -unfold: Unfolding. (line 25)
* -union: Set operations. (line 8) * -union: Set operations. (line 8)
* -unzip: Other list operations. * -unzip: Other list operations.
(line 215) (line 147)
* -unzip-lists: Other list operations.
(line 196)
* -update-at: List to list. (line 137) * -update-at: List to list. (line 137)
* -when-let: Binding. (line 9) * -when-let: Binding. (line 9)
* -when-let*: Binding. (line 21) * -when-let*: Binding. (line 21)
* -zip: Other list operations. * -zip: Other list operations.
(line 150) (line 96)
* -zip-fill: Other list operations. * -zip-fill: Other list operations.
(line 176) (line 139)
* -zip-lists: Other list operations. * -zip-lists: Other list operations.
(line 114) (line 120)
* -zip-lists-fill: Other list operations.
(line 135)
* -zip-pair: Other list operations.
(line 98)
* -zip-with: Other list operations. * -zip-with: Other list operations.
(line 80) (line 80)
* dash-fontify-mode: Fontification of special variables. * dash-fontify-mode: Fontification of special variables.
@ -4775,170 +4686,167 @@ Ref: -insert-at24816
Ref: -replace-at25141 Ref: -replace-at25141
Ref: -update-at25528 Ref: -update-at25528
Ref: -remove-at26069 Ref: -remove-at26069
Ref: -remove-at-indices26696 Ref: -remove-at-indices26554
Node: Reductions27386 Node: Reductions27133
Ref: -reduce-from27582 Ref: -reduce-from27329
Ref: -reduce-r-from28306 Ref: -reduce-r-from28053
Ref: -reduce29569 Ref: -reduce29316
Ref: -reduce-r30320 Ref: -reduce-r30067
Ref: -reductions-from31598 Ref: -reductions-from31345
Ref: -reductions-r-from32404 Ref: -reductions-r-from32151
Ref: -reductions33234 Ref: -reductions32981
Ref: -reductions-r33945 Ref: -reductions-r33692
Ref: -count34690 Ref: -count34437
Ref: -sum34920 Ref: -sum34667
Ref: -running-sum35108 Ref: -running-sum34855
Ref: -product35429 Ref: -product35176
Ref: -running-product35637 Ref: -running-product35384
Ref: -inits35978 Ref: -inits35725
Ref: -tails36223 Ref: -tails35970
Ref: -common-prefix36468 Ref: -common-prefix36214
Ref: -common-suffix36762 Ref: -common-suffix36508
Ref: -min37056 Ref: -min36802
Ref: -min-by37282 Ref: -min-by37028
Ref: -max37803 Ref: -max37549
Ref: -max-by38028 Ref: -max-by37774
Ref: -frequencies38554 Ref: -frequencies38300
Node: Unfolding39169 Node: Unfolding38915
Ref: -iterate39410 Ref: -iterate39156
Ref: -unfold39857 Ref: -unfold39603
Ref: -repeat40662 Ref: -repeat40408
Ref: -cycle40946 Ref: -cycle40692
Node: Predicates41343 Node: Predicates41091
Ref: -some41520 Ref: -some41268
Ref: -every41949 Ref: -every41697
Ref: -any?42663 Ref: -any?42411
Ref: -all?43012 Ref: -all?42760
Ref: -none?43754 Ref: -none?43502
Ref: -only-some?44074 Ref: -only-some?43822
Ref: -contains?44619 Ref: -contains?44367
Ref: -is-prefix?45125 Ref: -is-prefix?44873
Ref: -is-suffix?45457 Ref: -is-suffix?45205
Ref: -is-infix?45789 Ref: -is-infix?45537
Ref: -cons-pair?46149 Ref: -cons-pair?45897
Node: Partitioning46480 Node: Partitioning46228
Ref: -split-at46668 Ref: -split-at46416
Ref: -split-with47332 Ref: -split-with47080
Ref: -split-on47972 Ref: -split-on47720
Ref: -split-when48643 Ref: -split-when48391
Ref: -separate49286 Ref: -separate49034
Ref: -partition49820 Ref: -partition49568
Ref: -partition-all50269 Ref: -partition-all50017
Ref: -partition-in-steps50694 Ref: -partition-in-steps50442
Ref: -partition-all-in-steps51240 Ref: -partition-all-in-steps50988
Ref: -partition-by51754 Ref: -partition-by51502
Ref: -partition-by-header52132 Ref: -partition-by-header51880
Ref: -partition-after-pred52733 Ref: -partition-after-pred52481
Ref: -partition-before-pred53186 Ref: -partition-before-pred52934
Ref: -partition-before-item53571 Ref: -partition-before-item53319
Ref: -partition-after-item53878 Ref: -partition-after-item53626
Ref: -group-by54180 Ref: -group-by53928
Node: Indexing54613 Node: Indexing54361
Ref: -elem-index54815 Ref: -elem-index54563
Ref: -elem-indices55302 Ref: -elem-indices55050
Ref: -find-index55761 Ref: -find-index55509
Ref: -find-last-index56430 Ref: -find-last-index56178
Ref: -find-indices57081 Ref: -find-indices56829
Ref: -grade-up57843 Ref: -grade-up57591
Ref: -grade-down58250 Ref: -grade-down57998
Node: Set operations58664 Node: Set operations58412
Ref: -union58847 Ref: -union58595
Ref: -difference59277 Ref: -difference59025
Ref: -intersection59705 Ref: -intersection59453
Ref: -powerset60134 Ref: -powerset59882
Ref: -permutations60411 Ref: -permutations60159
Ref: -distinct60849 Ref: -distinct60597
Ref: -same-items?61243 Ref: -same-items?60991
Node: Other list operations61852 Node: Other list operations61600
Ref: -rotate62077 Ref: -rotate61825
Ref: -cons*62430 Ref: -cons*62178
Ref: -snoc62852 Ref: -snoc62600
Ref: -interpose63264 Ref: -interpose63012
Ref: -interleave63558 Ref: -interleave63306
Ref: -iota63924 Ref: -iota63672
Ref: -zip-with64407 Ref: -zip-with64155
Ref: -zip-pair65215 Ref: -zip64869
Ref: -zip-lists65781 Ref: -zip-lists65698
Ref: -zip-lists-fill66579 Ref: -zip-fill66396
Ref: -zip67289 Ref: -unzip66718
Ref: -zip-fill68316 Ref: -pad67460
Ref: -unzip-lists69230 Ref: -table67945
Ref: -unzip69853 Ref: -table-flat68731
Ref: -pad70846 Ref: -first69736
Ref: -table71331 Ref: -last70269
Ref: -table-flat72117 Ref: -first-item70615
Ref: -first73122 Ref: -second-item71027
Ref: -last73655 Ref: -third-item71444
Ref: -first-item74001 Ref: -fourth-item71819
Ref: -second-item74413 Ref: -fifth-item72197
Ref: -third-item74830 Ref: -last-item72572
Ref: -fourth-item75205 Ref: -butlast72933
Ref: -fifth-item75583 Ref: -sort73178
Ref: -last-item75958 Ref: -list73670
Ref: -butlast76319 Ref: -fix74239
Ref: -sort76564 Node: Tree operations74728
Ref: -list77058 Ref: -tree-seq74924
Ref: -fix77627 Ref: -tree-map75785
Node: Tree operations78116 Ref: -tree-map-nodes76225
Ref: -tree-seq78312 Ref: -tree-reduce77089
Ref: -tree-map79173 Ref: -tree-reduce-from77971
Ref: -tree-map-nodes79613 Ref: -tree-mapreduce78571
Ref: -tree-reduce80477 Ref: -tree-mapreduce-from79430
Ref: -tree-reduce-from81359 Ref: -clone80715
Ref: -tree-mapreduce81959 Node: Threading macros81042
Ref: -tree-mapreduce-from82818 Ref: ->81267
Ref: -clone84103 Ref: ->>81755
Node: Threading macros84441 Ref: -->82258
Ref: ->84666 Ref: -as->82814
Ref: ->>85154 Ref: -some->83268
Ref: -->85657 Ref: -some->>83653
Ref: -as->86213 Ref: -some-->84100
Ref: -some->86667 Ref: -doto84667
Ref: -some->>87052 Node: Binding85220
Ref: -some-->87499 Ref: -when-let85427
Ref: -doto88066 Ref: -when-let*85888
Node: Binding88619 Ref: -if-let86417
Ref: -when-let88826 Ref: -if-let*86783
Ref: -when-let*89287 Ref: -let87406
Ref: -if-let89816 Ref: -let*93496
Ref: -if-let*90182 Ref: -lambda94433
Ref: -let90805 Ref: -setq95239
Ref: -let*96895 Node: Side effects96040
Ref: -lambda97832 Ref: -each96234
Ref: -setq98638 Ref: -each-while96761
Node: Side effects99439 Ref: -each-indexed97381
Ref: -each99633 Ref: -each-r97973
Ref: -each-while100160 Ref: -each-r-while98415
Ref: -each-indexed100780 Ref: -dotimes99059
Ref: -each-r101372 Node: Destructive operations99612
Ref: -each-r-while101814 Ref: !cons99830
Ref: -dotimes102458 Ref: !cdr100034
Node: Destructive operations103011 Node: Function combinators100227
Ref: !cons103229 Ref: -partial100431
Ref: !cdr103433 Ref: -rpartial100949
Node: Function combinators103626 Ref: -juxt101597
Ref: -partial103830 Ref: -compose102049
Ref: -rpartial104348 Ref: -applify102656
Ref: -juxt104996 Ref: -on103086
Ref: -compose105448 Ref: -flip103858
Ref: -applify106055 Ref: -rotate-args104382
Ref: -on106485 Ref: -const105011
Ref: -flip107257 Ref: -cut105353
Ref: -rotate-args107781 Ref: -not105833
Ref: -const108410 Ref: -orfn106377
Ref: -cut108752 Ref: -andfn107170
Ref: -not109232 Ref: -iteratefn107957
Ref: -orfn109776 Ref: -fixfn108659
Ref: -andfn110569 Ref: -prodfn110233
Ref: -iteratefn111356 Node: Development111394
Ref: -fixfn112058 Node: Contribute111683
Ref: -prodfn113632 Node: Contributors112695
Node: Development114783 Node: FDL114788
Node: Contribute115072 Node: GPL140108
Node: Contributors116084 Node: Index177857
Node: FDL118177
Node: GPL143497
Node: Index181246
 
End Tag Table End Tag Table

View File

@ -0,0 +1,50 @@
;;; exec-path-from-shell-autoloads.el --- automatically extracted autoloads
;;
;;; Code:
(add-to-list 'load-path (directory-file-name
(or (file-name-directory #$) (car load-path))))
;;;### (autoloads nil "exec-path-from-shell" "exec-path-from-shell.el"
;;;;;; (0 0 0 0))
;;; Generated autoloads from exec-path-from-shell.el
(autoload 'exec-path-from-shell-copy-envs "exec-path-from-shell" "\
Set the environment variables with NAMES from the user's shell.
As a special case, if the variable is $PATH, then `exec-path' and
`eshell-path-env' are also set appropriately. The result is an alist,
as described by `exec-path-from-shell-getenvs'.
\(fn NAMES)" nil nil)
(autoload 'exec-path-from-shell-copy-env "exec-path-from-shell" "\
Set the environment variable $NAME from the user's shell.
As a special case, if the variable is $PATH, then `exec-path' and
`eshell-path-env' are also set appropriately. Return the value
of the environment variable.
\(fn NAME)" t nil)
(autoload 'exec-path-from-shell-initialize "exec-path-from-shell" "\
Initialize environment from the user's shell.
The values of all the environment variables named in
`exec-path-from-shell-variables' are set from the corresponding
values used in the user's shell.
\(fn)" t nil)
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "exec-path-from-shell" '("exec-path-from-shell-")))
;;;***
;; Local Variables:
;; version-control: never
;; no-byte-compile: t
;; no-update-autoloads: t
;; coding: utf-8
;; End:
;;; exec-path-from-shell-autoloads.el ends here

View File

@ -0,0 +1,2 @@
;;; -*- no-byte-compile: t -*-
(define-package "exec-path-from-shell" "1.12" "Get environment variables such as $PATH from the shell" 'nil :commit "76cd6e3fa8a7dac937af7e40507843dfae4f9184" :keywords '("unix" "environment") :authors '(("Steve Purcell" . "steve@sanityinc.com")) :maintainer '("Steve Purcell" . "steve@sanityinc.com") :url "https://github.com/purcell/exec-path-from-shell")

View File

@ -1,12 +1,12 @@
;;; exec-path-from-shell.el --- Get environment variables such as $PATH from the shell -*- lexical-binding: t -*- ;;; exec-path-from-shell.el --- Get environment variables such as $PATH from the shell
;; Copyright (C) 2012-2014 Steve Purcell ;; Copyright (C) 2012-2014 Steve Purcell
;; Author: Steve Purcell <steve@sanityinc.com> ;; Author: Steve Purcell <steve@sanityinc.com>
;; Keywords: unix, environment ;; Keywords: unix, environment
;; URL: https://github.com/purcell/exec-path-from-shell ;; URL: https://github.com/purcell/exec-path-from-shell
;; Package-Version: 2.1 ;; Package-Version: 1.12
;; Package-Requires: ((emacs "24.1") (cl-lib "0.6")) ;; Package-X-Original-Version: 0
;; This file is not part of GNU Emacs. ;; This file is not part of GNU Emacs.
@ -74,8 +74,7 @@
;;; Code: ;;; Code:
;; Satisfy the byte compiler ;; Satisfy the byte compiler
(eval-when-compile (require 'eshell)) (defvar eshell-path-env)
(require 'cl-lib)
(defgroup exec-path-from-shell nil (defgroup exec-path-from-shell nil
"Make Emacs use shell-defined values for $PATH etc." "Make Emacs use shell-defined values for $PATH etc."
@ -88,9 +87,12 @@
:type '(repeat (string :tag "Environment variable")) :type '(repeat (string :tag "Environment variable"))
:group 'exec-path-from-shell) :group 'exec-path-from-shell)
(defcustom exec-path-from-shell-warn-duration-millis 500 (defcustom exec-path-from-shell-check-startup-files t
"Print a warning if shell execution takes longer than this many milliseconds." "If non-nil, warn if variables are being set in the wrong shell startup files.
:type 'integer) Environment variables should be set in .profile or .zshenv rather than
.bashrc or .zshrc."
:type 'boolean
:group 'exec-path-from-shell)
(defcustom exec-path-from-shell-shell-name nil (defcustom exec-path-from-shell-shell-name nil
"If non-nil, use this shell executable. "If non-nil, use this shell executable.
@ -137,20 +139,7 @@ The default value denotes an interactive login shell."
(defun exec-path-from-shell--standard-shell-p (shell) (defun exec-path-from-shell--standard-shell-p (shell)
"Return non-nil iff SHELL supports the standard ${VAR-default} syntax." "Return non-nil iff SHELL supports the standard ${VAR-default} syntax."
(not (string-match "\\(fish\\|nu\\|t?csh\\)$" shell))) (not (string-match "\\(fish\\|t?csh\\)$" shell)))
(defmacro exec-path-from-shell--warn-duration (&rest body)
"Evaluate BODY and warn if execution duration exceeds a time limit.
The limit is given by `exec-path-from-shell-warn-duration-millis'."
(let ((start-time (cl-gensym))
(duration-millis (cl-gensym)))
`(let ((,start-time (current-time)))
(prog1
(progn ,@body)
(let ((,duration-millis (* 1000.0 (float-time (time-subtract (current-time) ,start-time)))))
(if (> ,duration-millis exec-path-from-shell-warn-duration-millis)
(message "Warning: exec-path-from-shell execution took %dms. See the README for tips on reducing this." ,duration-millis)
(exec-path-from-shell--debug "Shell execution took %dms" ,duration-millis)))))))
(defun exec-path-from-shell-printf (str &optional args) (defun exec-path-from-shell-printf (str &optional args)
"Return the result of printing STR in the user's shell. "Return the result of printing STR in the user's shell.
@ -177,8 +166,7 @@ shell-escaped, so they may contain $ etc."
(concat "sh -c " (shell-quote-argument printf-command))))))) (concat "sh -c " (shell-quote-argument printf-command)))))))
(with-temp-buffer (with-temp-buffer
(exec-path-from-shell--debug "Invoking shell %s with args %S" shell shell-args) (exec-path-from-shell--debug "Invoking shell %s with args %S" shell shell-args)
(let ((exit-code (exec-path-from-shell--warn-duration (let ((exit-code (apply #'call-process shell nil t nil shell-args)))
(apply #'call-process shell nil t nil shell-args))))
(exec-path-from-shell--debug "Shell printed: %S" (buffer-string)) (exec-path-from-shell--debug "Shell printed: %S" (buffer-string))
(unless (zerop exit-code) (unless (zerop exit-code)
(error "Non-zero exit code from shell %s invoked with args %S. Output was:\n%S" (error "Non-zero exit code from shell %s invoked with args %S. Output was:\n%S"
@ -193,8 +181,6 @@ shell-escaped, so they may contain $ etc."
Execute the shell according to `exec-path-from-shell-arguments'. Execute the shell according to `exec-path-from-shell-arguments'.
The result is a list of (NAME . VALUE) pairs." The result is a list of (NAME . VALUE) pairs."
(when (file-remote-p default-directory)
(error "You cannot run exec-path-from-shell from a remote buffer (Tramp, etc.)"))
(let* ((random-default (md5 (format "%s%s%s" (emacs-pid) (random) (current-time)))) (let* ((random-default (md5 (format "%s%s%s" (emacs-pid) (random) (current-time))))
(dollar-names (mapcar (lambda (n) (format "${%s-%s}" n random-default)) names)) (dollar-names (mapcar (lambda (n) (format "${%s-%s}" n random-default)) names))
(values (split-string (exec-path-from-shell-printf (values (split-string (exec-path-from-shell-printf
@ -221,35 +207,48 @@ variable of NAME and return this output as string."
(defun exec-path-from-shell-setenv (name value) (defun exec-path-from-shell-setenv (name value)
"Set the value of environment var NAME to VALUE. "Set the value of environment var NAME to VALUE.
Additionally, if NAME is \"PATH\" then also update the Additionally, if NAME is \"PATH\" then also set corresponding
variables `exec-path' and `eshell-path-env'." variables such as `exec-path'."
(setenv name value) (setenv name value)
(when (string-equal "PATH" name) (when (string-equal "PATH" name)
(setq exec-path (append (parse-colon-path value) (list exec-directory))) (setq eshell-path-env value
;; `eshell-path-env' is a buffer local variable, so change its default exec-path (append (parse-colon-path value) (list exec-directory)))))
;; value.
(setq-default eshell-path-env value)))
;;;###autoload ;;;###autoload
(defun exec-path-from-shell-copy-envs (names) (defun exec-path-from-shell-copy-envs (names)
"Set the environment variables with NAMES from the user's shell. "Set the environment variables with NAMES from the user's shell.
As a special case, if the variable is $PATH, then the variables As a special case, if the variable is $PATH, then `exec-path' and
`exec-path' and `eshell-path-env' are also set appropriately. `eshell-path-env' are also set appropriately. The result is an alist,
The result is an alist, as described by as described by `exec-path-from-shell-getenvs'."
`exec-path-from-shell-getenvs'."
(let ((pairs (exec-path-from-shell-getenvs names))) (let ((pairs (exec-path-from-shell-getenvs names)))
(when exec-path-from-shell-check-startup-files
(exec-path-from-shell--maybe-warn-about-startup-files pairs))
(mapc (lambda (pair) (mapc (lambda (pair)
(exec-path-from-shell-setenv (car pair) (cdr pair))) (exec-path-from-shell-setenv (car pair) (cdr pair)))
pairs))) pairs)))
(defun exec-path-from-shell--maybe-warn-about-startup-files (pairs)
"Warn the user if the value of PAIRS seems to depend on interactive shell startup files."
(let ((without-minus-i (remove "-i" exec-path-from-shell-arguments)))
;; If the user is using "-i", we warn them if it is necessary.
(unless (eq exec-path-from-shell-arguments without-minus-i)
(let* ((exec-path-from-shell-arguments without-minus-i)
(alt-pairs (exec-path-from-shell-getenvs (mapcar 'car pairs)))
different)
(dolist (pair pairs)
(unless (equal pair (assoc (car pair) alt-pairs))
(push (car pair) different)))
(when different
(message "You appear to be setting environment variables %S in your .bashrc or .zshrc: those files are only read by interactive shells, so you should instead set environment variables in startup files like .profile, .bash_profile or .zshenv. Refer to your shell's man page for more info. Customize `exec-path-from-shell-arguments' to remove \"-i\" when done, or disable `exec-path-from-shell-check-startup-files' to disable this message." different))))))
;;;###autoload ;;;###autoload
(defun exec-path-from-shell-copy-env (name) (defun exec-path-from-shell-copy-env (name)
"Set the environment variable $NAME from the user's shell. "Set the environment variable $NAME from the user's shell.
As a special case, if the variable is $PATH, then the variables As a special case, if the variable is $PATH, then `exec-path' and
`exec-path' and `eshell-path-env' are also set appropriately. `eshell-path-env' are also set appropriately. Return the value
Return the value of the environment variable." of the environment variable."
(interactive "sCopy value of which environment variable from shell? ") (interactive "sCopy value of which environment variable from shell? ")
(cdar (exec-path-from-shell-copy-envs (list name)))) (cdar (exec-path-from-shell-copy-envs (list name))))

View File

@ -1,51 +0,0 @@
;;; exec-path-from-shell-autoloads.el --- automatically extracted autoloads (do not edit) -*- lexical-binding: t -*-
;; Generated by the `loaddefs-generate' function.
;; This file is part of GNU Emacs.
;;; Code:
(add-to-list 'load-path (or (and load-file-name (directory-file-name (file-name-directory load-file-name))) (car load-path)))
;;; Generated autoloads from exec-path-from-shell.el
(autoload 'exec-path-from-shell-copy-envs "exec-path-from-shell" "\
Set the environment variables with NAMES from the user's shell.
As a special case, if the variable is $PATH, then the variables
`exec-path' and `eshell-path-env' are also set appropriately.
The result is an alist, as described by
`exec-path-from-shell-getenvs'.
(fn NAMES)")
(autoload 'exec-path-from-shell-copy-env "exec-path-from-shell" "\
Set the environment variable $NAME from the user's shell.
As a special case, if the variable is $PATH, then the variables
`exec-path' and `eshell-path-env' are also set appropriately.
Return the value of the environment variable.
(fn NAME)" t)
(autoload 'exec-path-from-shell-initialize "exec-path-from-shell" "\
Initialize environment from the user's shell.
The values of all the environment variables named in
`exec-path-from-shell-variables' are set from the corresponding
values used in the user's shell." t)
(register-definition-prefixes "exec-path-from-shell" '("exec-path-from-shell-"))
;;; End of scraped data
(provide 'exec-path-from-shell-autoloads)
;; Local Variables:
;; version-control: never
;; no-byte-compile: t
;; no-update-autoloads: t
;; no-native-compile: t
;; coding: utf-8-emacs-unix
;; End:
;;; exec-path-from-shell-autoloads.el ends here

View File

@ -1,15 +0,0 @@
(define-package "exec-path-from-shell" "2.1" "Get environment variables such as $PATH from the shell"
'((emacs "24.1")
(cl-lib "0.6"))
:commit "03fc0a38af9e396c98f5a30c392cf757b3a34feb" :authors
'(("Steve Purcell" . "steve@sanityinc.com"))
:maintainers
'(("Steve Purcell" . "steve@sanityinc.com"))
:maintainer
'("Steve Purcell" . "steve@sanityinc.com")
:keywords
'("unix" "environment")
:url "https://github.com/purcell/exec-path-from-shell")
;; Local Variables:
;; no-byte-compile: t
;; End:

View File

@ -1,43 +1,35 @@
;;; page-break-lines-autoloads.el --- automatically extracted autoloads (do not edit) -*- lexical-binding: t -*- ;;; page-break-lines-autoloads.el --- automatically extracted autoloads
;; Generated by the `loaddefs-generate' function. ;;
;; This file is part of GNU Emacs.
;;; Code: ;;; Code:
(add-to-list 'load-path (or (and load-file-name (directory-file-name (file-name-directory load-file-name))) (car load-path))) (add-to-list 'load-path (directory-file-name
(or (file-name-directory #$) (car load-path))))
;;;### (autoloads nil "page-break-lines" "page-break-lines.el" (0
;;;;;; 0 0 0))
;;; Generated autoloads from page-break-lines.el ;;; Generated autoloads from page-break-lines.el
(autoload 'page-break-lines-mode "page-break-lines" "\ (autoload 'page-break-lines-mode "page-break-lines" "\
Toggle Page Break Lines mode. Toggle Page Break Lines mode.
If called interactively, enable Page-Break-Lines mode if ARG is
positive, and disable it if ARG is zero or negative. If called
from Lisp, also enable the mode if ARG is omitted or nil, and
toggle it if ARG is `toggle'; disable the mode otherwise.
In Page Break mode, page breaks (^L characters) are displayed as a In Page Break mode, page breaks (^L characters) are displayed as a
horizontal line of `page-break-lines-char' characters. horizontal line of `page-break-lines-char' characters.
This is a minor mode. If called interactively, toggle the \(fn &optional ARG)" t nil)
`Page-Break-Lines mode' mode. If the prefix argument is
positive, enable the mode, and if it is zero or negative, disable
the mode.
If called from Lisp, toggle the mode if ARG is `toggle'. Enable
the mode if ARG is nil, omitted, or is a positive number.
Disable the mode if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
evaluate `page-break-lines-mode'.
The mode's hook is called both when the mode is enabled and when
it is disabled.
(fn &optional ARG)" t)
(autoload 'page-break-lines-mode-maybe "page-break-lines" "\ (autoload 'page-break-lines-mode-maybe "page-break-lines" "\
Enable `page-break-lines-mode' in the current buffer if desired. Enable `page-break-lines-mode' in the current buffer if desired.
When `major-mode' is listed in `page-break-lines-modes', then When `major-mode' is listed in `page-break-lines-modes', then
`page-break-lines-mode' will be enabled.") `page-break-lines-mode' will be enabled." nil nil)
(put 'global-page-break-lines-mode 'globalized-minor-mode t) (put 'global-page-break-lines-mode 'globalized-minor-mode t)
(defvar global-page-break-lines-mode nil "\ (defvar global-page-break-lines-mode nil "\
Non-nil if Global Page-Break-Lines mode is enabled. Non-nil if Global Page-Break-Lines mode is enabled.
See the `global-page-break-lines-mode' command See the `global-page-break-lines-mode' command
@ -45,34 +37,29 @@ for a description of this minor mode.
Setting this variable directly does not take effect; Setting this variable directly does not take effect;
either customize it (see the info node `Easy Customization') either customize it (see the info node `Easy Customization')
or call the function `global-page-break-lines-mode'.") or call the function `global-page-break-lines-mode'.")
(custom-autoload 'global-page-break-lines-mode "page-break-lines" nil) (custom-autoload 'global-page-break-lines-mode "page-break-lines" nil)
(autoload 'global-page-break-lines-mode "page-break-lines" "\ (autoload 'global-page-break-lines-mode "page-break-lines" "\
Toggle Page-Break-Lines mode in all buffers. Toggle Page-Break-Lines mode in all buffers.
With prefix ARG, enable Global Page-Break-Lines mode if ARG is positive; With prefix ARG, enable Global Page-Break-Lines mode if ARG is positive;
otherwise, disable it. otherwise, disable it. If called from Lisp, enable the mode if
ARG is omitted or nil.
If called from Lisp, toggle the mode if ARG is `toggle'.
Enable the mode if ARG is nil, omitted, or is a positive number.
Disable the mode if ARG is a negative number.
Page-Break-Lines mode is enabled in all buffers where Page-Break-Lines mode is enabled in all buffers where
`page-break-lines-mode-maybe' would do it. `page-break-lines-mode-maybe' would do it.
See `page-break-lines-mode' for more information on Page-Break-Lines mode. See `page-break-lines-mode' for more information on Page-Break-Lines mode.
(fn &optional ARG)" t) \(fn &optional ARG)" t nil)
(register-definition-prefixes "page-break-lines" '("page-break-lines-"))
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "page-break-lines" '("page-break-lines-")))
;;;***
;;; End of scraped data
(provide 'page-break-lines-autoloads)
;; Local Variables: ;; Local Variables:
;; version-control: never ;; version-control: never
;; no-byte-compile: t ;; no-byte-compile: t
;; no-update-autoloads: t ;; no-update-autoloads: t
;; no-native-compile: t ;; coding: utf-8
;; coding: utf-8-emacs-unix
;; End: ;; End:
;;; page-break-lines-autoloads.el ends here ;;; page-break-lines-autoloads.el ends here

View File

@ -0,0 +1,2 @@
;;; Generated package description from page-break-lines-0.14/page-break-lines.el -*- no-byte-compile: t -*-
(define-package "page-break-lines" "0.14" "Display ^L page breaks as tidy horizontal lines" '((emacs "24.4")) :commit "69caea070379f3324c530e96e06625c3cd097cb9" :authors '(("Steve Purcell" . "steve@sanityinc.com")) :maintainer '("Steve Purcell" . "steve@sanityinc.com") :keywords '("convenience" "faces") :url "https://github.com/purcell/page-break-lines")

View File

@ -4,7 +4,9 @@
;; Author: Steve Purcell <steve@sanityinc.com> ;; Author: Steve Purcell <steve@sanityinc.com>
;; URL: https://github.com/purcell/page-break-lines ;; URL: https://github.com/purcell/page-break-lines
;; Package-Version: 0.15 ;; Package-Commit: 69caea070379f3324c530e96e06625c3cd097cb9
;; Package-Version: 0.14
;; Package-X-Original-Version: 0
;; Package-Requires: ((emacs "24.4")) ;; Package-Requires: ((emacs "24.4"))
;; Keywords: convenience, faces ;; Keywords: convenience, faces

View File

@ -1,14 +0,0 @@
(define-package "page-break-lines" "0.15" "Display ^L page breaks as tidy horizontal lines"
'((emacs "24.4"))
:commit "c4283f580fa4feeb9abcaebb99709007db0a3159" :authors
'(("Steve Purcell" . "steve@sanityinc.com"))
:maintainers
'(("Steve Purcell" . "steve@sanityinc.com"))
:maintainer
'("Steve Purcell" . "steve@sanityinc.com")
:keywords
'("convenience" "faces")
:url "https://github.com/purcell/page-break-lines")
;; Local Variables:
;; no-byte-compile: t
;; End:

View File

@ -1,14 +1,13 @@
;;; use-package-autoloads.el --- automatically extracted autoloads (do not edit) -*- lexical-binding: t -*- ;;; use-package-autoloads.el --- automatically extracted autoloads
;; Generated by the `loaddefs-generate' function. ;;
;; This file is part of GNU Emacs.
;;; Code: ;;; Code:
(add-to-list 'load-path (or (and load-file-name (directory-file-name (file-name-directory load-file-name))) (car load-path))) (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"
;;;;;; (0 0 0 0))
;;; Generated autoloads from use-package-bind-key.el ;;; Generated autoloads from use-package-bind-key.el
(autoload 'use-package-autoload-keymap "use-package-bind-key" "\ (autoload 'use-package-autoload-keymap "use-package-bind-key" "\
@ -23,32 +22,46 @@ function for a particular keymap. The keymap is expected to be
defined by the package. In this way, loading the package is defined by the package. In this way, loading the package is
deferred until the prefix key sequence is pressed. deferred until the prefix key sequence is pressed.
(fn KEYMAP-SYMBOL PACKAGE OVERRIDE)") \(fn KEYMAP-SYMBOL PACKAGE OVERRIDE)" nil nil)
(autoload 'use-package-normalize-binder "use-package-bind-key" "\ (autoload 'use-package-normalize-binder "use-package-bind-key" "\
(fn NAME KEYWORD ARGS)") \(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-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)
(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" "\ (autoload 'use-package-handler/:bind "use-package-bind-key" "\
(fn NAME KEYWORD ARGS REST STATE &optional BIND-MACRO)") \(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)
(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" "\ (autoload 'use-package-handler/:bind-keymap "use-package-bind-key" "\
(fn NAME KEYWORD ARGS REST STATE &optional OVERRIDE)") \(fn NAME KEYWORD ARGS REST STATE &optional OVERRIDE)" nil nil)
(autoload 'use-package-handler/:bind-keymap* "use-package-bind-key" "\ (autoload 'use-package-handler/:bind-keymap* "use-package-bind-key" "\
(fn NAME KEYWORD ARG REST STATE)") \(fn NAME KEYWORD ARG REST STATE)" nil nil)
(register-definition-prefixes "use-package-bind-key" '("use-package-handler/:bind*"))
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "use-package-bind-key" '("use-package-handler/:bind*")))
;;;***
;;;### (autoloads nil "use-package-core" "use-package-core.el" (0
;;;;;; 0 0 0))
;;; Generated autoloads from use-package-core.el ;;; Generated autoloads from use-package-core.el
(autoload 'use-package "use-package-core" "\ (autoload 'use-package "use-package-core" "\
@ -77,7 +90,6 @@ this file. Usage:
package. This is useful if the package is being lazily package. This is useful if the package is being lazily
loaded, and you wish to conditionally call functions in your loaded, and you wish to conditionally call functions in your
`:init' block that are defined in the package. `:init' block that are defined in the package.
:autoload Similar to :commands, but it for no-interactive one.
:hook Specify hook(s) to attach this package to. :hook Specify hook(s) to attach this package to.
:bind Bind keys, and define autoloads for the bound commands. :bind Bind keys, and define autoloads for the bound commands.
@ -105,87 +117,114 @@ this file. Usage:
:load-path Add to the `load-path' before attempting to load the package. :load-path Add to the `load-path' before attempting to load the package.
:diminish Support for diminish.el (if installed). :diminish Support for diminish.el (if installed).
:delight Support for delight.el (if installed). :delight Support for delight.el (if installed).
:custom Call `Custom-set' or `set-default' with each variable :custom Call `custom-set' or `set-default' with each variable
definition without modifying the Emacs `custom-file'. definition without modifying the Emacs `custom-file'.
(compare with `custom-set-variables'). (compare with `custom-set-variables').
:custom-face Call `custom-set-faces' with each face definition. :custom-face Call `customize-set-faces' with each face definition.
:ensure Loads the package using package.el if necessary. :ensure Loads the package using package.el if necessary.
:pin Pin the package to an archive. :pin Pin the package to an archive.
(fn NAME &rest ARGS)" nil t) \(fn NAME &rest ARGS)" nil t)
(function-put 'use-package 'lisp-indent-function 'defun)
(register-definition-prefixes "use-package-core" '("use-package-"))
(function-put 'use-package 'lisp-indent-function '1)
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "use-package-core" '("use-package-")))
;;;***
;;;### (autoloads nil "use-package-delight" "use-package-delight.el"
;;;;;; (0 0 0 0))
;;; Generated autoloads from use-package-delight.el ;;; Generated autoloads from use-package-delight.el
(autoload 'use-package-normalize/:delight "use-package-delight" "\ (autoload 'use-package-normalize/:delight "use-package-delight" "\
Normalize arguments to delight. Normalize arguments to delight.
(fn NAME KEYWORD ARGS)") \(fn NAME KEYWORD ARGS)" nil nil)
(autoload 'use-package-handler/:delight "use-package-delight" "\ (autoload 'use-package-handler/:delight "use-package-delight" "\
(fn NAME KEYWORD ARGS REST STATE)") \(fn NAME KEYWORD ARGS REST STATE)" nil nil)
(register-definition-prefixes "use-package-delight" '("use-package-normalize-delight"))
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "use-package-delight" '("use-package-normalize-delight")))
;;;***
;;;### (autoloads nil "use-package-diminish" "use-package-diminish.el"
;;;;;; (0 0 0 0))
;;; Generated autoloads from use-package-diminish.el ;;; Generated autoloads from use-package-diminish.el
(autoload 'use-package-normalize/:diminish "use-package-diminish" "\ (autoload 'use-package-normalize/:diminish "use-package-diminish" "\
(fn NAME KEYWORD ARGS)") \(fn NAME KEYWORD ARGS)" nil nil)
(autoload 'use-package-handler/:diminish "use-package-diminish" "\ (autoload 'use-package-handler/:diminish "use-package-diminish" "\
(fn NAME KEYWORD ARG REST STATE)") \(fn NAME KEYWORD ARG REST STATE)" nil nil)
(register-definition-prefixes "use-package-diminish" '("use-package-normalize-diminish"))
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "use-package-diminish" '("use-package-normalize-diminish")))
;;;***
;;;### (autoloads nil "use-package-ensure" "use-package-ensure.el"
;;;;;; (0 0 0 0))
;;; Generated autoloads from use-package-ensure.el ;;; Generated autoloads from use-package-ensure.el
(autoload 'use-package-normalize/:ensure "use-package-ensure" "\ (autoload 'use-package-normalize/:ensure "use-package-ensure" "\
(fn NAME KEYWORD ARGS)") \(fn NAME KEYWORD ARGS)" nil nil)
(autoload 'use-package-handler/:ensure "use-package-ensure" "\ (autoload 'use-package-handler/:ensure "use-package-ensure" "\
(fn NAME KEYWORD ENSURE REST STATE)") \(fn NAME KEYWORD ENSURE REST STATE)" nil nil)
(register-definition-prefixes "use-package-ensure" '("use-package-"))
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "use-package-ensure" '("use-package-")))
;;;***
;;;### (autoloads nil "use-package-jump" "use-package-jump.el" (0
;;;;;; 0 0 0))
;;; Generated autoloads from use-package-jump.el ;;; Generated autoloads from use-package-jump.el
(autoload 'use-package-jump-to-package-form "use-package-jump" "\ (autoload 'use-package-jump-to-package-form "use-package-jump" "\
Attempt to find and jump to the `use-package' form that loaded PACKAGE. Attempt to find and jump to the `use-package' form that loaded
This will only find the form if that form actually required PACKAGE. This will only find the form if that form actually
PACKAGE. If PACKAGE was previously required then this function required PACKAGE. If PACKAGE was previously required then this
will jump to the file that originally required PACKAGE instead. function will jump to the file that originally required PACKAGE
instead.
(fn PACKAGE)" t) \(fn PACKAGE)" t nil)
(register-definition-prefixes "use-package-jump" '("use-package-find-require"))
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "use-package-jump" '("use-package-find-require")))
;;;***
;;;### (autoloads nil "use-package-lint" "use-package-lint.el" (0
;;;;;; 0 0 0))
;;; Generated autoloads from use-package-lint.el ;;; Generated autoloads from use-package-lint.el
(autoload 'use-package-lint "use-package-lint" "\ (autoload 'use-package-lint "use-package-lint" "\
Check for errors in `use-package' declarations. Check for errors in use-package declarations.
For example, if the module's `:if' condition is met, but even For example, if the module's `:if' condition is met, but even
with the specified `:load-path' the module cannot be found." t) with the specified `:load-path' the module cannot be found." t nil)
(register-definition-prefixes "use-package-lint" '("use-package-lint-declaration"))
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "use-package-lint" '("use-package-lint-declaration")))
;;;***
;;; End of scraped data ;;;### (autoloads nil nil ("use-package-pkg.el" "use-package.el")
;;;;;; (0 0 0 0))
(provide 'use-package-autoloads)
;;;***
;; Local Variables: ;; Local Variables:
;; version-control: never ;; version-control: never
;; no-byte-compile: t ;; no-byte-compile: t
;; no-update-autoloads: t ;; no-update-autoloads: t
;; no-native-compile: t ;; coding: utf-8
;; coding: utf-8-emacs-unix
;; End: ;; End:
;;; use-package-autoloads.el ends here ;;; use-package-autoloads.el ends here

View File

@ -1,27 +1,35 @@
;;; use-package-bind-key.el --- Support for the :bind/:bind-keymap keywords -*- lexical-binding: t; -*- ;;; use-package-bind-key.el --- Support for the :bind/:bind-keymap keywords -*- lexical-binding: t; -*-
;; Copyright (C) 2012-2022 Free Software Foundation, Inc. ;; Copyright (C) 2012-2017 John Wiegley
;; Author: John Wiegley <johnw@newartisans.com> ;; Author: John Wiegley <johnw@newartisans.com>
;; Maintainer: 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 ;; This program is free software; you can redistribute it and/or
;; it under the terms of the GNU General Public License as published by ;; modify it under the terms of the GNU General Public License as
;; the Free Software Foundation, either version 3 of the License, or ;; published by the Free Software Foundation; either version 3, or (at
;; (at your option) any later version. ;; your option) any later version.
;; This program is distributed in the hope that it will be useful, ;; This program is distributed in the hope that it will be useful, but
;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
;; GNU General Public License for more details. ;; General Public License for more details.
;; You should have received a copy of the GNU General Public License ;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <https://www.gnu.org/licenses/>. ;; 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: ;;; Commentary:
;; Provides support for the :bind, :bind*, :bind-keymap and :bind-keymap* ;; Provides support for the :bind, :bind*, :bind-keymap and :bind-keymap*
;; keywords. Note that these are currently still baked into ;; keywords. Note that these are currently still baked into
;; `use-package-keywords' and `use-package-deferring-keywords', although this ;; `use-package-keywords' and `use-package-deferring-keywords', although this
;; is harmless if they are never used. ;; is harmless if they are never used.
@ -78,20 +86,13 @@ deferred until the prefix key sequence is pressed."
;; :prefix-docstring STRING ;; :prefix-docstring STRING
;; :prefix-map SYMBOL ;; :prefix-map SYMBOL
;; :prefix STRING ;; :prefix STRING
;; :repeat-docstring STRING
;; :repeat-map SYMBOL
;; :filter SEXP ;; :filter SEXP
;; :menu-name STRING ;; :menu-name STRING
;; :package SYMBOL ;; :package SYMBOL
;; :continue and :exit are used within :repeat-map
((or (and (eq x :map) (symbolp (cadr arg))) ((or (and (eq x :map) (symbolp (cadr arg)))
(and (eq x :prefix) (stringp (cadr arg))) (and (eq x :prefix) (stringp (cadr arg)))
(and (eq x :prefix-map) (symbolp (cadr arg))) (and (eq x :prefix-map) (symbolp (cadr arg)))
(and (eq x :prefix-docstring) (stringp (cadr arg))) (and (eq x :prefix-docstring) (stringp (cadr arg)))
(and (eq x :repeat-map) (symbolp (cadr arg)))
(eq x :continue)
(eq x :exit)
(and (eq x :repeat-docstring) (stringp (cadr arg)))
(eq x :filter) (eq x :filter)
(and (eq x :menu-name) (stringp (cadr arg))) (and (eq x :menu-name) (stringp (cadr arg)))
(and (eq x :package) (symbolp (cadr arg)))) (and (eq x :package) (symbolp (cadr arg))))

View File

@ -1,22 +1,30 @@
;;; use-package-core.el --- A configuration macro for simplifying your .emacs -*- lexical-binding: t; -*- ;;; use-package-core.el --- A configuration macro for simplifying your .emacs -*- lexical-binding: t; -*-
;; Copyright (C) 2012-2022 Free Software Foundation, Inc. ;; Copyright (C) 2012-2017 John Wiegley
;; Author: John Wiegley <johnw@newartisans.com> ;; Author: John Wiegley <johnw@newartisans.com>
;; Maintainer: John Wiegley <johnw@newartisans.com> ;; Maintainer: John Wiegley <johnw@newartisans.com>
;; Created: 17 Jun 2012
;; Modified: 29 Nov 2017
;; Version: 2.4.1
;; Package-Requires: ((emacs "24.3"))
;; 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 ;; This program is free software; you can redistribute it and/or
;; it under the terms of the GNU General Public License as published by ;; modify it under the terms of the GNU General Public License as
;; the Free Software Foundation, either version 3 of the License, or ;; published by the Free Software Foundation; either version 3, or (at
;; (at your option) any later version. ;; your option) any later version.
;; This program is distributed in the hope that it will be useful, ;; This program is distributed in the hope that it will be useful, but
;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
;; GNU General Public License for more details. ;; General Public License for more details.
;; You should have received a copy of the GNU General Public License ;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <https://www.gnu.org/licenses/>. ;; 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: ;;; Commentary:
@ -35,38 +43,21 @@
(require 'cl-lib) (require 'cl-lib)
(require 'tabulated-list) (require 'tabulated-list)
(eval-and-compile (if (and (eq emacs-major-version 24) (eq emacs-minor-version 3))
;; Declare a synthetic theme for :custom variables. (defsubst hash-table-keys (hash-table)
;; Necessary in order to avoid having those variables saved by custom.el. "Return a list of keys in HASH-TABLE."
(deftheme use-package)) (cl-loop for k being the hash-keys of hash-table collect k))
(eval-when-compile (require 'subr-x)))
(enable-theme 'use-package)
;; Remove the synthetic use-package theme from the enabled themes, so
;; iterating over them to "disable all themes" won't disable it.
(setq custom-enabled-themes (remq 'use-package custom-enabled-themes))
(eval-when-compile
(if (and (eq emacs-major-version 24) (eq emacs-minor-version 3))
(progn
(defsubst hash-table-keys (hash-table)
"Return a list of keys in HASH-TABLE."
(cl-loop for k being the hash-keys of hash-table collect k))
(defsubst string-suffix-p (suffix string &optional ignore-case)
(let ((start-pos (- (length string) (length suffix))))
(and (>= start-pos 0)
(eq t (compare-strings suffix nil nil
string start-pos nil ignore-case))))))
(require 'subr-x)))
(eval-when-compile (eval-when-compile
(require 'regexp-opt)) (require 'regexp-opt))
(defgroup use-package nil (defgroup use-package nil
"A `use-package' declaration for simplifying your `.emacs'." "A use-package declaration for simplifying your `.emacs'."
:group 'startup) :group 'startup)
(defconst use-package-version "2.4.4" (defconst use-package-version "2.4.1"
"This version of `use-package'.") "This version of use-package.")
(defcustom use-package-keywords (defcustom use-package-keywords
'(:disabled '(:disabled
@ -93,25 +84,23 @@
;; Any other keyword that also declares commands to be autoloaded (such as ;; Any other keyword that also declares commands to be autoloaded (such as
;; :bind) must appear before this keyword. ;; :bind) must appear before this keyword.
:commands :commands
:autoload
:init :init
:defer :defer
:demand :demand
:load :load
;; This must occur almost last; the only forms which should appear after ;; This must occur almost last; the only forms which should appear after
;; are those that must happen directly after the config forms. ;; are those that must happen directly after the config forms.
:config :config)
:local)
"The set of valid keywords, in the order they are processed in. "The set of valid keywords, in the order they are processed in.
The order of this list is *very important*, so it is only The order of this list is *very important*, so it is only
advisable to insert new keywords, never to delete or reorder advisable to insert new keywords, never to delete or reorder
them. Further, attention should be paid to the NEWS.md if the them. Further, attention should be paid to the NEWS.md if the
default order ever changes, as they may have subtle effects on default order ever changes, as they may have subtle effects on
the semantics of `use-package' declarations and may necessitate the semantics of use-package declarations and may necessitate
changing where you had inserted a new keyword earlier. changing where you had inserted a new keyword earlier.
Note that `:disabled' is special in this list, as it causes Note that `:disabled' is special in this list, as it causes
nothing at all to happen, even if the rest of the `use-package' nothing at all to happen, even if the rest of the use-package
declaration is incorrect." declaration is incorrect."
:type '(repeat symbol) :type '(repeat symbol)
:group 'use-package) :group 'use-package)
@ -119,8 +108,7 @@ declaration is incorrect."
(defcustom use-package-deferring-keywords (defcustom use-package-deferring-keywords
'(:bind-keymap '(:bind-keymap
:bind-keymap* :bind-keymap*
:commands :commands)
:autoload)
"Unless `:demand' is used, keywords in this list imply deferred loading. "Unless `:demand' is used, keywords in this list imply deferred loading.
The reason keywords like `:hook' are not in this list is that The reason keywords like `:hook' are not in this list is that
they only imply deferred loading if they reference actual they only imply deferred loading if they reference actual
@ -131,16 +119,9 @@ otherwise requested."
:group 'use-package) :group 'use-package)
(defcustom use-package-ignore-unknown-keywords nil (defcustom use-package-ignore-unknown-keywords nil
"If non-nil, warn instead of signaling error for unknown keywords. "If non-nil, issue warning instead of error when unknown
The unknown keyword and its associated arguments will be ignored keyword is encountered. The unknown keyword and its associated
in the `use-package' expansion." arguments will be ignored in the `use-package' expansion."
:type 'boolean
:group 'use-package)
(defcustom use-package-use-theme t
"If non-nil, use a custom theme to avoid saving :custom
variables twice (once in the Custom file, once in the use-package
call)."
:type 'boolean :type 'boolean
:group 'use-package) :group 'use-package)
@ -148,7 +129,7 @@ call)."
"Whether to report about loading and configuration details. "Whether to report about loading and configuration details.
If you customize this, then you should require the `use-package' If you customize this, then you should require the `use-package'
feature in files that use `use-package', even if these files only feature in files that use `use-package', even if these files only
contain compiled expansions of the macros. If you don't do so, contain compiled expansions of the macros. If you don't do so,
then the expanded macros do their job silently." then the expanded macros do their job silently."
:type '(choice (const :tag "Quiet, without catching errors" errors) :type '(choice (const :tag "Quiet, without catching errors" errors)
(const :tag "Quiet" nil) (const :tag "Quiet" nil)
@ -195,9 +176,9 @@ Each entry in the alist is a list of three elements:
The first element is the `use-package' keyword. The first element is the `use-package' keyword.
The second is a form that can be evaluated to get the default The second is a form that can be evaluated to get the default
value. It can also be a function that will receive the name of value. It can also be a function that will receive the name of
the `use-package' declaration and the keyword plist given to the use-package declaration and the keyword plist given to
`use-package', in normalized form. The value it returns should `use-package', in normalized form. The value it returns should
also be in normalized form (which is sometimes *not* what one also be in normalized form (which is sometimes *not* what one
would normally write in a `use-package' declaration, so use would normally write in a `use-package' declaration, so use
caution). caution).
@ -205,9 +186,9 @@ caution).
The third element is a form that can be evaluated to determine The third element is a form that can be evaluated to determine
whether or not to assign a default value; if it evaluates to nil, whether or not to assign a default value; if it evaluates to nil,
then the default value is not assigned even if the keyword is not then the default value is not assigned even if the keyword is not
present in the `use-package' form. This third element may also be present in the `use-package' form. This third element may also be
a function, in which case it receives the name of the package (as a function, in which case it receives the name of the package (as
a symbol) and a list of keywords (in normalized form). It should a symbol) and a list of keywords (in normalized form). It should
return nil or non-nil depending on whether defaulting should be return nil or non-nil depending on whether defaulting should be
attempted." attempted."
:type `(repeat :type `(repeat
@ -292,7 +273,7 @@ This disables:
The main advantage to this variable is that, if you know your The main advantage to this variable is that, if you know your
configuration works, it will make the byte-compiled file as configuration works, it will make the byte-compiled file as
minimal as possible. It can also help with reading macro-expanded minimal as possible. It can also help with reading macro-expanded
definitions, to understand the main intent of what's happening." definitions, to understand the main intent of what's happening."
:type 'boolean :type 'boolean
:group 'use-package) :group 'use-package)
@ -304,7 +285,7 @@ definitions, to understand the main intent of what's happening."
"\\s-+\\(")) "\\s-+\\("))
(or (bound-and-true-p lisp-mode-symbol-regexp) (or (bound-and-true-p lisp-mode-symbol-regexp)
"\\(?:\\sw\\|\\s_\\|\\\\.\\)+") "\\)") "\\(?:\\sw\\|\\s_\\|\\\\.\\)+") "\\)")
"Sexp providing regexp for finding `use-package' forms in user files. "Sexp providing regexp for finding use-package forms in user files.
This is used by `use-package-jump-to-package-form' and This is used by `use-package-jump-to-package-form' and
`use-package-enable-imenu-support'." `use-package-enable-imenu-support'."
:type 'sexp :type 'sexp
@ -315,18 +296,17 @@ This is used by `use-package-jump-to-package-form' and
This is done by adjusting `lisp-imenu-generic-expression' to This is done by adjusting `lisp-imenu-generic-expression' to
include support for finding `use-package' and `require' forms. include support for finding `use-package' and `require' forms.
Must be set before loading `use-package'." Must be set before loading use-package."
:type 'boolean :type 'boolean
:set :set
#'(lambda (sym value) #'(lambda (_sym value)
(eval-after-load 'lisp-mode (eval-after-load 'lisp-mode
(if value (if value
`(add-to-list 'lisp-imenu-generic-expression `(add-to-list 'lisp-imenu-generic-expression
(list "Packages" ,use-package-form-regexp-eval 2)) (list "Packages" ,use-package-form-regexp-eval 2))
`(setq lisp-imenu-generic-expression `(setq lisp-imenu-generic-expression
(remove (list "Packages" ,use-package-form-regexp-eval 2) (remove (list "Packages" ,use-package-form-regexp-eval 2)
lisp-imenu-generic-expression)))) lisp-imenu-generic-expression)))))
(set-default sym value))
:group 'use-package) :group 'use-package)
(defconst use-package-font-lock-keywords (defconst use-package-font-lock-keywords
@ -337,8 +317,8 @@ Must be set before loading `use-package'."
(font-lock-add-keywords 'emacs-lisp-mode use-package-font-lock-keywords) (font-lock-add-keywords 'emacs-lisp-mode use-package-font-lock-keywords)
(defcustom use-package-compute-statistics nil (defcustom use-package-compute-statistics nil
"If non-nil, compute statistics concerned `use-package' declarations. "If non-nil, compute statistics concerned use-package declarations.
View the statistical report using `use-package-report'. Note that View the statistical report using `use-package-report'. Note that
if this option is enabled, you must require `use-package' in your if this option is enabled, you must require `use-package' in your
user init file at loadup time, or you will see errors concerning user init file at loadup time, or you will see errors concerning
undefined variables." undefined variables."
@ -364,14 +344,14 @@ undefined variables."
(and sym (symbolp sym))) (and sym (symbolp sym)))
(defsubst use-package-as-symbol (string-or-symbol) (defsubst use-package-as-symbol (string-or-symbol)
"If STRING-OR-SYMBOL is already a symbol, return it. "If STRING-OR-SYMBOL is already a symbol, return it. Otherwise
Otherwise convert it to a symbol and return that." convert it to a symbol and return that."
(if (symbolp string-or-symbol) string-or-symbol (if (symbolp string-or-symbol) string-or-symbol
(intern string-or-symbol))) (intern string-or-symbol)))
(defsubst use-package-as-string (string-or-symbol) (defsubst use-package-as-string (string-or-symbol)
"If STRING-OR-SYMBOL is already a string, return it. "If STRING-OR-SYMBOL is already a string, return it. Otherwise
Otherwise convert it to a string and return that." convert it to a string and return that."
(if (stringp string-or-symbol) string-or-symbol (if (stringp string-or-symbol) string-or-symbol
(symbol-name string-or-symbol))) (symbol-name string-or-symbol)))
@ -737,8 +717,8 @@ one.
If AFTER is non-nil, insert KEYWORD either at the end of the If AFTER is non-nil, insert KEYWORD either at the end of the
keywords list, or after the ANCHOR if one has been provided. keywords list, or after the ANCHOR if one has been provided.
If TEST is non-nil, it is the test used to compare ELEM to list If TEST is non-nil, it is the test used to compare ELEM to list
elements. The default is `eq'. elements. The default is `eq'.
The modified list is returned. The original list is not modified." The modified list is returned. The original list is not modified."
(let (result) (let (result)
(dolist (k xs) (dolist (k xs)
(if (funcall (or test #'eq) k anchor) (if (funcall (or test #'eq) k anchor)
@ -909,14 +889,14 @@ If RECURSED is non-nil, recurse into sublists."
"A predicate that recognizes functional constructions: "A predicate that recognizes functional constructions:
nil nil
sym sym
\\='sym 'sym
(quote sym) (quote sym)
#\\='sym #'sym
(function sym) (function sym)
(lambda () ...) (lambda () ...)
\\='(lambda () ...) '(lambda () ...)
(quote (lambda () ...)) (quote (lambda () ...))
#\\='(lambda () ...) #'(lambda () ...)
(function (lambda () ...))" (function (lambda () ...))"
(or (if binding (or (if binding
(symbolp v) (symbolp v)
@ -931,7 +911,7 @@ If RECURSED is non-nil, recurse into sublists."
(defun use-package-normalize-function (v) (defun use-package-normalize-function (v)
"Reduce functional constructions to one of two normal forms: "Reduce functional constructions to one of two normal forms:
sym sym
#\\='(lambda () ...)" #'(lambda () ...)"
(cond ((symbolp v) v) (cond ((symbolp v) v)
((and (listp v) ((and (listp v)
(memq (car v) '(quote function)) (memq (car v) '(quote function))
@ -988,8 +968,6 @@ If RECURSED is non-nil, recurse into sublists."
;; ;;
(defun use-package-reset-statistics () (defun use-package-reset-statistics ()
"Reset statistics for `use-package'.
See also `use-package-statistics'."
(interactive) (interactive)
(setq use-package-statistics (make-hash-table))) (setq use-package-statistics (make-hash-table)))
@ -1003,10 +981,11 @@ See also `use-package-statistics'."
(defun use-package-statistics-last-event (package) (defun use-package-statistics-last-event (package)
"Return the date when PACKAGE's status last changed. "Return the date when PACKAGE's status last changed.
The date is returned as a string." The date is returned as a string."
(or (gethash :config package) (format-time-string "%Y-%m-%d %a %H:%M"
(gethash :init package) (or (gethash :config package)
(gethash :preface package) (gethash :init package)
(gethash :use-package package))) (gethash :preface package)
(gethash :use-package package))))
(defun use-package-statistics-time (package) (defun use-package-statistics-time (package)
"Return the time is took for PACKAGE to load." "Return the time is took for PACKAGE to load."
@ -1026,13 +1005,11 @@ The information is formatted in a way suitable for
(vector (vector
(symbol-name package) (symbol-name package)
(use-package-statistics-status statistics) (use-package-statistics-status statistics)
(format-time-string (use-package-statistics-last-event statistics)
"%H:%M:%S.%6N"
(use-package-statistics-last-event statistics))
(format "%.2f" (use-package-statistics-time statistics)))))) (format "%.2f" (use-package-statistics-time statistics))))))
(defun use-package-report () (defun use-package-report ()
"Show current statistics gathered about `use-package' declarations. "Show current statistics gathered about use-package declarations.
In the table that's generated, the status field has the following In the table that's generated, the status field has the following
meaning: meaning:
Configured :config has been processed (the package is loaded!) Configured :config has been processed (the package is loaded!)
@ -1048,43 +1025,15 @@ meaning:
(tabulated-list-print) (tabulated-list-print)
(display-buffer (current-buffer)))) (display-buffer (current-buffer))))
(defvar use-package-statistics-status-order
'(("Declared" . 0)
("Prefaced" . 1)
("Initialized" . 2)
("Configured" . 3)))
(define-derived-mode use-package-statistics-mode tabulated-list-mode (define-derived-mode use-package-statistics-mode tabulated-list-mode
"use-package statistics" "use-package statistics"
"Show current statistics gathered about `use-package' declarations." "Show current statistics gathered about use-package declarations."
(setq tabulated-list-format (setq tabulated-list-format
;; The sum of column width is 80 characters: ;; The sum of column width is 80 characters:
[("Package" 25 t) [("Package" 25 t)
("Status" 13 ("Status" 13 t)
(lambda (a b) ("Last Event" 23 t)
(< (assoc-default ("Time" 10 t)])
(use-package-statistics-status
(gethash (car a) use-package-statistics))
use-package-statistics-status-order)
(assoc-default
(use-package-statistics-status
(gethash (car b) use-package-statistics))
use-package-statistics-status-order))))
("Last Event" 23
(lambda (a b)
(< (float-time
(use-package-statistics-last-event
(gethash (car a) use-package-statistics)))
(float-time
(use-package-statistics-last-event
(gethash (car b) use-package-statistics))))))
("Time" 10
(lambda (a b)
(< (use-package-statistics-time
(gethash (car a) use-package-statistics))
(use-package-statistics-time
(gethash (car b) use-package-statistics)))))])
(setq tabulated-list-sort-key '("Time" . t))
(tabulated-list-init-header)) (tabulated-list-init-header))
(defun use-package-statistics-gather (keyword name after) (defun use-package-statistics-gather (keyword name after)
@ -1298,10 +1247,7 @@ meaning:
(setq every nil))) (setq every nil)))
every)))) every))))
#'use-package-recognize-function #'use-package-recognize-function
(if (string-suffix-p "-mode" (symbol-name name)) name label arg))))
name
(intern (concat (symbol-name name) "-mode")))
label arg))))
(defalias 'use-package-autoloads/:hook 'use-package-autoloads-mode) (defalias 'use-package-autoloads/:hook 'use-package-autoloads-mode)
@ -1321,13 +1267,9 @@ meaning:
(concat (symbol-name sym) (concat (symbol-name sym)
use-package-hook-name-suffix))) use-package-hook-name-suffix)))
(function ,fun))) (function ,fun)))
(use-package-hook-handler-normalize-mode-symbols syms))))) (if (use-package-non-nil-symbolp syms) (list syms) syms)))))
(use-package-normalize-commands args)))) (use-package-normalize-commands args))))
(defun use-package-hook-handler-normalize-mode-symbols (syms)
"Ensure that `SYMS' turns into a list of modes."
(if (use-package-non-nil-symbolp syms) (list syms) syms))
;;;; :commands ;;;; :commands
(defalias 'use-package-normalize/:commands 'use-package-normalize-symlist) (defalias 'use-package-normalize/:commands 'use-package-normalize-symlist)
@ -1350,28 +1292,6 @@ meaning:
(delete-dups arg))) (delete-dups arg)))
(use-package-process-keywords name rest state))) (use-package-process-keywords name rest state)))
;;;; :autoload
(defalias 'use-package-normalize/:autoload 'use-package-normalize/:commands)
(defun use-package-handler/:autoload (name _keyword arg rest state)
(use-package-concat
;; Since we deferring load, establish any necessary autoloads, and also
;; keep the byte-compiler happy.
(let ((name-string (use-package-as-string name)))
(cl-mapcan
#'(lambda (command)
(when (symbolp command)
(append
(unless (plist-get state :demand)
`((unless (fboundp ',command)
(autoload #',command ,name-string))))
(when (bound-and-true-p byte-compile-current-file)
`((eval-when-compile
(declare-function ,command ,name-string)))))))
(delete-dups arg)))
(use-package-process-keywords name rest state)))
;;;; :defer ;;;; :defer
(defalias 'use-package-normalize/:defer 'use-package-normalize-predicate) (defalias 'use-package-normalize/:defer 'use-package-normalize-predicate)
@ -1467,34 +1387,17 @@ no keyword implies `:all'."
(defun use-package-handler/:custom (name _keyword args rest state) (defun use-package-handler/:custom (name _keyword args rest state)
"Generate use-package custom keyword code." "Generate use-package custom keyword code."
(use-package-concat (use-package-concat
(if (bound-and-true-p use-package-use-theme) (mapcar
`((let ((custom--inhibit-theme-enable nil)) #'(lambda (def)
;; Declare the theme here so use-package can be required inside (let ((variable (nth 0 def))
;; eval-and-compile without warnings about unknown theme. (value (nth 1 def))
(unless (memq 'use-package custom-known-themes) (comment (nth 2 def)))
(deftheme use-package) (unless (and comment (stringp comment))
(enable-theme 'use-package) (setq comment (format "Customized with use-package %s" name)))
(setq custom-enabled-themes (remq 'use-package custom-enabled-themes))) `(funcall (or (get (quote ,variable) 'custom-set) #'set-default)
(custom-theme-set-variables (quote ,variable)
'use-package ,value)))
,@(mapcar args)
#'(lambda (def)
(let ((variable (nth 0 def))
(value (nth 1 def))
(comment (nth 2 def)))
(unless (and comment (stringp comment))
(setq comment (format "Customized with use-package %s" name)))
`'(,variable ,value nil () ,comment)))
args))))
(mapcar
#'(lambda (def)
(let ((variable (nth 0 def))
(value (nth 1 def))
(comment (nth 2 def)))
(unless (and comment (stringp comment))
(setq comment (format "Customized with use-package %s" name)))
`(customize-set-variable (quote ,variable) ,value ,comment)))
args))
(use-package-process-keywords name rest state))) (use-package-process-keywords name rest state)))
;;;; :custom-face ;;;; :custom-face
@ -1502,7 +1405,7 @@ no keyword implies `:all'."
(defun use-package-normalize/:custom-face (name-symbol _keyword arg) (defun use-package-normalize/:custom-face (name-symbol _keyword arg)
"Normalize use-package custom-face keyword." "Normalize use-package custom-face keyword."
(let ((error-msg (let ((error-msg
(format "%s wants a (<symbol> <face-spec> [spec-type]) or list of these" (format "%s wants a (<symbol> <face-spec>) or list of these"
name-symbol))) name-symbol)))
(unless (listp arg) (unless (listp arg)
(use-package-error error-msg)) (use-package-error error-msg))
@ -1513,13 +1416,13 @@ no keyword implies `:all'."
(spec (nth 1 def))) (spec (nth 1 def)))
(when (or (not face) (when (or (not face)
(not spec) (not spec)
(> (length def) 3)) (> (length def) 2))
(use-package-error error-msg)))))) (use-package-error error-msg))))))
(defun use-package-handler/:custom-face (name _keyword args rest state) (defun use-package-handler/:custom-face (name _keyword args rest state)
"Generate use-package custom-face keyword code." "Generate use-package custom-face keyword code."
(use-package-concat (use-package-concat
(mapcar #'(lambda (def) `(apply #'face-spec-set (backquote ,def))) args) (mapcar #'(lambda (def) `(custom-set-faces (backquote ,def))) args)
(use-package-process-keywords name rest state))) (use-package-process-keywords name rest state)))
;;;; :init ;;;; :init
@ -1580,31 +1483,6 @@ no keyword implies `:all'."
(when use-package-compute-statistics (when use-package-compute-statistics
`((use-package-statistics-gather :config ',name t)))))) `((use-package-statistics-gather :config ',name t))))))
;;;; :local
(defun use-package-normalize/:local (name keyword args)
(let ((first-arg-name (symbol-name (caar args))))
(if (not (string-suffix-p "-hook" first-arg-name))
(let* ((sym-name (symbol-name name))
(addition (if (string-suffix-p "-mode" sym-name)
"-hook"
"-mode-hook"))
(hook (intern (concat sym-name addition))))
`((,hook . ,(use-package-normalize-forms name keyword args))))
(cl-loop for (hook . code) in args
collect `(,hook . ,(use-package-normalize-forms name keyword code))))))
(defun use-package-handler/:local (name _keyword arg rest state)
(let* ((body (use-package-process-keywords name rest state)))
(use-package-concat
body
(cl-loop for (hook . code) in arg
for func-name = (intern (concat "use-package-func/" (symbol-name hook)))
collect (progn
(push 'progn code)
`(defun ,func-name () ,code))
collect `(add-hook ',hook ',func-name)))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;;; The main macro ;;; The main macro
@ -1658,7 +1536,6 @@ this file. Usage:
package. This is useful if the package is being lazily package. This is useful if the package is being lazily
loaded, and you wish to conditionally call functions in your loaded, and you wish to conditionally call functions in your
`:init' block that are defined in the package. `:init' block that are defined in the package.
:autoload Similar to :commands, but it for no-interactive one.
:hook Specify hook(s) to attach this package to. :hook Specify hook(s) to attach this package to.
:bind Bind keys, and define autoloads for the bound commands. :bind Bind keys, and define autoloads for the bound commands.
@ -1686,13 +1563,13 @@ this file. Usage:
:load-path Add to the `load-path' before attempting to load the package. :load-path Add to the `load-path' before attempting to load the package.
:diminish Support for diminish.el (if installed). :diminish Support for diminish.el (if installed).
:delight Support for delight.el (if installed). :delight Support for delight.el (if installed).
:custom Call `Custom-set' or `set-default' with each variable :custom Call `custom-set' or `set-default' with each variable
definition without modifying the Emacs `custom-file'. definition without modifying the Emacs `custom-file'.
(compare with `custom-set-variables'). (compare with `custom-set-variables').
:custom-face Call `custom-set-faces' with each face definition. :custom-face Call `customize-set-faces' with each face definition.
:ensure Loads the package using package.el if necessary. :ensure Loads the package using package.el if necessary.
:pin Pin the package to an archive." :pin Pin the package to an archive."
(declare (indent defun)) (declare (indent 1))
(unless (memq :disabled args) (unless (memq :disabled args)
(macroexp-progn (macroexp-progn
(use-package-concat (use-package-concat
@ -1711,6 +1588,12 @@ this file. Usage:
(when use-package-compute-statistics (when use-package-compute-statistics
`((use-package-statistics-gather :use-package ',name t))))))) `((use-package-statistics-gather :use-package ',name t)))))))
(put 'use-package 'lisp-indent-function 'defun)
(provide 'use-package-core) (provide 'use-package-core)
;; Local Variables:
;; indent-tabs-mode: nil
;; End:
;;; use-package-core.el ends here ;;; use-package-core.el ends here

View File

@ -1,22 +1,30 @@
;;; use-package-delight.el --- Support for the :delight keyword -*- lexical-binding: t; -*- ;;; use-package-delight.el --- Support for the :delight keyword -*- lexical-binding: t; -*-
;; Copyright (C) 2012-2022 Free Software Foundation, Inc. ;; Copyright (C) 2012-2017 John Wiegley
;; Author: John Wiegley <johnw@newartisans.com> ;; Author: John Wiegley <johnw@newartisans.com>
;; Maintainer: 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 ;; This program is free software; you can redistribute it and/or
;; it under the terms of the GNU General Public License as published by ;; modify it under the terms of the GNU General Public License as
;; the Free Software Foundation, either version 3 of the License, or ;; published by the Free Software Foundation; either version 3, or (at
;; (at your option) any later version. ;; your option) any later version.
;; This program is distributed in the hope that it will be useful, ;; This program is distributed in the hope that it will be useful, but
;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
;; GNU General Public License for more details. ;; General Public License for more details.
;; You should have received a copy of the GNU General Public License ;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <https://www.gnu.org/licenses/>. ;; 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: ;;; Commentary:

View File

@ -1,22 +1,30 @@
;;; use-package-diminish.el --- Support for the :diminish keyword -*- lexical-binding: t; -*- ;;; use-package-diminish.el --- Support for the :diminish keyword -*- lexical-binding: t; -*-
;; Copyright (C) 2012-2022 Free Software Foundation, Inc. ;; Copyright (C) 2012-2017 John Wiegley
;; Author: John Wiegley <johnw@newartisans.com> ;; Author: John Wiegley <johnw@newartisans.com>
;; Maintainer: 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 ;; This program is free software; you can redistribute it and/or
;; it under the terms of the GNU General Public License as published by ;; modify it under the terms of the GNU General Public License as
;; the Free Software Foundation, either version 3 of the License, or ;; published by the Free Software Foundation; either version 3, or (at
;; (at your option) any later version. ;; your option) any later version.
;; This program is distributed in the hope that it will be useful, ;; This program is distributed in the hope that it will be useful, but
;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
;; GNU General Public License for more details. ;; General Public License for more details.
;; You should have received a copy of the GNU General Public License ;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <https://www.gnu.org/licenses/>. ;; 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: ;;; Commentary:

View File

@ -1,22 +1,30 @@
;;; use-package-ensure.el --- Support for the :ensure and :pin keywords -*- lexical-binding: t; -*- ;;; use-package-ensure.el --- Support for the :ensure and :pin keywords -*- lexical-binding: t; -*-
;; Copyright (C) 2012-2022 Free Software Foundation, Inc. ;; Copyright (C) 2012-2017 John Wiegley
;; Author: John Wiegley <johnw@newartisans.com> ;; Author: John Wiegley <johnw@newartisans.com>
;; Maintainer: 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 ;; This program is free software; you can redistribute it and/or
;; it under the terms of the GNU General Public License as published by ;; modify it under the terms of the GNU General Public License as
;; the Free Software Foundation, either version 3 of the License, or ;; published by the Free Software Foundation; either version 3, or (at
;; (at your option) any later version. ;; your option) any later version.
;; This program is distributed in the hope that it will be useful, ;; This program is distributed in the hope that it will be useful, but
;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
;; GNU General Public License for more details. ;; General Public License for more details.
;; You should have received a copy of the GNU General Public License ;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <https://www.gnu.org/licenses/>. ;; 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: ;;; Commentary:
@ -29,7 +37,7 @@
(require 'use-package-core) (require 'use-package-core)
(defgroup use-package-ensure nil (defgroup use-package-ensure nil
"Support for :ensure and :pin keywords in `use-package' declarations." "Support for :ensure and :pin keywords in use-package declarations."
:group 'use-package) :group 'use-package)
(eval-when-compile (eval-when-compile
@ -56,7 +64,7 @@ to all `:ensure' keywords (always a list, even if only one); and
the current `state' plist created by previous handlers. the current `state' plist created by previous handlers.
Note that this function is called whenever `:ensure' is provided, 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 even if it is nil. It is up to the function to decide on the
semantics of the various values for `:ensure'. semantics of the various values for `:ensure'.
This function should return non-nil if the package is installed. This function should return non-nil if the package is installed.
@ -85,7 +93,7 @@ The default value uses package.el to install the package."
(defun use-package-archive-exists-p (archive) (defun use-package-archive-exists-p (archive)
"Check if a given ARCHIVE is enabled. "Check if a given ARCHIVE is enabled.
ARCHIVE can be a string or a symbol or `manual' to indicate a ARCHIVE can be a string or a symbol or 'manual to indicate a
manually updated package." manually updated package."
(if (member archive '(manual "manual")) (if (member archive '(manual "manual"))
't 't
@ -103,7 +111,7 @@ manually updated package."
(archive-name (if (stringp archive) archive (symbol-name archive)))) (archive-name (if (stringp archive) archive (symbol-name archive))))
(if (use-package-archive-exists-p archive-symbol) (if (use-package-archive-exists-p archive-symbol)
(add-to-list 'package-pinned-packages (cons package archive-name)) (add-to-list 'package-pinned-packages (cons package archive-name))
(error "Archive '%s' requested for package '%s' is not available" (error "Archive '%s' requested for package '%s' is not available."
archive-name package)) archive-name package))
(unless (bound-and-true-p package--initialized) (unless (bound-and-true-p package--initialized)
(package-initialize t)))) (package-initialize t))))

View File

@ -1,29 +1,37 @@
;;; use-package-jump.el --- Attempt to jump to a use-package declaration -*- lexical-binding: t; -*- ;;; use-package-jump.el --- Attempt to jump to a use-package declaration -*- lexical-binding: t; -*-
;; Copyright (C) 2012-2022 Free Software Foundation, Inc. ;; Copyright (C) 2012-2017 John Wiegley
;; Author: John Wiegley <johnw@newartisans.com> ;; Author: John Wiegley <johnw@newartisans.com>
;; Maintainer: 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 ;; This program is free software; you can redistribute it and/or
;; it under the terms of the GNU General Public License as published by ;; modify it under the terms of the GNU General Public License as
;; the Free Software Foundation, either version 3 of the License, or ;; published by the Free Software Foundation; either version 3, or (at
;; (at your option) any later version. ;; your option) any later version.
;; This program is distributed in the hope that it will be useful, ;; This program is distributed in the hope that it will be useful, but
;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
;; GNU General Public License for more details. ;; General Public License for more details.
;; You should have received a copy of the GNU General Public License ;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <https://www.gnu.org/licenses/>. ;; 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: ;;; Commentary:
;; Provides the command `M-x use-package-jump-to-package-form', however it ;; Provides the command `M-x use-package-jump-to-package-form', however it
;; only works if the package being jumped to was required during ;; only works if the package being jumped to was required during
;; initialization. If it was delay-loaded, it will not work. ;; initialization. If it was delay-loaded, it will not work. Improvements are
;; Improvements are needed. ;; needed.
;;; Code: ;;; Code:
@ -40,10 +48,11 @@ Returns an absolute file path or nil if none is found."
;;;###autoload ;;;###autoload
(defun use-package-jump-to-package-form (package) (defun use-package-jump-to-package-form (package)
"Attempt to find and jump to the `use-package' form that loaded PACKAGE. "Attempt to find and jump to the `use-package' form that loaded
This will only find the form if that form actually required PACKAGE. This will only find the form if that form actually
PACKAGE. If PACKAGE was previously required then this function required PACKAGE. If PACKAGE was previously required then this
will jump to the file that originally required PACKAGE instead." function will jump to the file that originally required PACKAGE
instead."
(interactive (list (completing-read "Package: " features))) (interactive (list (completing-read "Package: " features)))
(let* ((package (if (stringp package) (intern package) package)) (let* ((package (if (stringp package) (intern package) package))
(requiring-file (use-package-find-require package)) (requiring-file (use-package-find-require package))

View File

@ -1,22 +1,30 @@
;;; use-package-lint.el --- Attempt to find errors in use-package declarations -*- lexical-binding: t; -*- ;;; use-package-lint.el --- Attempt to find errors in use-package declarations -*- lexical-binding: t; -*-
;; Copyright (C) 2012-2022 Free Software Foundation, Inc. ;; Copyright (C) 2012-2017 John Wiegley
;; Author: John Wiegley <johnw@newartisans.com> ;; Author: John Wiegley <johnw@newartisans.com>
;; Maintainer: 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 ;; This program is free software; you can redistribute it and/or
;; it under the terms of the GNU General Public License as published by ;; modify it under the terms of the GNU General Public License as
;; the Free Software Foundation, either version 3 of the License, or ;; published by the Free Software Foundation; either version 3, or (at
;; (at your option) any later version. ;; your option) any later version.
;; This program is distributed in the hope that it will be useful, ;; This program is distributed in the hope that it will be useful, but
;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
;; GNU General Public License for more details. ;; General Public License for more details.
;; You should have received a copy of the GNU General Public License ;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <https://www.gnu.org/licenses/>. ;; 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: ;;; Commentary:
@ -55,7 +63,7 @@
;;;###autoload ;;;###autoload
(defun use-package-lint () (defun use-package-lint ()
"Check for errors in `use-package' declarations. "Check for errors in use-package declarations.
For example, if the module's `:if' condition is met, but even For example, if the module's `:if' condition is met, but even
with the specified `:load-path' the module cannot be found." with the specified `:load-path' the module cannot be found."
(interactive) (interactive)

View File

@ -0,0 +1,13 @@
(define-package "use-package" "2.4.1" "A configuration macro for simplifying your .emacs"
'((emacs "24.3")
(bind-key "2.4"))
:commit "caa92f1d64fc25480551757d854b4b49981dfa6b" :keywords
("dotemacs" "startup" "speed" "config" "package")
:authors
(("John Wiegley" . "johnw@newartisans.com"))
:maintainer
("John Wiegley" . "johnw@newartisans.com")
:url "https://github.com/jwiegley/use-package")
;; Local Variables:
;; no-byte-compile: t
;; End:

View File

@ -1,27 +1,30 @@
;;; use-package.el --- A configuration macro for simplifying your .emacs -*- lexical-binding: t; -*- ;;; use-package.el --- A configuration macro for simplifying your .emacs -*- lexical-binding: t; -*-
;; Copyright (C) 2012-2022 Free Software Foundation, Inc. ;; Copyright (C) 2012-2017 John Wiegley
;; Author: John Wiegley <johnw@newartisans.com> ;; Author: John Wiegley <johnw@newartisans.com>
;; Maintainer: John Wiegley <johnw@newartisans.com> ;; Maintainer: John Wiegley <johnw@newartisans.com>
;; Created: 17 Jun 2012 ;; Created: 17 Jun 2012
;; Version: 2.4.4 ;; Modified: 29 Nov 2017
;; Version: 2.4.1
;; Package-Requires: ((emacs "24.3") (bind-key "2.4")) ;; Package-Requires: ((emacs "24.3") (bind-key "2.4"))
;; Keywords: dotemacs startup speed config package extensions ;; Keywords: dotemacs startup speed config package
;; URL: https://github.com/jwiegley/use-package ;; URL: https://github.com/jwiegley/use-package
;; This program is free software; you can redistribute it and/or modify ;; This program is free software; you can redistribute it and/or
;; it under the terms of the GNU General Public License as published by ;; modify it under the terms of the GNU General Public License as
;; the Free Software Foundation, either version 3 of the License, or ;; published by the Free Software Foundation; either version 3, or (at
;; (at your option) any later version. ;; your option) any later version.
;; This program is distributed in the hope that it will be useful, ;; This program is distributed in the hope that it will be useful, but
;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
;; GNU General Public License for more details. ;; General Public License for more details.
;; You should have received a copy of the GNU General Public License ;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <https://www.gnu.org/licenses/>. ;; 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: ;;; Commentary:

View File

@ -1,7 +1,7 @@
This is use-package.info, produced by makeinfo version 6.7 from This is use-package.info, produced by makeinfo version 6.5 from
use-package.texi. use-package.texi.
Copyright (C) 2012-2022 Free Software Foundation, Inc. Copyright (C) 2012-2017 John Wiegley <johnw@newartisans.com>
You can redistribute this document and/or modify it under the terms You can redistribute this document and/or modify it under the terms
of the GNU General Public License as published by the Free Software of the GNU General Public License as published by the Free Software
@ -10,9 +10,8 @@ use-package.texi.
This document is distributed in the hope that it will be useful, This document is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details. General Public License for more details.
INFO-DIR-SECTION Emacs INFO-DIR-SECTION Emacs
START-INFO-DIR-ENTRY START-INFO-DIR-ENTRY
* use-package: (use-package). Declarative package configuration for Emacs. * use-package: (use-package). Declarative package configuration for Emacs.
@ -24,13 +23,9 @@ File: use-package.info, Node: Top, Next: Introduction, Up: (dir)
use-package User Manual use-package User Manual
*********************** ***********************
The use-package macro allows you to isolate package configuration in use-package is...
your .emacs file in a way that is both performance-oriented and, well,
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 around 2 seconds, with no loss of functionality!
Copyright (C) 2012-2022 Free Software Foundation, Inc. Copyright (C) 2012-2017 John Wiegley <johnw@newartisans.com>
You can redistribute this document and/or modify it under the terms You can redistribute this document and/or modify it under the terms
of the GNU General Public License as published by the Free Software of the GNU General Public License as published by the Free Software
@ -39,7 +34,7 @@ total load time is around 2 seconds, with no loss of functionality!
This document is distributed in the hope that it will be useful, This document is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details. General Public License for more details.
* Menu: * Menu:
@ -47,46 +42,66 @@ total load time is around 2 seconds, with no loss of functionality!
* Introduction:: * Introduction::
* Installation:: * Installation::
* Getting Started:: * Getting Started::
* Basic Concepts::
* Issues/Requests::
* Keywords:: * Keywords::
* FAQ::
* Debugging Tools:: * Debugging Tools::
* Command Index::
* Function Index::
* Variable Index::
— The Detailed Node Listing — — The Detailed Node Listing —
Installation Installation
* Installing from GNU ELPA:: * Installing from an Elpa Archive::
* Installing from the Git Repository:: * Installing from the Git Repository::
* Post-Installation Tasks:: * Post-Installation Tasks::
Keywords Keywords
* after:: :after. * :after: after.
* bind-keymap bind-keymap*:: :bind-keymap, :bind-keymap*. * :bind-keymap, :bind-keymap*: bind-keymap bind-keymap*.
* bind bind*:: :bind, :bind*. * :bind, :bind*: bind bind*.
* commands:: :commands. * :commands: commands.
* preface init config:: :preface, :init, :config. * :preface, :init, :config: preface init config.
* custom:: :custom. * :custom: custom.
* custom-face:: :custom-face. * :custom-face: custom-face.
* defer demand:: :defer, :demand. * :defer, :demand: defer demand.
* defines functions:: :defines, :functions. * :defines, :functions: defines functions.
* diminish delight:: :diminish, :delight. * :diminish, :delight: diminish delight.
* disabled:: :disabled. * :disabled: disabled.
* ensure pin:: :ensure, :pin. * :ensure, :pin: ensure pin.
* hook:: :hook. * :hook: hook.
* if when unless:: :if, :when, :unless. * :if, :when, :unless: if when unless.
* load-path:: :load-path. * :load-path: load-path.
* mode interpreter:: :mode, :interpreter. * :mode, :interpreter: mode interpreter.
* magic magic-fallback:: :magic, :magic-fallback. * :magic, :magic-fallback: magic magic-fallback.
* no-require:: :no-require. * :no-require: no-require.
* requires:: :requires. * :requires: requires.
bind, bind*
:bind, :bind*
* Binding to local keymaps:: * Binding to local keymaps::
FAQ
* FAQ - How to ...?::
* FAQ - Issues and Errors::
FAQ - How to ...?
* This is a question::
FAQ - Issues and Errors
* This is an issues::
 
File: use-package.info, Node: Introduction, Next: Installation, Prev: Top, Up: Top File: use-package.info, Node: Introduction, Next: Installation, Prev: Top, Up: Top
@ -96,11 +111,10 @@ File: use-package.info, Node: Introduction, Next: Installation, Prev: Top, U
The use-package macro allows you to isolate package configuration in The use-package macro allows you to isolate package configuration in
your .emacs file in a way that is both performance-oriented and, well, your .emacs file in a way that is both performance-oriented and, well,
tidy. I created it because I have over 80 packages that I use in Emacs, tidy. I created it because I have over 400 packages that I use in
and things were getting difficult to manage. Yet with this utility my Emacs, and things were getting difficult to manage. Yet with this
total load time is around 2 seconds, with no loss of functionality! utility my total load time is around 2 seconds, with no loss of
functionality!
More text to come...
 
File: use-package.info, Node: Installation, Next: Getting Started, Prev: Introduction, Up: Top File: use-package.info, Node: Installation, Next: Getting Started, Prev: Introduction, Up: Top
@ -113,22 +127,36 @@ from its development repository.
* Menu: * Menu:
* Installing from GNU ELPA:: * Installing from an Elpa Archive::
* Installing from the Git Repository:: * Installing from the Git Repository::
* Post-Installation Tasks:: * Post-Installation Tasks::
 
File: use-package.info, Node: Installing from GNU ELPA, Next: Installing from the Git Repository, Up: Installation File: use-package.info, Node: Installing from an Elpa Archive, Next: Installing from the Git Repository, Up: Installation
2.1 Installing from GNU ELPA 2.1 Installing from an Elpa Archive
============================ ===================================
use-package is available from GNU ELPA. If you havent used Emacs use-package is available from Melpa and Melpa-Stable. If you havent
package manager before, then it is high time you familiarize yourself used Emacs package manager before, then it is high time you familiarize
with it by reading the documentation in the Emacs manual, see *note yourself with it by reading the documentation in the Emacs manual, see
(emacs)Packages::. Then add one of the archives to package-archives: *note (emacs)Packages::. Then add one of the archives to
package-archives:
First, you need to update the local package list using: • To use Melpa:
(require 'package)
(add-to-list 'package-archives
'("melpa" . "https://melpa.org/packages/") t)
• To use Melpa-Stable:
(require 'package)
(add-to-list 'package-archives
'("melpa-stable" . "https://stable.melpa.org/packages/") t)
Once you have added your preferred archive, you need to update the
local package list using:
M-x package-refresh-contents RET M-x package-refresh-contents RET
@ -140,7 +168,7 @@ dependencies using:
Now see *note Post-Installation Tasks::. Now see *note Post-Installation Tasks::.
 
File: use-package.info, Node: Installing from the Git Repository, Next: Post-Installation Tasks, Prev: Installing from GNU ELPA, Up: Installation File: use-package.info, Node: Installing from the Git Repository, Next: Post-Installation Tasks, Prev: Installing from an Elpa Archive, Up: Installation
2.2 Installing from the Git Repository 2.2 Installing from the Git Repository
====================================== ======================================
@ -167,7 +195,7 @@ following content before running make:
(with-eval-after-load 'info (with-eval-after-load 'info
(info-initialize) (info-initialize)
(add-to-list 'Info-directory-list (add-to-list 'Info-directory-list
"~/.emacs.d/site-lisp/use-package/")) "~/.emacs.d/site-lisp/use-package/"))
Note that elements of load-path should not end with a slash, while Note that elements of load-path should not end with a slash, while
those of Info-directory-list should. those of Info-directory-list should.
@ -203,89 +231,54 @@ for load-path.
should display something like should display something like
use-package-versions value is "2.4.3" use-package-versions value is "2.4.1"
If you are completely new to use-package then see *note Getting If you are completely new to use-package then see *note Getting
Started::. Started::.
If you run into problems, then please see the *note Debugging If you run into problems, then please see the *note FAQ::. Also see
Tools::. the *note Debugging Tools::.
 
File: use-package.info, Node: Getting Started, Next: Basic Concepts, Prev: Installation, Up: Top File: use-package.info, Node: Getting Started, Next: Keywords, Prev: Installation, Up: Top
3 Getting Started 3 Getting Started
***************** *****************
TODO. For now, see README.md. TODO. For now, see README.md.
 
File: use-package.info, Node: Basic Concepts, Next: Issues/Requests, Prev: Getting Started, Up: Top File: use-package.info, Node: Keywords, Next: FAQ, Prev: Getting Started, Up: Top
4 Basic Concepts 4 Keywords
****************
use-package was created for few basic reasons, each of which drove the
design in various ways. Understanding these reasons may help make some
of those decisions clearer:
• To gather all configuration details of a package into one place,
making it easier to copy, disable, or move it elsewhere in the init
file.
• To reduce duplication and boilerplate, capturing several common
practices as mere keywords both easy and intuitive to use.
• To make startup time of Emacs as quick as possible, without
sacrificing the quantity of add-on packages used.
• To make it so errors encountered during startup disable only the
package raising the error, and as little else as possible, leaving
a close to a functional Emacs as possible.
• To allow byte-compilation of ones init file so that any warnings
or errors seen are meaningful. In this way, even if
byte-compilation is not used for speed (reason 3), it can still be
used as a sanity check.

File: use-package.info, Node: Issues/Requests, Next: Keywords, Prev: Basic Concepts, Up: Top
5 Issues/Requests
*****************

File: use-package.info, Node: Keywords, Next: Debugging Tools, Prev: Issues/Requests, Up: Top
6 Keywords
********** **********
* Menu: * Menu:
* after:: after. * :after: after.
* bind-keymap bind-keymap*:: :bind-keymap, :bind-keymap*. * :bind-keymap, :bind-keymap*: bind-keymap bind-keymap*.
* bind bind*:: bind :bind*. * :bind, :bind*: bind bind*.
* commands:: :commands. * :commands: commands.
* preface init config:: :preface, :init, :config. * :preface, :init, :config: preface init config.
* custom:: :custom. * :custom: custom.
* custom-face:: :custom-face. * :custom-face: custom-face.
* defer demand:: :defer, :demand. * :defer, :demand: defer demand.
* defines functions:: :defines, :functions. * :defines, :functions: defines functions.
* diminish delight:: :diminish, :delight. * :diminish, :delight: diminish delight.
* disabled:: :disabled. * :disabled: disabled.
* ensure pin:: :ensure, :pin. * :ensure, :pin: ensure pin.
* hook:: :hook. * :hook: hook.
* if when unless:: :if, :when, :unless. * :if, :when, :unless: if when unless.
* load-path:: :load-path. * :load-path: load-path.
* mode interpreter:: :mode, :interpreter. * :mode, :interpreter: mode interpreter.
* magic magic-fallback:: :magic, :magic-fallback. * :magic, :magic-fallback: magic magic-fallback.
* no-require:: :no-require. * :no-require: no-require.
* requires:: :requires. * :requires: requires.
 
File: use-package.info, Node: after, Next: bind-keymap bind-keymap*, Up: Keywords File: use-package.info, Node: after, Next: bind-keymap bind-keymap*, Up: Keywords
6.1 :after 4.1 :after
============ ============
Sometimes it only makes sense to configure a package after another has Sometimes it only makes sense to configure a package after another has
@ -323,18 +316,10 @@ possibilities:
quux)), it means that the package will be loaded when either both foo quux)), it means that the package will be loaded when either both foo
and bar have been loaded, or both baz and quux have been loaded. and bar have been loaded, or both baz and quux have been loaded.
*NOTE*: Pay attention if you set use-package-always-defer to t, and
also use the :after keyword, as you will need to specify how the
declared package is to be loaded: e.g., by some :bind. If youre not
using one of the mechanisms that registers autoloads, such as :bind or
:hook, and your package manager does not provide autoloads, its
possible that without adding :demand t to those declarations, your
package will never be loaded.
 
File: use-package.info, Node: bind-keymap bind-keymap*, Next: bind bind*, Prev: after, Up: Keywords File: use-package.info, Node: bind-keymap bind-keymap*, Next: bind bind*, Prev: after, Up: Keywords
6.2 :bind-keymap, :bind-keymap* 4.2 :bind-keymap, :bind-keymap*
=================================== ===================================
Normally :bind expects that commands are functions that will be Normally :bind expects that commands are functions that will be
@ -359,7 +344,7 @@ reinterpret that keypress as a prefix key.
 
File: use-package.info, Node: bind bind*, Next: commands, Prev: bind-keymap bind-keymap*, Up: Keywords File: use-package.info, Node: bind bind*, Next: commands, Prev: bind-keymap bind-keymap*, Up: Keywords
6.3 :bind, :bind* 4.3 :bind, :bind*
===================== =====================
Another common thing to do when loading a module is to bind a key to Another common thing to do when loading a module is to bind a key to
@ -391,8 +376,8 @@ either way.
(use-package hi-lock (use-package hi-lock
:bind (("M-o l" . highlight-lines-matching-regexp) :bind (("M-o l" . highlight-lines-matching-regexp)
("M-o r" . highlight-regexp) ("M-o r" . highlight-regexp)
("M-o w" . highlight-phrase))) ("M-o w" . highlight-phrase)))
The :commands keyword likewise takes either a symbol or a list of The :commands keyword likewise takes either a symbol or a list of
symbols. symbols.
@ -407,9 +392,9 @@ for more information.
(use-package helm (use-package helm
:bind (("M-x" . helm-M-x) :bind (("M-x" . helm-M-x)
("M-<f5>" . helm-find-files) ("M-<f5>" . helm-find-files)
([f10] . helm-buffers-list) ([f10] . helm-buffers-list)
([S-f10] . helm-recentf))) ([S-f10] . helm-recentf)))
* Menu: * Menu:
@ -418,7 +403,7 @@ for more information.
 
File: use-package.info, Node: Binding to local keymaps, Up: bind bind* File: use-package.info, Node: Binding to local keymaps, Up: bind bind*
6.3.1 Binding to local keymaps 4.3.1 Binding to local keymaps
------------------------------ ------------------------------
Slightly different from binding a key to a keymap, is binding a key Slightly different from binding a key to a keymap, is binding a key
@ -428,7 +413,7 @@ keymap to bind to:
(use-package helm (use-package helm
:bind (:map helm-command-map :bind (:map helm-command-map
("C-c h" . helm-execute-persistent-action))) ("C-c h" . helm-execute-persistent-action)))
The effect of this statement is to wait until helm has loaded, and The effect of this statement is to wait until helm has loaded, and
then to bind the key C-c h to helm-execute-persistent-action within then to bind the key C-c h to helm-execute-persistent-action within
@ -439,24 +424,24 @@ before the first use of :map are applied to the global keymap:
(use-package term (use-package term
:bind (("C-c t" . term) :bind (("C-c t" . term)
:map term-mode-map :map term-mode-map
("M-p" . term-send-up) ("M-p" . term-send-up)
("M-n" . term-send-down) ("M-n" . term-send-down)
:map term-raw-map :map term-raw-map
("M-o" . other-window) ("M-o" . other-window)
("M-p" . term-send-up) ("M-p" . term-send-up)
("M-n" . term-send-down))) ("M-n" . term-send-down)))
 
File: use-package.info, Node: commands, Next: preface init config, Prev: bind bind*, Up: Keywords File: use-package.info, Node: commands, Next: preface init config, Prev: bind bind*, Up: Keywords
6.4 :commands 4.4 :commands
=============== ===============
 
File: use-package.info, Node: preface init config, Next: custom, Prev: commands, Up: Keywords File: use-package.info, Node: preface init config, Next: custom, Prev: commands, Up: Keywords
6.5 :preface, :init, :config 4.5 :preface, :init, :config
================================== ==================================
Here is the simplest use-package declaration: Here is the simplest use-package declaration:
@ -497,9 +482,9 @@ occurs:
(use-package color-moccur (use-package color-moccur
:commands (isearch-moccur isearch-all) :commands (isearch-moccur isearch-all)
:bind (("M-s O" . moccur) :bind (("M-s O" . moccur)
:map isearch-mode-map :map isearch-mode-map
("M-o" . isearch-moccur) ("M-o" . isearch-moccur)
("M-O" . isearch-moccur-all)) ("M-O" . isearch-moccur-all))
:init :init
(setq isearch-lazy-highlight t) (setq isearch-lazy-highlight t)
:config :config
@ -514,7 +499,7 @@ package is actually loaded (by using one of these commands),
 
File: use-package.info, Node: custom, Next: custom-face, Prev: preface init config, Up: Keywords File: use-package.info, Node: custom, Next: custom-face, Prev: preface init config, Up: Keywords
6.6 :custom 4.6 :custom
============= =============
The :custom keyword allows customization of package custom variables. The :custom keyword allows customization of package custom variables.
@ -529,7 +514,7 @@ The :custom keyword allows customization of package custom variables.
 
File: use-package.info, Node: custom-face, Next: defer demand, Prev: custom, Up: Keywords File: use-package.info, Node: custom-face, Next: defer demand, Prev: custom, Up: Keywords
6.7 :custom-face 4.7 :custom-face
================== ==================
The :custom-face keyword allows customization of package custom faces. The :custom-face keyword allows customization of package custom faces.
@ -541,7 +526,7 @@ The :custom-face keyword allows customization of package custom faces.
 
File: use-package.info, Node: defer demand, Next: defines functions, Prev: custom-face, Up: Keywords File: use-package.info, Node: defer demand, Next: defines functions, Prev: custom-face, Up: Keywords
6.8 :defer, :demand 4.8 :defer, :demand
======================= =======================
In almost all cases you dont need to manually specify :defer t. This In almost all cases you dont need to manually specify :defer t. This
@ -558,7 +543,7 @@ immediately and not establish an autoload for the bound key.
 
File: use-package.info, Node: defines functions, Next: diminish delight, Prev: defer demand, Up: Keywords File: use-package.info, Node: defines functions, Next: diminish delight, Prev: defer demand, Up: Keywords
6.9 :defines, :functions 4.9 :defines, :functions
============================ ============================
Another feature of use-package is that it always loads every file that Another feature of use-package is that it always loads every file that
@ -593,7 +578,7 @@ byte-compiler:
 
File: use-package.info, Node: diminish delight, Next: disabled, Prev: defines functions, Up: Keywords File: use-package.info, Node: diminish delight, Next: disabled, Prev: defines functions, Up: Keywords
6.10 :diminish, :delight 4.10 :diminish, :delight
============================ ============================
use-package also provides built-in support for the diminish and use-package also provides built-in support for the diminish and
@ -643,7 +628,7 @@ completely.
 
File: use-package.info, Node: disabled, Next: ensure pin, Prev: diminish delight, Up: Keywords File: use-package.info, Node: disabled, Next: ensure pin, Prev: diminish delight, Up: Keywords
6.11 :disabled 4.11 :disabled
================ ================
The :disabled keyword can turn off a module youre having difficulties The :disabled keyword can turn off a module youre having difficulties
@ -659,7 +644,7 @@ omitted from the output entirely, to accelerate startup times.
 
File: use-package.info, Node: ensure pin, Next: hook, Prev: disabled, Up: Keywords File: use-package.info, Node: ensure pin, Next: hook, Prev: disabled, Up: Keywords
6.12 :ensure, :pin 4.12 :ensure, :pin
====================== ======================
You can use use-package to load packages from ELPA with package.el. You can use use-package to load packages from ELPA with package.el.
@ -729,7 +714,7 @@ from the magic manual archive mentioned above):
 
File: use-package.info, Node: hook, Next: if when unless, Prev: ensure pin, Up: Keywords File: use-package.info, Node: hook, Next: if when unless, Prev: ensure pin, Up: Keywords
6.13 :hook 4.13 :hook
============ ============
The :hook keyword allows adding functions onto hooks, here only the The :hook keyword allows adding functions onto hooks, here only the
@ -758,7 +743,7 @@ are also equivalent:
(use-package ace-jump-mode (use-package ace-jump-mode
:hook ((prog-mode . ace-jump-mode) :hook ((prog-mode . ace-jump-mode)
(text-mode . ace-jump-mode))) (text-mode . ace-jump-mode)))
(use-package ace-jump-mode (use-package ace-jump-mode
:commands ace-jump-mode :commands ace-jump-mode
@ -775,7 +760,7 @@ implied by :hook.
 
File: use-package.info, Node: if when unless, Next: load-path, Prev: hook, Up: Keywords File: use-package.info, Node: if when unless, Next: load-path, Prev: hook, Up: Keywords
6.14 :if, :when, :unless 4.14 :if, :when, :unless
============================== ==============================
You can use the :if keyword to predicate the loading and You can use the :if keyword to predicate the loading and
@ -805,7 +790,7 @@ foo means the same thing as :if (not foo).
 
File: use-package.info, Node: load-path, Next: mode interpreter, Prev: if when unless, Up: Keywords File: use-package.info, Node: load-path, Next: mode interpreter, Prev: if when unless, Up: Keywords
6.15 :load-path 4.15 :load-path
================= =================
If your package needs a directory added to the load-path in order to If your package needs a directory added to the load-path in order to
@ -836,7 +821,7 @@ again on each startup:
 
File: use-package.info, Node: mode interpreter, Next: magic magic-fallback, Prev: load-path, Up: Keywords File: use-package.info, Node: mode interpreter, Next: magic magic-fallback, Prev: load-path, Up: Keywords
6.16 :mode, :interpreter 4.16 :mode, :interpreter
============================ ============================
Similar to :bind, you can use :mode and :interpreter to establish Similar to :bind, you can use :mode and :interpreter to establish
@ -872,29 +857,26 @@ each), you can still defer loading with the :defer keyword:
 
File: use-package.info, Node: magic magic-fallback, Next: no-require, Prev: mode interpreter, Up: Keywords File: use-package.info, Node: magic magic-fallback, Next: no-require, Prev: mode interpreter, Up: Keywords
6.17 :magic, :magic-fallback 4.17 :magic, :magic-fallback
================================ ================================
Similar to :mode and :interpreter, you can also use :magic and Similar to :mode and :interpreter, you can also use :magic and
:magic-fallback to cause certain function to be run if the beginning :magic-fallback to cause certain function to be run if the beginning
of a file matches a given regular expression. The difference between of a file matches a given regular expression. The difference between
the two is that :magic-fallback has a lower priority than :mode. the two is that :magic-fallback has a lower priority than :mode.
For example: For example:
(use-package pdf-tools “‘ elisp (use-package pdf-tools :load-path "site-lisp/pdf-tools/lisp"
:load-path "site-lisp/pdf-tools/lisp" :magic ("%PDF" . pdf-view-mode) :config (pdf-tools-install)) “‘
:magic ("%PDF" . pdf-view-mode)
:config
(pdf-tools-install))
This registers an autoloaded command for pdf-view-mode, defers This registers an autoloaded command for pdf-view-mode, defers
loading of pdf-tools, and runs pdf-view-mode if the beginning of a loading of pdf-tools, and runs pdf-view-mode if the beginning of a
buffer matches the string "%PDF". buffer matches the string "%PDF".
 
File: use-package.info, Node: no-require, Next: requires, Prev: magic magic-fallback, Up: Keywords File: use-package.info, Node: no-require, Next: requires, Prev: magic magic-fallback, Up: Keywords
6.18 :no-require 4.18 :no-require
================== ==================
Normally, use-package will load each package at compile time before Normally, use-package will load each package at compile time before
@ -912,7 +894,7 @@ want to use use-package for is to add a configuration to the
 
File: use-package.info, Node: requires, Prev: no-require, Up: Keywords File: use-package.info, Node: requires, Prev: no-require, Up: Keywords
6.19 :requires 4.19 :requires
================ ================
While the :after keyword delays loading until the dependencies are While the :after keyword delays loading until the dependencies are
@ -939,47 +921,124 @@ to a non-nil value. For example:
use :if and the appropriate Lisp expression. use :if and the appropriate Lisp expression.
 
File: use-package.info, Node: Debugging Tools, Prev: Keywords, Up: Top File: use-package.info, Node: FAQ, Next: Debugging Tools, Prev: Keywords, Up: Top
7 Debugging Tools Appendix A FAQ
**************
The next two nodes lists frequently asked questions.
Please also use the *note Debugging Tools::.
* Menu:
* FAQ - How to ...?::
* FAQ - Issues and Errors::

File: use-package.info, Node: FAQ - How to ...?, Next: FAQ - Issues and Errors, Up: FAQ
A.1 FAQ - How to ...?
=====================
* Menu:
* This is a question::

File: use-package.info, Node: This is a question, Up: FAQ - How to ...?
A.1.1 This is a question
------------------------
This is an answer.

File: use-package.info, Node: FAQ - Issues and Errors, Prev: FAQ - How to ...?, Up: FAQ
A.2 FAQ - Issues and Errors
===========================
* Menu:
* This is an issues::

File: use-package.info, Node: This is an issues, Up: FAQ - Issues and Errors
A.2.1 This is an issues
-----------------------
This is a description.

File: use-package.info, Node: Debugging Tools, Next: Command Index, Prev: FAQ, Up: Top
B Debugging Tools
***************** *****************
TODO TODO
Please also see the *note FAQ::.

File: use-package.info, Node: Command Index, Next: Function Index, Prev: Debugging Tools, Up: Top
Appendix C Command Index
************************

File: use-package.info, Node: Function Index, Next: Variable Index, Prev: Command Index, Up: Top
Appendix D Function Index
*************************

File: use-package.info, Node: Variable Index, Prev: Function Index, Up: Top
Appendix E Variable Index
*************************
 
Tag Table: Tag Table:
Node: Top780 Node: Top784
Node: Introduction2989 Node: Introduction2819
Node: Installation3500 Node: Installation3306
Node: Installing from GNU ELPA3845 Node: Installing from an Elpa Archive3658
Node: Installing from the Git Repository4586 Node: Installing from the Git Repository4773
Node: Post-Installation Tasks6122 Node: Post-Installation Tasks6309
Node: Getting Started6810 Node: Getting Started7024
Node: Basic Concepts6989 Node: Keywords7196
Node: Issues/Requests8153 Node: after8115
Node: Keywords8290 Node: bind-keymap bind-keymap*9647
Node: after9237 Node: bind bind*10700
Node: bind-keymap bind-keymap*11249 Node: Binding to local keymaps12740
Node: bind bind*12302 Node: commands13831
Node: Binding to local keymaps14377 Node: preface init config13973
Node: commands15524 Node: custom16051
Node: preface init config15666 Node: custom-face16491
Node: custom17765 Node: defer demand16811
Node: custom-face18205 Node: defines functions17623
Node: defer demand18525 Node: diminish delight18768
Node: defines functions19337 Node: disabled20711
Node: diminish delight20482 Node: ensure pin21206
Node: disabled22425 Node: hook23936
Node: ensure pin22920 Node: if when unless25354
Node: hook25650 Node: load-path26300
Node: if when unless27075 Node: mode interpreter27446
Node: load-path28021 Node: magic magic-fallback28757
Node: mode interpreter29167 Node: no-require29602
Node: magic magic-fallback30478 Node: requires30306
Node: no-require31332 Node: FAQ31193
Node: requires32036 Node: FAQ - How to ...?31476
Node: Debugging Tools32923 Node: This is a question31648
Node: FAQ - Issues and Errors31796
Node: This is an issues31979
Node: Debugging Tools32134
Node: Command Index32308
Node: Function Index32464
Node: Variable Index32621
 
End Tag Table End Tag Table

View File

@ -1,15 +0,0 @@
(define-package "use-package" "2.4.4" "A configuration macro for simplifying your .emacs"
'((emacs "24.3")
(bind-key "2.4"))
:commit "9090080b15486c3e337be254226efe7e5fde4c99" :authors
'(("John Wiegley" . "johnw@newartisans.com"))
:maintainers
'(("John Wiegley" . "johnw@newartisans.com"))
:maintainer
'("John Wiegley" . "johnw@newartisans.com")
:keywords
'("dotemacs" "startup" "speed" "config" "package" "extensions")
:url "https://github.com/jwiegley/use-package")
;; Local Variables:
;; no-byte-compile: t
;; End:

View File

@ -2277,6 +2277,7 @@ The password is assumed to be stored at the PASSWORD property."
helm-kill-ring-threshold 0 ; include all yanks in the kill ring helm-kill-ring-threshold 0 ; include all yanks in the kill ring
) )
:config (progn :config (progn
(require 'helm-config)
(require 'helm-mode) (require 'helm-mode)
(require 'helm-buffers) (require 'helm-buffers)
(require 'helm-ring) (require 'helm-ring)