Open lu-pl opened 10 months ago
Emacs version: 29.2 yasnippet version: 20240124.258 (Melpa)
Snippets using elpy-snippet-init-assignments expand to error output "Symbol’s value as variable is void: start-point".
elpy-snippet-init-assignments
E.g.
# -*- mode: snippet -*- # name: init # key: init # group : definitions # -- def __init__(self${1:, args}): ${1:$(my/elpy-snippet-init-assignments yas/text)}
expands to
def __init__(self, args): Symbol’s value as variable is void: start-point
As a quick fix replacing start-point with (point) appears to work:
start-point
(point)
(defun fix/elpy-snippet-init-assignments (arg-string) "Return the typical __init__ assignments for arguments in ARG-STRING." (let ((indentation (make-string (save-excursion (goto-char (point)) (current-indentation)) ?\s))) (mapconcat (lambda (arg) (if (string-match "^\\*" arg) "" (format "self.%s = %s\n%s" arg arg indentation))) (elpy-snippet-split-args arg-string) "")))
What/where is my/elpy-snippet-init-assignments? It sounds like the error is coming from that function, which is not part of YASnippet, AFAICT.
my/elpy-snippet-init-assignments
Emacs version: 29.2 yasnippet version: 20240124.258 (Melpa)
Snippets using
elpy-snippet-init-assignments
expand to error output "Symbol’s value as variable is void: start-point".E.g.
expands to
As a quick fix replacing
start-point
with(point)
appears to work: