From 991f8ff925f51fd5598db72885f8cca1a1a79bed Mon Sep 17 00:00:00 2001 From: Simeon Simeonov Date: Thu, 16 Jun 2016 09:07:53 +0200 Subject: Upgrade all modes, include snippets/html-mode, snippets/nxml-mode and snippets/prog-mode --- .emacs.d/snippets/python-mode/.yas-setup.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to '.emacs.d/snippets/python-mode') diff --git a/.emacs.d/snippets/python-mode/.yas-setup.el b/.emacs.d/snippets/python-mode/.yas-setup.el index 864cbce..3f57d15 100644 --- a/.emacs.d/snippets/python-mode/.yas-setup.el +++ b/.emacs.d/snippets/python-mode/.yas-setup.el @@ -1,3 +1,5 @@ +(defvar yas-text) + (defun python-split-args (arg-string) "Split a python argument string into ((name, default)..) tuples" (mapcar (lambda (x) @@ -11,12 +13,12 @@ (max-len (if args (apply 'max (mapcar (lambda (x) (length (nth 0 x))) args)) 0)) (formatted-args (mapconcat (lambda (x) - (concat ":param " (nth 0 x) (make-string (- max-len (length (nth 0 x))) ? ) ": " + (concat (nth 0 x) (make-string (- max-len (length (nth 0 x))) ? ) " -- " (if (nth 1 x) (concat "\(default " (nth 1 x) "\)")))) args indent))) (unless (string= formatted-args "") - (mapconcat 'identity (list "Keyword arguments:" formatted-args) indent)))) + (mapconcat 'identity (list "Keyword Arguments:" formatted-args) indent)))) (add-hook 'python-mode-hook '(lambda () (set (make-local-variable 'yas-indent-line) 'fixed))) -- cgit v1.3