tweaking the ruby-mode snippets slightly

This commit is contained in:
capitaomorte
2009-11-27 16:05:05 +00:00
parent 295972897f
commit 1c812b8692
5 changed files with 33 additions and 28 deletions

View File

@@ -17,11 +17,10 @@
((string-match "_" fn) (replace-match "" nil nil fn))
(t fn))))
(defun yas/ruby-in-interpolated-string-p ()
(eq (fourth (syntax-ppss))
?\"))
(defun yas/ruby-in-comment-p ()
(fifth (syntax-ppss)))
;; conditions
;;
(yas/define-condition-cache yas/ruby-in-interpolated-string-p (eq (fourth (syntax-ppss)) ?\"))
(yas/define-condition-cache yas/ruby-in-comment-p (fifth (syntax-ppss)))
(yas/define-condition-cache yas/ruby-in-string-p (fourth (syntax-ppss)))