emacs-elpa-diffs
[Top][All Lists]
Advanced

[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))))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]