From: morioka Date: Sun, 25 Oct 1998 18:14:26 +0000 (+0000) Subject: (make-local-hook): New macro. X-Git-Tag: apel-9_6~10 X-Git-Url: http://git.chise.org/gitweb/?p=elisp%2Fapel.git;a=commitdiff_plain;h=f78c675c33e664521928ae68a9b1b40f0a467d97 (make-local-hook): New macro. (add-local-hook): New macro. (remove-local-hook): New macro. --- diff --git a/poe.el b/poe.el index f5c97e1..7405c50 100644 --- a/poe.el +++ b/poe.el @@ -177,11 +177,27 @@ STRING should be given if the last search was by `string-match' on STRING. (defun read-string (prompt &optional initial-input history) "Read a string from the minibuffer, prompting with string PROMPT. If non-nil, second arg INITIAL-INPUT is a string to insert before reading. -The third arg HISTORY, is dummy for compatibility. [emu.el] +The third arg HISTORY, is dummy for compatibility. See `read-from-minibuffer' for details of HISTORY argument." (si:read-string prompt initial-input)) )) +(defmacro-maybe make-local-hook (hook)) + +;; They are not Emacs features + +(defmacro-maybe add-local-hook (hook function &optional append) + (if (fboundp 'make-local-hook) + (list 'add-hook hook function append 'local) + (list 'add-hook hook function append) + )) + +(defmacro remove-local-hook (hook function) + (if (fboundp 'make-local-hook) + (list 'remove-hook hook function 'local) + (list 'remove-hook hook function) + )) + ;;; @ Emacs 19.30 emulation ;;;