comparison lisp/emacs-lisp/byte-run.el @ 90119:8395880305fe

Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-25 Merge from emacs--cvs-trunk--0 Patches applied: * emacs--cvs-trunk--0 (patch 173-179) - Update from CVS
author Miles Bader <miles@gnu.org>
date Mon, 14 Mar 2005 05:27:53 +0000
parents 4c90ffeb71c5 a7bed417c2e6
children 30ad2795fdab
comparison
equal deleted inserted replaced
90118:e330fedc9152 90119:8395880305fe
1 ;;; byte-run.el --- byte-compiler support for inlining 1 ;;; byte-run.el --- byte-compiler support for inlining
2 2
3 ;; Copyright (C) 1992, 2004 Free Software Foundation, Inc. 3 ;; Copyright (C) 1992, 2004, 2005 Free Software Foundation, Inc.
4 4
5 ;; Author: Jamie Zawinski <jwz@lucid.com> 5 ;; Author: Jamie Zawinski <jwz@lucid.com>
6 ;; Hallvard Furuseth <hbf@ulrik.uio.no> 6 ;; Hallvard Furuseth <hbf@ulrik.uio.no>
7 ;; Maintainer: FSF 7 ;; Maintainer: FSF
8 ;; Keywords: internal 8 ;; Keywords: internal
32 ;;; Code: 32 ;;; Code:
33 33
34 ;; Redefined in byte-optimize.el. 34 ;; Redefined in byte-optimize.el.
35 ;; This is not documented--it's not clear that we should promote it. 35 ;; This is not documented--it's not clear that we should promote it.
36 (fset 'inline 'progn) 36 (fset 'inline 'progn)
37 (put 'inline 'lisp-indent-hook 0) 37 (put 'inline 'lisp-indent-function 0)
38 38
39 39
40 ;;; Interface to inline functions. 40 ;;; Interface to inline functions.
41 41
42 ;; (defmacro proclaim-inline (&rest fns) 42 ;; (defmacro proclaim-inline (&rest fns)
103 (intern str)) 103 (intern str))
104 (car (read-from-string (read-string "Obsoletion replacement: "))))) 104 (car (read-from-string (read-string "Obsoletion replacement: ")))))
105 (put variable 'byte-obsolete-variable (cons new when)) 105 (put variable 'byte-obsolete-variable (cons new when))
106 variable) 106 variable)
107 107
108 (put 'dont-compile 'lisp-indent-hook 0) 108 (put 'dont-compile 'lisp-indent-function 0)
109 (defmacro dont-compile (&rest body) 109 (defmacro dont-compile (&rest body)
110 "Like `progn', but the body always runs interpreted (not compiled). 110 "Like `progn', but the body always runs interpreted (not compiled).
111 If you think you need this, you're probably making a mistake somewhere." 111 If you think you need this, you're probably making a mistake somewhere."
112 (declare (debug t)) 112 (declare (debug t))
113 (list 'eval (list 'quote (if (cdr body) (cons 'progn body) (car body))))) 113 (list 'eval (list 'quote (if (cdr body) (cons 'progn body) (car body)))))
116 ;;; interface to evaluating things at compile time and/or load time 116 ;;; interface to evaluating things at compile time and/or load time
117 ;;; these macro must come after any uses of them in this file, as their 117 ;;; these macro must come after any uses of them in this file, as their
118 ;;; definition in the file overrides the magic definitions on the 118 ;;; definition in the file overrides the magic definitions on the
119 ;;; byte-compile-macro-environment. 119 ;;; byte-compile-macro-environment.
120 120
121 (put 'eval-when-compile 'lisp-indent-hook 0) 121 (put 'eval-when-compile 'lisp-indent-function 0)
122 (defmacro eval-when-compile (&rest body) 122 (defmacro eval-when-compile (&rest body)
123 "Like `progn', but evaluates the body at compile time. 123 "Like `progn', but evaluates the body at compile time.
124 The result of the body appears to the compiler as a quoted constant." 124 The result of the body appears to the compiler as a quoted constant."
125 (declare (debug t)) 125 (declare (debug t))
126 ;; Not necessary because we have it in b-c-initial-macro-environment 126 ;; Not necessary because we have it in b-c-initial-macro-environment
127 ;; (list 'quote (eval (cons 'progn body))) 127 ;; (list 'quote (eval (cons 'progn body)))
128 (cons 'progn body)) 128 (cons 'progn body))
129 129
130 (put 'eval-and-compile 'lisp-indent-hook 0) 130 (put 'eval-and-compile 'lisp-indent-function 0)
131 (defmacro eval-and-compile (&rest body) 131 (defmacro eval-and-compile (&rest body)
132 "Like `progn', but evaluates the body at compile time and at load time." 132 "Like `progn', but evaluates the body at compile time and at load time."
133 (declare (debug t)) 133 (declare (debug t))
134 ;; Remember, it's magic. 134 ;; Remember, it's magic.
135 (cons 'progn body)) 135 (cons 'progn body))
136 136
137 (put 'with-no-warnings 'lisp-indent-function 0)
137 (defun with-no-warnings (&rest body) 138 (defun with-no-warnings (&rest body)
138 "Like `progn', but prevents compiler warnings in the body." 139 "Like `progn', but prevents compiler warnings in the body."
139 ;; The implementation for the interpreter is basically trivial. 140 ;; The implementation for the interpreter is basically trivial.
140 (car (last body))) 141 (car (last body)))
141 142
145 ;;; with particular source files; it's a mistake to suggest to users 146 ;;; with particular source files; it's a mistake to suggest to users
146 ;;; they should associate these with particular source files. 147 ;;; they should associate these with particular source files.
147 ;;; There is hardly any reason to change these parameters, anyway. 148 ;;; There is hardly any reason to change these parameters, anyway.
148 ;;; --rms. 149 ;;; --rms.
149 150
150 ;; (put 'byte-compiler-options 'lisp-indent-hook 0) 151 ;; (put 'byte-compiler-options 'lisp-indent-function 0)
151 ;; (defmacro byte-compiler-options (&rest args) 152 ;; (defmacro byte-compiler-options (&rest args)
152 ;; "Set some compilation-parameters for this file. This will affect only the 153 ;; "Set some compilation-parameters for this file. This will affect only the
153 ;; file in which it appears; this does nothing when evaluated, and when loaded 154 ;; file in which it appears; this does nothing when evaluated, and when loaded
154 ;; from a .el file. 155 ;; from a .el file.
155 ;; 156 ;;