[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/emacs-lisp/byte-run.el [emacs-unicod
From: |
Miles Bader |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/emacs-lisp/byte-run.el [emacs-unicode-2] |
Date: |
Mon, 28 Jun 2004 04:57:34 -0400 |
Index: emacs/lisp/emacs-lisp/byte-run.el
diff -c emacs/lisp/emacs-lisp/byte-run.el:1.1.2.1
emacs/lisp/emacs-lisp/byte-run.el:1.1.2.2
*** emacs/lisp/emacs-lisp/byte-run.el:1.1.2.1 Fri Apr 16 12:50:13 2004
--- emacs/lisp/emacs-lisp/byte-run.el Mon Jun 28 07:29:45 2004
***************
*** 76,96 ****
(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.
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 function
was first made obsolete, for example a date or a release number."
(interactive "aMake function obsolete: \nxObsoletion replacement: ")
! (let ((handler (get fn 'byte-compile)))
(if (eq 'byte-compile-obsolete handler)
! (setq handler (nth 1 (get fn 'byte-obsolete-info)))
! (put fn 'byte-compile 'byte-compile-obsolete))
! (put fn 'byte-obsolete-info (list new handler when)))
! fn)
! (defun make-obsolete-variable (var new &optional when)
"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.
--- 76,96 ----
(eval-and-compile
(put ',name 'byte-optimizer 'byte-compile-inline-expand))))
! (defun make-obsolete (function new &optional when)
"Make the byte-compiler warn that FUNCTION 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 function
was first made obsolete, for example a date or a release number."
(interactive "aMake function obsolete: \nxObsoletion replacement: ")
! (let ((handler (get function 'byte-compile)))
(if (eq 'byte-compile-obsolete handler)
! (setq handler (nth 1 (get function 'byte-obsolete-info)))
! (put function 'byte-compile 'byte-compile-obsolete))
! (put function 'byte-obsolete-info (list new handler when)))
! function)
! (defun make-obsolete-variable (variable new &optional when)
"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.
***************
*** 102,109 ****
(if (equal str "") (error ""))
(intern str))
(car (read-from-string (read-string "Obsoletion replacement: ")))))
! (put var 'byte-obsolete-variable (cons new when))
! var)
(put 'dont-compile 'lisp-indent-hook 0)
(defmacro dont-compile (&rest body)
--- 102,109 ----
(if (equal str "") (error ""))
(intern str))
(car (read-from-string (read-string "Obsoletion replacement: ")))))
! (put variable 'byte-obsolete-variable (cons new when))
! variable)
(put 'dont-compile 'lisp-indent-hook 0)
(defmacro dont-compile (&rest body)
***************
*** 134,144 ****
;; Remember, it's magic.
(cons 'progn body))
! (defun with-no-warnings (&optional first &rest body)
"Like `progn', but prevents compiler warnings in the body."
;; The implementation for the interpreter is basically trivial.
! (if body (car (last body))
! first))
;;; I nuked this because it's not a good idea for users to think of using it.
--- 134,143 ----
;; Remember, it's magic.
(cons 'progn body))
! (defun with-no-warnings (&rest body)
"Like `progn', but prevents compiler warnings in the body."
;; The implementation for the interpreter is basically trivial.
! (car (last body)))
;;; I nuked this because it's not a good idea for users to think of using it.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/emacs-lisp/byte-run.el [emacs-unicode-2],
Miles Bader <=