branch: master commit b62cf52f3517d9ba62635304df8b8cac877c53e2 Author: Noam Postavsky <npost...@users.sourceforge.net> Commit: Noam Postavsky <npost...@users.sourceforge.net>
Remove lambda list building hack * yasnippet.el (yas-load-directory, yas--eval-for-effect): Use `apply-partially' instead of building lambda lists. --- yasnippet.el | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/yasnippet.el b/yasnippet.el index 7645c19..f6036da 100644 --- a/yasnippet.el +++ b/yasnippet.el @@ -1345,8 +1345,7 @@ Returns (TEMPLATES START END). This function respects ((debug error) (cdr oops))))) (defun yas--eval-for-effect (form) - ;; FIXME: simulating lexical-binding. - (yas--safely-run-hook `(lambda () ,form))) + (yas--safely-run-hook (apply-partially #'eval form))) (defun yas--read-lisp (string &optional nil-on-error) "Read STRING as a elisp expression and return it. @@ -1755,8 +1754,7 @@ With prefix argument USE-JIT do jit-loading of snippets." ;; (yas--define-parents mode-sym parents) (yas--menu-keymap-get-create mode-sym) - (let ((fun `(lambda () ;; FIXME: Simulating lexical-binding. - (yas--load-directory-1 ',dir ',mode-sym)))) + (let ((fun (apply-partially #'yas--load-directory-1 dir mode-sym))) (if use-jit (yas--schedule-jit mode-sym fun) (funcall fun)))