diff options
author | Jim Blandy <jimb@redhat.com> | 1992-08-12 12:50:10 +0000 |
---|---|---|
committer | Jim Blandy <jimb@redhat.com> | 1992-08-12 12:50:10 +0000 |
commit | d20d6bcf462e142782e145f65466fb49df8efaab (patch) | |
tree | d7ed92ede0bd1db568408b640829808acc138c20 /lisp/byte-run.el | |
parent | 36e38304c4accf84bada6094408be067faecb5e4 (diff) | |
download | emacs-d20d6bcf462e142782e145f65466fb49df8efaab.tar.gz |
entered into RCS
Diffstat (limited to 'lisp/byte-run.el')
-rw-r--r-- | lisp/byte-run.el | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/lisp/byte-run.el b/lisp/byte-run.el index b0bd59b98d1..1a09ec6ac11 100644 --- a/lisp/byte-run.el +++ b/lisp/byte-run.el @@ -86,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))))) |