diff options
| author | Daniel Mendler <mail@daniel-mendler.de> | 2023-01-05 11:22:42 +0100 |
|---|---|---|
| committer | Daniel Mendler <mail@daniel-mendler.de> | 2023-01-05 11:22:42 +0100 |
| commit | 3b3b1fe6f616b9b71fe69fb0da3bda55098009e7 (patch) | |
| tree | bf7c968bdf2ae5335b314e4bef01fdc6bdb29545 /compat-macs.el | |
| parent | 1399e7e98a50752d40d7169b9cfaf95ab80cfc55 (diff) | |
Add string-split
Diffstat (limited to 'compat-macs.el')
| -rw-r--r-- | compat-macs.el | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/compat-macs.el b/compat-macs.el index c40f473..7d6c097 100644 --- a/compat-macs.el +++ b/compat-macs.el @@ -238,6 +238,18 @@ attribute, is greater than the current Emacs version." (declare (debug compat-defun) (doc-string 3) (indent 2)) ;; <UNTESTED> (compat--define-function 'macro name arglist docstring rest)) +(defmacro compat-defalias (name def) + "Declare compatibility alias NAME with DEF." + (compat--generate + name + (lambda (realname version) + `(defalias ',realname ',def)) + (lambda (realname _version) + `(defalias ',name ',realname)) + (lambda () + `(not (fboundp ',name))) + nil)) + (defmacro compat-defvar (name initval docstring &rest attr) "Declare compatibility variable NAME with initial value INITVAL. The obligatory documentation string DOCSTRING must be given. |
