Mercurial > emacs
diff lisp/subr.el @ 144:535ec1aa78ef
*** empty log message ***
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 22 Dec 1990 22:51:22 +0000 |
parents | 899728e6052a |
children | 7e7575d7b6d0 |
line wrap: on
line diff
--- a/lisp/subr.el Thu Dec 20 20:38:22 1990 +0000 +++ b/lisp/subr.el Sat Dec 22 22:51:22 1990 +0000 @@ -290,6 +290,17 @@ This makes or adds to an entry on `after-load-alist'. FILE should be the name of a library, with no directory name." (eval-after-load file (read))) + +(defmacro defun-inline (name args &rest body) + "Create an \"inline defun\" (actually a macro). +Use just like `defun'." + (nconc (list 'defmacro name '(&rest args)) + (if (stringp (car body)) + (prog1 (list (car body)) + (setq body (or (cdr body) body)))) + (list (list 'cons (list 'quote + (cons 'lambda (cons args body))) + 'args)))) (defun user-original-login-name () "Return user's login name from original login.