From 7125a945d043bc504a7ed29916ef4af737449343 Mon Sep 17 00:00:00 2001 From: morioka Date: Tue, 20 Oct 1998 09:01:59 +0000 Subject: [PATCH] (eval-and-compile): New macro. Enclose redefinition of `read-string' by `eval-and-compile'. --- poe.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/poe.el b/poe.el index 4b51c51..572c1bc 100644 --- a/poe.el +++ b/poe.el @@ -107,6 +107,11 @@ ;;; @ Emacs 19 emulation ;;; +(defmacro-maybe eval-and-compile (&rest body) + "Like `progn', but evaluates the body at compile time and at load time." + ;; Remember, it's magic. + (cons 'progn body)) + (defun-maybe minibuffer-prompt-width () "Return the display width of the minibuffer prompt." (save-excursion @@ -146,9 +151,8 @@ STRING should be given if the last search was by `string-match' on STRING. (>= emacs-minor-version 29)) ;; for Emacs 19.28 or earlier (fboundp 'si:read-string) - (progn + (eval-and-compile (fset 'si:read-string (symbol-function 'read-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. -- 1.7.10.4