# HG changeset patch # User Glenn Morris # Date 1251682356 0 # Node ID 0299ec0f58e604c55622f2fa0c2829a07b4c22bb # Parent d2e8b86ba828d1d3c7337a7a24a89937ec41c3e7 (define-obsolete-face-alias): New macro. diff -r d2e8b86ba828 -r 0299ec0f58e6 lisp/emacs-lisp/byte-run.el --- a/lisp/emacs-lisp/byte-run.el Mon Aug 31 00:28:37 2009 +0000 +++ b/lisp/emacs-lisp/byte-run.el Mon Aug 31 01:32:36 2009 +0000 @@ -1,7 +1,7 @@ ;;; byte-run.el --- byte-compiler support for inlining -;; Copyright (C) 1992, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009 Free Software Foundation, Inc. +;; Copyright (C) 1992, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, +;; 2009 Free Software Foundation, Inc. ;; Author: Jamie Zawinski ;; Hallvard Furuseth @@ -180,6 +180,21 @@ (defvaralias ,obsolete-name ,current-name ,docstring) (make-obsolete-variable ,obsolete-name ,current-name ,when))) +;; FIXME This is only defined in this file because the variable- and +;; function- versions are too. Unlike those two, this one is not used +;; by the byte-compiler (would be nice if it could warn about obsolete +;; faces, but it doesn't really do anything special with faces). +;; It only really affects M-x describe-face output. +(defmacro define-obsolete-face-alias (obsolete-face current-face + &optional when) + "Make OBSOLETE-FACE a face alias for CURRENT-FACE and mark it obsolete. +The optional string WHEN gives the Emacs version where OBSOLETE-FACE +became obsolete." + `(progn + (put ,obsolete-face 'face-alias ,current-face) + ;; Used by M-x describe-face. + (put ,obsolete-face 'obsolete-face (or ,when t)))) + (defmacro dont-compile (&rest body) "Like `progn', but the body always runs interpreted (not compiled). If you think you need this, you're probably making a mistake somewhere."