From 2cffce5664c70c9237667999f8aab26534d77869 Mon Sep 17 00:00:00 2001 From: Daniel Borchmann Date: Fri, 12 Apr 2019 11:10:59 +0200 Subject: [PATCH] [ELPA] Update --- .gitignore | 1 + .../dash-autoloads.el | 0 .../dash-pkg.el | 2 +- .../dash.el | 38 ++++-- .../hydra-autoloads.el | 0 .../hydra-examples.el | 0 .../hydra-ox.el | 0 .../hydra-pkg.el | 2 +- .../hydra.el | 8 +- elpa/lv-20181110.1740/lv-autoloads.el | 22 ++++ elpa/lv-20181110.1740/lv-pkg.el | 2 + elpa/lv-20181110.1740/lv.el | 121 ++++++++++++++++++ 12 files changed, 181 insertions(+), 15 deletions(-) rename elpa/{dash-20190320.1406 => dash-20190409.1402}/dash-autoloads.el (100%) rename elpa/{dash-20190320.1406 => dash-20190409.1402}/dash-pkg.el (55%) rename elpa/{dash-20190320.1406 => dash-20190409.1402}/dash.el (98%) rename elpa/{hydra-20190405.1015 => hydra-20190408.1006}/hydra-autoloads.el (100%) rename elpa/{hydra-20190405.1015 => hydra-20190408.1006}/hydra-examples.el (100%) rename elpa/{hydra-20190405.1015 => hydra-20190408.1006}/hydra-ox.el (100%) rename elpa/{hydra-20190405.1015 => hydra-20190408.1006}/hydra-pkg.el (81%) rename elpa/{hydra-20190405.1015 => hydra-20190408.1006}/hydra.el (99%) create mode 100644 elpa/lv-20181110.1740/lv-autoloads.el create mode 100644 elpa/lv-20181110.1740/lv-pkg.el create mode 100644 elpa/lv-20181110.1740/lv.el diff --git a/.gitignore b/.gitignore index d331324..341976c 100644 --- a/.gitignore +++ b/.gitignore @@ -16,6 +16,7 @@ !/elpa/page-break-lines-20* !/elpa/multiple-cursors-20* !/elpa/exec-path-from-shell-20* +!/elpa/lv-20* /emms/ /eshell/history /eshell/lastdir diff --git a/elpa/dash-20190320.1406/dash-autoloads.el b/elpa/dash-20190409.1402/dash-autoloads.el similarity index 100% rename from elpa/dash-20190320.1406/dash-autoloads.el rename to elpa/dash-20190409.1402/dash-autoloads.el diff --git a/elpa/dash-20190320.1406/dash-pkg.el b/elpa/dash-20190409.1402/dash-pkg.el similarity index 55% rename from elpa/dash-20190320.1406/dash-pkg.el rename to elpa/dash-20190409.1402/dash-pkg.el index 8ba45f6..3fa3823 100644 --- a/elpa/dash-20190320.1406/dash-pkg.el +++ b/elpa/dash-20190409.1402/dash-pkg.el @@ -1,2 +1,2 @@ ;;; -*- no-byte-compile: t -*- -(define-package "dash" "20190320.1406" "A modern list library for Emacs" 'nil :commit "677c1561142db89cb151f50ce21f24096ca1a328" :keywords '("lists") :authors '(("Magnar Sveen" . "magnars@gmail.com")) :maintainer '("Magnar Sveen" . "magnars@gmail.com")) +(define-package "dash" "20190409.1402" "A modern list library for Emacs" 'nil :commit "dca7bdcf7919dd3e589e0bb2fa210fcba34ec69a" :keywords '("lists") :authors '(("Magnar Sveen" . "magnars@gmail.com")) :maintainer '("Magnar Sveen" . "magnars@gmail.com")) diff --git a/elpa/dash-20190320.1406/dash.el b/elpa/dash-20190409.1402/dash.el similarity index 98% rename from elpa/dash-20190320.1406/dash.el rename to elpa/dash-20190409.1402/dash.el index 87989dc..120e657 100644 --- a/elpa/dash-20190320.1406/dash.el +++ b/elpa/dash-20190409.1402/dash.el @@ -4,7 +4,7 @@ ;; Author: Magnar Sveen ;; Version: 2.15.0 -;; Package-Version: 20190320.1406 +;; Package-Version: 20190409.1402 ;; Keywords: lists ;; This program is free software; you can redistribute it and/or modify @@ -1653,6 +1653,10 @@ All returned symbols are guaranteed to be unique." (t (cons (list s source) (dash--match-cons-1 match-form s)))))) +(defun dash--get-expand-function (type) + "Get expand function name for TYPE." + (intern (format "dash-expand:%s" type))) + (defun dash--match-cons-1 (match-form source &optional props) "Match MATCH-FORM against SOURCE. @@ -1672,7 +1676,7 @@ SOURCE is a proper or improper list." ((cdr match-form) (cond ((and (symbolp (car match-form)) - (memq (car match-form) '(&keys &plist &alist &hash))) + (functionp (dash--get-expand-function (car match-form)))) (dash--match-kv (dash--match-kv-normalize-match-form match-form) (dash--match-cons-get-cdr skip-cdr source))) ((dash--match-ignore-place-p (car match-form)) (dash--match-cons-1 (cdr match-form) source @@ -1813,6 +1817,25 @@ kv can be any key-value store, such as plist, alist or hash-table." (t (cons (list s source) (dash--match-kv-1 (cdr match-form) s (car match-form))))))) +(defun dash-expand:&hash (key source) + "Generate extracting KEY from SOURCE for &hash destructuring." + `(gethash ,key ,source)) + +(defun dash-expand:&plist (key source) + "Generate extracting KEY from SOURCE for &plist destructuring." + `(plist-get ,source ,key)) + +(defun dash-expand:&alist (key source) + "Generate extracting KEY from SOURCE for &alist destructuring." + `(cdr (assoc ,key ,source))) + +(defun dash-expand:&hash? (key source) + "Generate extracting KEY from SOURCE for &hash? destructuring. +Similar to &hash but check whether the map is not nil." + `(when ,source (gethash ,key ,source))) + +(defalias 'dash-expand:&keys 'dash-expand:&plist) + (defun dash--match-kv-1 (match-form source type) "Match MATCH-FORM against SOURCE of type TYPE. @@ -1830,13 +1853,8 @@ Valid values are &plist, &alist and &hash." (lambda (kv) (let* ((k (car kv)) (v (cadr kv)) - (getter (cond - ((or (eq type '&plist) (eq type '&keys)) - `(plist-get ,source ,k)) - ((eq type '&alist) - `(cdr (assoc ,k ,source))) - ((eq type '&hash) - `(gethash ,k ,source))))) + (getter + (funcall (dash--get-expand-function type) k source))) (cond ((symbolp v) (list (list v getter))) @@ -1869,7 +1887,7 @@ Key-value stores are disambiguated by placing a token &plist, (let ((s (car match-form))) (cons (list s source) (dash--match (cddr match-form) s)))) - ((memq (car match-form) '(&keys &plist &alist &hash)) + ((functionp (dash--get-expand-function (car match-form))) (dash--match-kv (dash--match-kv-normalize-match-form match-form) source)) (t (dash--match-cons match-form source)))) ((vectorp match-form) diff --git a/elpa/hydra-20190405.1015/hydra-autoloads.el b/elpa/hydra-20190408.1006/hydra-autoloads.el similarity index 100% rename from elpa/hydra-20190405.1015/hydra-autoloads.el rename to elpa/hydra-20190408.1006/hydra-autoloads.el diff --git a/elpa/hydra-20190405.1015/hydra-examples.el b/elpa/hydra-20190408.1006/hydra-examples.el similarity index 100% rename from elpa/hydra-20190405.1015/hydra-examples.el rename to elpa/hydra-20190408.1006/hydra-examples.el diff --git a/elpa/hydra-20190405.1015/hydra-ox.el b/elpa/hydra-20190408.1006/hydra-ox.el similarity index 100% rename from elpa/hydra-20190405.1015/hydra-ox.el rename to elpa/hydra-20190408.1006/hydra-ox.el diff --git a/elpa/hydra-20190405.1015/hydra-pkg.el b/elpa/hydra-20190408.1006/hydra-pkg.el similarity index 81% rename from elpa/hydra-20190405.1015/hydra-pkg.el rename to elpa/hydra-20190408.1006/hydra-pkg.el index cda6eb7..102bc25 100644 --- a/elpa/hydra-20190405.1015/hydra-pkg.el +++ b/elpa/hydra-20190408.1006/hydra-pkg.el @@ -1,4 +1,4 @@ -(define-package "hydra" "20190405.1015" "Make bindings that stick around." +(define-package "hydra" "20190408.1006" "Make bindings that stick around." '((cl-lib "0.5") (lv "0")) :keywords diff --git a/elpa/hydra-20190405.1015/hydra.el b/elpa/hydra-20190408.1006/hydra.el similarity index 99% rename from elpa/hydra-20190405.1015/hydra.el rename to elpa/hydra-20190408.1006/hydra.el index 8aca43e..6da21a2 100644 --- a/elpa/hydra-20190405.1015/hydra.el +++ b/elpa/hydra-20190408.1006/hydra.el @@ -235,6 +235,10 @@ the body or the head." (const posframe)) :group 'hydra) +(define-obsolete-variable-alias + 'hydra-lv 'hydra-hint-display-type "0.14.0" + "Use either `hydra-hint-display-type' or `hydra-set-property' :verbosity.") + (defcustom hydra-lv t "When non-nil, `lv-message' (not `message') will be used to display hints." :type 'boolean) @@ -886,9 +890,7 @@ BODY-AFTER-EXIT is added to the end of the wrapper." `(condition-case err ,(hydra--call-interactively cmd (cadr head)) ((quit error) - (message (error-message-string err)) - (unless hydra-lv - (sit-for 0.8))))) + (message (error-message-string err))))) ,(if (and body-idle (eq (cadr head) 'body)) `(hydra-idle-message ,body-idle ,hint ',name) `(hydra-show-hint ,hint ',name)) diff --git a/elpa/lv-20181110.1740/lv-autoloads.el b/elpa/lv-20181110.1740/lv-autoloads.el new file mode 100644 index 0000000..61b1079 --- /dev/null +++ b/elpa/lv-20181110.1740/lv-autoloads.el @@ -0,0 +1,22 @@ +;;; lv-autoloads.el --- automatically extracted autoloads +;; +;;; Code: + +(add-to-list 'load-path (directory-file-name + (or (file-name-directory #$) (car load-path)))) + + +;;;### (autoloads nil "lv" "lv.el" (0 0 0 0)) +;;; Generated autoloads from lv.el + +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "lv" '("lv-"))) + +;;;*** + +;; Local Variables: +;; version-control: never +;; no-byte-compile: t +;; no-update-autoloads: t +;; coding: utf-8 +;; End: +;;; lv-autoloads.el ends here diff --git a/elpa/lv-20181110.1740/lv-pkg.el b/elpa/lv-20181110.1740/lv-pkg.el new file mode 100644 index 0000000..04d2b3b --- /dev/null +++ b/elpa/lv-20181110.1740/lv-pkg.el @@ -0,0 +1,2 @@ +;;; -*- no-byte-compile: t -*- +(define-package "lv" "20181110.1740" "Other echo area" 'nil :commit "480ae6313763a6af6dab85ed629aff2e2037bef0" :authors '(("Oleh Krehel")) :maintainer '("Oleh Krehel")) diff --git a/elpa/lv-20181110.1740/lv.el b/elpa/lv-20181110.1740/lv.el new file mode 100644 index 0000000..504573c --- /dev/null +++ b/elpa/lv-20181110.1740/lv.el @@ -0,0 +1,121 @@ +;;; lv.el --- Other echo area +;; Package-Version: 20181110.1740 + +;; Copyright (C) 2015 Free Software Foundation, Inc. + +;; Author: Oleh Krehel + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: +;; +;; This package provides `lv-message' intended to be used in place of +;; `message' when semi-permanent hints are needed, in order to not +;; interfere with Echo Area. +;; +;; "Я тихо-тихо пiдглядаю, +;; І тiшуся собi, як бачу то, +;; Шо страшить i не пiдпускає, +;; А iншi п’ють тебе, як воду пiсок." +;; -- Андрій Кузьменко, L.V. + +;;; Code: + +(defgroup lv nil + "The other echo area." + :group 'minibuffer + :group 'hydra) + +(defcustom lv-use-separator nil + "Whether to draw a line between the LV window and the Echo Area." + :group 'lv + :type 'boolean) + +(defface lv-separator + '((((class color) (background light)) :background "grey80") + (((class color) (background dark)) :background "grey30")) + "Face used to draw line between the lv window and the echo area. +This is only used if option `lv-use-separator' is non-nil. +Only the background color is significant." + :group 'lv) + +(defvar lv-wnd nil + "Holds the current LV window.") + +(defvar display-line-numbers) + +(defun lv-window () + "Ensure that LV window is live and return it." + (if (window-live-p lv-wnd) + lv-wnd + (let ((ori (selected-window)) + buf) + (prog1 (setq lv-wnd + (select-window + (let ((ignore-window-parameters t)) + (split-window + (frame-root-window) -1 'below)))) + (if (setq buf (get-buffer " *LV*")) + (switch-to-buffer buf) + (switch-to-buffer " *LV*") + (set-window-hscroll lv-wnd 0) + (setq window-size-fixed t) + (setq mode-line-format nil) + (setq cursor-type nil) + (setq display-line-numbers nil) + (set-window-dedicated-p lv-wnd t) + (set-window-parameter lv-wnd 'no-other-window t)) + (select-window ori))))) + +(defvar golden-ratio-mode) + +(defvar lv-force-update nil + "When non-nil, `lv-message' will refresh even for the same string.") + +(defun lv-message (format-string &rest args) + "Set LV window contents to (`format' FORMAT-STRING ARGS)." + (let* ((str (apply #'format format-string args)) + (n-lines (cl-count ?\n str)) + deactivate-mark + golden-ratio-mode) + (with-selected-window (lv-window) + (unless (and (string= (buffer-string) str) + (null lv-force-update)) + (delete-region (point-min) (point-max)) + (insert str) + (when (and (window-system) lv-use-separator) + (unless (looking-back "\n" nil) + (insert "\n")) + (insert + (propertize "__" 'face 'lv-separator 'display '(space :height (1))) + (propertize "\n" 'face 'lv-separator 'line-height t))) + (set (make-local-variable 'window-min-height) n-lines) + (setq truncate-lines (> n-lines 1)) + (let ((window-resize-pixelwise t) + (window-size-fixed nil)) + (fit-window-to-buffer nil nil 1))) + (goto-char (point-min))))) + +(defun lv-delete-window () + "Delete LV window and kill its buffer." + (when (window-live-p lv-wnd) + (let ((buf (window-buffer lv-wnd))) + (delete-window lv-wnd) + (kill-buffer buf)))) + +(provide 'lv) + +;;; lv.el ends here