Browse Source

merge from origin/master

master
Brett Langdon 5 years ago
parent
commit
972d1b7ad9
No known key found for this signature in database GPG Key ID: E6600FB894DB3D19
15 changed files with 239 additions and 23 deletions
  1. +1
    -1
      emacs.d/custom.el
  2. +8
    -0
      emacs.d/init.el
  3. +2
    -1
      emacs.d/use-package/.travis.yml
  4. +83
    -0
      emacs.d/use-package/NEWS.md
  5. +6
    -2
      emacs.d/use-package/README.md
  6. +8
    -5
      emacs.d/use-package/bind-key.el
  7. +2
    -2
      emacs.d/use-package/default.mk
  8. +8
    -4
      emacs.d/use-package/use-package-core.el
  9. +17
    -1
      emacs.d/use-package/use-package-tests.el
  10. +1
    -1
      emacs.d/use-package/use-package.el
  11. +2
    -2
      emacs.d/use-package/use-package.org
  12. +2
    -2
      emacs.d/use-package/use-package.texi
  13. +92
    -0
      emacs.d/vendor/emacs_27_obsolete.el
  14. +2
    -2
      gitconfig
  15. +5
    -0
      zshrc.d/.env.zsh

+ 1
- 1
emacs.d/custom.el View File

@ -4,7 +4,7 @@
;; Your init file should contain only one such instance. ;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right. ;; If there is more than one, they won't work right.
'(package-selected-packages '(package-selected-packages
'(py-isort lsp-python-ms helm-lsp go-mode company projectile helm adoc-mode csv-mode php-mode python-black cython-mode scss-mode vue-mode tide rust-mode company-auctex tex-site auctex sphinx-doc company-lsp lsp-ui lsp-mode ws-butler use-package smartparens pip-requirements osx-clipboard monokai-theme markdown-mode helm-projectile helm-ag godoctor go-guru go-eldoc go-autocomplete flycheck-gometalinter doom-modeline dockerfile-mode docker-compose-mode diminish company-go company-anaconda)))
'(py-isort flycheck lsp-python-ms helm-lsp go-mode company projectile helm adoc-mode csv-mode php-mode python-black cython-mode scss-mode vue-mode tide rust-mode company-auctex tex-site auctex sphinx-doc company-lsp lsp-ui lsp-mode ws-butler use-package smartparens pip-requirements osx-clipboard monokai-theme markdown-mode helm-projectile helm-ag godoctor go-guru go-eldoc go-autocomplete flycheck-gometalinter doom-modeline dockerfile-mode docker-compose-mode diminish company-go company-anaconda)))
(custom-set-faces (custom-set-faces
;; custom-set-faces was added by Custom. ;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful. ;; If you edit it by hand, you could mess it up, so be careful.


+ 8
- 0
emacs.d/init.el View File

@ -1,3 +1,11 @@
;; https://github.com/kiwanami/emacs-epc/issues/35#issuecomment-756701267
(setq byte-compile-warnings '(cl-functions))
;; Fix for emacs 28.0.50 changing `define-obsolete-function-alias`
;; https://www.reddit.com/r/emacs/comments/kqb9s9/cannot_recompile_packagess_error_wrong_number_of/gj3cfn3/?utm_source=reddit&utm_medium=web2x&context=3
(load "~/.emacs.d/vendor/emacs_27_obsolete")
;; -- Startup optimizations -- ;; -- Startup optimizations --
;; The below will increase the GC limits and remove the file name regex checker ;; The below will increase the GC limits and remove the file name regex checker
;; for 5 seconds. This helps reduce the number of GC calls and the total time spent ;; for 5 seconds. This helps reduce the number of GC calls and the total time spent


+ 2
- 1
emacs.d/use-package/.travis.yml View File

@ -15,11 +15,12 @@ install:
- tar xf emacs-bin-${EMACS_VERSION}.tar.gz -C / - tar xf emacs-bin-${EMACS_VERSION}.tar.gz -C /
- export EMACS=/tmp/emacs/bin/emacs - export EMACS=/tmp/emacs/bin/emacs
- $EMACS --version - $EMACS --version
dist: trusty
dist: bionic
addons: addons:
apt: apt:
packages: packages:
- texinfo - texinfo
- libgnutls30
script: script:
- make - make
- make test - make test


+ 83
- 0
emacs.d/use-package/NEWS.md View File

@ -1,5 +1,88 @@
# Changes # Changes
## 2.4.1
This is mostly a bug-fix release:
- Update the documentation for :custom as per #850
- Fix broken test due to #850
- better tests
- add test for #845
- Support keymap symbol in bind-key. Fix #845
- use-package-core.el: use the Emacs set-default function to avoid saving :custom vars twice
- Fix Travis
- typo, should be a vector, not a bytecode object
Solves https://github.com/jwiegley/use-package/issues/842
- Add special value back again, in case needed for backwards compat
I don't know why this special value exists, but perhaps old client code uses it.
The additional `t' in the macro expansion is accidental but not harmful I guess.
- Even when there's no :config, run any pre/post config hooks
i.e., following the existing docs for use-package-inject-hooks, these hooks are
run:
use-package--foo--pre-config-hook
use-package--foo--post-config-hook
This should make config customisations more predictable (for example, spacemacs
uses these hooks extensively to allow 'layers' to be customised).
I got rid of the "special" default value for :config, because it doesn't seem to
be treated any differently than nil.
Fixes #785
- Clarify the documentation for :after
- add table of contents to README
- Fix typos
Typos found with codespell.
- Fix typos
- Attempt to explain omit "-hook" better
- Update tests
- Switch from `require' to `load' + `featurep'
- Use `require', not `load', when byte-compiling
- Make custom-face evaluate elisp.
Fix #696.
- Add a line of documentation for (use-pacakage ... :hook).
- Fix typo in README
- Fix documentation for defer
- Add no-query option for pdf-tools-install
- Fix typo in README
- Fix all notes in README
- Mention use-package-ensure in README
Without requiring `use-package-ensure`, setting `use-package-always-ensure`
did not actually work for me.
## 2.4 ## 2.4
### Breaking changes ### Breaking changes


+ 6
- 2
emacs.d/use-package/README.md View File

@ -376,8 +376,12 @@ The documentation string is not mandatory.
**NOTE**: these are only for people who wish to keep customizations with their **NOTE**: these are only for people who wish to keep customizations with their
accompanying use-package declarations. Functionally, the only benefit over accompanying use-package declarations. Functionally, the only benefit over
using `setq` in a `:config` block is that customizations might execute code using `setq` in a `:config` block is that customizations might execute code
when values are assigned. If you currently use `M-x customize-option` and save
to a settings file, you do not want to use this option.
when values are assigned.
**NOTE**: The customized values are **not** saved in the Emacs `custom-file`.
Thus you should either use the `:custom` option **or** you should use `M-x
customize-option` which will save customized values in the Emacs `custom-file`.
Do not use both.
### Customizing faces ### Customizing faces


+ 8
- 5
emacs.d/use-package/bind-key.el View File

@ -154,11 +154,13 @@ spelled-out keystrokes, e.g., \"C-c C-z\". See documentation of
COMMAND must be an interactive function or lambda form. COMMAND must be an interactive function or lambda form.
KEYMAP, if present, should be a keymap and not a quoted 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)
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.
Emacs can evaluate this form at any time that it does redisplay Emacs can evaluate this form at any time that it does redisplay
@ -171,10 +173,11 @@ can safely be called at any time."
`(let* ((,namevar ,key-name) `(let* ((,namevar ,key-name)
(,keyvar (if (vectorp ,namevar) ,namevar (,keyvar (if (vectorp ,namevar) ,namevar
(read-kbd-macro ,namevar))) (read-kbd-macro ,namevar)))
(kmap (if (and ,keymap (symbolp ,keymap)) (symbol-value ,keymap) ,keymap))
(,kdescvar (cons (if (stringp ,namevar) ,namevar (,kdescvar (cons (if (stringp ,namevar) ,namevar
(key-description ,namevar)) (key-description ,namevar))
(quote ,keymap)))
(,bindingvar (lookup-key (or ,keymap global-map) ,keyvar)))
(if (symbolp ,keymap) ,keymap (quote ,keymap))))
(,bindingvar (lookup-key (or kmap global-map) ,keyvar)))
(let ((entry (assoc ,kdescvar personal-keybindings)) (let ((entry (assoc ,kdescvar personal-keybindings))
(details (list ,command (details (list ,command
(unless (numberp ,bindingvar) (unless (numberp ,bindingvar)
@ -183,11 +186,11 @@ 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 ,keymap global-map) ,keyvar
`(define-key (or kmap global-map) ,keyvar
'(menu-item "" nil :filter (lambda (&optional _) '(menu-item "" nil :filter (lambda (&optional _)
(when ,predicate (when ,predicate
,command)))) ,command))))
`(define-key (or ,keymap global-map) ,keyvar ,command)))))
`(define-key (or kmap global-map) ,keyvar ,command)))))
;;;###autoload ;;;###autoload
(defmacro unbind-key (key-name &optional keymap) (defmacro unbind-key (key-name &optional keymap)


+ 2
- 2
emacs.d/use-package/default.mk View File

@ -63,9 +63,9 @@ ELGS =
## Versions ########################################################## ## Versions ##########################################################
VERSION = 2.4
VERSION = 2.4.1
USE_PACKAGE_VERSION = 2.4
USE_PACKAGE_VERSION = 2.4.1
EMACS_VERSION = 24.3 EMACS_VERSION = 24.3


+ 8
- 4
emacs.d/use-package/use-package-core.el View File

@ -6,7 +6,7 @@
;; Maintainer: John Wiegley <johnw@newartisans.com> ;; Maintainer: John Wiegley <johnw@newartisans.com>
;; Created: 17 Jun 2012 ;; Created: 17 Jun 2012
;; Modified: 29 Nov 2017 ;; Modified: 29 Nov 2017
;; Version: 2.4
;; Version: 2.4.1
;; Package-Requires: ((emacs "24.3")) ;; Package-Requires: ((emacs "24.3"))
;; Keywords: dotemacs startup speed config package ;; Keywords: dotemacs startup speed config package
;; URL: https://github.com/jwiegley/use-package ;; URL: https://github.com/jwiegley/use-package
@ -56,7 +56,7 @@
"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"
(defconst use-package-version "2.4.1"
"This version of use-package.") "This version of use-package.")
(defcustom use-package-keywords (defcustom use-package-keywords
@ -1394,7 +1394,9 @@ 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)))
`(customize-set-variable (quote ,variable) ,value ,comment)))
`(funcall (or (get (quote ,variable) 'custom-set) #'set-default)
(quote ,variable)
,value)))
args) args)
(use-package-process-keywords name rest state))) (use-package-process-keywords name rest state)))
@ -1561,7 +1563,9 @@ 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 `customize-set-variable' with each variable definition.
:custom Call `custom-set' or `set-default' with each variable
definition without modifying the Emacs `custom-file'.
(compare with `custom-set-variables').
:custom-face Call `customize-set-faces' with each face definition. :custom-face Call `customize-set-faces' with each face definition.
:ensure Loads the package using package.el if necessary. :ensure Loads the package using package.el if necessary.
:pin Pin the package to an archive." :pin Pin the package to an archive."


+ 17
- 1
emacs.d/use-package/use-package-tests.el View File

@ -1133,7 +1133,11 @@
(match-expansion (match-expansion
(use-package foo :custom (foo bar)) (use-package foo :custom (foo bar))
`(progn `(progn
(customize-set-variable 'foo bar "Customized with use-package foo")
(funcall
(or
(get 'foo 'custom-set)
(function set-default))
'foo bar)
(require 'foo nil nil)))) (require 'foo nil nil))))
(ert-deftest use-package-test/:custom-face-1 () (ert-deftest use-package-test/:custom-face-1 ()
@ -1936,6 +1940,18 @@
(define-prefix-command 'my/map) (define-prefix-command 'my/map)
(bind-key "<f1>" 'my/map nil nil)))) (bind-key "<f1>" 'my/map nil nil))))
(ert-deftest bind-key/845 ()
(defvar test-map (make-keymap))
(bind-key "<f1>" 'ignore 'test-map)
(should (eq (lookup-key test-map (kbd "<f1>")) 'ignore))
(let ((binding (cl-find "<f1>" personal-keybindings :test 'string= :key 'caar)))
(message "test-map %s" test-map)
(message "binding %s" binding)
(should (eq (cdar binding) 'test-map))
(should (eq (nth 1 binding) 'ignore))
(should (eq (nth 2 binding) nil))))
;; Local Variables: ;; Local Variables:
;; indent-tabs-mode: nil ;; indent-tabs-mode: nil
;; no-byte-compile: t ;; no-byte-compile: t


+ 1
- 1
emacs.d/use-package/use-package.el View File

@ -6,7 +6,7 @@
;; Maintainer: John Wiegley <johnw@newartisans.com> ;; Maintainer: John Wiegley <johnw@newartisans.com>
;; Created: 17 Jun 2012 ;; Created: 17 Jun 2012
;; Modified: 29 Nov 2017 ;; Modified: 29 Nov 2017
;; Version: 2.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
;; URL: https://github.com/jwiegley/use-package ;; URL: https://github.com/jwiegley/use-package


+ 2
- 2
emacs.d/use-package/use-package.org View File

@ -11,7 +11,7 @@
#+TEXINFO_DIR_CATEGORY: Emacs #+TEXINFO_DIR_CATEGORY: Emacs
#+TEXINFO_DIR_TITLE: use-package: (use-package). #+TEXINFO_DIR_TITLE: use-package: (use-package).
#+TEXINFO_DIR_DESC: Declarative package configuration for Emacs. #+TEXINFO_DIR_DESC: Declarative package configuration for Emacs.
#+SUBTITLE: for version 2.4
#+SUBTITLE: for version 2.4.1
#+TEXINFO_DEFFN: t #+TEXINFO_DEFFN: t
#+OPTIONS: H:4 num:3 toc:2 creator:t #+OPTIONS: H:4 num:3 toc:2 creator:t
@ -171,7 +171,7 @@ doing so, to make sure you are not using an outdated value for ~load-path~.
should display something like should display something like
#+BEGIN_EXAMPLE #+BEGIN_EXAMPLE
use-package-version’s value is "2.4"
use-package-version’s value is "2.4.1"
#+END_EXAMPLE #+END_EXAMPLE
If you are completely new to use-package then see {{{link-jump(Getting If you are completely new to use-package then see {{{link-jump(Getting


+ 2
- 2
emacs.d/use-package/use-package.texi View File

@ -30,7 +30,7 @@ General Public License for more details.
@finalout @finalout
@titlepage @titlepage
@title use-package User Manual @title use-package User Manual
@subtitle for version 2.4
@subtitle for version 2.4.1
@author John Wiegley @author John Wiegley
@page @page
@vskip 0pt plus 1filll @vskip 0pt plus 1filll
@ -262,7 +262,7 @@ C-h v use-package-version RET
should display something like should display something like
@example @example
use-package-version’s value is "2.4"
use-package-version’s value is "2.4.1"
@end example @end example
If you are completely new to use-package then see @ref{Getting Started}. If you are completely new to use-package then see @ref{Getting Started}.


+ 92
- 0
emacs.d/vendor/emacs_27_obsolete.el View File

@ -0,0 +1,92 @@
(defun make-obsolete (obsolete-name current-name &optional when)
"Make the byte-compiler warn that function OBSOLETE-NAME is obsolete.
OBSOLETE-NAME should be a function name or macro name (a symbol).
The warning will say that CURRENT-NAME should be used instead.
If CURRENT-NAME is a string, that is the `use instead' message
\(it should end with a period, and not start with a capital).
WHEN should be a string indicating when the function
was first made obsolete, for example a date or a release number."
(declare (advertised-calling-convention
;; New code should always provide the `when' argument.
(obsolete-name current-name when) "23.1"))
(put obsolete-name 'byte-obsolete-info
;; The second entry used to hold the `byte-compile' handler, but
;; is not used any more nowadays.
(purecopy (list current-name nil when)))
obsolete-name)
(defmacro define-obsolete-function-alias (obsolete-name current-name
&optional when docstring)
"Set OBSOLETE-NAME's function definition to CURRENT-NAME and mark it obsolete.
\(define-obsolete-function-alias \\='old-fun \\='new-fun \"22.1\" \"old-fun's doc.\")
is equivalent to the following two lines of code:
\(defalias \\='old-fun \\='new-fun \"old-fun's doc.\")
\(make-obsolete \\='old-fun \\='new-fun \"22.1\")
WHEN should be a string indicating when the function was first
made obsolete, for example a date or a release number.
See the docstrings of `defalias' and `make-obsolete' for more details."
(declare (doc-string 4)
(advertised-calling-convention
;; New code should always provide the `when' argument.
(obsolete-name current-name when &optional docstring) "23.1"))
`(progn
(defalias ,obsolete-name ,current-name ,docstring)
(make-obsolete ,obsolete-name ,current-name ,when)))
(defun make-obsolete-variable (obsolete-name current-name &optional when access-type)
"Make the byte-compiler warn that OBSOLETE-NAME is obsolete.
The warning will say that CURRENT-NAME should be used instead.
If CURRENT-NAME is a string, that is the `use instead' message.
WHEN should be a string indicating when the variable
was first made obsolete, for example a date or a release number.
ACCESS-TYPE if non-nil should specify the kind of access that will trigger
obsolescence warnings; it can be either `get' or `set'."
(declare (advertised-calling-convention
;; New code should always provide the `when' argument.
(obsolete-name current-name when &optional access-type) "23.1"))
(put obsolete-name 'byte-obsolete-variable
(purecopy (list current-name access-type when)))
obsolete-name)
(defmacro define-obsolete-variable-alias (obsolete-name current-name
&optional when docstring)
"Make OBSOLETE-NAME a variable alias for CURRENT-NAME and mark it obsolete.
This uses `defvaralias' and `make-obsolete-variable' (which see).
See the Info node `(elisp)Variable Aliases' for more details.
If CURRENT-NAME is a defcustom or a defvar (more generally, any variable
where OBSOLETE-NAME may be set, e.g. in an init file, before the
alias is defined), then the define-obsolete-variable-alias
statement should be evaluated before the defcustom, if user
customizations are to be respected. The simplest way to achieve
this is to place the alias statement before the defcustom (this
is not necessary for aliases that are autoloaded, or in files
dumped with Emacs). This is so that any user customizations are
applied before the defcustom tries to initialize the
variable (this is due to the way `defvaralias' works).
WHEN should be a string indicating when the variable was first
made obsolete, for example a date or a release number.
For the benefit of Customize, if OBSOLETE-NAME has
any of the following properties, they are copied to
CURRENT-NAME, if it does not already have them:
`saved-value', `saved-variable-comment'."
(declare (doc-string 4)
(advertised-calling-convention
;; New code should always provide the `when' argument.
(obsolete-name current-name when &optional docstring) "23.1"))
`(progn
(defvaralias ,obsolete-name ,current-name ,docstring)
;; See Bug#4706.
(dolist (prop '(saved-value saved-variable-comment))
(and (get ,obsolete-name prop)
(null (get ,current-name prop))
(put ,current-name prop (get ,obsolete-name prop))))
(make-obsolete-variable ,obsolete-name ,current-name ,when)))

+ 2
- 2
gitconfig View File

@ -1,7 +1,7 @@
[user] [user]
name = brettlangdon name = brettlangdon
email = brett.langdon@datadoghq.com
signingkey = E6600FB894DB3D19
email = me@brett.is
signingkey = A70042D88B95AA2B
[credential] [credential]
helper = store helper = store


+ 5
- 0
zshrc.d/.env.zsh View File

@ -42,7 +42,12 @@ PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH:$HOME/.local/bin"
PATH="$PATH:/usr/local/go/bin:$GOPATH/bin" PATH="$PATH:/usr/local/go/bin:$GOPATH/bin"
PATH="/usr/local/heroku/bin:$PATH" PATH="/usr/local/heroku/bin:$PATH"
PATH="/usr/local/opt/python/libexec/bin:$PATH" PATH="/usr/local/opt/python/libexec/bin:$PATH"
PATH="/usr/local/opt/sqlite/bin:$PATH"
PATH="$HOME/.cargo/bin:$PATH" PATH="$HOME/.cargo/bin:$PATH"
PATH="/usr/local/opt/python@3.8/libexec/bin:$PATH"
PATH="~/.local/bin:/usr/local/bin:/usr/local/sbin:/sbin:$PATH"
PATH="$PATH:/usr/local/go/bin:$GOPATH/bin"
PATH="$HOME/.poetry/bin:$PATH"
export PATH="$HOME/.rvm/bin:$PATH" export PATH="$HOME/.rvm/bin:$PATH"
export MANPATH="/usr/local/opt/coreutils/libexec/gnuman:$MANPATH" export MANPATH="/usr/local/opt/coreutils/libexec/gnuman:$MANPATH"


Loading…
Cancel
Save