mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-10-14 13:33:04 +00:00
Remove lambda list building hack
* yasnippet.el (yas-load-directory, yas--eval-for-effect): Use `apply-partially' instead of building lambda lists.
This commit is contained in:
parent
203df22e26
commit
b62cf52f35
@ -1345,8 +1345,7 @@ Returns (TEMPLATES START END). This function respects
|
|||||||
((debug error) (cdr oops)))))
|
((debug error) (cdr oops)))))
|
||||||
|
|
||||||
(defun yas--eval-for-effect (form)
|
(defun yas--eval-for-effect (form)
|
||||||
;; FIXME: simulating lexical-binding.
|
(yas--safely-run-hook (apply-partially #'eval form)))
|
||||||
(yas--safely-run-hook `(lambda () ,form)))
|
|
||||||
|
|
||||||
(defun yas--read-lisp (string &optional nil-on-error)
|
(defun yas--read-lisp (string &optional nil-on-error)
|
||||||
"Read STRING as a elisp expression and return it.
|
"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--define-parents mode-sym parents)
|
||||||
(yas--menu-keymap-get-create mode-sym)
|
(yas--menu-keymap-get-create mode-sym)
|
||||||
(let ((fun `(lambda () ;; FIXME: Simulating lexical-binding.
|
(let ((fun (apply-partially #'yas--load-directory-1 dir mode-sym)))
|
||||||
(yas--load-directory-1 ',dir ',mode-sym))))
|
|
||||||
(if use-jit
|
(if use-jit
|
||||||
(yas--schedule-jit mode-sym fun)
|
(yas--schedule-jit mode-sym fun)
|
||||||
(funcall fun)))
|
(funcall fun)))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user