Changeset 9265


Ignore:
Timestamp:
05/27/05 11:32:12 (16 years ago)
Author:
piso
Message:

Work in progress.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/lisp/j.lisp

    r8738 r9265  
    22;;;
    33;;; Copyright (C) 2003-2005 Peter Graves
    4 ;;; $Id: j.lisp,v 1.43 2005-03-07 03:34:05 piso Exp $
     4;;; $Id: j.lisp,v 1.44 2005-05-27 11:32:12 piso Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    147147    (let ((hook-functions (symbol-value hook)))
    148148      (unless (memq function hook-functions)
    149         (setq hook-functions (cons function hook-functions))
     149        (push function hook-functions)
    150150        (set hook hook-functions)))))
    151151
    152152(defun invoke-hook (hook &rest args)
    153   (when (symbolp hook)
    154     (unless (boundp hook) (set hook nil))
     153  (when (and (symbolp hook) (boundp hook))
    155154    (let ((hooks (symbol-value hook)))
    156       (dolist (function hooks)
    157         (apply function args)))))
     155      (when hooks
     156        (dolist (function hooks)
     157          (apply function args))
     158        t))))
    158159
    159160(defvar open-file-hook nil)
Note: See TracChangeset for help on using the changeset viewer.