From: morioka Date: Tue, 20 Oct 1998 09:01:59 +0000 (+0000) Subject: (eval-and-compile): New macro. X-Git-Tag: apel-9_5~16 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7125a945d043bc504a7ed29916ef4af737449343;p=elisp%2Fapel.git (eval-and-compile): New macro. Enclose redefinition of `read-string' by `eval-and-compile'. --- 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.