gnu: emacs-yasnippet: Update to 0.14.0-0.297546f.
* gnu/packages/emacs-xyz.scm (emacs-yasnippet): Update to 0.14.0-0.297546f. Remove fix-tests patch. * gnu/packages/patches/emacs-yasnippet-fix-tests.patch: Delete file. * gnu/local.mk (dist_patch_DATA): De-register it. Change-Id: I3fda2bb3d879d88f06f9d814b6c8d835d9eafc9f
This commit is contained in:
		
							parent
							
								
									1348be9115
								
							
						
					
					
						commit
						e479920cfd
					
				
					 3 changed files with 33 additions and 160 deletions
				
			
		|  | @ -1132,7 +1132,6 @@ dist_patch_DATA =						\ | |||
|   %D%/packages/patches/emacs-wordnut-require-adaptive-wrap.patch	\
 | ||||
|   %D%/packages/patches/emacs-xelb-ignore-length-element.patch	\
 | ||||
|   %D%/packages/patches/emacs-yasnippet-fix-empty-snippet-next.patch	\
 | ||||
|   %D%/packages/patches/emacs-yasnippet-fix-tests.patch	\
 | ||||
|   %D%/packages/patches/enblend-enfuse-reproducible.patch	\
 | ||||
|   %D%/packages/patches/enjarify-setup-py.patch			\
 | ||||
|   %D%/packages/patches/enlightenment-fix-setuid-path.patch	\
 | ||||
|  |  | |||
|  | @ -17919,39 +17919,40 @@ the Emacs TempEl package.") | |||
|       (license license:gpl3+)))) | ||||
| 
 | ||||
| (define-public emacs-yasnippet | ||||
|   (package | ||||
|     (name "emacs-yasnippet") | ||||
|     (version "0.14.0") | ||||
|     (source | ||||
|      (origin | ||||
|        (method git-fetch) | ||||
|        (uri (git-reference | ||||
|              (url "https://github.com/joaotavora/yasnippet") | ||||
|              (commit version))) | ||||
|        (file-name (git-file-name name version)) | ||||
|        (sha256 | ||||
|         (base32 "0via9dzw8m5lzymg1h78xkwjssh39zr3g6ccyamlf1rjzjsyxknv")) | ||||
|        (patches | ||||
|         (search-patches "emacs-yasnippet-fix-empty-snippet-next.patch" | ||||
|                         "emacs-yasnippet-fix-tests.patch")))) | ||||
|     (build-system emacs-build-system) | ||||
|     (arguments | ||||
|      `(#:tests? #t | ||||
|        #:test-command '("emacs" "--batch" | ||||
|                         "-l" "yasnippet-tests.el" | ||||
|                         "-f" "ert-run-tests-batch-and-exit") | ||||
|        #:phases | ||||
|        (modify-phases %standard-phases | ||||
|          ;; Set HOME, otherwise test-rebindings fails. | ||||
|          (add-before 'check 'set-home | ||||
|            (lambda _ | ||||
|              (setenv "HOME" (getcwd)) | ||||
|              #t))))) | ||||
|     (home-page "https://github.com/joaotavora/yasnippet") | ||||
|     (synopsis "Yet another snippet extension for Emacs") | ||||
|     (description "YASnippet is a template system for Emacs.  It allows you to | ||||
|   ;; The latest release is more than 5 years old, has test problems. | ||||
|   (let ((revision "0") | ||||
|         (commit "297546f0853a6a51f5b05e954d0c6aea8caa5ec2")) | ||||
|     (package | ||||
|       (name "emacs-yasnippet") | ||||
|       (version (git-version "0.14.0" revision commit)) | ||||
|       (source | ||||
|        (origin | ||||
|          (method git-fetch) | ||||
|          (uri (git-reference | ||||
|                (url "https://github.com/joaotavora/yasnippet") | ||||
|                (commit commit))) | ||||
|          (file-name (git-file-name name version)) | ||||
|          (sha256 | ||||
|           (base32 "0b1fdigwjshfim6zyzkn2wa6k8xd4qlafrf7zgj5bsx6alrzac8v")) | ||||
|          (patches | ||||
|           (search-patches "emacs-yasnippet-fix-empty-snippet-next.patch")))) | ||||
|       (build-system emacs-build-system) | ||||
|       (arguments | ||||
|        `(#:tests? #t | ||||
|          #:test-command '("emacs" "--batch" | ||||
|                           "-l" "yasnippet-tests.el" | ||||
|                           "-f" "ert-run-tests-batch-and-exit") | ||||
|          #:phases | ||||
|          (modify-phases %standard-phases | ||||
|            ;; Set HOME, otherwise test-rebindings fails. | ||||
|            (add-before 'check 'set-home | ||||
|              (lambda _ | ||||
|                (setenv "HOME" (getcwd))))))) | ||||
|       (home-page "https://github.com/joaotavora/yasnippet") | ||||
|       (synopsis "Yet another snippet extension for Emacs") | ||||
|       (description "YASnippet is a template system for Emacs.  It allows you to | ||||
| type an abbreviation and automatically expand it into function templates.") | ||||
|     (license license:gpl3+))) | ||||
|       (license license:gpl3+)))) | ||||
| 
 | ||||
| (define-public emacs-yasnippet-snippets | ||||
|   (package | ||||
|  |  | |||
|  | @ -1,127 +0,0 @@ | |||
| From 904a058fcf4e1f4985e03f8551eec282ca12ccb5 Mon Sep 17 00:00:00 2001 | ||||
| From: Philipp Stephani <phst@google.com> | ||||
| Date: Mon, 6 Dec 2021 18:50:10 +0100 | ||||
| Subject: [PATCH] Unbreak unit tests under Emacs 28. | ||||
| MIME-Version: 1.0 | ||||
| Content-Type: text/plain; charset=UTF-8 | ||||
| Content-Transfer-Encoding: 8bit | ||||
| 
 | ||||
| - Emacs 28 has a new mode ‘lisp-data-mode’ for Lisp data.
 | ||||
| - A test that was temporarily broken passes again.
 | ||||
| - The default for ‘org-adapt-indentation’ has changed.
 | ||||
| - buffer-list may be called with arguments when native-comp is enabled.
 | ||||
| 
 | ||||
| 2023-08-19 Liliana Marie Prikler <liliana.prikler@gmail.com> | ||||
| 
 | ||||
| 	* delete-numberless-inner-snippet-issue-562: Correct value in | ||||
|         looking-at. | ||||
| ---
 | ||||
|  yasnippet-tests.el | 45 ++++++++++++++++++++++++++++----------------- | ||||
|  1 file changed, 28 insertions(+), 17 deletions(-) | ||||
| 
 | ||||
| diff --git a/yasnippet-tests.el b/yasnippet-tests.el
 | ||||
| index f7ca2bb..7618ab7 100644
 | ||||
| --- a/yasnippet-tests.el
 | ||||
| +++ b/yasnippet-tests.el
 | ||||
| @@ -1,6 +1,6 @@
 | ||||
|  ;;; yasnippet-tests.el --- some yasnippet tests  -*- lexical-binding: t -*- | ||||
|   | ||||
| -;; Copyright (C) 2012-2015, 2017-2018  Free Software Foundation, Inc.
 | ||||
| +;; Copyright (C) 2012-2015, 2017-2018, 2021  Free Software Foundation, Inc.
 | ||||
|   | ||||
|  ;; Author: João Távora <joaot@siscog.pt> | ||||
|  ;; Keywords: emulations, convenience | ||||
| @@ -289,7 +289,7 @@ attention to case differences."
 | ||||
|      (should (looking-at "testblable")) | ||||
|      (ert-simulate-command '(yas-next-field-or-maybe-expand)) | ||||
|      (ert-simulate-command '(yas-skip-and-clear-field)) | ||||
| -    (should (looking-at "ble"))
 | ||||
| +    (should (looking-at "blable"))
 | ||||
|      (should (null (yas-active-snippets))))) | ||||
|   | ||||
|  (ert-deftest delete-nested-simple-field-issue-824 () | ||||
| @@ -556,16 +556,19 @@ XXXXX   ------------------------"))))
 | ||||
|      (yas-mock-insert "foo bar") | ||||
|      (ert-simulate-command '(yas-next-field)) | ||||
|      (goto-char (point-min)) | ||||
| -    (let ((expected (with-temp-buffer
 | ||||
| -                      (insert (format (concat "* Test foo bar\n"
 | ||||
| -                                              "  " org-property-format "\n"
 | ||||
| -                                              "  " org-property-format "\n"
 | ||||
| -                                              "  " org-property-format)
 | ||||
| -                                      ":PROPERTIES:" ""
 | ||||
| -                                      ":ID:" "foo bar-after"
 | ||||
| -                                      ":END:" ""))
 | ||||
| -                      (delete-trailing-whitespace)
 | ||||
| -                      (buffer-string))))
 | ||||
| +    ;; The default value of `org-adapt-indentation' changed between Org-mode 9.4
 | ||||
| +    ;; and 9.5, so force a specific value.
 | ||||
| +    (let* ((org-adapt-indentation nil)
 | ||||
| +           (expected (with-temp-buffer
 | ||||
| +                       (insert (format (concat "* Test foo bar\n"
 | ||||
| +                                               org-property-format "\n"
 | ||||
| +                                               org-property-format "\n"
 | ||||
| +                                               org-property-format)
 | ||||
| +                                       ":PROPERTIES:" ""
 | ||||
| +                                       ":ID:" "foo bar-after"
 | ||||
| +                                       ":END:" ""))
 | ||||
| +                       (delete-trailing-whitespace)
 | ||||
| +                       (buffer-string))))
 | ||||
|        ;; Some org-mode versions leave trailing whitespace, some don't. | ||||
|        (delete-trailing-whitespace) | ||||
|        (should (equal expected (buffer-string)))))) | ||||
| @@ -1195,11 +1198,11 @@ hello ${1:$(when (stringp yas-text) (funcall func yas-text))} foo${1:$$(concat \
 | ||||
|    (let ((saved-sym (make-symbol "yas--buffer-list"))) | ||||
|      `(let ((,saved-sym (symbol-function 'buffer-list))) | ||||
|         (cl-letf (((symbol-function 'buffer-list) | ||||
| -                  (lambda ()
 | ||||
| +                  (lambda (&rest args)
 | ||||
|                      (cl-remove-if (lambda (buf) | ||||
|                                      (with-current-buffer buf | ||||
|                                        (eq major-mode 'lisp-interaction-mode))) | ||||
| -                                  (funcall ,saved-sym)))))
 | ||||
| +                                  (funcall ,saved-sym args)))))
 | ||||
|           ,@body)))) | ||||
|   | ||||
|   | ||||
| @@ -1356,7 +1359,9 @@ hello ${1:$(when (stringp yas-text) (funcall func yas-text))} foo${1:$$(concat \
 | ||||
|                            ,@(if (fboundp 'prog-mode) | ||||
|                                  '(prog-mode)) | ||||
|                            emacs-lisp-mode | ||||
| -                          lisp-interaction-mode))
 | ||||
| +                          lisp-interaction-mode
 | ||||
| +                          ;; `lisp-data-mode' doesn't exist prior to Emacs 28.
 | ||||
| +                          ,@(and (fboundp 'lisp-data-mode) '(lisp-data-mode))))
 | ||||
|                (observed (yas--modes-to-activate))) | ||||
|           (should (equal major-mode (car observed))) | ||||
|           (should (equal (sort expected #'string<) (sort observed #'string<)))))))) | ||||
| @@ -1384,7 +1389,11 @@ hello ${1:$(when (stringp yas-text) (funcall func yas-text))} foo${1:$$(concat \
 | ||||
|                                       '(prog-mode)) | ||||
|                                 emacs-lisp-mode | ||||
|                                 and-also-this-one | ||||
| -                               lisp-interaction-mode))
 | ||||
| +                               lisp-interaction-mode
 | ||||
| +                               ;; `lisp-data-mode' doesn't exist prior to
 | ||||
| +                               ;; Emacs 28.
 | ||||
| +                               ,@(and (fboundp 'lisp-data-mode)
 | ||||
| +                                      '(lisp-data-mode))))
 | ||||
|                (observed (yas--modes-to-activate))) | ||||
|           (should (equal expected-first | ||||
|                          (cl-subseq observed 0 (length expected-first)))) | ||||
| @@ -1657,9 +1666,11 @@ TODO: be meaner"
 | ||||
|    "Test expansion of snippets in org source blocks." | ||||
|    ;; org 9+ no longer runs fontification for text-mode, so our hacks | ||||
|    ;; don't work.  Note that old ert doesn't have skipping, so we have | ||||
| -  ;; to expect failure instead.
 | ||||
| +  ;; to expect failure instead.  Starting with Org-mode 9.5 this seems
 | ||||
| +  ;; to work again.
 | ||||
|    :expected-result (if (and (fboundp 'org-in-src-block-p) | ||||
| -                            (version< (org-version) "9"))
 | ||||
| +                            (or (version< (org-version) "9")
 | ||||
| +                                (version<= "9.5" (org-version))))
 | ||||
|                         :passed :failed) | ||||
|    (let ((text-mode-hook #'yas-minor-mode)) | ||||
|      (do-yas-org-native-tab-in-source-block "text"))) | ||||
| -- 
 | ||||
| 2.37.2 | ||||
| 
 | ||||
		Reference in a new issue