Mercurial > hg > xemacs-beta
comparison lisp/prim/subr.el @ 108:360340f9fd5f r20-1b6
Import from CVS: tag r20-1b6
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:18:39 +0200 |
parents | cf808b4c4290 |
children | 59463afc5666 |
comparison
equal
deleted
inserted
replaced
107:523141596bda | 108:360340f9fd5f |
---|---|
468 (signal 'error (list (apply 'format args)))) | 468 (signal 'error (list (apply 'format args)))) |
469 | 469 |
470 (defmacro check-argument-type (predicate argument) | 470 (defmacro check-argument-type (predicate argument) |
471 "Check that ARGUMENT satisfies PREDICATE. | 471 "Check that ARGUMENT satisfies PREDICATE. |
472 If not, signal a continuable `wrong-type-argument' error until the | 472 If not, signal a continuable `wrong-type-argument' error until the |
473 returned value satifies PREDICATE, and assign the returned value | 473 returned value satisfies PREDICATE, and assign the returned value |
474 to ARGUMENT." | 474 to ARGUMENT." |
475 `(if (not (,(eval predicate) ,argument)) | 475 `(if (not (,(eval predicate) ,argument)) |
476 (setq ,argument | 476 (setq ,argument |
477 (wrong-type-argument ,predicate ,argument)))) | 477 (wrong-type-argument ,predicate ,argument)))) |
478 | 478 |
562 | 562 |
563 ;; This was not present before. I think Jamie had some objections | 563 ;; This was not present before. I think Jamie had some objections |
564 ;; to this, so I'm leaving this undefined for now. --ben | 564 ;; to this, so I'm leaving this undefined for now. --ben |
565 | 565 |
566 ;;; The objection is this: there is more than one way to load the same file. | 566 ;;; The objection is this: there is more than one way to load the same file. |
567 ;;; "foo", "foo.elc", "foo.el", and "/some/path/foo.elc" are all differrent | 567 ;;; "foo", "foo.elc", "foo.el", and "/some/path/foo.elc" are all different |
568 ;;; ways to load the exact same code. `eval-after-load' is too stupid to | 568 ;;; ways to load the exact same code. `eval-after-load' is too stupid to |
569 ;;; deal with this sort of thing. If this sort of feature is desired, then | 569 ;;; deal with this sort of thing. If this sort of feature is desired, then |
570 ;;; it should work off of a hook on `provide'. Features are unique and | 570 ;;; it should work off of a hook on `provide'. Features are unique and |
571 ;;; the arguments to (load) are not. --Stig | 571 ;;; the arguments to (load) are not. --Stig |
572 | 572 |