;; XXX: should do compile-time and load-time check before loading
;; "localhook". But, it is difficult since "localhook" is
;; already loaded via "install" at compile-time. any idea?
- (require 'localhook)
- ))
+ (require 'localhook)))
-(eval-when-compile
- (condition-case nil
- (require 'edebug)
- (error
- (defmacro def-edebug-spec (symbol spec)
- (` (put (quote (, symbol)) 'edebug-form-spec (quote (, spec)))))
- ))
- (require 'static)
- )
+;;; `eval-when-compile' is defined in "poe-18" under v18 with old compiler.
+(eval-when-compile (require 'static))
+
+;; imported from emacs-20.3/lisp/emacs-lisp/edebug.el.
+;; `def-edebug-spec' is an autoloaded macro in v19 and later.
+(defmacro-maybe def-edebug-spec (symbol spec)
+ "Set the edebug-form-spec property of SYMBOL according to SPEC.
+Both SYMBOL and SPEC are unevaluated. The SPEC can be 0, t, a symbol
+\(naming a function\), or a list."
+ (` (put (quote (, symbol)) 'edebug-form-spec (quote (, spec)))))
(def-edebug-spec defun-maybe defun)
(def-edebug-spec defmacro-maybe defmacro)
(defmacro-maybe when (cond &rest body)
"If COND yields non-nil, do BODY, else return nil."
(list 'if cond (cons 'progn body)))
+;; (def-edebug-spec when (&rest form))
;; imported from emacs-20.3/lisp/subr.el.
(defmacro-maybe unless (cond &rest body)
"If COND yields nil, do BODY, else return nil."
(cons 'if (cons cond (cons nil body))))
+;; (def-edebug-spec unless (&rest form))
;;; @ Emacs 19.23 emulation
(static-condition-case nil
;; compile-time check.
(progn
- ;; XXX: current make process requires this file at compile-time,
- ;; so this test will be always success at compile-time.
+ ;; XXX: this file is already loaded at compile-time,
+ ;; so this test will always success.
(char-before)
;; If our definition is found at compile-time, signal an error.
;; XXX: should signal more specific error.
(static-condition-case nil
;; compile-time check.
(progn
- ;; XXX: current make process requires this file at compile-time,
- ;; so this test will be always success at compile-time.
+ ;; XXX: this file is already loaded at compile-time,
+ ;; so this test will always success.
(char-after)
;; If our definition is found at compile-time, signal an error.
;; XXX: should signal more specific error.
or a symbol such as 'clear. [XEmacs emulating function]"
ch)
- (defun-maybe event-to-character (event)
+ (defsubst-maybe event-to-character (event)
"Return the character approximation to the given event object.
If the event isn't a keypress, this returns nil.
\[XEmacs emulating function]"
(if base
(logior base (car (cdr mask)))
)))))
- ((integerp event) event)
- ))
+ ((integerp event) event)))
)