update packages

This commit is contained in:
2025-06-22 17:08:08 +02:00
parent 54e5633369
commit 16a0a6db93
558 changed files with 68349 additions and 26568 deletions

View File

@@ -1,13 +1,10 @@
(define-package "yasnippet" "20250112.1504" "Yet another snippet extension for Emacs"
;; -*- no-byte-compile: t; lexical-binding: nil -*-
(define-package "yasnippet" "20250602.1342"
"Yet another snippet extension for Emacs."
'((cl-lib "0.5")
(emacs "24.4"))
:commit "03b1b11547eab76851574eadd18e2ad186b2a080" :maintainers
'(("Noam Postavsky" . "npostavs@gmail.com"))
:maintainer
'("Noam Postavsky" . "npostavs@gmail.com")
:keywords
'("convenience" "emulation")
:url "http://github.com/joaotavora/yasnippet")
;; Local Variables:
;; no-byte-compile: t
;; End:
(emacs "24.4"))
:url "http://github.com/joaotavora/yasnippet"
:commit "dd570a6b22364212fff9769cbf4376bdbd7a63c5"
:revdesc "dd570a6b2236"
:keywords '("convenience" "emulation")
:maintainers '(("Noam Postavsky" . "npostavs@gmail.com")))

View File

@@ -5,7 +5,8 @@
;; João Távora <joaotavora@gmail.com>,
;; Noam Postavsky <npostavs@gmail.com>
;; Maintainer: Noam Postavsky <npostavs@gmail.com>
;; Version: 0.14.1
;; Package-Version: 20250602.1342
;; Package-Revision: dd570a6b2236
;; X-URL: http://github.com/joaotavora/yasnippet
;; Keywords: convenience, emulation
;; URL: http://github.com/joaotavora/yasnippet
@@ -588,8 +589,6 @@ can be useful."
;;; Internal variables
(defconst yas--version "0.14.0")
(defvar yas--menu-table (make-hash-table)
"A hash table of MAJOR-MODE symbols to menu keymaps.")
@@ -891,18 +890,10 @@ which decides on the snippet to expand.")
;;;###autoload
(define-minor-mode yas-minor-mode
"Toggle YASnippet mode.
"YASnippet minor mode.
When YASnippet mode is enabled, `yas-expand', normally bound to
the TAB key, expands snippets of code depending on the major
mode.
With no argument, this command toggles the mode.
positive prefix argument turns on the mode.
Negative prefix argument turns off the mode.
Key bindings:
\\{yas-minor-mode-map}"
the TAB key, expands snippets of code depending on the major mode."
:lighter " yas" ;; The indicator for the mode line.
(cond ((and yas-minor-mode (featurep 'yasnippet))
;; Install the direct keymaps in `emulation-mode-map-alists'
@@ -1463,7 +1454,7 @@ Returns (TEMPLATES START END). This function respects
(defun yas--remove-misc-free-from-undo (old-undo-list)
"Tries to work around Emacs Bug#30931.
Helper function for `yas--save-restriction-and-widen'."
;; If Bug#30931 is unfixed, we get (#<Lisp_Misc_Free> . INTEGER)
;; If Bug#30931 is unfixed (Emacs<26.2), we get (#<Lisp_Misc_Free> . INTEGER)
;; entries in the undo list. If we call `type-of' on the
;; Lisp_Misc_Free object then Emacs aborts, so try to find it by
;; checking that its type is none of the expected ones.
@@ -1487,15 +1478,16 @@ Helper function for `yas--save-restriction-and-widen'."
(defmacro yas--save-restriction-and-widen (&rest body)
"Equivalent to (save-restriction (widen) BODY).
Also tries to work around Emacs Bug#30931."
Also tries to work around Emacs Bug#30931, fixed in Emacs-26.2."
(declare (debug (body)) (indent 0))
;; Disable garbage collection, since it could cause an abort.
`(let ((gc-cons-threshold most-positive-fixnum)
(old-undo-list buffer-undo-list))
(prog1 (save-restriction
(widen)
,@body)
(yas--remove-misc-free-from-undo old-undo-list))))
(let ((main `(save-restriction (widen) ,@body)))
(if (< emacs-major-version 27)
;; Disable garbage collection, since it could cause an abort.
`(let ((gc-cons-threshold most-positive-fixnum)
(old-undo-list buffer-undo-list))
(prog1 ,main
(yas--remove-misc-free-from-undo old-undo-list)))
main)))
(defun yas--eval-for-string (form)
"Evaluate FORM and convert the result to string."
@@ -1679,8 +1671,9 @@ Here's a list of currently recognized directives:
(directory-files directory t)))
(defun yas--make-menu-binding (template)
(let ((mode (yas--table-mode (yas--template-table template))))
`(lambda () (interactive) (yas--expand-or-visit-from-menu ',mode ,(yas--template-uuid template)))))
(let ((mode (yas--table-mode (yas--template-table template)))
(uuid (yas--template-uuid template)))
(lambda () (interactive) (yas--expand-or-visit-from-menu mode uuid))))
(defun yas--expand-or-visit-from-menu (mode uuid)
(let* ((table (yas--table-get-create mode))
@@ -1941,16 +1934,18 @@ With prefix argument USE-JIT do jit-loading of snippets."
(let ((output-file (expand-file-name ".yas-compiled-snippets.el"
directory)))
(with-temp-file output-file
(insert (format ";;; Compiled snippets and support files for `%s'\n"
(insert (format ";;; \"Compiled\" snippets and support files for `%S' -*- lexical-binding:t -*-\n"
mode-sym))
(yas--load-directory-2 directory mode-sym)
(insert (format ";;; Do not edit! File generated at %s\n"
(current-time-string)))))
;; Normal case.
(unless (file-exists-p (expand-file-name ".yas-skip" directory))
(unless (and (load (expand-file-name ".yas-compiled-snippets" directory)
'noerror (<= yas-verbosity 3))
(progn (yas--message 4 "Loaded compiled snippets from %s" directory) t))
(if (let ((warning-inhibit-types
'((files missing-lexbind-cookie))))
(load (expand-file-name ".yas-compiled-snippets" directory)
'noerror (<= yas-verbosity 3)))
(yas--message 4 "Loaded compiled snippets from %s" directory)
(yas--message 4 "Loading snippet files from %s" directory)
(yas--load-directory-2 directory mode-sym)))))
@@ -2127,27 +2122,23 @@ This works by stubbing a few functions, then calling
(defun yas-about ()
(interactive)
(message "yasnippet (version %s) -- pluskid/joaotavora/npostavs"
(or (ignore-errors (car (let ((default-directory yas--loaddir))
(process-lines "git" "describe"
"--tags" "--dirty"))))
(eval-when-compile
(or (eval-when-compile
(and (fboundp 'package-get-version)
(package-get-version)))
(when (and (featurep 'package)
(when (and (boundp 'package-alist)
(fboundp 'package-desc-version)
(fboundp 'package-version-join))
(defvar package-alist)
(ignore-errors
(let* ((yas-pkg (cdr (assq 'yasnippet package-alist)))
(version (package-version-join
(package-desc-version (car yas-pkg)))))
;; Special case for MELPA's bogus version numbers.
(if (string-match "\\`20..[01][0-9][0-3][0-9][.][0-9]\\{3,4\\}\\'"
version)
(concat yas--version "-snapshot" version)
version))))
yas--version)))
(let* ((yas-pkg (cdr (assq 'yasnippet package-alist))))
(when yas-pkg
(package-version-join
(package-desc-version (car yas-pkg)))))))
;; The Git description can be misleading, for lack of
;; recent tags, so we prefer package version info.
(ignore-errors (car (let ((default-directory yas--loaddir))
(process-lines "git" "describe"
"--tags" "--dirty"))))
"unknown")))
;;; Apropos snippet menu:
;;
@@ -3212,12 +3203,13 @@ ENV is a lisp expression that evaluates to list of elements with
the form (VAR FORM), where VAR is a symbol and FORM is a lisp
expression that evaluates to its value."
(declare (debug (form body)) (indent 1))
(let ((envvar (make-symbol "envvar")))
`(let ((,envvar ,env))
(cl-progv
(mapcar #'car ,envvar)
(mapcar (lambda (v-f) (eval (cadr v-f) t)) ,envvar)
,@body))))
`(yas--letenv-f ,env (lambda () ,@body)))
(defun yas--letenv-f (env body-fun)
(cl-progv
(mapcar #'car env)
(mapcar (lambda (v-f) (eval (cadr v-f) t)) env)
(funcall body-fun)))
(defun yas--snippet-map-markers (fun snippet)
"Apply FUN to all marker (sub)fields in SNIPPET.
@@ -4133,7 +4125,7 @@ Returns the newly created snippet."
(unwind-protect
(let ((buffer-undo-list t))
(goto-char begin)
(if (> emacs-major-version 29)
(if (< emacs-major-version 27)
;; Don't use the workaround for CC-mode's cache,
;; since it was presumably a bug in CC-mode, so either
;; it's fixed already, or it should get fixed.
@@ -4161,6 +4153,7 @@ Returns the newly created snippet."
(run-hook-with-args 'after-change-functions
(point-min) (point-max)
(- end begin))))
;; FIXME: Use `undo-amalgamate-change-group'?
(when (listp buffer-undo-list)
(push (cons (point-min) (point-max))
buffer-undo-list)))
@@ -5056,7 +5049,7 @@ object satisfying `yas--field-p' to restrict the expansion to.")))
(define-button-type 'help-snippet-def
:supertype 'help-xref
'help-function (lambda (template) (yas--visit-snippet-file-1 template))
'help-echo (purecopy "mouse-2, RET: find snippets's definition"))
'help-echo "mouse-2, RET: find snippets's definition")
(defun yas--snippet-description-finish-runonce ()
"Final adjustments for the help buffer when snippets are concerned."