mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-10-13 21:13:04 +00:00
future-proof against obsoleting of `flet'
flet will be marked obsolete starting in Emacs 24.3
This commit is contained in:
parent
42ed181f4a
commit
32e56098fb
10
yasnippet.el
10
yasnippet.el
@ -136,6 +136,12 @@
|
|||||||
(require 'easymenu)
|
(require 'easymenu)
|
||||||
(require 'help-mode)
|
(require 'help-mode)
|
||||||
|
|
||||||
|
(eval-and-compile
|
||||||
|
(unless (fboundp 'cl-flet)
|
||||||
|
(defalias 'cl-flet 'flet)
|
||||||
|
(put 'cl-flet 'lisp-indent-function 1)
|
||||||
|
(put 'cl-flet 'edebug-form-spec '((&rest (defun*)) cl-declarations body))))
|
||||||
|
|
||||||
|
|
||||||
;;; User customizable variables
|
;;; User customizable variables
|
||||||
|
|
||||||
@ -1843,7 +1849,7 @@ foo\"bar\\! -> \"foo\\\"bar\\\\!\""
|
|||||||
This works by stubbing a few functions, then calling
|
This works by stubbing a few functions, then calling
|
||||||
`yas-load-directory'."
|
`yas-load-directory'."
|
||||||
(interactive "DTop level snippet directory?")
|
(interactive "DTop level snippet directory?")
|
||||||
(flet ((yas--load-yas-setup-file
|
(cl-flet ((yas--load-yas-setup-file
|
||||||
(file)
|
(file)
|
||||||
(let ((elfile (concat file ".el")))
|
(let ((elfile (concat file ".el")))
|
||||||
(when (file-exists-p elfile)
|
(when (file-exists-p elfile)
|
||||||
@ -3685,7 +3691,7 @@ Returns the newly created snippet."
|
|||||||
|
|
||||||
This is according to their relative positions in the buffer, and
|
This is according to their relative positions in the buffer, and
|
||||||
has to be called before the $-constructs are deleted."
|
has to be called before the $-constructs are deleted."
|
||||||
(flet ((yas--fom-set-next-fom (fom nextfom)
|
(cl-flet ((yas--fom-set-next-fom (fom nextfom)
|
||||||
(cond ((yas--field-p fom)
|
(cond ((yas--field-p fom)
|
||||||
(setf (yas--field-next fom) nextfom))
|
(setf (yas--field-next fom) nextfom))
|
||||||
((yas--mirror-p fom)
|
((yas--mirror-p fom)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user