X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Fbytecomp-runtime.el;h=7c198d837bf5b988ee0b7a11c33fbf59f2efdc00;hb=273e8446bbdbf720291e2c533284ed987506bf83;hp=105374a9b99d21d9fe06c625ae034974f196051c;hpb=6883ee56ec887c2c48abe5b06b5e66aa74031910;p=chise%2Fxemacs-chise.git.1 diff --git a/lisp/bytecomp-runtime.el b/lisp/bytecomp-runtime.el index 105374a..7c198d8 100644 --- a/lisp/bytecomp-runtime.el +++ b/lisp/bytecomp-runtime.el @@ -2,7 +2,7 @@ ;; Copyright (C) 1992, 1997 Free Software Foundation, Inc. -;; Author: Jamie Zawinski +;; Author: Jamie Zawinski ;; Author: Hallvard Furuseth ;; Maintainer: XEmacs Development Team ;; Keywords: internal, dumped @@ -55,13 +55,13 @@ They will only be compiled open-coded when `byte-optimize' is true." (apply 'nconc (mapcar - '(lambda (x) - (` ((or (memq (get '(, x) 'byte-optimizer) - '(nil byte-compile-inline-expand)) - (error - "%s already has a byte-optimizer, can't make it inline" - '(, x))) - (put '(, x) 'byte-optimizer 'byte-compile-inline-expand)))) + #'(lambda (x) + `((or (memq (get ',x 'byte-optimizer) + '(nil byte-compile-inline-expand)) + (error + "%s already has a byte-optimizer, can't make it inline" + ',x)) + (put ',x 'byte-optimizer 'byte-compile-inline-expand))) fns)))) @@ -71,10 +71,10 @@ They will only be compiled open-coded when `byte-optimize' is true." (apply 'nconc (mapcar - '(lambda (x) - (` ((if (eq (get '(, x) 'byte-optimizer) - 'byte-compile-inline-expand) - (put '(, x) 'byte-optimizer nil))))) + #'(lambda (x) + `((if (eq (get ',x 'byte-optimizer) + 'byte-compile-inline-expand) + (put ',x 'byte-optimizer nil)))) fns)))) ;; This has a special byte-hunk-handler in bytecomp.el. @@ -91,10 +91,12 @@ They will only be compiled open-coded when `byte-optimize' is true." ; (list 'put (list 'quote name) ; ''byte-optimizer ''byte-compile-inline-expand)))) -(defun make-obsolete (fn new) - "Make the byte-compiler warn that FUNCTION is obsolete. +(defun make-obsolete (fn new &optional when) + "Make the byte-compiler warn that function FN is obsolete. The warning will say that NEW should be used instead. -If NEW is a string, that is the `use instead' message." +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) @@ -103,10 +105,12 @@ 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, +(defun make-obsolete-variable (var new &optional when) + "Make the byte-compiler warn that variable VAR is obsolete, and NEW should be used instead. If NEW is a string, then that is the -`use instead' message." +`use instead' message. +If provided, WHEN should be a string indicating when the variable +was first made obsolete, for example a date or a release number." (interactive (list (let ((str (completing-read "Make variable obsolete: " obarray 'boundp t))) @@ -119,7 +123,7 @@ and NEW should be used instead. If NEW is a string, then that is the ;; By overwhelming demand, we separate out truly obsolete symbols from ;; those that are present for GNU Emacs compatibility. (defun make-compatible (fn new) - "Make the byte-compiler know that FUNCTION is provided for compatibility. + "Make the byte-compiler know that function FN is provided for compatibility. The warning will say that NEW should be used instead. If NEW is a string, that is the `use instead' message." (interactive "aMake function compatible: \nxCompatible replacement: ") @@ -131,7 +135,7 @@ If NEW is a string, that is the `use instead' message." fn) (defun make-compatible-variable (var new) - "Make the byte-compiler know that VARIABLE is provided for compatibility. + "Make the byte-compiler know that variable VAR is provided for compatibility, and NEW should be used instead. If NEW is a string, then that is the `use instead' message." (interactive @@ -178,7 +182,7 @@ Called (eval-when-feature (FEATURE [. FILENAME]) BODYFORMS...). If (featurep 'FEATURE), evals now; otherwise adds an elt to `after-load-alist' (which see), using FEATURE as filename if FILENAME is nil." (let ((file (or (cdr feature) (symbol-name (car feature))))) - `(let ((bodythunk (function (lambda () ,@body)))) + `(let ((bodythunk #'(lambda () ,@body))) (if (featurep ',(car feature)) (funcall bodythunk) (setq after-load-alist (cons '(,file . (list 'lambda '() bodythunk))