mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-10-13 13:13:03 +00:00
Add yas-backport-obsolete-alias option
* yasnippet.el (yas-backport-obsolete-alias): New option.
This commit is contained in:
parent
0d79e6988e
commit
bbfa1f0c9a
22
yasnippet.el
22
yasnippet.el
@ -386,6 +386,11 @@ the trigger key itself."
|
|||||||
:type '(repeat function)
|
:type '(repeat function)
|
||||||
:group 'yasnippet)
|
:group 'yasnippet)
|
||||||
|
|
||||||
|
(defcustom yas-backport-obsolete-alias t
|
||||||
|
"If non-nil backport function and variables from old version of yasnippet."
|
||||||
|
:type 'boolean
|
||||||
|
:group 'yasnippet)
|
||||||
|
|
||||||
;; Only two faces, and one of them shouldn't even be used...
|
;; Only two faces, and one of them shouldn't even be used...
|
||||||
;;
|
;;
|
||||||
(defface yas-field-highlight-face
|
(defface yas-field-highlight-face
|
||||||
@ -4598,14 +4603,15 @@ and return the directory. Return nil if not found."
|
|||||||
|
|
||||||
They are mapped to \"yas/*\" variants.")
|
They are mapped to \"yas/*\" variants.")
|
||||||
|
|
||||||
(dolist (sym yas--backported-syms)
|
(when yas-backport-obsolete-alias
|
||||||
(let ((backported (intern (replace-regexp-in-string "\\`yas-" "yas/" (symbol-name sym)))))
|
(dolist (sym yas--backported-syms)
|
||||||
(when (boundp sym)
|
(let ((backported (intern (replace-regexp-in-string "\\`yas-" "yas/" (symbol-name sym)))))
|
||||||
(make-obsolete-variable backported sym "yasnippet 0.8")
|
(when (boundp sym)
|
||||||
(defvaralias backported sym))
|
(make-obsolete-variable backported sym "yasnippet 0.8")
|
||||||
(when (fboundp sym)
|
(defvaralias backported sym))
|
||||||
(make-obsolete backported sym "yasnippet 0.8")
|
(when (fboundp sym)
|
||||||
(defalias backported sym))))
|
(make-obsolete backported sym "yasnippet 0.8")
|
||||||
|
(defalias backported sym)))))
|
||||||
|
|
||||||
(defvar yas--exported-syms
|
(defvar yas--exported-syms
|
||||||
(let (exported)
|
(let (exported)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user