[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 7e0a0de 28/40: Use new name of python-in-string/comment in
From: |
Noam Postavsky |
Subject: |
[elpa] master 7e0a0de 28/40: Use new name of python-in-string/comment in docs |
Date: |
Wed, 26 Oct 2016 23:06:33 +0000 (UTC) |
branch: master
commit 7e0a0de499e655d94a2e454f6519620d99c92ac6
Author: Sudarshan Gaikaiwari <address@hidden>
Commit: Noam Postavsky <address@hidden>
Use new name of python-in-string/comment in docs
* doc/snippet-expansion.org:
* yasnippet.el (yas-buffer-local-condition): python.el renames
python-in-string/comment to python-syntax-comment-or-string-p. Modify
the documentation to reflect that.
Copyright-paperwork-exempt: yes
Close #725
---
doc/snippet-expansion.org | 6 +++---
yasnippet.el | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/doc/snippet-expansion.org b/doc/snippet-expansion.org
index f57df95..4bd133b 100644
--- a/doc/snippet-expansion.org
+++ b/doc/snippet-expansion.org
@@ -193,11 +193,11 @@ block or a string (e.g. in =python-mode=).
If you use the =# condition := directive (see
[[./snippet-development.org][Writing Snippets]]) you could just specify
-the condition for =if= to be =(not (python-in-string/comment))=. But how
+the condition for =if= to be =(not (python-syntax-comment-or-string-p))=. But
how
about =while=, =for=, etc. ? Writing the same condition for all the
snippets is just boring. So has a buffer local variable
[[sym:yas-buffer-local-condition][=yas-buffer-local-condition=]]. You can set
this variable to
-=(not (python-in-string/comment))= in =python-mode-hook=.
+=(not (python-syntax-comment-or-string-p))= in =python-mode-hook=.
Then, what if you really want some particular snippet to expand even
inside a comment? Set
[[sym:yas-buffer-local-condition][=yas-buffer-local-condition=]] like this
@@ -206,7 +206,7 @@ inside a comment? Set
[[sym:yas-buffer-local-condition][=yas-buffer-local-condit
(add-hook 'python-mode-hook
(lambda ()
(setq yas-buffer-local-condition
- '(if (python-in-string/comment)
+ '(if (python-syntax-comment-or-string-p)
'(require-snippet-condition . force-in-comment)
t))))
#+END_SRC
diff --git a/yasnippet.el b/yasnippet.el
index 6b1f954..0223963 100644
--- a/yasnippet.el
+++ b/yasnippet.el
@@ -522,7 +522,7 @@ conditions.
(add-hook \\='python-mode-hook
(lambda ()
(setq yas-buffer-local-condition
- \\='(if (python-in-string/comment)
+ \\='(if (python-syntax-comment-or-string-p)
\\='(require-snippet-condition . force-in-comment)
t))))
- [elpa] master 9c9952c 12/40: Add test for indentation of single line mirrors, (continued)
- [elpa] master 9c9952c 12/40: Add test for indentation of single line mirrors, Noam Postavsky, 2016/10/26
- [elpa] master 4296a86 15/40: yasnippet.el (yas--quote-string): Remove., Noam Postavsky, 2016/10/26
- [elpa] master d4da806 17/40: Fix removal of snippets by uuid, Noam Postavsky, 2016/10/26
- [elpa] master 42b0c26 18/40: Don't warn about modifications to other buffers, Noam Postavsky, 2016/10/26
- [elpa] master eaaec30 38/40: Replace all occurances of `capitaomorte', Noam Postavsky, 2016/10/26
- [elpa] master ff6f31e 37/40: Replace yas--with-temp-redefs with cl-letf, Noam Postavsky, 2016/10/26
- [elpa] master 244cdfa 26/40: Merge: Simplify `yas-new-snippet' load&save logic, Noam Postavsky, 2016/10/26
- [elpa] master 9500b00 21/40: Fix field navigation in the backwards direction, Noam Postavsky, 2016/10/26
- [elpa] master 309fe15 31/40: * Rakefile: Handle unset `warnings' parameter, Noam Postavsky, 2016/10/26
- [elpa] master 9cf9208 32/40: Fix test-rebindings, Noam Postavsky, 2016/10/26
- [elpa] master 7e0a0de 28/40: Use new name of python-in-string/comment in docs,
Noam Postavsky <=
- [elpa] master e6b8651 39/40: * NEWS: Update for 0.11.0., Noam Postavsky, 2016/10/26
- [elpa] master 5264379 29/40: Cleanup redundant cl dependency, :group & :require, Noam Postavsky, 2016/10/26
- [elpa] master 4b12f7d 30/40: Don't warn about cl-functions with old cl-lib, Noam Postavsky, 2016/10/26
- [elpa] master a5e88b2 34/40: Add test for snippet saving, Noam Postavsky, 2016/10/26
- [elpa] master 299efcb 40/40: packages/yasnippet: Merge external (v0.11.0), Noam Postavsky, 2016/10/26