From 357cf7e8a604c1e6eb375b45320bb9999a1d6159 Mon Sep 17 00:00:00 2001 From: Andreas Gerler Date: Tue, 28 Aug 2018 19:52:56 +0200 Subject: [PATCH] Update magit-popup to 20180509.1041 Signed-off-by: Andreas Gerler --- .../magit-popup-autoloads.el | 16 --- .../magit-popup-pkg.el | 9 -- .../dir | 0 .../magit-popup-autoloads.el | 26 +++++ .../magit-popup-pkg.el | 10 ++ .../magit-popup.el | 99 +++++++++++++------ .../magit-popup.info | 66 +++++++++---- 7 files changed, 153 insertions(+), 73 deletions(-) delete mode 100644 elpa/magit-popup-20171121.1110/magit-popup-autoloads.el delete mode 100644 elpa/magit-popup-20171121.1110/magit-popup-pkg.el rename elpa/{magit-popup-20171121.1110 => magit-popup-20180509.1041}/dir (100%) create mode 100644 elpa/magit-popup-20180509.1041/magit-popup-autoloads.el create mode 100644 elpa/magit-popup-20180509.1041/magit-popup-pkg.el rename elpa/{magit-popup-20171121.1110 => magit-popup-20180509.1041}/magit-popup.el (94%) rename elpa/{magit-popup-20171121.1110 => magit-popup-20180509.1041}/magit-popup.info (91%) diff --git a/elpa/magit-popup-20171121.1110/magit-popup-autoloads.el b/elpa/magit-popup-20171121.1110/magit-popup-autoloads.el deleted file mode 100644 index 7283367b..00000000 --- a/elpa/magit-popup-20171121.1110/magit-popup-autoloads.el +++ /dev/null @@ -1,16 +0,0 @@ -;;; magit-popup-autoloads.el --- automatically extracted autoloads -;; -;;; Code: -(add-to-list 'load-path (directory-file-name (or (file-name-directory #$) (car load-path)))) - -;;;### (autoloads nil nil ("magit-popup-pkg.el" "magit-popup.el") -;;;;;; (23082 53687 368743 885000)) - -;;;*** - -;; Local Variables: -;; version-control: never -;; no-byte-compile: t -;; no-update-autoloads: t -;; End: -;;; magit-popup-autoloads.el ends here diff --git a/elpa/magit-popup-20171121.1110/magit-popup-pkg.el b/elpa/magit-popup-20171121.1110/magit-popup-pkg.el deleted file mode 100644 index 527aa3e9..00000000 --- a/elpa/magit-popup-20171121.1110/magit-popup-pkg.el +++ /dev/null @@ -1,9 +0,0 @@ -(define-package "magit-popup" "20171121.1110" "Define prefix-infix-suffix command combos" - '((emacs "24.4") - (async "1.9.2") - (dash "2.13.0")) - :url "https://github.com/magit/magit-popup" :keywords - '("bindings")) -;; Local Variables: -;; no-byte-compile: t -;; End: diff --git a/elpa/magit-popup-20171121.1110/dir b/elpa/magit-popup-20180509.1041/dir similarity index 100% rename from elpa/magit-popup-20171121.1110/dir rename to elpa/magit-popup-20180509.1041/dir diff --git a/elpa/magit-popup-20180509.1041/magit-popup-autoloads.el b/elpa/magit-popup-20180509.1041/magit-popup-autoloads.el new file mode 100644 index 00000000..e6e027b2 --- /dev/null +++ b/elpa/magit-popup-20180509.1041/magit-popup-autoloads.el @@ -0,0 +1,26 @@ +;;; magit-popup-autoloads.el --- automatically extracted autoloads +;; +;;; Code: + +(add-to-list 'load-path (directory-file-name + (or (file-name-directory #$) (car load-path)))) + + +;;;### (autoloads nil "magit-popup" "magit-popup.el" (0 0 0 0)) +;;; Generated autoloads from magit-popup.el + +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "magit-popup" '("magit-"))) + +;;;*** + +;;;### (autoloads nil nil ("magit-popup-pkg.el") (0 0 0 0)) + +;;;*** + +;; Local Variables: +;; version-control: never +;; no-byte-compile: t +;; no-update-autoloads: t +;; coding: utf-8 +;; End: +;;; magit-popup-autoloads.el ends here diff --git a/elpa/magit-popup-20180509.1041/magit-popup-pkg.el b/elpa/magit-popup-20180509.1041/magit-popup-pkg.el new file mode 100644 index 00000000..76fc98c0 --- /dev/null +++ b/elpa/magit-popup-20180509.1041/magit-popup-pkg.el @@ -0,0 +1,10 @@ +(define-package "magit-popup" "20180509.1041" "Define prefix-infix-suffix command combos" + '((emacs "24.4") + (async "1.9.2") + (dash "2.13.0")) + :keywords + '("bindings") + :url "https://github.com/magit/magit-popup") +;; Local Variables: +;; no-byte-compile: t +;; End: diff --git a/elpa/magit-popup-20171121.1110/magit-popup.el b/elpa/magit-popup-20180509.1041/magit-popup.el similarity index 94% rename from elpa/magit-popup-20171121.1110/magit-popup.el rename to elpa/magit-popup-20180509.1041/magit-popup.el index 756419b7..5378842d 100644 --- a/elpa/magit-popup-20171121.1110/magit-popup.el +++ b/elpa/magit-popup-20180509.1041/magit-popup.el @@ -1,6 +1,6 @@ ;;; magit-popup.el --- Define prefix-infix-suffix command combos -*- lexical-binding: t -*- -;; Copyright (C) 2010-2017 The Magit Project Contributors +;; Copyright (C) 2010-2018 The Magit Project Contributors ;; ;; You should have received a copy of the AUTHORS.md file which ;; lists all contributors. If not, see http://magit.vc/authors. @@ -487,10 +487,13 @@ usually specified in that order): `SHORTNAME-arguments'. This is usually done by calling the function `SHORTNAME-arguments'. - Members of VALUE may also be strings, assuming the first member - is also a string. Instead of just one action section with the - heading \"Actions\", multiple sections are then inserted into - the popup buffer, using these strings as headings. + Members of VALUE may also be strings and functions, assuming + the first member is a string or function. In that case the + members are split into sections and these special elements are + used as headings. If such an element is a function then it is + called with no arguments and must return either a string, which + is used as the heading, or nil, in which case the section is + not inserted. Members of VALUE may also be nil. This should only be used together with `:max-action-columns' and allows having gaps in @@ -523,11 +526,27 @@ usually specified in that order): is a list whose members have the form (KEY DESC SWITCH), see `magit-define-popup-switch' for details. + Members of VALUE may also be strings and functions, assuming + the first member is a string or function. In that case the + members are split into sections and these special elements are + used as headings. If such an element is a function then it is + called with no arguments and must return either a string, which + is used as the heading, or nil, in which case the section is + not inserted. + `:options' The popup arguments which take a value, as in \"--opt=OPTVAL\". VALUE is a list whose members have the form (KEY DESC OPTION READER), see `magit-define-popup-option' for details. + Members of VALUE may also be strings and functions, assuming + the first member is a string or function. In that case the + members are split into sections and these special elements are + used as headings. If such an element is a function then it is + called with no arguments and must return either a string, which + is used as the heading, or nil, in which case the section is + not inserted. + `:default-arguments' The default arguments, a list of switches (which are then enabled by default) and options with there default values, as @@ -539,6 +558,20 @@ usually specified in that order): whose members have the form (KEY DESC COMMAND FORMATTER), see `magit-define-popup-variable' for details. + Members of VALUE may also be strings and functions, assuming + the first member is a string or function. In that case the + members are split into sections and these special elements are + used as headings. If such an element is a function then it is + called with no arguments and must return either a string, which + is used as the heading, or nil, in which case the section is + not inserted. + + Members of VALUE may also be actions as described above for + `:actions'. + + VALUE may also be a function that returns a list as describe + above. + `:sequence-predicate' When this function returns non-nil, then the popup uses `:sequence-actions' instead of `:actions', and does not show @@ -1196,13 +1229,6 @@ of events shared by all popups and before point is adjusted.") (button-type-get type 'property))))) (maxcols (button-type-get type 'maxcols)) (pred (magit-popup-get :sequence-predicate))) - (if (and pred (funcall pred)) - (setq maxcols nil) - (cl-typecase maxcols - (keyword (setq maxcols (magit-popup-get maxcols))) - (symbol (setq maxcols (symbol-value maxcols))))) - (when (functionp maxcols) - (setq maxcols (funcall maxcols heading))) (when items (if (functionp heading) (when (setq heading (funcall heading)) @@ -1212,6 +1238,13 @@ of events shared by all popups and before point is adjusted.") (insert (propertize heading 'face 'magit-popup-heading)) (unless (string-match "\n$" heading) (insert "\n"))) + (if (and pred (funcall pred)) + (setq maxcols nil) + (cl-typecase maxcols + (keyword (setq maxcols (magit-popup-get maxcols))) + (symbol (setq maxcols (symbol-value maxcols))))) + (when (functionp maxcols) + (setq maxcols (funcall maxcols heading))) (when heading (let ((colwidth (+ (apply 'max (mapcar (lambda (e) (length (car e))) items)) @@ -1263,26 +1296,29 @@ of events shared by all popups and before point is adjusted.") 'type type 'event (magit-popup-event-key ev)))) (defun magit-popup-format-action-button (type ev) - (let* ((dsc (magit-popup-event-dsc ev)) + (let* ((cmd (magit-popup-event-fun ev)) + (dsc (magit-popup-event-dsc ev)) (fun (and (functionp dsc) dsc))) - (when fun - (setq dsc - (-when-let (branch (funcall fun)) - (if (text-property-not-all 0 (length branch) 'face nil branch) - branch - (magit-branch-set-face branch))))) - (when dsc - (list (format-spec - (button-type-get type 'format) - `((?k . ,(propertize (magit-popup-event-keydsc ev) - 'face 'magit-popup-key)) - (?d . ,dsc) - (?D . ,(if (and (not fun) - (eq (magit-popup-event-fun ev) - (magit-popup-get :default-action))) - (propertize dsc 'face 'bold) - dsc)))) - 'type type 'event (magit-popup-event-key ev))))) + (unless (and disabled-command-function + (symbolp cmd) + (get cmd 'disabled)) + (when fun + (setq dsc + (-when-let (branch (funcall fun)) + (if (text-property-not-all 0 (length branch) 'face nil branch) + branch + (magit-branch-set-face branch))))) + (when dsc + (list (format-spec + (button-type-get type 'format) + `((?k . ,(propertize (magit-popup-event-keydsc ev) + 'face 'magit-popup-key)) + (?d . ,dsc) + (?D . ,(if (and (not fun) + (eq cmd (magit-popup-get :default-action))) + (propertize dsc 'face 'bold) + dsc)))) + 'type type 'event (magit-popup-event-key ev)))))) (defun magit-popup-insert-command-section (type spec) (magit-popup-insert-section @@ -1322,6 +1358,7 @@ of events shared by all popups and before point is adjusted.") (font-lock-add-keywords 'emacs-lisp-mode magit-popup-font-lock-keywords) +;;; _ (provide 'magit-popup) ;; Local Variables: ;; indent-tabs-mode: nil diff --git a/elpa/magit-popup-20171121.1110/magit-popup.info b/elpa/magit-popup-20180509.1041/magit-popup.info similarity index 91% rename from elpa/magit-popup-20171121.1110/magit-popup.info rename to elpa/magit-popup-20180509.1041/magit-popup.info index fa8f72f7..e5cae82b 100644 --- a/elpa/magit-popup-20171121.1110/magit-popup.info +++ b/elpa/magit-popup-20180509.1041/magit-popup.info @@ -1,7 +1,7 @@ -This is magit-popup.info, produced by makeinfo version 5.2 from +This is magit-popup.info, produced by makeinfo version 6.1 from magit-popup.texi. - Copyright (C) 2015-2017 Jonas Bernoulli + Copyright (C) 2015-2018 Jonas Bernoulli You can redistribute this document and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -28,9 +28,9 @@ this library implements a similar abstraction; a new kind of prefix command that is associated with a specific set of infix arguments and suffix commands. - This manual is for Magit-Popup version 2.12.0. +This manual is for Magit-Popup version 2.12.2 (v2.12.2-6-gbd04ebd+1). - Copyright (C) 2015-2017 Jonas Bernoulli + Copyright (C) 2015-2018 Jonas Bernoulli You can redistribute this document and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -490,7 +490,7 @@ commands are also defined using that macro, but the actual interactive commands have to be defined separately using plain ‘defun’. -- Macro: magit-define-popup name doc [group [mode [option]]] :keyword - value… + value... This macro defines a popup named NAME. The NAME should begin with the package prefix and by convention end with ‘-popup’, it is used @@ -546,11 +546,13 @@ commands have to be defined separately using plain ‘defun’. ‘SHORTNAME-arguments’. This is usually done by calling the function ‘SHORTNAME-arguments’. - Members of VALUE may also be strings, assuming the first - member is also a string. Instead of just one action section - with the heading \"Actions\", multiple sections are then - inserted into the popup buffer, using these strings as - headings. + Members of VALUE may also be strings and functions, assuming + the first member is a string or function. In that case the + members are split into sections and these special elements are + used as headings. If such an element is a function then it is + called with no arguments and must return either a string, + which is used as the heading, or nil, in which case the + section is not inserted. Members of VALUE may also be nil. This should only be used together with ‘:max-action-columns’ and allows having gaps in @@ -587,12 +589,28 @@ commands have to be defined separately using plain ‘defun’. a list whose members have the form ‘(KEY DESC SWITCH)’, see ‘magit-define-popup-switch’ for details. + Members of VALUE may also be strings and functions, assuming + the first member is a string or function. In that case the + members are split into sections and these special elements are + used as headings. If such an element is a function then it is + called with no arguments and must return either a string, + which is used as the heading, or nil, in which case the + section is not inserted. + • ‘:options’ The popup arguments which take a value, as in "–opt~OPTVAL". VALUE is a list whose members have the form ‘(KEY DESC OPTION READER)’, see ‘magit-define-popup-option’ for details. + Members of VALUE may also be strings and functions, assuming + the first member is a string or function. In that case the + members are split into sections and these special elements are + used as headings. If such an element is a function then it is + called with no arguments and must return either a string, + which is used as the heading, or nil, in which case the + section is not inserted. + • ‘:default-arguments’ The default arguments, a list of switches (which are then @@ -605,6 +623,20 @@ commands have to be defined separately using plain ‘defun’. list whose members have the form ‘(KEY DESC COMMAND FORMATTER)’, see ‘magit-define-popup-variable’ for details. + Members of VALUE may also be strings and functions, assuming + the first member is a string or function. In that case the + members are split into sections and these special elements are + used as headings. If such an element is a function then it is + called with no arguments and must return either a string, + which is used as the heading, or nil, in which case the + section is not inserted. + + Members of VALUE may also be actions as described above for + ‘:actions’. + + VALUE may also be a function that returns a list as describe + above. + • ‘:sequence-predicate’ When this function returns non-nil, then the popup uses @@ -692,13 +724,13 @@ directly.  Tag Table: Node: Top768 -Node: Introduction1995 -Node: Usage4694 -Node: Customizing Existing Popups9391 -Node: Other Options15137 -Node: Defining Prefix and Suffix Commands16680 -Node: Defining Prefix Commands18832 -Node: Defining Suffix Commands25807 +Node: Introduction2013 +Node: Usage4712 +Node: Customizing Existing Popups9409 +Node: Other Options15155 +Node: Defining Prefix and Suffix Commands16698 +Node: Defining Prefix Commands18850 +Node: Defining Suffix Commands27548  End Tag Table -- 2.47.3