Update elpa packages

Also remove obsolete configuration for `git-commit` package.
This commit is contained in:
Daniel Borchmann 2024-06-10 18:09:40 +02:00
parent 03f856ce49
commit 5d561c0e1d
No known key found for this signature in database
GPG Key ID: 784AA8DF0CCDF625
9 changed files with 125 additions and 88 deletions

View File

@ -50,15 +50,13 @@ 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, disable it.
disable it.
If called from Lisp, toggle the mode if ARG is `toggle'. If called from Lisp, toggle the mode if ARG is `toggle'.
Enable the mode if ARG is nil, omitted, or is a positive number. Enable the mode if ARG is nil, omitted, or is a positive number.
Disable the mode if ARG is a negative number. Disable the mode if ARG is a negative number.
Dash-Fontify mode is enabled in all buffers where `dash--turn-on-fontify-mode' Dash-Fontify mode is enabled in all buffers where `dash--turn-on-fontify-mode' would do it.
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.
@ -67,6 +65,7 @@ See `dash-fontify-mode' for more information on Dash-Fontify mode.
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) 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-"))
;;; End of scraped data ;;; End of scraped data

View File

@ -1,6 +1,6 @@
(define-package "dash" "20240103.1301" "A modern list library for Emacs" (define-package "dash" "20240510.1327" "A modern list library for Emacs"
'((emacs "24")) '((emacs "24"))
:commit "e32a70ca636bad42232b6c79f1491dc86802a721" :authors :commit "1de9dcb83eacfb162b6d9a118a4770b1281bcd84" :authors
'(("Magnar Sveen" . "magnars@gmail.com")) '(("Magnar Sveen" . "magnars@gmail.com"))
:maintainers :maintainers
'(("Magnar Sveen" . "magnars@gmail.com")) '(("Magnar Sveen" . "magnars@gmail.com"))

View File

@ -2108,7 +2108,7 @@ last item in second form, etc."
Insert X at the position signified by the symbol `it' in the first Insert X at the position signified by the symbol `it' in the first
form. If there are more forms, insert the first form at the position form. If there are more forms, insert the first form at the position
signified by `it' in in second form, etc." signified by `it' in the second form, etc."
(declare (debug (form body))) (declare (debug (form body)))
`(-as-> ,x it ,@forms)) `(-as-> ,x it ,@forms))
@ -3298,6 +3298,8 @@ Return the sorted list. LIST is NOT modified by side effects.
COMPARATOR is called with two elements of LIST, and should return non-nil COMPARATOR is called with two elements of LIST, and should return non-nil
if the first element should sort before the second." if the first element should sort before the second."
(declare (important-return-value t)) (declare (important-return-value t))
;; Not yet worth changing to (sort list :lessp comparator);
;; still seems as fast or slightly faster.
(sort (copy-sequence list) comparator)) (sort (copy-sequence list) comparator))
(defmacro --sort (form list) (defmacro --sort (form list)

View File

@ -2427,7 +2427,7 @@ readability.
Insert X at the position signified by the symbol it in the first Insert X at the position signified by the symbol it in the first
form. If there are more forms, insert the first form at the form. If there are more forms, insert the first form at the
position signified by it in in second form, etc. position signified by it in the second form, etc.
(--> "def" (concat "abc" it "ghi")) (--> "def" (concat "abc" it "ghi"))
⇒ "abcdefghi" ⇒ "abcdefghi"
@ -4892,53 +4892,53 @@ Node: Threading macros84441
Ref: ->84666 Ref: ->84666
Ref: ->>85154 Ref: ->>85154
Ref: -->85657 Ref: -->85657
Ref: -as->86213 Ref: -as->86214
Ref: -some->86667 Ref: -some->86668
Ref: -some->>87052 Ref: -some->>87053
Ref: -some-->87499 Ref: -some-->87500
Ref: -doto88066 Ref: -doto88067
Node: Binding88619 Node: Binding88620
Ref: -when-let88826 Ref: -when-let88827
Ref: -when-let*89287 Ref: -when-let*89288
Ref: -if-let89816 Ref: -if-let89817
Ref: -if-let*90182 Ref: -if-let*90183
Ref: -let90805 Ref: -let90806
Ref: -let*96895 Ref: -let*96896
Ref: -lambda97832 Ref: -lambda97833
Ref: -setq98638 Ref: -setq98639
Node: Side effects99439 Node: Side effects99440
Ref: -each99633 Ref: -each99634
Ref: -each-while100160 Ref: -each-while100161
Ref: -each-indexed100780 Ref: -each-indexed100781
Ref: -each-r101372 Ref: -each-r101373
Ref: -each-r-while101814 Ref: -each-r-while101815
Ref: -dotimes102458 Ref: -dotimes102459
Node: Destructive operations103011 Node: Destructive operations103012
Ref: !cons103229 Ref: !cons103230
Ref: !cdr103433 Ref: !cdr103434
Node: Function combinators103626 Node: Function combinators103627
Ref: -partial103830 Ref: -partial103831
Ref: -rpartial104348 Ref: -rpartial104349
Ref: -juxt104996 Ref: -juxt104997
Ref: -compose105448 Ref: -compose105449
Ref: -applify106055 Ref: -applify106056
Ref: -on106485 Ref: -on106486
Ref: -flip107257 Ref: -flip107258
Ref: -rotate-args107781 Ref: -rotate-args107782
Ref: -const108410 Ref: -const108411
Ref: -cut108752 Ref: -cut108753
Ref: -not109232 Ref: -not109233
Ref: -orfn109776 Ref: -orfn109777
Ref: -andfn110569 Ref: -andfn110570
Ref: -iteratefn111356 Ref: -iteratefn111357
Ref: -fixfn112058 Ref: -fixfn112059
Ref: -prodfn113632 Ref: -prodfn113633
Node: Development114783 Node: Development114784
Node: Contribute115072 Node: Contribute115073
Node: Contributors116084 Node: Contributors116085
Node: FDL118177 Node: FDL118178
Node: GPL143497 Node: GPL143498
Node: Index181246 Node: Index181247
 
End Tag Table End Tag Table

View File

@ -1,7 +1,6 @@
(define-package "exec-path-from-shell" "2.1" "Get environment variables such as $PATH from the shell" (define-package "exec-path-from-shell" "2.2" "Get environment variables such as $PATH from the shell"
'((emacs "24.1") '((emacs "24.4"))
(cl-lib "0.6")) :commit "72ede29a0e0467b3b433e8edbee3c79bab005884" :authors
:commit "03fc0a38af9e396c98f5a30c392cf757b3a34feb" :authors
'(("Steve Purcell" . "steve@sanityinc.com")) '(("Steve Purcell" . "steve@sanityinc.com"))
:maintainers :maintainers
'(("Steve Purcell" . "steve@sanityinc.com")) '(("Steve Purcell" . "steve@sanityinc.com"))

View File

@ -5,8 +5,8 @@
;; 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: 2.1 ;; Package-Version: 2.2
;; Package-Requires: ((emacs "24.1") (cl-lib "0.6")) ;; Package-Requires: ((emacs "24.4"))
;; This file is not part of GNU Emacs. ;; This file is not part of GNU Emacs.
@ -76,6 +76,7 @@
;; Satisfy the byte compiler ;; Satisfy the byte compiler
(eval-when-compile (require 'eshell)) (eval-when-compile (require 'eshell))
(require 'cl-lib) (require 'cl-lib)
(require 'json)
(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."
@ -135,9 +136,13 @@ The default value denotes an interactive login shell."
(when exec-path-from-shell-debug (when exec-path-from-shell-debug
(apply 'message msg args))) (apply 'message msg args)))
(defun exec-path-from-shell--nushell-p (shell)
"Return non-nil if SHELL is nu."
(string-match-p "nu$" 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\\|nu\\|t?csh\\)$" shell))) (not (string-match-p "\\(fish\\|nu\\|t?csh\\)$" shell)))
(defmacro exec-path-from-shell--warn-duration (&rest body) (defmacro exec-path-from-shell--warn-duration (&rest body)
"Evaluate BODY and warn if execution duration exceeds a time limit. "Evaluate BODY and warn if execution duration exceeds a time limit.
@ -166,7 +171,7 @@ in place of any % placeholders in STR. ARGS are not automatically
shell-escaped, so they may contain $ etc." shell-escaped, so they may contain $ etc."
(let* ((printf-bin (or (executable-find "printf") "printf")) (let* ((printf-bin (or (executable-find "printf") "printf"))
(printf-command (printf-command
(concat printf-bin (concat (shell-quote-argument printf-bin)
" '__RESULT\\000" str "\\000__RESULT' " " '__RESULT\\000" str "\\000__RESULT' "
(mapconcat #'exec-path-from-shell--double-quote args " "))) (mapconcat #'exec-path-from-shell--double-quote args " ")))
(shell (exec-path-from-shell--shell)) (shell (exec-path-from-shell--shell))
@ -188,6 +193,44 @@ shell-escaped, so they may contain $ etc."
(match-string 1) (match-string 1)
(error "Expected printf output from shell, but got: %S" (buffer-string)))))) (error "Expected printf output from shell, but got: %S" (buffer-string))))))
(defun exec-path-from-shell-getenvs--nushell (names)
"Use nushell to get the value of env vars with the given NAMES.
Execute the shell according to `exec-path-from-shell-arguments'.
The result is a list of (NAME . VALUE) pairs."
(let* ((shell (exec-path-from-shell--shell))
(expr (format "[ %s ] | to json"
(string-join
(mapcar (lambda (name)
(format "$env.%s?" (exec-path-from-shell--double-quote name)))
names)
", ")))
(shell-args (append exec-path-from-shell-arguments (list "-c" expr))))
(with-temp-buffer
(exec-path-from-shell--debug "Invoking shell %s with args %S" shell 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))
(unless (zerop exit-code)
(error "Non-zero exit code from shell %s invoked with args %S. Output was:\n%S"
shell shell-args (buffer-string))))
(goto-char (point-min))
(let ((json-array-type 'list)
(json-null :null))
(let ((values (json-read-array))
result)
(while values
(let ((value (car values)))
(push (cons (car names)
(unless (eq :null value)
(if (listp value)
(string-join value path-separator)
value)))
result))
(setq values (cdr values)
names (cdr names)))
result)))))
(defun exec-path-from-shell-getenvs (names) (defun exec-path-from-shell-getenvs (names)
"Get the environment variables with NAMES from the user's shell. "Get the environment variables with NAMES from the user's shell.
@ -195,22 +238,24 @@ 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) (when (file-remote-p default-directory)
(error "You cannot run exec-path-from-shell from a remote buffer (Tramp, etc.)")) (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)))) (if (exec-path-from-shell--nushell-p (exec-path-from-shell--shell))
(dollar-names (mapcar (lambda (n) (format "${%s-%s}" n random-default)) names)) (exec-path-from-shell-getenvs--nushell names)
(values (split-string (exec-path-from-shell-printf (let* ((random-default (md5 (format "%s%s%s" (emacs-pid) (random) (current-time))))
(mapconcat #'identity (make-list (length names) "%s") "\\000") (dollar-names (mapcar (lambda (n) (format "${%s-%s}" n random-default)) names))
dollar-names) "\0"))) (values (split-string (exec-path-from-shell-printf
(let (result) (mapconcat #'identity (make-list (length names) "%s") "\\000")
(while names dollar-names) "\0")))
(prog1 (let (result)
(let ((value (car values))) (while names
(push (cons (car names) (prog1
(unless (string-equal random-default value) (let ((value (car values)))
value)) (push (cons (car names)
result)) (unless (string-equal random-default value)
(setq values (cdr values) value))
names (cdr names)))) result))
result))) (setq values (cdr values)
names (cdr names))))
result))))
(defun exec-path-from-shell-getenv (name) (defun exec-path-from-shell-getenv (name)
"Get the environment variable NAME from the user's shell. "Get the environment variable NAME from the user's shell.

10
init.el
View File

@ -1372,15 +1372,7 @@ Note that this workaround is incomplete, as explained in this comment."
:commands (global-git-commit-mode) :commands (global-git-commit-mode)
:ensure t :ensure t
:init (setq git-commit-style-convention-checks '(non-empty-second-line :init (setq git-commit-style-convention-checks '(non-empty-second-line
overlong-summary-line) overlong-summary-line))
git-commit-known-pseudo-headers '("Signed-off-by"
"Acked-by"
"Modified-by"
"Cc"
"Suggested-by"
"Reported-by"
"Tested-by"
"Reviewed-by"))
:config (add-hook 'git-commit-mode-hook :config (add-hook 'git-commit-mode-hook
#'(lambda () #'(lambda ()
(setq fill-column 72)))) (setq fill-column 72))))