mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-10-13 21:13:04 +00:00
Rename yas-backport-obsolete-alias
* yasnippet.el (yas-alias-to-yas/prefix-p): Rename from yas-backport-obsolete-alias. (yas/root-directory): Only define if yas-alias-to-yas/prefix-p is non-nil. Mark obsolete.
This commit is contained in:
parent
bbfa1f0c9a
commit
497867cea5
13
yasnippet.el
13
yasnippet.el
@ -202,8 +202,6 @@ created with `yas-new-snippet'. "
|
|||||||
(t
|
(t
|
||||||
(error "[yas] invalid element %s in `yas-snippet-dirs'" e)))))
|
(error "[yas] invalid element %s in `yas-snippet-dirs'" e)))))
|
||||||
|
|
||||||
(defvaralias 'yas/root-directory 'yas-snippet-dirs)
|
|
||||||
|
|
||||||
(defcustom yas-new-snippet-default "\
|
(defcustom yas-new-snippet-default "\
|
||||||
# -*- mode: snippet -*-
|
# -*- mode: snippet -*-
|
||||||
# name: $1
|
# name: $1
|
||||||
@ -386,8 +384,9 @@ the trigger key itself."
|
|||||||
:type '(repeat function)
|
:type '(repeat function)
|
||||||
:group 'yasnippet)
|
:group 'yasnippet)
|
||||||
|
|
||||||
(defcustom yas-backport-obsolete-alias t
|
(defcustom yas-alias-to-yas/prefix-p t
|
||||||
"If non-nil backport function and variables from old version of yasnippet."
|
"If non-nil make aliases for the old style yas/ prefixed symbols.
|
||||||
|
It must be set to nil before loading yasnippet to take effect."
|
||||||
:type 'boolean
|
:type 'boolean
|
||||||
:group 'yasnippet)
|
:group 'yasnippet)
|
||||||
|
|
||||||
@ -4603,7 +4602,7 @@ and return the directory. Return nil if not found."
|
|||||||
|
|
||||||
They are mapped to \"yas/*\" variants.")
|
They are mapped to \"yas/*\" variants.")
|
||||||
|
|
||||||
(when yas-backport-obsolete-alias
|
(when yas-alias-to-yas/prefix-p
|
||||||
(dolist (sym yas--backported-syms)
|
(dolist (sym yas--backported-syms)
|
||||||
(let ((backported (intern (replace-regexp-in-string "\\`yas-" "yas/" (symbol-name sym)))))
|
(let ((backported (intern (replace-regexp-in-string "\\`yas-" "yas/" (symbol-name sym)))))
|
||||||
(when (boundp sym)
|
(when (boundp sym)
|
||||||
@ -4611,7 +4610,9 @@ They are mapped to \"yas/*\" variants.")
|
|||||||
(defvaralias backported sym))
|
(defvaralias backported sym))
|
||||||
(when (fboundp sym)
|
(when (fboundp sym)
|
||||||
(make-obsolete backported sym "yasnippet 0.8")
|
(make-obsolete backported sym "yasnippet 0.8")
|
||||||
(defalias backported sym)))))
|
(defalias backported sym))))
|
||||||
|
(make-obsolete 'yas/root-directory 'yas-snippet-dirs "yasnippet 0.8")
|
||||||
|
(defvaralias 'yas/root-directory 'yas-snippet-dirs))
|
||||||
|
|
||||||
(defvar yas--exported-syms
|
(defvar yas--exported-syms
|
||||||
(let (exported)
|
(let (exported)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user