diff options
| author | Glenn Morris | 2009-08-31 01:32:36 +0000 |
|---|---|---|
| committer | Glenn Morris | 2009-08-31 01:32:36 +0000 |
| commit | 95ed0f11006d521c2146b59590f96fef2fcefc88 (patch) | |
| tree | 8feb37d6176a0cb30b4ef6749c71fe67039a2957 | |
| parent | d50f7687ce8d054f28fc7ce86457bfffa6c8133d (diff) | |
| download | emacs-95ed0f11006d521c2146b59590f96fef2fcefc88.tar.gz emacs-95ed0f11006d521c2146b59590f96fef2fcefc88.zip | |
(define-obsolete-face-alias): New macro.
| -rw-r--r-- | lisp/emacs-lisp/byte-run.el | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el index c03ccee2481..b6408f2c14c 100644 --- a/lisp/emacs-lisp/byte-run.el +++ b/lisp/emacs-lisp/byte-run.el | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | ;;; byte-run.el --- byte-compiler support for inlining | 1 | ;;; byte-run.el --- byte-compiler support for inlining |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1992, 2001, 2002, 2003, 2004, 2005, | 3 | ;; Copyright (C) 1992, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, |
| 4 | ;; 2006, 2007, 2008, 2009 Free Software Foundation, Inc. | 4 | ;; 2009 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: Jamie Zawinski <jwz@lucid.com> | 6 | ;; Author: Jamie Zawinski <jwz@lucid.com> |
| 7 | ;; Hallvard Furuseth <hbf@ulrik.uio.no> | 7 | ;; Hallvard Furuseth <hbf@ulrik.uio.no> |
| @@ -180,6 +180,21 @@ Info node `(elisp)Variable Aliases' for more details." | |||
| 180 | (defvaralias ,obsolete-name ,current-name ,docstring) | 180 | (defvaralias ,obsolete-name ,current-name ,docstring) |
| 181 | (make-obsolete-variable ,obsolete-name ,current-name ,when))) | 181 | (make-obsolete-variable ,obsolete-name ,current-name ,when))) |
| 182 | 182 | ||
| 183 | ;; FIXME This is only defined in this file because the variable- and | ||
| 184 | ;; function- versions are too. Unlike those two, this one is not used | ||
| 185 | ;; by the byte-compiler (would be nice if it could warn about obsolete | ||
| 186 | ;; faces, but it doesn't really do anything special with faces). | ||
| 187 | ;; It only really affects M-x describe-face output. | ||
| 188 | (defmacro define-obsolete-face-alias (obsolete-face current-face | ||
| 189 | &optional when) | ||
| 190 | "Make OBSOLETE-FACE a face alias for CURRENT-FACE and mark it obsolete. | ||
| 191 | The optional string WHEN gives the Emacs version where OBSOLETE-FACE | ||
| 192 | became obsolete." | ||
| 193 | `(progn | ||
| 194 | (put ,obsolete-face 'face-alias ,current-face) | ||
| 195 | ;; Used by M-x describe-face. | ||
| 196 | (put ,obsolete-face 'obsolete-face (or ,when t)))) | ||
| 197 | |||
| 183 | (defmacro dont-compile (&rest body) | 198 | (defmacro dont-compile (&rest body) |
| 184 | "Like `progn', but the body always runs interpreted (not compiled). | 199 | "Like `progn', but the body always runs interpreted (not compiled). |
| 185 | If you think you need this, you're probably making a mistake somewhere." | 200 | If you think you need this, you're probably making a mistake somewhere." |