next-command-event

Tetsuo Tsukamoto czkmt @ remus.dti.ne.jp
2005年 12月 27日 (火) 23:51:27 JST


塚本です.こんにちは.

poe.el の next-command-event() の実装に疑問があります.

> (defun-maybe-cond next-command-event (&optional event prompt)
>   "Read an event object from the input stream.
> If EVENT is non-nil, it should be an event object and will be filled
> in and returned; otherwise a new event object will be created and
> returned.
> If PROMPT is non-nil, it should be a string and will be displayed in
> the echo area while this function is waiting for an event."
>   ((and (>= emacs-major-version 20)
> 	(>= emacs-minor-version 4))
>    ;; Emacs 20.4 and later.
>    (read-event prompt))			; should specify 2nd arg?
>   ((and (= emacs-major-version 20)
> 	(= emacs-minor-version 3))
>    ;; Emacs 20.3.
>    (read-event prompt))			; should specify 2nd arg?
>   ((and (fboundp 'read-event)
> 	(subrp (symbol-function 'read-event)))
>    ;; Emacs 19, 20.1 and 20.2.
>    (if prompt (message "%s" prompt))
>    (read-event))
>   (t
>    (if prompt (message "%s" prompt))
>    (read-char)))

上記の最初の条件は,コメントには

;; Emacs 20.4 and later.

と書いてありますが,Emacs 21.1, 21.2, 21.3, 22.0.50 では fail する
と思います.これは

(or (>= emacs-major-version 21)
    (and (= emacs-major-version 20)
	 (>= emacs-minor-version 4)))

の間違いでしょうか.


-- 
Tetsuo Tsukamoto





More information about the APEL-ja mailing list