Ignore:
Timestamp:
12/04/03 19:41:34 (18 years ago)
Author:
piso
Message:

BUFFER-ACTIVATED-HOOK

File:
1 edited

Legend:

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

    r4969 r4973  
    1616          defcommand
    1717          open-file-hook
     18          buffer-activated-hook
    1819          after-save-hook
    1920          key-pressed-hook
     
    3940(defun log-debug (control-string &rest args)
    4041  (%log-debug (apply 'format nil control-string args)))
    41 
    42 (defun add-hook (hook function)
    43   (when (symbolp hook)
    44     (unless (boundp hook) (set hook nil))
    45     (let ((hook-functions (symbol-value hook)))
    46       (unless (memq function hook-functions)
    47         (setq hook-functions (cons function hook-functions))
    48         (set hook hook-functions)))))
    49 
    50 (defun invoke-hook (hook &rest args)
    51   (when (symbolp hook)
    52     (unless (boundp hook) (set hook nil))
    53     (let ((hooks (symbol-value hook)))
    54       (dolist (function hooks)
    55         (apply function args)))))
    5642
    5743(defun update-display (&optional ed)
     
    8773         (lambda () (execute-command ,command))))
    8874
     75;;; HOOKS
     76(defun add-hook (hook function)
     77  (when (symbolp hook)
     78    (unless (boundp hook) (set hook nil))
     79    (let ((hook-functions (symbol-value hook)))
     80      (unless (memq function hook-functions)
     81        (setq hook-functions (cons function hook-functions))
     82        (set hook hook-functions)))))
     83
     84(defun invoke-hook (hook &rest args)
     85  (when (symbolp hook)
     86    (unless (boundp hook) (set hook nil))
     87    (let ((hooks (symbol-value hook)))
     88      (dolist (function hooks)
     89        (apply function args)))))
     90
    8991(defvar open-file-hook nil)
     92
     93(defvar buffer-activated-hook nil)
    9094
    9195(defvar after-save-hook nil)
Note: See TracChangeset for help on using the changeset viewer.