-;; byte-run.el --- byte-compiler support for inlining
+;;; byte-run.el --- byte-compiler support for inlining
;; Copyright (C) 1992 Free Software Foundation, Inc.
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to
-;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+;; along with GNU Emacs; see the file COPYING. If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
;;; Commentary:
-;;; interface to selectively inlining functions.
-;;; This only happens when source-code optimization is turned on.
+;; interface to selectively inlining functions.
+;; This only happens when source-code optimization is turned on.
;;; Code:
(put fn 'byte-compile 'byte-compile-obsolete)))
fn)
+(defun make-obsolete-variable (var new)
+ "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."
+ (interactive
+ (list
+ (let ((str (completing-read "Make variable obsolete: " obarray 'boundp t)))
+ (if (equal str "") (error ""))
+ (intern str))
+ (car (read-from-string (read-string "Obsoletion replacement: ")))))
+ (put var 'byte-obsolete-variable new)
+ var)
+
(put 'dont-compile 'lisp-indent-hook 0)
(defmacro dont-compile (&rest body)
- "Like `progn', but the body always runs interpreted (not compiled)."
+ "Like `progn', but the body always runs interpreted (not compiled).
+If you think you need this, you're probably making a mistake somewhere."
(list 'eval (list 'quote (if (cdr body) (cons 'progn body) (car body)))))
\f