Mercurial > emacs
diff lisp/emacs-lisp/byte-run.el @ 89909:68c22ea6027c
Sync to HEAD
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Fri, 16 Apr 2004 12:51:06 +0000 |
parents | 375f2633d815 |
children | 4c90ffeb71c5 |
line wrap: on
line diff
--- a/lisp/emacs-lisp/byte-run.el Thu Apr 15 01:08:34 2004 +0000 +++ b/lisp/emacs-lisp/byte-run.el Fri Apr 16 12:51:06 2004 +0000 @@ -1,6 +1,6 @@ ;;; byte-run.el --- byte-compiler support for inlining -;; Copyright (C) 1992 Free Software Foundation, Inc. +;; Copyright (C) 1992, 2004 Free Software Foundation, Inc. ;; Author: Jamie Zawinski <jwz@lucid.com> ;; Hallvard Furuseth <hbf@ulrik.uio.no> @@ -67,14 +67,14 @@ ;; This has a special byte-hunk-handler in bytecomp.el. (defmacro defsubst (name arglist &rest body) "Define an inline function. The syntax is just like that of `defun'." + (declare (debug defun)) (or (memq (get name 'byte-optimizer) '(nil byte-compile-inline-expand)) (error "`%s' is a primitive" name)) - (list 'prog1 - (cons 'defun (cons name (cons arglist body))) - (list 'eval-and-compile - (list 'put (list 'quote name) - ''byte-optimizer ''byte-compile-inline-expand)))) + `(prog1 + (defun ,name ,arglist ,@body) + (eval-and-compile + (put ',name 'byte-optimizer 'byte-compile-inline-expand)))) (defun make-obsolete (fn new &optional when) "Make the byte-compiler warn that FUNCTION is obsolete. @@ -91,9 +91,9 @@ fn) (defun make-obsolete-variable (var new &optional when) - "Make the byte-compiler warn that VARIABLE is obsolete, -and NEW should be used instead. If NEW is a string, then that is the -`use instead' message. + "Make the byte-compiler warn that VARIABLE is obsolete. +The warning will say that NEW should be used instead. +If NEW is a string, that is the `use instead' message. If provided, WHEN should be a string indicating when the variable was first made obsolete, for example a date or a release number." (interactive @@ -109,6 +109,7 @@ (defmacro dont-compile (&rest body) "Like `progn', but the body always runs interpreted (not compiled). If you think you need this, you're probably making a mistake somewhere." + (declare (debug t)) (list 'eval (list 'quote (if (cdr body) (cons 'progn body) (car body))))) @@ -121,6 +122,7 @@ (defmacro eval-when-compile (&rest body) "Like `progn', but evaluates the body at compile time. The result of the body appears to the compiler as a quoted constant." + (declare (debug t)) ;; Not necessary because we have it in b-c-initial-macro-environment ;; (list 'quote (eval (cons 'progn body))) (cons 'progn body)) @@ -128,6 +130,7 @@ (put 'eval-and-compile 'lisp-indent-hook 0) (defmacro eval-and-compile (&rest body) "Like `progn', but evaluates the body at compile time and at load time." + (declare (debug t)) ;; Remember, it's magic. (cons 'progn body)) @@ -169,4 +172,5 @@ ;; (file-format emacs19))" ;; nil) +;;; arch-tag: 76f8328a-1f66-4df2-9b6d-5c3666dc05e9 ;;; byte-run.el ends here