mirror of
https://github.com/masscollaborationlabs/emacs.git
synced 2025-07-05 03:39:38 +00:00
Merge pull request from npostavs/cleanup
Cleanup GitHub-reference: https://github.com/jwiegley/use-package/issues/57
This commit is contained in:
commit
e367788005
2 changed files with 15 additions and 24 deletions
|
@ -87,11 +87,6 @@
|
||||||
(add-to-list 'emulation-mode-map-alists
|
(add-to-list 'emulation-mode-map-alists
|
||||||
`((override-global-mode . ,override-global-map)))
|
`((override-global-mode . ,override-global-map)))
|
||||||
|
|
||||||
(add-hook 'after-init-hook
|
|
||||||
(function
|
|
||||||
(lambda ()
|
|
||||||
(override-global-mode 1))))
|
|
||||||
|
|
||||||
(defvar personal-keybindings nil)
|
(defvar personal-keybindings nil)
|
||||||
|
|
||||||
(defmacro bind-key (key-name command &optional keymap)
|
(defmacro bind-key (key-name command &optional keymap)
|
||||||
|
|
|
@ -298,9 +298,6 @@
|
||||||
(require 'bytecomp)
|
(require 'bytecomp)
|
||||||
(require 'diminish nil t)
|
(require 'diminish nil t)
|
||||||
|
|
||||||
(eval-when-compile
|
|
||||||
(require 'cl))
|
|
||||||
|
|
||||||
(declare-function package-installed-p 'package)
|
(declare-function package-installed-p 'package)
|
||||||
(declare-function el-get-read-recipe 'el-get)
|
(declare-function el-get-read-recipe 'el-get)
|
||||||
|
|
||||||
|
@ -324,18 +321,18 @@
|
||||||
:group 'use-package)
|
:group 'use-package)
|
||||||
|
|
||||||
(defmacro with-elapsed-timer (text &rest forms)
|
(defmacro with-elapsed-timer (text &rest forms)
|
||||||
`(let ((now ,(if use-package-verbose
|
(let ((body `(progn ,@forms)))
|
||||||
'(current-time))))
|
(if use-package-verbose
|
||||||
,(if use-package-verbose
|
(let ((nowvar (make-symbol "now")))
|
||||||
`(message "%s..." ,text))
|
`(let ((,nowvar (current-time)))
|
||||||
(prog1
|
(message "%s..." ,text)
|
||||||
,@forms
|
(prog1 ,body
|
||||||
,(when use-package-verbose
|
(let ((elapsed
|
||||||
`(let ((elapsed
|
(float-time (time-subtract (current-time) ,nowvar))))
|
||||||
(float-time (time-subtract (current-time) now))))
|
|
||||||
(if (> elapsed ,use-package-minimum-reported-time)
|
(if (> elapsed ,use-package-minimum-reported-time)
|
||||||
(message "%s...done (%.3fs)" ,text elapsed)
|
(message "%s...done (%.3fs)" ,text elapsed)
|
||||||
(message "%s...done" ,text)))))))
|
(message "%s...done" ,text))))))
|
||||||
|
,body)))
|
||||||
|
|
||||||
(put 'with-elapsed-timer 'lisp-indent-function 1)
|
(put 'with-elapsed-timer 'lisp-indent-function 1)
|
||||||
|
|
||||||
|
@ -656,10 +653,9 @@ For full documentation. please see commentary.
|
||||||
`(eval-after-load ,(if (stringp name) name `',name)
|
`(eval-after-load ,(if (stringp name) name `',name)
|
||||||
`(,(lambda ()
|
`(,(lambda ()
|
||||||
(if ,requires-test
|
(if ,requires-test
|
||||||
,(macroexpand-all
|
(with-elapsed-timer
|
||||||
`(with-elapsed-timer
|
|
||||||
,(format "Configuring package %s" name-string)
|
,(format "Configuring package %s" name-string)
|
||||||
,config-body)))))))
|
,config-body))))))
|
||||||
t))
|
t))
|
||||||
`(if (and ,(or predicate t)
|
`(if (and ,(or predicate t)
|
||||||
,requires-test)
|
,requires-test)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue