(current-fill-column): If fill-column is nil, return nil.
[bpt/emacs.git] / lisp / byte-run.el
index 785a89b..8d5595a 100644 (file)
@@ -1,12 +1,11 @@
-;; byte-run.el --- byte-compiler support for inlining
+;;; byte-run.el --- byte-compiler support for inlining
+
+;; Copyright (C) 1992 Free Software Foundation, Inc.
 
 ;; Author: Jamie Zawinski <jwz@lucid.com>
 ;;     Hallvard Furuseth <hbf@ulrik.uio.no>
-;; Last-Modified: 13 Jul 1992
 ;; Keywords: internal
 
-;; Copyright (C) 1992 Free Software Foundation, Inc.
-
 ;; This file is part of GNU Emacs.
 
 ;; GNU Emacs is free software; you can redistribute it and/or modify
@@ -87,9 +86,23 @@ If NEW is a string, that is the `use instead' message."
       (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