From f78c675c33e664521928ae68a9b1b40f0a467d97 Mon Sep 17 00:00:00 2001 From: morioka Date: Sun, 25 Oct 1998 18:14:26 +0000 Subject: [PATCH] (make-local-hook): New macro. (add-local-hook): New macro. (remove-local-hook): New macro. --- poe.el | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) 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 ;;; -- 1.7.10.4