;;
;; If old (v18) compiler is used, top-level macros are expanded at
;; *load-time*, not compile-time. So, you cannot use macros defined
-;; in this file using `defmacro-maybe'. Especially, you cannot use
-;; `eval-when-compile' and `eval-and-compile' in this file.
+;; in this file using `defmacro-maybe'. In addition, due to this
+;; limitation, `eval-when-compile' and `eval-and-compile' provided by
+;; this file do not do compile-time evaluation at all.
;;; Code:
Therefore, write `(setq foo (delete element foo))'
to be sure of changing the value of `foo'.
\[poe-18.el; EMACS 19 emulating function]"
- (if (equal elt (car list))
- (cdr list)
- (let ((rest list)
- (rrest (cdr list)))
- (while (and rrest (not (equal elt (car rrest))))
- (setq rest rrest
- rrest (cdr rrest)))
- (setcdr rest (cdr rrest))
- list)))
+ (if list
+ (if (equal elt (car list))
+ (cdr list)
+ (let ((rest list)
+ (rrest (cdr list)))
+ (while (and rrest (not (equal elt (car rrest))))
+ (setq rest rrest
+ rrest (cdr rrest)))
+ (setcdr rest (cdr rrest))
+ list))))
(defun member (elt list)
"Return non-nil if ELT is an element of LIST. Comparison done with EQUAL.
;;; macros; they are "nuked" by rms in FSF version.)
(put 'inline 'lisp-indent-hook 0)
-(defalias-maybe 'inline 'progn)
+(defmacro inline (&rest body)
+ "Eval BODY forms sequentially and return value of last one.
+
+This emulating macro does not support function inlining because old \(v18\)
+compiler does not support inlining feature.
+\[poe-18.el; EMACS 19 emulating macro]"
+ (` (progn (,@ body))))
(put 'defsubst 'lisp-indent-hook 'defun)
(put 'defsubst 'edebug-form-spec 'defun)
(defmacro-maybe eval-when-compile (&rest body)
"Like progn, but evaluates the body at compile-time.
-This emulating macro does not work if used at top-level.
-Top-level macros are expanded at load-time.
+This emulating macro does not do compile-time evaluation at all because
+of the limitation of old \(v18\) compiler.
\[poe-18.el; EMACS 19 emulating macro]"
- (list 'quote (eval (cons 'progn body))))
+ (cons 'progn body))
(put 'eval-and-compile 'lisp-indent-hook 0)
(defmacro-maybe eval-and-compile (&rest body)
"Like progn, but evaluates the body at compile-time as well as at load-time.
-This emulating macro does not work if used at top-level.
-Top-level macros are expanded at load-time.
+This emulating macro does not do compile-time evaluation at all because
+of the limitation of old \(v18\) compiler.
\[poe-18.el; EMACS 19 emulating macro]"
- ;; `form' is a parameter of `byte-compile-form'. kludge! kludge! kludge!
- ;; this kludge prevents from evaluating `body' twice when this macro is
- ;; expanded at load-time.
- (if (and (boundp 'form)
- (eq (car-safe form) 'eval-and-compile))
- (eval (cons 'progn body)))
(cons 'progn body))