[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 42601d2 4/8: Apply changes from GNU ELPA
From: |
João Távora |
Subject: |
[elpa] master 42601d2 4/8: Apply changes from GNU ELPA |
Date: |
Mon, 07 Mar 2016 08:45:04 +0000 |
branch: master
commit 42601d2ff8ff0071a099c50d4afab0ca7945e6af
Author: Stefan Monnier <address@hidden>
Commit: Noam Postavsky <address@hidden>
Apply changes from GNU ELPA
* doc/yas-doc-helper.el:
* yasnippet-debug.el:
* yasnippet-tests.el: Fix up copyright headers.
* yasnippet-tests.el: Fix lexical-binding cookie.
* yasnippet-debug.el: Require cl.
* yasnippet-tests.el: Silence byte-compiler.
(yas-saving-variables, yas-with-snippet-dirs): Move macros before their use.
(yas--barbaz, yas--foobarbaz): Declare.
(yas--phony-c-mode, yas--test-mode, yas--another-test-mode): Move out of
deftest, so the byte-compiler understands they're defined.
---
doc/yas-doc-helper.el | 2 +-
yasnippet-debug.el | 3 ++-
yasnippet-tests.el | 36 ++++++++++++++++++++----------------
3 files changed, 23 insertions(+), 18 deletions(-)
diff --git a/doc/yas-doc-helper.el b/doc/yas-doc-helper.el
index ab172b6..f4cd49b 100755
--- a/doc/yas-doc-helper.el
+++ b/doc/yas-doc-helper.el
@@ -1,6 +1,6 @@
;;; yas-doc-helper.el --- Help generate documentation for YASnippet
-;; Copyright (C) 2012 João Távora
+;; Copyright (C) 2012, 2013 Free Software Foundation, Inc.
;; Author: João Távora <address@hidden>
;; Keywords: convenience
diff --git a/yasnippet-debug.el b/yasnippet-debug.el
index c5dd06a..b12bcd4 100644
--- a/yasnippet-debug.el
+++ b/yasnippet-debug.el
@@ -1,6 +1,6 @@
;;; yasnippet-debug.el --- debug functions for yasnippet
-;; Copyright (C) 2010 Jo�o T�vora
+;; Copyright (C) 2010, 2013, 2014 Free Software Foundation, Inc.
;; Author: Jo�o T�vora
;; Keywords: emulations, convenience
@@ -25,6 +25,7 @@
;;; Code:
(require 'yasnippet)
+(require 'cl)
(defun yas-debug-snippet-vars ()
"Debug snippets, fields, mirrors and the `buffer-undo-list'."
diff --git a/yasnippet-tests.el b/yasnippet-tests.el
index cf8ace9..844cd94 100644
--- a/yasnippet-tests.el
+++ b/yasnippet-tests.el
@@ -1,6 +1,6 @@
-;;; yasnippet-tests.el --- some yasnippet tests
+;;; yasnippet-tests.el --- some yasnippet tests -*- lexical-binding: t -*-
-;; Copyright (C) 2012 Jo�o T�vora
+;; Copyright (C) 2012, 2013, 2014, 2015 Free Software Foundation, Inc.
;; Author: Jo�o T�vora <address@hidden>
;; Keywords: emulations, convenience
@@ -27,6 +27,7 @@
(require 'yasnippet)
(require 'ert)
(require 'ert-x)
+(require 'cl)
;;; Snippet mechanics
@@ -275,6 +276,15 @@
(and (buffer-name ,temp-buffer)
(kill-buffer ,temp-buffer))))))))
+(defmacro yas-saving-variables (&rest body)
+ `(yas-call-with-saving-variables #'(lambda () ,@body)))
+
+(defmacro yas-with-snippet-dirs (dirs &rest body)
+ (declare (indent defun))
+ `(yas-call-with-snippet-dirs ,dirs
+ #'(lambda ()
+ ,@body)))
+
(ert-deftest example-for-issue-474 ()
(yas--with-font-locked-temp-buffer
(c-mode)
@@ -365,6 +375,9 @@ TODO: correct this bug!"
"brother from another mother") ;; no newline should be
here!
)))
+(defvar yas--barbaz)
+(defvar yas--foobarbaz)
+
;; See issue #497. To understand this test, follow the example of the
;; `yas-key-syntaxes' docstring.
;;
@@ -569,8 +582,9 @@ TODO: correct this bug!"
(should (equal (sort expected-rest #'string<)
(sort (cl-subseq observed (length expected-first))
#'string<))))))))
+(defalias 'yas--phony-c-mode 'c-mode)
+
(ert-deftest issue-492-and-494 ()
- (defalias 'yas--phony-c-mode 'c-mode)
(define-derived-mode yas--test-mode yas--phony-c-mode "Just a test mode")
(yas-with-snippet-dirs '((".emacs.d/snippets"
("yas--test-mode")))
@@ -587,9 +601,10 @@ TODO: correct this bug!"
(should (= (length expected)
(length observed)))))))
+(define-derived-mode yas--test-mode c-mode "Just a test mode")
+(define-derived-mode yas--another-test-mode c-mode "Another test mode")
+
(ert-deftest issue-504-tricky-jit ()
- (define-derived-mode yas--test-mode c-mode "Just a test mode")
- (define-derived-mode yas--another-test-mode c-mode "Another test mode")
(yas-with-snippet-dirs
'((".emacs.d/snippets"
("yas--another-test-mode"
@@ -880,10 +895,6 @@ add the snippets associated with the given mode."
for saved in saved-values
do (set var saved)))))
-(defmacro yas-saving-variables (&rest body)
- `(yas-call-with-saving-variables #'(lambda () ,@body)))
-
-
(defun yas-call-with-snippet-dirs (dirs fn)
(let* ((default-directory (make-temp-file "yasnippet-fixture" t))
(yas-snippet-dirs (mapcar #'car dirs)))
@@ -895,12 +906,6 @@ add the snippets associated with the given mode."
(when (>= emacs-major-version 24)
(delete-directory default-directory 'recursive))))))
-(defmacro yas-with-snippet-dirs (dirs &rest body)
- (declare (indent defun))
- `(yas-call-with-snippet-dirs ,dirs
- #'(lambda ()
- ,@body)))
-
;;; Older emacsen
;;;
(unless (fboundp 'special-mode)
@@ -939,7 +944,6 @@ attention to case differences."
(provide 'yasnippet-tests)
;; Local Variables:
;; indent-tabs-mode: nil
-;; lexical-binding: t
;; byte-compile-warnings: (not cl-functions)
;; End:
;;; yasnippet-tests.el ends here
- [elpa] master updated (ab7d7f3 -> 9983491), João Távora, 2016/03/07
- [elpa] master 4a6d923 1/8: Slightly improve on fix for #515: Refactor code and add tests, João Távora, 2016/03/07
- [elpa] master acf2cdd 2/8: Decide field clearing commands based on delsel, João Távora, 2016/03/07
- [elpa] master 80941c0 3/8: Update snippets submodule, João Távora, 2016/03/07
- [elpa] master 42601d2 4/8: Apply changes from GNU ELPA,
João Távora <=
- [elpa] master 8632262 5/8: Don't use yas-x-prompt by default, João Távora, 2016/03/07
- [elpa] master 88b7950 6/8: Reduce `yas-new-snippet-default', João Távora, 2016/03/07
- [elpa] master 572c73d 7/8: Avoid error in case this-command isn't a symbol., João Távora, 2016/03/07
- [elpa] master 9983491 8/8: Update packages/yasnippet by subtree-merging from its github-based upstream, João Távora, 2016/03/07