/[emacs]/emacs/lisp/subr.el
ViewVC logotype

Diff of /emacs/lisp/subr.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.273 by miles, Fri Nov 9 01:02:27 2001 UTC revision 1.274 by monnier, Fri Nov 16 14:11:24 2001 UTC
# Line 847  If FILE is already loaded, evaluate FORM Line 847  If FILE is already loaded, evaluate FORM
847  It does nothing if FORM is already on the list for FILE.  It does nothing if FORM is already on the list for FILE.
848  FILE must match exactly.  Normally FILE is the name of a library,  FILE must match exactly.  Normally FILE is the name of a library,
849  with no directory or extension specified, since that is how `load'  with no directory or extension specified, since that is how `load'
850  is normally called."  is normally called.
851    ;; Make sure `load-history' contains the files dumped with Emacs  FILE can also be a feature (i.e. a symbol), in which case FORM is
852    ;; for the case that FILE is one of the files dumped with Emacs.  evaluated whenever that feature is `provide'd."
   (load-symbol-file-load-history)  
   ;; Make sure there is an element for FILE.  
   (or (assoc file after-load-alist)  
       (setq after-load-alist (cons (list file) after-load-alist)))  
   ;; Add FORM to the element if it isn't there.  
853    (let ((elt (assoc file after-load-alist)))    (let ((elt (assoc file after-load-alist)))
854      (or (member form (cdr elt))      ;; Make sure there is an element for FILE.
855          (progn      (unless elt (setq elt (list file)) (push elt after-load-alist))
856            (nconc elt (list form))      ;; Add FORM to the element if it isn't there.
857            ;; If the file has been loaded already, run FORM right away.      (unless (member form (cdr elt))
858            (and (assoc file load-history)        (nconc elt (list form))
859                 (eval form)))))        ;; If the file has been loaded already, run FORM right away.
860          (if (if (symbolp file)
861                  (featurep file)
862                ;; Make sure `load-history' contains the files dumped with
863                ;; Emacs for the case that FILE is one of them.
864                (load-symbol-file-load-history)
865                (assoc file load-history))
866              (eval form))))
867    form)    form)
868    
869  (defun eval-next-after-load (file)  (defun eval-next-after-load (file)
# Line 1534  configuration." Line 1536  configuration."
1536    
1537  (defun functionp (object)  (defun functionp (object)
1538    "Non-nil iff OBJECT is a type of object that can be called as a function."    "Non-nil iff OBJECT is a type of object that can be called as a function."
1539    (or (and (symbolp object)    (or (and (symbolp object) (fboundp object)
            (fboundp object)  
1540             (setq object (indirect-function object))             (setq object (indirect-function object))
1541             (eq (car-safe object) 'autoload)             (eq (car-safe object) 'autoload)
1542             (not (car-safe (cdr-safe (cdr-safe (cdr-safe (cdr-safe object)))))))             (not (car-safe (cdr-safe (cdr-safe (cdr-safe (cdr object)))))))
1543        (subrp object) (byte-code-function-p object)        (subrp object) (byte-code-function-p object)
1544        (eq (car-safe object) 'lambda)))        (eq (car-safe object) 'lambda)))
1545    

Legend:
Removed from v.1.273  
changed lines
  Added in v.1.274

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26