Skip to content

Commit

Permalink
Merge pull request #123 from tkita/master
Browse files Browse the repository at this point in the history
remove function next-command-event
  • Loading branch information
tkita committed Feb 29, 2020
2 parents f7f7250 + 8c89973 commit 488432d
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 21 deletions.
11 changes: 11 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
2020-02-29 Tsuyoshi Kitamoto <tsuyoshi.kitamoto@gmail.com>

* skk-macs.el (next-command-event): Remove function.
* skk.el (skk-henkan-show-candidates): Use function read-event() instead of
next-command-event().
* skk-tut.el (skktut-end-tutorial): Ditto.
* skk-sticky.el (skk-insert): Ditto.
* skk-kcode.el (skk-input-by-code-or-menu-jump,skk-input-by-code-or-menu-1): Ditto.
* skk-isearch.el (skk-isearch-start-henkan): Ditto.
* skk-gadget.el (skk-clock): Ditto.

2020-02-29 Tsuyoshi Kitamoto <tsuyoshi.kitamoto@gmail.com>

* Makefile (test): テスト実行時に bayesian と tut-code のバイトコンパイルを追加.
Expand Down
4 changes: 2 additions & 2 deletions skk-annotation.el
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@
;;
(skk-annotation-message 'annotation)
;;
(setq event (next-command-event))
(setq event (read-event))
(when (skk-key-binding-member (skk-event-key event)
'(key-board-quit
skk-kanagaki-bs
Expand Down Expand Up @@ -727,7 +727,7 @@ NO-PREVIOUS-ANNOTATION $B$r;XDj(B (\\[Universal-Argument] \\[skk-annotation-ad
nil)))
(condition-case nil
(progn
(setq event (next-command-event)
(setq event (read-event)
key (skk-event-key event)
command (key-binding key))
;; Return value of the following expression is important.
Expand Down
4 changes: 2 additions & 2 deletions skk-gadget.el
Original file line number Diff line number Diff line change
Expand Up @@ -312,11 +312,11 @@ interactive $B$K5/F0$9$kB>!"(B\"clock /(skk-clock)/\" $B$J$I$N%(%s%H%j$r(B S
(ding)
(unless (sit-for (setq sec (+ sec 0.16))
'nodisplay)
(next-command-event)
(read-event)
(signal 'quit nil))
(ding)))))
(unless (sit-for (- 1 sec) 'nodisplay)
(next-command-event)
(read-event)
(signal 'quit nil))))
(quit
(prog2
Expand Down
2 changes: 1 addition & 1 deletion skk-isearch.el
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ If the current mode is different from previous, remove it first."
(interactive)
(let ((digit (or digit
(- (logand last-command-event ?\177) ?0)))
(event (next-command-event nil (skk-isearch-incomplete-message))))
(event (read-event (skk-isearch-incomplete-message))))
(cond ((equal event ?\ )
;; XEmacs $B$G$O(B eq $B$K$O$J$i$J$$(B
(with-current-buffer (get-buffer-create skk-isearch-working-buffer)
Expand Down
8 changes: 4 additions & 4 deletions skk-kcode.el
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ To find a character in `%s', type 7/8 bits JIS code (00nn),\
(funcall skk-tooltip-function str)
(message "%s" str)))
;;
(let* ((event (next-command-event))
(let* ((event (read-event))
(char (event-to-character event))
(key (skk-event-key event))
rest ch)
Expand Down Expand Up @@ -299,7 +299,7 @@ To find a character in `%s', type 7/8 bits JIS code (00nn),\
n-org skk-code-n1-min
(- n-org 128) (- skk-code-n1-min 128)
(- n-org 128) (- skk-code-n1-min 128))
(next-command-event)
(read-event)
(setq n n-org))
;;
(t
Expand Down Expand Up @@ -350,7 +350,7 @@ To find a character in `%s', type 7/8 bits JIS code (00nn),\
(if skk-show-tooltip
(funcall skk-tooltip-function str)
(message "%s" str)))
(let* ((event (next-command-event))
(let* ((event (read-event))
(char (event-to-character event))
(key (skk-event-key event))
rest ch)
Expand Down Expand Up @@ -398,7 +398,7 @@ To find a character in `%s', type 7/8 bits JIS code (00nn),\
n1-org n2-org
(- n1-org 128) (- n2-org 128)
(- n1-org 128) (- n2-org 128))
(next-command-event)
(read-event)
(setq n1 n1-org n2 n2-org))
;;
((eq char ?>)
Expand Down
9 changes: 0 additions & 9 deletions skk-macs.el
Original file line number Diff line number Diff line change
Expand Up @@ -228,15 +228,6 @@ If the event isn't a keypress, this returns nil."
(setq buffer-undo-list (cdr buffer-undo-list))))

;; For GNU Emacs.
(defun 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."
(read-event prompt))

(defun skk-color-cursor-display-p ()
(and (skk-find-window-system)
(fboundp 'x-display-color-p)
Expand Down
2 changes: 1 addition & 1 deletion skk-sticky.el
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@
ad-do-it)
(t
;; Some key's pressed.
(let ((next-event (next-command-event)))
(let ((next-event (read-event)))
(if (skk-sticky-double-p this-command
(aref (skk-event-key next-event) 0))
(skk-sticky-set-henkan-point)
Expand Down
2 changes: 1 addition & 1 deletion skk-tut.el
Original file line number Diff line number Diff line change
Expand Up @@ -1008,7 +1008,7 @@ with both the subject and the body empty.
'face skk-tut-do-it-face)))
(while (not skktut-tutorial-end)
(ignore-errors
(let* ((event (next-command-event))
(let* ((event (read-event))
(char (event-to-character event)))
(skktut-message "<return> $B%-!<$r2!$7$F$/$@$5$$(B"
"Hit <return> key")
Expand Down
2 changes: 1 addition & 1 deletion skk.el
Original file line number Diff line number Diff line change
Expand Up @@ -1903,7 +1903,7 @@ CHAR-LIST $B$N;D$j$HC)$l$J$/$J$C$?@aE@$NLZ$NAH$rJV$9!#(B"
(setq n (skk-henkan-show-candidate-subr candidate-keys henkan-list))
(when (> n 0)
(condition-case nil
(let* ((event (next-command-event))
(let* ((event (read-event))
(char (event-to-character event))
(key (skk-event-key event))
num)
Expand Down

0 comments on commit 488432d

Please sign in to comment.