2000-09-09  MIYASHITA Hisashi  <himi@m17n.org>

	* iiimcf-sc.el (iiimcf-server-control-setup):
	Use iiimcf-server-control-default-language instead of
	iiimcf-server-control-language.
	(iiimcf-server-control-setup): If connection is down,
	call iiimcf-server-control-shutdown at first.

2000-09-08  MIYASHITA Hisashi  <himi@m17n.org>

	* iiimcf-sc.el: New file
	(iiimcf-server-control): New group for custom package.
	(iiimcf-server-control-default-port): New defcustom variable.
	(iiimcf-server-control-hostlist): New defcustom variable.
	This replaces iiimcf-server-control-host.
	(iiimcf-server-control-host): removed.
	(iiimcf-server-control-parse-hostname): New function.
	(iiimcf-server-control-setup): Adapt it to the new format
	of iiimcf-server-control-hostlist.

	* iiimcf.el (iiimcf-version): New variable.
	(iiimcf-make-client-descriptor): New function.
	(iiimcf-send-client-descriptor): New function.
	(iiimcf-im-setimvalues-handler-default): New function.
	And register it as a handler.

	* iiimcf.el: Moved iiimcf-server-control-part to iiimcf-sc.el.

	* iiimp.el (iiimp-string-conversion-or-coding-system):
	Set utf-16-be-no-signature-unix by default if it exists.
	(iiimp-string-pack): If iiimp-string-conversion-or-coding-system
	is not utf-16-be-no-signature-unix, and the encoded string has BOM
	at the head, strip it.

2000-09-07  MIYASHITA Hisashi  <himi@m17n.org>

	* iiimp.el (iiimp-send-im-setimvalues): Bug fix.
	Call iiimp-im-attribute-pack instead of iiimp-imattribute-pack.
	(iiimp-attribid-unpack): Bug fix.  Get car of the slot
	obtained by rassq.

2000-08-30  MIYASHITA Hisashi  <himi@m17n.org>

	* iiimp.el (iiimp-packet-erase): When removing buffer region,
	use (point-min) as a start point instead of 1.

	* iiimcf.el (iiimcf-event-to-char): Bug fix.  The number of
	normal ASCII events must be larger than 0.
	(iiimcf-server-control-host): Set the default host to localhost.
	(iiimcf-server-control-com-id): Move it to the internal variable section.
	(iiimcf-server-control-im-id): likewise.
	(iiimcf-server-control-ic-id): likewise.
	(iiimcf-server-control-preedit-open-string): New variable.
	(iiimcf-server-control-preedit-close-string): New variable.
	(iiimcf-server-control-preedit-face-alist): Change the format of
	each slot.  The third element consists of start and end strings.
	(iiimcf-server-control-preedit-use-face-p): New variable.
	(iiimcf-server-control-convert-iiim-feedback): Adapt it to the above
	change.
	(iiimcf-server-control-put-face-to-preedit): Moved from
	iiimcf-server-control-format-textprops.
	(iiimcf-server-control-enclose-preedit-with-string): New function.
	(iiimcf-server-control-format-preedit): New function.
	This function replaces iiimcf-server-control-format-textprops.
	It can also modify a preedit string for display.
	(iiimcf-server-control-format-textprops): Removed.
	(iiimcf-server-control-setup-preedit-text):
	Use iiimcf-server-control-preedit-open-string and
	iiimcf-server-control-preedit-close-string instead of
	directly embedding strings.  And set-markser-insertion-type
	to t(moved when insertion) on iiimcf-server-control-preedit-marker.
	(iiimcf-server-control-insert-preedit): Take the second argument, `caret'.
	And generate new string for display from iiimcf-server-control-preedit.
	At this time, update `caret' that corresponds to the new string.

2000-08-29  MIYASHITA Hisashi  <himi@m17n.org>

	* iiimp.el (iiimp-write-channel): If iiimp-debug-flag
	is dump or verbose, dump hexadecimal binary that is
	sent to a server.

2000-08-29  MIYASHITA Hisashi  <himi@meadowy.org>

	* iiimcf.el (iiimcf-prevent-error): 
	(iiimcf-error): Move error handling part for the front.
	(iiimcf-server-control-async-handler): When iiimp-fatal error
	is occurred, shutdown the connection, and propergate the error.
	(iiimcf-server-control-keyforward): likewise.
	(iiimcf-server-control-shutdown): If the connection is closed,
	initialize iiimcf-server-control-ic-id and
	iiimcf-server-control-im-id without sending messages.
	(iiimcf-server-control-forward-event): Discard all forwarded
	events that cannot be translated to Emacs events.
	(iiimcf-server-control-maintain-preedit-text): When the command
	where we dispatches a message is not iiimcf-server-control-keyforward,
	restore position and current buffer in order to deal with inserstions
	that may be caused by the command.
	(iiimcf-server-control-commit-string): Don't directly insert the string.
	instead, generate events from it
	("iiim-server-control"): Change the indicator string.

	* iiimp.el (iiimp-connection-error): 
	New function.
	(iiimp-connection-error): New error symbol.
	Put an error message.
	(iiimp-check-channel-connection): New function.
	(iiimp-wait-message): If the channel of com-id is closed,
	cause iiimp-connection-error.
	(iiimp-send-message): likewise.

2000-08-26  MIYASHITA Hisashi  <himi@meadowy.org>

	* iiimcf.el: Add commnets on Emacs event and IIIM keyevent.
	(iiimcf-keycode-spec-alist): Change the format of each slot.
	Third element in each slot, if any, specifies a keychar.
	(iiimcf-event-to-char): New function.
	(iiimcf-basic-event-type-to-keycode): New function.
	(iiimcf-translate-key): Split this function.
	A part on converting event to keycode is moved to
	iiimcf-basic-event-type-to-keycode, and another part
	on converting event to keychar is moved to
	iiimcf-event-to-char.
	(iiimcf-im-destroyic-reply-handler-default):
	Use iiimp-send-message instead of calling
	iiimp-send-im-trigger-notify-reply directly.
	(iiimcf-im-trigger-notify-handler-default): Likewise.
	(iiimcf-im-forward-event-handler-default): Likewise.
	(iiimcf-im-forward-event-with-operations-handler-default):
	Likewise.
	(iiimcf-im-preedit-start-handler-default): Likewise.
	(iiimcf-im-preedit-draw-handler-default): Likewise.
	(iiimcf-im-preedit-done-handler-default): Likewise.
	(iiimcf-im-status-start-handler-default): Likewise.
	(iiimcf-im-status-draw-handler-default): Likewise.
	(iiimcf-im-status-done-handler-default): Likewise.
	(iiimcf-im-lookup-choice-start-handler-default): Likewise.
	(iiimcf-im-lookup-choice-draw-handler-default): Likewise.
	(iiimcf-im-lookup-choice-process-handler-default): Likewise.
	(iiimcf-im-lookup-choice-done-handler-default): Likewise.
	(iiimcf-im-aux-start-handler-default): Likewise.
	(iiimcf-im-aux-draw-handler-default): Likewise.
	(iiimcf-im-aux-done-handler-default): Likewise.
	(iiimcf-server-control-setup): Likewise.
	(iiimcf-server-control-shutdown): Likewise.
	(iiimcf-server-control-notify-trigger): Likewise.
	(iiimcf-server-control-keyforward): Likewise.
	("iiim-server-control"): Change the indicator string.

	* iiimp.el (iiimp-debug-flag): evaluate lso at byte compilation
	time in order to chagen compilated code.
	(iiimp-async-invocation-handler): make it a permanent
	buffer-local variable at declaration time.
	(iiimp-opcode-send-function): New function, which
	retrieves an appropreate sending function.
	(iiimp-opcode-number): Make it a defsubst function.
	(iiimp-client-descriptor-pack): Use defun to define
	function instead of defsubst.
	(iiimp-client-descriptor-unpack): Likewise.
	(iiimp-object-descriptor-pack): Likewise.
	(iiimp-object-descriptor-unpack): Likewise.
	(iiimp-jarfile-object-pack): Likewise.
	(iiimp-jarfile-object-unpack): Likewise.
	(iiimp-im-descriptor-pack): Likewise.
	(iiimp-im-descriptor-unpack): Likewise.
	(iiimp-im-attribute-pack): Likewise.
	(iiimp-im-attribute-unpack): Likewise.
	(iiimp-ic-attribute-pack): Likewise.
	(iiimp-ic-attribute-unpack): Likewise.
	(iiimp-keyevent-pack): Likewise.
	(iiimp-keyevent-unpack): Likewise.
	(iiimp-contents-pack): Likewise.
	(iiimp-contents-unpack): Likewise.
	(iiimp-send-message): New function, from here, use
	this function to send IIIMP messages instead of
	calling specific sending functions.

2000-08-13  MIYASHITA Hisashi  <himi@m17n.org>

	* iiimp.el (iiimp-basic-opcode-spec-list):
	Register send functions.

2000-08-06  MIYASHITA Hisashi  <himi@m17n.org>

	* iiimp.el (iiimp-basic-opcode-spec-list):
	Add handlers for parse: iiimp-parse-im-setimvalues,
	iiimp-parse-im-setimvalues-reply,
	iiimp-parse-im-seticvalues-reply,
	and iiimp-parse-im-geticvalues-reply.
	(iiimp-basic-opcode-vector):
	Put iiimp-opcode property to each iiimp message symbol.
	(iiimp-opcode-spec): New function.
	(iiimp-opcode-number): Rewritten simply.
	(iiimp-attribid-pack): When attribid is a symbol registered
	in iiimp-attribid-alist, use the corresponding attibid-ID.
	(iiimp-attribid-unpack): When attribid is a registered ID
	in iiimp-attribid-alist, use the correspoinding symbol
	as unpacked value.
	(iiimp-im-attribute-pack): If the given attribid is
	a known symbol, pack values in the fashion that is
	defined by the attribid.
	(iiimp-im-attribute-unpack): If the unpacked attribid
	is a known ID, unpack values in the fashion that is
	defined by the attribid.
	(iiimp-ic-attribute-pack): Use let instead of let*.
	(iiimp-ic-attribute-unpack): When at is 2 or 3,
	i.e, attribid is character-subsets or input-method,
	unpack attatched binary as is instead of causing an error.
	(iiimp-parse-imvalues-internal): New function.
	(iiimp-parse-im-getimvalues-reply): Use the above function.
	(iiimp-parse-im-setimvalues): New function.
	(iiimp-parse-im-setimvalues-reply): New function.
	(iiimp-parse-im-seticvalues-reply): New function.
	(iiimp-parse-im-geticvalues-reply): New function.
	(iiimp-select-message-parser): Use iiimp-opcode-spec
	instead of accessing iiimp-basic-opcode-spec-list.
	(iiimp-send-im-setimvalues): New function.
	(iiimp-send-im-setimvalues-reply): New function.
	(iiimp-send-im-getimvalues): Bug fix.  Modify
	the protocol format.
	(iiimp-send-im-seticvalues): New function.
	(iiimp-send-im-geticvalues): New function.

2000-08-04  MIYASHITA Hisashi  <himi@m17n.org>

	* iiimcf.el (iiimcf-server-control-setup):
	Add a handler, iiimcf-server-control-trigger-notify. 
	(iiimcf-server-control-dispatch-event):
	Bind input-method-function to nil before calling
	read-key-sequence and call-interactively.
	(iiimcf-server-control-trigger-notify):
	New function.
	(iiimcf-server-control-forward-event):
	Set the current buffer to
	iimcf-server-control-editing-buffer
	before dispatching events.
	("iiim-server-control"):
	Modify explanation strings.

	* iiimp.el (iiimp-open-network-channel):
	Disble newly created buffer's undo list.

2000-08-03  MIYASHITA Hisashi  <himi@m17n.org>

	* iiimp.el (iiimp-pack-annotation-interval):
	Add elem to let's varlist.
	(iiimp-text-unpack):
	Add sidx, eidx, and len-v to let's varlist.
	(iiimp-contents-unpack):
	Add len to let's varlist.
	(iiimp-parse-im-lookup-choice-start):
	Fix typo.  Change `labelowner' to `labelownp'.
	(iiimp-wait-message):
	Add type to let's varlist.

	* iiimcf.el (iiimcf-server-control-editing-buffer):
	New variable.
	(iiimcf-server-control-keyforward):
	Set the above variable.
	(iiimcf-server-control-setup-preedit-text):
	Before setting iiimcf-server-control-preedit-marker,
	set the current buffer to iiimcf-server-control-editing-buffer.
	(iiimcf-server-control-commit-string):
	Before inserting committed string,
	set the current buffer to iiimcf-server-control-editing-buffer.
	(iiimcf-server-control-clear-preedit-text):
	Set buffer-undo-list to t during removing preedit text
	in order not to record undo infomation.
	(iiimcf-server-control-setup-preedit-text):
	Set buffer-undo-list to t during setting up preedit text
	in order not to record undo infomation.
	(iiimcf-server-control-insert-preedit):
	likewise.
	(iiimcf-server-control-clear-preedit-text):
	Use let to use mbuf.

2000-08-02  MIYASHITA Hisashi  <himi@m17n.org>

	* iiimcf.el (iiimcf-server-control-insert-preedit): 
	If iiimcf-server-control-preedit-marker is invalid,
	regard it as an evidence that a setup for preedit
	text is not completed, then call 
	iiimcf-server-control-setup-preedit-text.
	(iiimcf-server-control-maintain-preedit-text):
	Don't try to process unread events.

	* iiimcf.el (iiimcf-server-control-dispatch-event):
	Extract iiimcf-server-control-forward-event.
	(iiimcf-server-control-forward-event):
	Use the above function.
	(iiimcf-server-control-keyforward):
	If we don't forward events, dispatch them by
	iiimcf-server-control-dispatch-event instead of
	sending back to the preedit event loop.
	(iiimcf-server-control-setup):
	Add handlers:
	iiimcf-server-control-prepare-lookup-choice,
	iiimcf-server-control-draw-lookup-choice,
	iiimcf-server-control-redraw-lookup-choice, and
	iiimcf-server-control-clear-lookup-choice.
	(iiimcf-server-control-shutdown):
	Bug fix.  Remove iiimcf-server-control-setup-event-flow-mode
	handler instead of registering.
	And remove the above 4 handlers.
	(iiimcf-server-control-maintain-preedit-text-internal): 
	If iiimcf-server-control-preedit-marker is valid,
	draw preedit text in inline mode.  And when
	the reviced preedit text is empty, call
	iiimcf-server-control-clear-preedit-text.
	(iiimcf-server-control-maintain-preedit-text):
	Don't call iiimcf-server-control-clear-preedit-text
	in the end.
	(iiimcf-server-control-prepare-lookup-choice): 
	(iiimcf-server-control-draw-lookup-choice): 
	(iiimcf-server-control-redraw-lookup-choice): 
	(iiimcf-server-control-clear-lookup-choice):
	New functions as handlers

	* IIIMECF first import dark-0.01.

