From eafe1bd48fffea0ce5e2d914f5ef5be58e13f3be Mon Sep 17 00:00:00 2001 From: Andreas Gerler Date: Wed, 24 Dec 2025 15:20:23 +0100 Subject: [PATCH] update yasnippet --- bba.org | 2 +- .../yasnippet-autoloads.el | 8 +++--- .../yasnippet-pkg.el | 6 ++--- .../yasnippet.el | 27 ++++++++++--------- 4 files changed, 23 insertions(+), 20 deletions(-) rename elpa/{yasnippet-20250403.1926 => yasnippet-20250602.1342}/yasnippet-autoloads.el (94%) rename elpa/{yasnippet-20250403.1926 => yasnippet-20250602.1342}/yasnippet-pkg.el (70%) rename elpa/{yasnippet-20250403.1926 => yasnippet-20250602.1342}/yasnippet.el (99%) diff --git a/bba.org b/bba.org index a2209f9b..d1902835 100644 --- a/bba.org +++ b/bba.org @@ -641,7 +641,7 @@ snippets for =aws cli= are awesome! #+BEGIN_SRC emacs-lisp (add-to-list 'load-path - "~/.emacs.d/elpa/yasnippet-20230914.1400") + "~/.emacs.d/elpa/yasnippet-20250602.1342") (require 'yasnippet) (if (equal "work" (getenv "SYSENV")) diff --git a/elpa/yasnippet-20250403.1926/yasnippet-autoloads.el b/elpa/yasnippet-20250602.1342/yasnippet-autoloads.el similarity index 94% rename from elpa/yasnippet-20250403.1926/yasnippet-autoloads.el rename to elpa/yasnippet-20250602.1342/yasnippet-autoloads.el index 62cbae1b..36893ec1 100644 --- a/elpa/yasnippet-20250403.1926/yasnippet-autoloads.el +++ b/elpa/yasnippet-20250602.1342/yasnippet-autoloads.el @@ -44,7 +44,10 @@ either customize it (see the info node `Easy Customization') or call the function `yas-global-mode'.") (custom-autoload 'yas-global-mode "yasnippet" nil) (autoload 'yas-global-mode "yasnippet" "\ -Toggle Yas minor mode in all buffers. +Toggle Yas minor mode in many buffers. +Specifically, Yas minor mode is enabled in all buffers where +`yas-minor-mode-on' would do it. + With prefix ARG, enable Yas-Global mode if ARG is positive; otherwise, disable it. @@ -52,9 +55,6 @@ If called from Lisp, toggle the mode if ARG is `toggle'. Enable the mode if ARG is nil, omitted, or is a positive number. Disable the mode if ARG is a negative number. -Yas minor mode is enabled in all buffers where `yas-minor-mode-on' -would do it. - See `yas-minor-mode' for more information on Yas minor mode. (fn &optional ARG)" t) diff --git a/elpa/yasnippet-20250403.1926/yasnippet-pkg.el b/elpa/yasnippet-20250602.1342/yasnippet-pkg.el similarity index 70% rename from elpa/yasnippet-20250403.1926/yasnippet-pkg.el rename to elpa/yasnippet-20250602.1342/yasnippet-pkg.el index 15f3b466..9d5fa764 100644 --- a/elpa/yasnippet-20250403.1926/yasnippet-pkg.el +++ b/elpa/yasnippet-20250602.1342/yasnippet-pkg.el @@ -1,10 +1,10 @@ ;; -*- no-byte-compile: t; lexical-binding: nil -*- -(define-package "yasnippet" "20250403.1926" +(define-package "yasnippet" "20250602.1342" "Yet another snippet extension for Emacs." '((cl-lib "0.5") (emacs "24.4")) :url "http://github.com/joaotavora/yasnippet" - :commit "2384fe1655c60e803521ba59a34c0a7e48a25d06" - :revdesc "2384fe1655c6" + :commit "dd570a6b22364212fff9769cbf4376bdbd7a63c5" + :revdesc "dd570a6b2236" :keywords '("convenience" "emulation") :maintainers '(("Noam Postavsky" . "npostavs@gmail.com"))) diff --git a/elpa/yasnippet-20250403.1926/yasnippet.el b/elpa/yasnippet-20250602.1342/yasnippet.el similarity index 99% rename from elpa/yasnippet-20250403.1926/yasnippet.el rename to elpa/yasnippet-20250602.1342/yasnippet.el index e7997b9e..296bc801 100644 --- a/elpa/yasnippet-20250403.1926/yasnippet.el +++ b/elpa/yasnippet-20250602.1342/yasnippet.el @@ -5,8 +5,8 @@ ;; João Távora , ;; Noam Postavsky ;; Maintainer: Noam Postavsky -;; Package-Version: 20250403.1926 -;; Package-Revision: 2384fe1655c6 +;; Package-Version: 20250602.1342 +;; Package-Revision: dd570a6b2236 ;; X-URL: http://github.com/joaotavora/yasnippet ;; Keywords: convenience, emulation ;; URL: http://github.com/joaotavora/yasnippet @@ -1934,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))))) @@ -3201,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. -- 2.47.3