Update elpa packages

This commit is contained in:
Daniel - 2023-08-13 10:56:23 +02:00
parent d6ffc0ba40
commit 4c0af67656
Signed by: dbo
GPG Key ID: 784AA8DF0CCDF625
32 changed files with 1679 additions and 1264 deletions

View File

@ -1,84 +0,0 @@
;;; 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

@ -1,2 +0,0 @@
;;; 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

@ -0,0 +1,97 @@
;;; 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

@ -0,0 +1,14 @@
(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,37 +1,33 @@
;;; bind-key.el --- A simple way to manage personal keybindings ;;; bind-key.el --- A simple way to manage personal keybindings -*- lexical-binding: t; -*-
;; Copyright (c) 2012-2017 John Wiegley ;; Copyright (c) 2012-2022 Free Software Foundation, Inc.
;; 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
;; Modified: 29 Nov 2017 ;; Version: 2.4.1
;; Version: 2.4 ;; Package-Requires: ((emacs "24.3"))
;; Package-Version: 2.4.1 ;; Keywords: keys keybinding config dotemacs extensions
;; 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 ;; This program is free software; you can redistribute it and/or modify
;; modify it under the terms of the gnu general public license as ;; it under the terms of the GNU General Public License as published by
;; published by the free software foundation; either version 3, or (at ;; the Free Software Foundation, either version 3 of the License, or
;; your option) any later version. ;; (at your option) any later version.
;; This program is distributed in the hope that it will be useful, but ;; This program is distributed in the hope that it will be useful,
;; 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
;; general public license for more details. ;; GNU 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:
@ -106,7 +102,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)
@ -129,11 +125,12 @@
;; 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)
"override-global-mode keymap") "Keymap for `override-global-mode'.")
(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."
t "") :init-value 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'
@ -151,7 +148,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.
@ -159,9 +156,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.
@ -170,16 +167,20 @@ 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 (vectorp ,namevar) ,namevar (,keyvar ,(if (stringp key-name) (read-kbd-macro key-name)
(read-kbd-macro ,namevar))) `(if (vectorp ,namevar) ,namevar
(kmap (if (and ,keymap (symbolp ,keymap)) (symbol-value ,keymap) ,keymap)) (read-kbd-macro ,namevar))))
(,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 (or kmap global-map) ,keyvar))) (,bindingvar (lookup-key ,kmapvar ,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)
@ -188,27 +189,57 @@ 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 (or kmap global-map) ,keyvar `(define-key ,kmapvar ,keyvar
'(menu-item "" nil :filter (lambda (&optional _) '(menu-item "" nil :filter (lambda (&optional _)
(when ,predicate (when ,predicate
,command)))) ,command))))
`(define-key (or kmap global-map) ,keyvar ,command))))) `(define-key ,kmapvar ,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."
`(progn (let ((namevar (make-symbol "name"))
(bind-key ,key-name nil ,keymap) (kdescvar (make-symbol "kdesc")))
`(let* ((,namevar ,key-name)
(,kdescvar (cons (if (stringp ,namevar) ,namevar
(key-description ,namevar))
(if (symbolp ,keymap) ,keymap (quote ,keymap)))))
(bind-key--remove (if (vectorp ,namevar) ,namevar
(read-kbd-macro ,namevar))
(or (if (and ,keymap (symbolp ,keymap))
(symbol-value ,keymap) ,keymap)
global-map))
(setq personal-keybindings (setq personal-keybindings
(cl-delete-if #'(lambda (k) (cl-delete-if (lambda (k) (equal (car k) ,kdescvar))
,(if keymap personal-keybindings))
`(and (consp (car k)) nil)))
(string= (caar k) ,key-name)
(eq (cdar k) ',keymap)) (defun bind-key--remove (key keymap)
`(and (stringp (car k)) "Remove KEY from KEYMAP.
(string= (car k) ,key-name))))
personal-keybindings)))) 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)
@ -226,30 +257,60 @@ 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
doc prefix-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 doc (cadr args))) (setq prefix-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))
@ -258,13 +319,17 @@ 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 (cddr args)) (setq args (funcall arg-change-func 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"))
@ -296,13 +361,16 @@ function symbol (unquoted)."
(append (append
(when prefix-map (when prefix-map
`((defvar ,prefix-map) `((defvar ,prefix-map)
,@(when doc `((put ',prefix-map 'variable-documentation ,doc))) ,@(when prefix-doc `((put ',prefix-map 'variable-documentation ,prefix-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)
@ -310,13 +378,19 @@ 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)))
`((bind-key ,(car form) ,fun ,map ,filter)) ;; Only needed in this branch, since when
;; 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 (if pkg (bind-keys-form `(,@(when repeat-map `(:repeat-map ,repeat-map))
,@(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)
@ -330,6 +404,19 @@ 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
@ -430,8 +517,7 @@ 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)
@ -453,7 +539,6 @@ 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,17 +1,29 @@
;;; dash-autoloads.el --- automatically extracted autoloads -*- lexical-binding: t -*- ;;; dash-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: ;;; Code:
(add-to-list 'load-path (directory-file-name (add-to-list 'load-path (or (and load-file-name (directory-file-name (file-name-directory load-file-name))) (car load-path)))
(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.
@ -26,20 +38,8 @@ 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.
Dash-Fontify mode is a buffer-local minor mode intended for Emacs (fn &optional ARG)" t)
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,9 +47,7 @@ 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,
@ -64,24 +62,22 @@ 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 nil) (fn &optional ARG)" t)
(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 nil) This allows Dash symbols to be looked up with \\[info-lookup-symbol]." t)
(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-"))
;;;***
;;;### (autoloads nil nil ("dash-pkg.el") (0 0 0 0)) ;;; End of scraped data
(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
;; coding: utf-8 ;; no-native-compile: t
;; coding: utf-8-emacs-unix
;; End: ;; End:
;;; dash-autoloads.el ends here ;;; dash-autoloads.el ends here

View File

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

View File

@ -1,50 +0,0 @@
;;; 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

@ -1,2 +0,0 @@
;;; -*- 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

@ -0,0 +1,51 @@
;;; 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

@ -0,0 +1,15 @@
(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,12 +1,12 @@
;;; exec-path-from-shell.el --- Get environment variables such as $PATH from the shell ;;; exec-path-from-shell.el --- Get environment variables such as $PATH from the shell -*- lexical-binding: t -*-
;; 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: 1.12 ;; Package-Version: 2.1
;; Package-X-Original-Version: 0 ;; Package-Requires: ((emacs "24.1") (cl-lib "0.6"))
;; This file is not part of GNU Emacs. ;; This file is not part of GNU Emacs.
@ -74,7 +74,8 @@
;;; Code: ;;; Code:
;; Satisfy the byte compiler ;; Satisfy the byte compiler
(defvar eshell-path-env) (eval-when-compile (require 'eshell))
(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."
@ -87,12 +88,9 @@
: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-check-startup-files t (defcustom exec-path-from-shell-warn-duration-millis 500
"If non-nil, warn if variables are being set in the wrong shell startup files. "Print a warning if shell execution takes longer than this many milliseconds."
Environment variables should be set in .profile or .zshenv rather than :type 'integer)
.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.
@ -139,7 +137,20 @@ 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\\|t?csh\\)$" shell))) (not (string-match "\\(fish\\|nu\\|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.
@ -166,7 +177,8 @@ 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 (apply #'call-process shell nil t nil shell-args))) (let ((exit-code (exec-path-from-shell--warn-duration
(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"
@ -181,6 +193,8 @@ 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
@ -207,48 +221,35 @@ 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 set corresponding Additionally, if NAME is \"PATH\" then also update the
variables such as `exec-path'." variables `exec-path' and `eshell-path-env'."
(setenv name value) (setenv name value)
(when (string-equal "PATH" name) (when (string-equal "PATH" name)
(setq eshell-path-env value (setq exec-path (append (parse-colon-path value) (list exec-directory)))
exec-path (append (parse-colon-path value) (list exec-directory))))) ;; `eshell-path-env' is a buffer local variable, so change its default
;; 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 `exec-path' and As a special case, if the variable is $PATH, then the variables
`eshell-path-env' are also set appropriately. The result is an alist, `exec-path' and `eshell-path-env' are also set appropriately.
as described by `exec-path-from-shell-getenvs'." The result is an alist, as described by
`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 `exec-path' and As a special case, if the variable is $PATH, then the variables
`eshell-path-env' are also set appropriately. Return the value `exec-path' and `eshell-path-env' are also set appropriately.
of the environment variable." Return the value 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,2 +0,0 @@
;;; 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

@ -1,35 +1,43 @@
;;; page-break-lines-autoloads.el --- automatically extracted autoloads ;;; page-break-lines-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: ;;; Code:
(add-to-list 'load-path (directory-file-name (add-to-list 'load-path (or (and load-file-name (directory-file-name (file-name-directory load-file-name))) (car load-path)))
(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.
\(fn &optional ARG)" t nil) This is a minor mode. If called interactively, toggle the
`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." nil nil) `page-break-lines-mode' will be enabled.")
(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
@ -37,29 +45,34 @@ 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. If called from Lisp, enable the mode if otherwise, disable it.
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 nil) (fn &optional ARG)" t)
(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
;; coding: utf-8 ;; no-native-compile: t
;; 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,14 @@
(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

@ -4,9 +4,7 @@
;; 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-Commit: 69caea070379f3324c530e96e06625c3cd097cb9 ;; Package-Version: 0.15
;; 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,13 +0,0 @@
(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,13 +1,14 @@
;;; use-package-autoloads.el --- automatically extracted autoloads ;;; use-package-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: ;;; Code:
(add-to-list 'load-path (directory-file-name (add-to-list 'load-path (or (and load-file-name (directory-file-name (file-name-directory load-file-name))) (car load-path)))
(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" "\
@ -22,46 +23,32 @@ 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)" nil nil) (fn KEYMAP-SYMBOL PACKAGE OVERRIDE)")
(autoload 'use-package-normalize-binder "use-package-bind-key" "\ (autoload 'use-package-normalize-binder "use-package-bind-key" "\
\(fn NAME KEYWORD ARGS)" nil nil) (fn NAME KEYWORD ARGS)")
(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)" nil nil) (fn NAME KEYWORD ARGS REST STATE &optional BIND-MACRO)")
(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)" nil nil) (fn NAME KEYWORD ARGS REST STATE &optional OVERRIDE)")
(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)" nil nil) (fn NAME KEYWORD ARG REST STATE)")
(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" "\
@ -90,6 +77,7 @@ 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.
@ -117,114 +105,87 @@ 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 `customize-set-faces' with each face definition. :custom-face Call `custom-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)" nil nil) (fn NAME KEYWORD ARGS)")
(autoload 'use-package-handler/:delight "use-package-delight" "\ (autoload 'use-package-handler/:delight "use-package-delight" "\
\(fn NAME KEYWORD ARGS REST STATE)" nil nil) (fn NAME KEYWORD ARGS REST STATE)")
(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)" nil nil) (fn NAME KEYWORD ARGS)")
(autoload 'use-package-handler/:diminish "use-package-diminish" "\ (autoload 'use-package-handler/:diminish "use-package-diminish" "\
\(fn NAME KEYWORD ARG REST STATE)" nil nil) (fn NAME KEYWORD ARG REST STATE)")
(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)" nil nil) (fn NAME KEYWORD ARGS)")
(autoload 'use-package-handler/:ensure "use-package-ensure" "\ (autoload 'use-package-handler/:ensure "use-package-ensure" "\
\(fn NAME KEYWORD ENSURE REST STATE)" nil nil) (fn NAME KEYWORD ENSURE REST STATE)")
(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 Attempt to find and jump to the `use-package' form that loaded PACKAGE.
PACKAGE. This will only find the form if that form actually This will only find the form if that form actually required
required PACKAGE. If PACKAGE was previously required then this PACKAGE. If PACKAGE was previously required then this function
function will jump to the file that originally required PACKAGE will jump to the file that originally required PACKAGE instead.
instead.
\(fn PACKAGE)" t nil) (fn PACKAGE)" t)
(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 nil) with the specified `:load-path' the module cannot be found." t)
(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")))
;;;***
;;;### (autoloads nil nil ("use-package-pkg.el" "use-package.el") ;;; End of scraped data
;;;;;; (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
;; coding: utf-8 ;; no-native-compile: t
;; coding: utf-8-emacs-unix
;; End: ;; End:
;;; use-package-autoloads.el ends here ;;; use-package-autoloads.el ends here

View File

@ -1,30 +1,22 @@
;;; 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-2017 John Wiegley ;; Copyright (C) 2012-2022 Free Software Foundation, Inc.
;; 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 ;; This program is free software; you can redistribute it and/or modify
;; modify it under the terms of the GNU General Public License as ;; it under the terms of the GNU General Public License as published by
;; published by the Free Software Foundation; either version 3, or (at ;; the Free Software Foundation, either version 3 of the License, or
;; your option) any later version. ;; (at your option) any later version.
;; This program is distributed in the hope that it will be useful, but ;; This program is distributed in the hope that it will be useful,
;; 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
;; General Public License for more details. ;; GNU 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 GNU Emacs; see the file COPYING. If not, write to the ;; along with this program. If not, see <https://www.gnu.org/licenses/>.
;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.
;;; Commentary: ;;; Commentary:
@ -86,13 +78,20 @@ 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,30 +1,22 @@
;;; 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-2017 John Wiegley ;; Copyright (C) 2012-2022 Free Software Foundation, Inc.
;; 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 ;; This program is free software; you can redistribute it and/or modify
;; modify it under the terms of the GNU General Public License as ;; it under the terms of the GNU General Public License as published by
;; published by the Free Software Foundation; either version 3, or (at ;; the Free Software Foundation, either version 3 of the License, or
;; your option) any later version. ;; (at your option) any later version.
;; This program is distributed in the hope that it will be useful, but ;; This program is distributed in the hope that it will be useful,
;; 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
;; General Public License for more details. ;; GNU 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 GNU Emacs; see the file COPYING. If not, write to the ;; along with this program. If not, see <https://www.gnu.org/licenses/>.
;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.
;;; Commentary: ;;; Commentary:
@ -43,21 +35,38 @@
(require 'cl-lib) (require 'cl-lib)
(require 'tabulated-list) (require 'tabulated-list)
(if (and (eq emacs-major-version 24) (eq emacs-minor-version 3)) (eval-and-compile
;; Declare a synthetic theme for :custom variables.
;; Necessary in order to avoid having those variables saved by custom.el.
(deftheme use-package))
(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) (defsubst hash-table-keys (hash-table)
"Return a list of keys in HASH-TABLE." "Return a list of keys in HASH-TABLE."
(cl-loop for k being the hash-keys of hash-table collect k)) (cl-loop for k being the hash-keys of hash-table collect k))
(eval-when-compile (require 'subr-x))) (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.1" (defconst use-package-version "2.4.4"
"This version of use-package.") "This version of `use-package'.")
(defcustom use-package-keywords (defcustom use-package-keywords
'(:disabled '(:disabled
@ -84,23 +93,25 @@
;; 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)
@ -108,7 +119,8 @@ 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
@ -119,9 +131,16 @@ 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, issue warning instead of error when unknown "If non-nil, warn instead of signaling error for unknown keywords.
keyword is encountered. The unknown keyword and its associated The unknown keyword and its associated arguments will be ignored
arguments will be ignored in the `use-package' expansion." 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)
@ -177,7 +196,7 @@ 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
@ -285,7 +304,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
@ -296,17 +315,18 @@ 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
@ -317,7 +337,7 @@ 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
@ -344,14 +364,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. Otherwise "If STRING-OR-SYMBOL is already a symbol, return it.
convert it to a symbol and return that." Otherwise 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. Otherwise "If STRING-OR-SYMBOL is already a string, return it.
convert it to a string and return that." Otherwise 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)))
@ -889,14 +909,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)
@ -911,7 +931,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))
@ -968,6 +988,8 @@ 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)))
@ -981,11 +1003,10 @@ If RECURSED is non-nil, recurse into sublists."
(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."
(format-time-string "%Y-%m-%d %a %H:%M"
(or (gethash :config package) (or (gethash :config package)
(gethash :init package) (gethash :init package)
(gethash :preface package) (gethash :preface package)
(gethash :use-package 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."
@ -1005,11 +1026,13 @@ 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)
(use-package-statistics-last-event statistics) (format-time-string
"%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!)
@ -1025,15 +1048,43 @@ 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 t) ("Status" 13
("Last Event" 23 t) (lambda (a b)
("Time" 10 t)]) (< (assoc-default
(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)
@ -1247,7 +1298,10 @@ meaning:
(setq every nil))) (setq every nil)))
every)))) every))))
#'use-package-recognize-function #'use-package-recognize-function
name label arg)))) (if (string-suffix-p "-mode" (symbol-name name))
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)
@ -1267,9 +1321,13 @@ meaning:
(concat (symbol-name sym) (concat (symbol-name sym)
use-package-hook-name-suffix))) use-package-hook-name-suffix)))
(function ,fun))) (function ,fun)))
(if (use-package-non-nil-symbolp syms) (list syms) syms))))) (use-package-hook-handler-normalize-mode-symbols 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)
@ -1292,6 +1350,28 @@ 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)
@ -1387,6 +1467,25 @@ 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)
`((let ((custom--inhibit-theme-enable nil))
;; Declare the theme here so use-package can be required inside
;; eval-and-compile without warnings about unknown theme.
(unless (memq 'use-package custom-known-themes)
(deftheme use-package)
(enable-theme 'use-package)
(setq custom-enabled-themes (remq 'use-package custom-enabled-themes)))
(custom-theme-set-variables
'use-package
,@(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)))
`'(,variable ,value nil () ,comment)))
args))))
(mapcar (mapcar
#'(lambda (def) #'(lambda (def)
(let ((variable (nth 0 def)) (let ((variable (nth 0 def))
@ -1394,10 +1493,8 @@ no keyword implies `:all'."
(comment (nth 2 def))) (comment (nth 2 def)))
(unless (and comment (stringp comment)) (unless (and comment (stringp comment))
(setq comment (format "Customized with use-package %s" name))) (setq comment (format "Customized with use-package %s" name)))
`(funcall (or (get (quote ,variable) 'custom-set) #'set-default) `(customize-set-variable (quote ,variable) ,value ,comment)))
(quote ,variable) args))
,value)))
args)
(use-package-process-keywords name rest state))) (use-package-process-keywords name rest state)))
;;;; :custom-face ;;;; :custom-face
@ -1405,7 +1502,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>) or list of these" (format "%s wants a (<symbol> <face-spec> [spec-type]) or list of these"
name-symbol))) name-symbol)))
(unless (listp arg) (unless (listp arg)
(use-package-error error-msg)) (use-package-error error-msg))
@ -1416,13 +1513,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) 2)) (> (length def) 3))
(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) `(custom-set-faces (backquote ,def))) args) (mapcar #'(lambda (def) `(apply #'face-spec-set (backquote ,def))) args)
(use-package-process-keywords name rest state))) (use-package-process-keywords name rest state)))
;;;; :init ;;;; :init
@ -1483,6 +1580,31 @@ 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
@ -1536,6 +1658,7 @@ 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.
@ -1563,13 +1686,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 `customize-set-faces' with each face definition. :custom-face Call `custom-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 1)) (declare (indent defun))
(unless (memq :disabled args) (unless (memq :disabled args)
(macroexp-progn (macroexp-progn
(use-package-concat (use-package-concat
@ -1588,12 +1711,6 @@ 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,30 +1,22 @@
;;; 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-2017 John Wiegley ;; Copyright (C) 2012-2022 Free Software Foundation, Inc.
;; 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 ;; This program is free software; you can redistribute it and/or modify
;; modify it under the terms of the GNU General Public License as ;; it under the terms of the GNU General Public License as published by
;; published by the Free Software Foundation; either version 3, or (at ;; the Free Software Foundation, either version 3 of the License, or
;; your option) any later version. ;; (at your option) any later version.
;; This program is distributed in the hope that it will be useful, but ;; This program is distributed in the hope that it will be useful,
;; 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
;; General Public License for more details. ;; GNU 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 GNU Emacs; see the file COPYING. If not, write to the ;; along with this program. If not, see <https://www.gnu.org/licenses/>.
;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.
;;; Commentary: ;;; Commentary:

View File

@ -1,30 +1,22 @@
;;; 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-2017 John Wiegley ;; Copyright (C) 2012-2022 Free Software Foundation, Inc.
;; 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 ;; This program is free software; you can redistribute it and/or modify
;; modify it under the terms of the GNU General Public License as ;; it under the terms of the GNU General Public License as published by
;; published by the Free Software Foundation; either version 3, or (at ;; the Free Software Foundation, either version 3 of the License, or
;; your option) any later version. ;; (at your option) any later version.
;; This program is distributed in the hope that it will be useful, but ;; This program is distributed in the hope that it will be useful,
;; 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
;; General Public License for more details. ;; GNU 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 GNU Emacs; see the file COPYING. If not, write to the ;; along with this program. If not, see <https://www.gnu.org/licenses/>.
;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.
;;; Commentary: ;;; Commentary:

View File

@ -1,30 +1,22 @@
;;; 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-2017 John Wiegley ;; Copyright (C) 2012-2022 Free Software Foundation, Inc.
;; 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 ;; This program is free software; you can redistribute it and/or modify
;; modify it under the terms of the GNU General Public License as ;; it under the terms of the GNU General Public License as published by
;; published by the Free Software Foundation; either version 3, or (at ;; the Free Software Foundation, either version 3 of the License, or
;; your option) any later version. ;; (at your option) any later version.
;; This program is distributed in the hope that it will be useful, but ;; This program is distributed in the hope that it will be useful,
;; 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
;; General Public License for more details. ;; GNU 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 GNU Emacs; see the file COPYING. If not, write to the ;; along with this program. If not, see <https://www.gnu.org/licenses/>.
;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.
;;; Commentary: ;;; Commentary:
@ -37,7 +29,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
@ -93,7 +85,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
@ -111,7 +103,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,37 +1,29 @@
;;; 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-2017 John Wiegley ;; Copyright (C) 2012-2022 Free Software Foundation, Inc.
;; 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 ;; This program is free software; you can redistribute it and/or modify
;; modify it under the terms of the GNU General Public License as ;; it under the terms of the GNU General Public License as published by
;; published by the Free Software Foundation; either version 3, or (at ;; the Free Software Foundation, either version 3 of the License, or
;; your option) any later version. ;; (at your option) any later version.
;; This program is distributed in the hope that it will be useful, but ;; This program is distributed in the hope that it will be useful,
;; 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
;; General Public License for more details. ;; GNU 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 GNU Emacs; see the file COPYING. If not, write to the ;; along with this program. If not, see <https://www.gnu.org/licenses/>.
;; 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. Improvements are ;; initialization. If it was delay-loaded, it will not work.
;; needed. ;; Improvements are needed.
;;; Code: ;;; Code:
@ -48,11 +40,10 @@ 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 "Attempt to find and jump to the `use-package' form that loaded PACKAGE.
PACKAGE. This will only find the form if that form actually This will only find the form if that form actually required
required PACKAGE. If PACKAGE was previously required then this PACKAGE. If PACKAGE was previously required then this function
function will jump to the file that originally required PACKAGE will jump to the file that originally required PACKAGE instead."
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,30 +1,22 @@
;;; 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-2017 John Wiegley ;; Copyright (C) 2012-2022 Free Software Foundation, Inc.
;; 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 ;; This program is free software; you can redistribute it and/or modify
;; modify it under the terms of the GNU General Public License as ;; it under the terms of the GNU General Public License as published by
;; published by the Free Software Foundation; either version 3, or (at ;; the Free Software Foundation, either version 3 of the License, or
;; your option) any later version. ;; (at your option) any later version.
;; This program is distributed in the hope that it will be useful, but ;; This program is distributed in the hope that it will be useful,
;; 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
;; General Public License for more details. ;; GNU 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 GNU Emacs; see the file COPYING. If not, write to the ;; along with this program. If not, see <https://www.gnu.org/licenses/>.
;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.
;;; Commentary: ;;; Commentary:
@ -63,7 +55,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,15 @@
(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

@ -1,30 +1,27 @@
;;; 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-2017 John Wiegley ;; Copyright (C) 2012-2022 Free Software Foundation, Inc.
;; 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
;; Modified: 29 Nov 2017 ;; Version: 2.4.4
;; 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 ;; Keywords: dotemacs startup speed config package extensions
;; 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 ;; This program is free software; you can redistribute it and/or modify
;; modify it under the terms of the GNU General Public License as ;; it under the terms of the GNU General Public License as published by
;; published by the Free Software Foundation; either version 3, or (at ;; the Free Software Foundation, either version 3 of the License, or
;; your option) any later version. ;; (at your option) any later version.
;; This program is distributed in the hope that it will be useful, but ;; This program is distributed in the hope that it will be useful,
;; 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
;; General Public License for more details. ;; GNU 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 GNU Emacs; see the file COPYING. If not, write to the ;; along with this program. If not, see <https://www.gnu.org/licenses/>.
;; 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.5 from This is use-package.info, produced by makeinfo version 6.7 from
use-package.texi. use-package.texi.
Copyright (C) 2012-2017 John Wiegley <johnw@newartisans.com> Copyright (C) 2012-2022 Free Software Foundation, Inc.
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
@ -12,6 +12,7 @@ use-package.texi.
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.
@ -23,9 +24,13 @@ File: use-package.info, Node: Top, Next: Introduction, Up: (dir)
use-package User Manual use-package User Manual
*********************** ***********************
use-package is... The use-package macro allows you to isolate package configuration in
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-2017 John Wiegley <johnw@newartisans.com> Copyright (C) 2012-2022 Free Software Foundation, Inc.
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
@ -42,66 +47,46 @@ use-package is...
* 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 an Elpa Archive:: * Installing from GNU ELPA::
* 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
@ -111,10 +96,11 @@ 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 400 packages that I use in tidy. I created it because I have over 80 packages that I use in Emacs,
Emacs, and things were getting difficult to manage. Yet with this and things were getting difficult to manage. Yet with this utility my
utility my total load time is around 2 seconds, with no loss of total load time is around 2 seconds, with no loss of functionality!
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
@ -127,36 +113,22 @@ from its development repository.
* Menu: * Menu:
* Installing from an Elpa Archive:: * Installing from GNU ELPA::
* Installing from the Git Repository:: * Installing from the Git Repository::
* Post-Installation Tasks:: * Post-Installation Tasks::
 
File: use-package.info, Node: Installing from an Elpa Archive, Next: Installing from the Git Repository, Up: Installation File: use-package.info, Node: Installing from GNU ELPA, Next: Installing from the Git Repository, Up: Installation
2.1 Installing from an Elpa Archive 2.1 Installing from GNU ELPA
=================================== ============================
use-package is available from Melpa and Melpa-Stable. If you havent use-package is available from GNU ELPA. If you havent used Emacs
used Emacs package manager before, then it is high time you familiarize package manager before, then it is high time you familiarize yourself
yourself with it by reading the documentation in the Emacs manual, see with it by reading the documentation in the Emacs manual, see *note
*note (emacs)Packages::. Then add one of the archives to (emacs)Packages::. Then add one of the archives to package-archives:
package-archives:
• To use Melpa: First, you need to update the local package list using:
(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
@ -168,7 +140,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 an Elpa Archive, Up: Installation File: use-package.info, Node: Installing from the Git Repository, Next: Post-Installation Tasks, Prev: Installing from GNU ELPA, Up: Installation
2.2 Installing from the Git Repository 2.2 Installing from the Git Repository
====================================== ======================================
@ -231,16 +203,16 @@ for load-path.
should display something like should display something like
use-package-versions value is "2.4.1" use-package-versions value is "2.4.3"
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 FAQ::. Also see If you run into problems, then please see the *note Debugging
the *note Debugging Tools::. Tools::.
 
File: use-package.info, Node: Getting Started, Next: Keywords, Prev: Installation, Up: Top File: use-package.info, Node: Getting Started, Next: Basic Concepts, Prev: Installation, Up: Top
3 Getting Started 3 Getting Started
***************** *****************
@ -248,37 +220,72 @@ File: use-package.info, Node: Getting Started, Next: Keywords, Prev: Installa
TODO. For now, see README.md. TODO. For now, see README.md.
 
File: use-package.info, Node: Keywords, Next: FAQ, Prev: Getting Started, Up: Top File: use-package.info, Node: Basic Concepts, Next: Issues/Requests, Prev: Getting Started, Up: Top
4 Keywords 4 Basic Concepts
****************
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
4.1 :after 6.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
@ -316,10 +323,18 @@ 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
4.2 :bind-keymap, :bind-keymap* 6.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
@ -344,7 +359,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
4.3 :bind, :bind* 6.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
@ -403,7 +418,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*
4.3.1 Binding to local keymaps 6.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
@ -435,13 +450,13 @@ before the first use of :map are applied to the global keymap:
 
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
4.4 :commands 6.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
4.5 :preface, :init, :config 6.5 :preface, :init, :config
================================== ==================================
Here is the simplest use-package declaration: Here is the simplest use-package declaration:
@ -499,7 +514,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
4.6 :custom 6.6 :custom
============= =============
The :custom keyword allows customization of package custom variables. The :custom keyword allows customization of package custom variables.
@ -514,7 +529,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
4.7 :custom-face 6.7 :custom-face
================== ==================
The :custom-face keyword allows customization of package custom faces. The :custom-face keyword allows customization of package custom faces.
@ -526,7 +541,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
4.8 :defer, :demand 6.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
@ -543,7 +558,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
4.9 :defines, :functions 6.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
@ -578,7 +593,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
4.10 :diminish, :delight 6.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
@ -628,7 +643,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
4.11 :disabled 6.11 :disabled
================ ================
The :disabled keyword can turn off a module youre having difficulties The :disabled keyword can turn off a module youre having difficulties
@ -644,7 +659,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
4.12 :ensure, :pin 6.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.
@ -714,7 +729,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
4.13 :hook 6.13 :hook
============ ============
The :hook keyword allows adding functions onto hooks, here only the The :hook keyword allows adding functions onto hooks, here only the
@ -760,7 +775,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
4.14 :if, :when, :unless 6.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
@ -790,7 +805,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
4.15 :load-path 6.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
@ -821,7 +836,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
4.16 :mode, :interpreter 6.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
@ -857,26 +872,29 @@ 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
4.17 :magic, :magic-fallback 6.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:
“‘ elisp (use-package pdf-tools :load-path "site-lisp/pdf-tools/lisp" (use-package pdf-tools
:magic ("%PDF" . pdf-view-mode) :config (pdf-tools-install)) “‘ :load-path "site-lisp/pdf-tools/lisp"
: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
4.18 :no-require 6.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
@ -894,7 +912,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
4.19 :requires 6.19 :requires
================ ================
While the :after keyword delays loading until the dependencies are While the :after keyword delays loading until the dependencies are
@ -921,124 +939,47 @@ 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: FAQ, Next: Debugging Tools, Prev: Keywords, Up: Top File: use-package.info, Node: Debugging Tools, Prev: Keywords, Up: Top
Appendix A FAQ 7 Debugging Tools
**************
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: Top784 Node: Top780
Node: Introduction2819 Node: Introduction2989
Node: Installation3306 Node: Installation3500
Node: Installing from an Elpa Archive3658 Node: Installing from GNU ELPA3845
Node: Installing from the Git Repository4773 Node: Installing from the Git Repository4586
Node: Post-Installation Tasks6309 Node: Post-Installation Tasks6122
Node: Getting Started7024 Node: Getting Started6810
Node: Keywords7196 Node: Basic Concepts6989
Node: after8115 Node: Issues/Requests8153
Node: bind-keymap bind-keymap*9647 Node: Keywords8290
Node: bind bind*10700 Node: after9237
Node: Binding to local keymaps12740 Node: bind-keymap bind-keymap*11249
Node: commands13831 Node: bind bind*12302
Node: preface init config13973 Node: Binding to local keymaps14377
Node: custom16051 Node: commands15524
Node: custom-face16491 Node: preface init config15666
Node: defer demand16811 Node: custom17765
Node: defines functions17623 Node: custom-face18205
Node: diminish delight18768 Node: defer demand18525
Node: disabled20711 Node: defines functions19337
Node: ensure pin21206 Node: diminish delight20482
Node: hook23936 Node: disabled22425
Node: if when unless25354 Node: ensure pin22920
Node: load-path26300 Node: hook25650
Node: mode interpreter27446 Node: if when unless27075
Node: magic magic-fallback28757 Node: load-path28021
Node: no-require29602 Node: mode interpreter29167
Node: requires30306 Node: magic magic-fallback30478
Node: FAQ31193 Node: no-require31332
Node: FAQ - How to ...?31476 Node: requires32036
Node: This is a question31648 Node: Debugging Tools32923
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