Index: head/editors/tamago/Makefile =================================================================== --- head/editors/tamago/Makefile (revision 378251) +++ head/editors/tamago/Makefile (revision 378252) @@ -1,57 +1,51 @@ # Created by: tetsushi NAKAI # $FreeBSD$ PORTNAME= tamago PORTVERSION= 4.0.6.0.20041122.19 -PORTREVISION= 11 +PORTREVISION= 12 CATEGORIES= editors elisp MASTER_SITES= ${MASTER_SITE_DEBIAN} MASTER_SITE_SUBDIR= pool/main/e/egg PKGNAMESUFFIX= -${EMACS_PORT_NAME} DISTNAME= egg_4.0.6+0.20041122cvs.orig PATCH_SITES= ${MASTER_SITE_DEBIAN:S,%SUBDIR%,pool/main/e/egg,} \ ${MASTER_SITE_LOCAL:S,%SUBDIR%,nork,} PATCHFILES= egg_4.0.6+0.20041122cvs-19.diff.gz PATCH_DIST_STRIP= -p1 MAINTAINER= hrs@FreeBSD.org COMMENT= Egg V4, Multilingual Input Method for Emacsen LICENSE= GPLv2 USES= gmake USE_EMACS= yes WRKSRC= ${WRKDIR}/egg-4.0.6+0.20041122cvs GNU_CONFIGURE= yes CONFIGURE_ENV= lispdir="${LOCALBASE}/${EMACS_VERSION_SITE_LISPDIR}" PLIST_SUB= ELISPDIR="${EMACS_VERSION_SITE_LISPDIR}" PORTDOCS= AUTHORS ChangeLog ChangeLog.1997-1998 \ ChangeLog.2000-2001 PROBLEMS README.ja.txt TODO \ README.Debian changelog.Debian OPTIONS_DEFINE= DOCS -.include +.include -.if ${EMACS_PORT_NAME:Memacs2[1234]} -PLIST_SUB+= HAS_JISX0213="" -.else -PLIST_SUB+= HAS_JISX0213="@comment " -.endif - post-build: cd ${WRKSRC}/helper && \ ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} \ ${_MAKE_JOBS} ${MAKE_ARGS} egg-helper ${INSTALL_DATA} ${WRKSRC}/debian/changelog ${WRKSRC}/changelog.Debian ${INSTALL_DATA} ${WRKSRC}/debian/README.Debian ${WRKSRC} post-install: ${INSTALL_PROGRAM} ${WRKSRC}/helper/egg-helper \ ${STAGEDIR}${PREFIX}/bin/egg-helper .if ${PORT_OPTIONS:MDOCS} ${MKDIR} ${STAGEDIR}${DOCSDIR} cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR} .endif -.include +.include Index: head/editors/tamago/files/patch-Makefile.in =================================================================== --- head/editors/tamago/files/patch-Makefile.in (revision 378251) +++ head/editors/tamago/files/patch-Makefile.in (revision 378252) @@ -1,45 +1,58 @@ --- Makefile.in.orig 2015-01-31 19:24:09.000000000 +0900 -+++ Makefile.in 2015-01-31 19:25:52.000000000 +0900 -@@ -115,32 +115,32 @@ ++++ Makefile.in 2015-02-02 01:32:47.000000000 +0900 +@@ -54,8 +54,7 @@ + egg-sim.el \ + menudiag.el \ + its.el \ +- its-keydef.el \ +- leim-list.el \ ++ its-keydef.el + # + EGGSRCS = \ +@@ -115,32 +114,32 @@ + install-site: all echo "Egg system will be installed in ${lispdir}/egg...."; \ - if [ -d ${lispdir}/egg ]; then \ -+ if [ -d -p ${DESTDIR}${lispdir}/egg ]; then \ ++ if [ -d ${DESTDIR}${lispdir}/egg ]; then \ echo "Clean up the previsous installation...."; \ - rm -rf ${lispdir}/egg/*; \ + rm -rf ${DESTDIR}${lispdir}/egg/*; \ else \ echo "Make the directory ${lispdir}/egg..."; \ - mkdir ${lispdir}/egg; \ + mkdir -p ${DESTDIR}${lispdir}/egg; \ fi; \ # - for FILE in ${TOPSRCS} ${TOPELCS} ${INITELS}; \ +- for FILE in ${TOPSRCS} ${TOPELCS} ${INITELS}; \ ++ for FILE in ${TOPELCS} ${INITELS}; \ do \ - ${INSTALL_DATA} $${FILE} ${lispdir}/egg/; \ + ${INSTALL_DATA} $${FILE} ${DESTDIR}${lispdir}/egg/; \ done; \ # - mkdir ${lispdir}/egg/egg ; \ +- for FILE in ${EGGSRCS} ${EGGELCS} ; \ + mkdir -p ${DESTDIR}${lispdir}/egg/egg ; \ - for FILE in ${EGGSRCS} ${EGGELCS} ; \ ++ for FILE in ${EGGELCS} ; \ do \ - ${INSTALL_DATA} $${FILE} ${lispdir}/egg/egg; \ + ${INSTALL_DATA} $${FILE} ${DESTDIR}${lispdir}/egg/egg; \ done; \ - touch ${lispdir}/egg/egg/.nosearch; \ + touch ${DESTDIR}${lispdir}/egg/egg/.nosearch; \ # - mkdir ${lispdir}/egg/its ; \ +- for FILE in ${ITSSRCS} ${ITSELCS} ; \ + mkdir -p ${DESTDIR}${lispdir}/egg/its ; \ - for FILE in ${ITSSRCS} ${ITSELCS} ; \ ++ for FILE in ${ITSELCS} ; \ do \ - ${INSTALL_DATA} $${FILE} ${lispdir}/egg/its ; \ + ${INSTALL_DATA} $${FILE} ${DESTDIR}${lispdir}/egg/its ; \ done; \ - touch ${lispdir}/egg/its/.nosearch; \ + touch ${DESTDIR}${lispdir}/egg/its/.nosearch; \ uninstall-site: Index: head/editors/tamago/files/patch-egg-anthy.el =================================================================== --- head/editors/tamago/files/patch-egg-anthy.el (revision 378251) +++ head/editors/tamago/files/patch-egg-anthy.el (revision 378252) @@ -1,11 +1,27 @@ --- egg/anthy.el.orig 2015-01-31 19:24:09.000000000 +0900 -+++ egg/anthy.el 2015-01-31 19:39:19.000000000 +0900 -@@ -146,7 +146,7 @@ ++++ egg/anthy.el 2015-02-02 00:32:09.000000000 +0900 +@@ -146,12 +146,11 @@ (if anthy-egg-use-utf8 '("--egg" "--utf8") '("--egg")))) - (process-kill-without-query anthy-egg-proc) + (set-process-query-on-exit-flag anthy-egg-proc nil) (set-process-coding-system anthy-egg-proc cs cs) (set-process-sentinel anthy-egg-proc 'anthy-egg-proc-sentinel) (set-marker-insertion-type (process-mark anthy-egg-proc) t) +- (save-excursion +- (set-buffer buf) ++ (with-current-buffer buf + (erase-buffer) + (buffer-disable-undo)) + (anthyipc-get-greeting anthy-egg-proc))) +@@ -404,8 +403,7 @@ + (let ((buf (get-buffer-create anthy-egg-dic-buffer-name)) + (cs (if anthy-egg-use-utf8 'utf-8-unix 'euc-japan-unix)) + proc) +- (save-excursion +- (set-buffer buf) ++ (with-current-buffer buf + (setq proc (apply 'start-process "anthy-egg-dic" buf + anthy-egg-dic-util-command + (if anthy-egg-use-utf8 Index: head/editors/tamago/files/patch-egg-anthyipc.el =================================================================== --- head/editors/tamago/files/patch-egg-anthyipc.el (nonexistent) +++ head/editors/tamago/files/patch-egg-anthyipc.el (revision 378252) @@ -0,0 +1,12 @@ +--- egg/anthyipc.el.orig 2015-01-31 19:24:09.000000000 +0900 ++++ egg/anthyipc.el 2015-02-02 00:32:22.000000000 +0900 +@@ -46,8 +46,7 @@ + ,@vlist) + (if (and (eq (process-status proc) 'run) + (buffer-live-p buffer)) +- (save-excursion +- (set-buffer buffer) ++ (with-current-buffer buffer + (erase-buffer) + ,send-expr + (goto-char (point-max)) Property changes on: head/editors/tamago/files/patch-egg-anthyipc.el ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/editors/tamago/files/patch-egg-canna.el =================================================================== --- head/editors/tamago/files/patch-egg-canna.el (revision 378251) +++ head/editors/tamago/files/patch-egg-canna.el (revision 378252) @@ -1,29 +1,48 @@ --- egg/canna.el.orig 2015-01-31 19:24:09.000000000 +0900 -+++ egg/canna.el 2015-01-31 19:39:19.000000000 +0900 -@@ -337,7 +337,7 @@ ++++ egg/canna.el 2015-02-02 00:52:59.000000000 +0900 +@@ -134,7 +134,7 @@ + (defun canna-make-backend (lang env &optional source-lang converted-lang) + (let ((finalize (canna-backend-func-name "canna-finalize-backend" lang)) + (backend (canna-backend-func-name "canna-backend" lang env))) +- (if (null (fboundp finalize)) ++ (if (null (fboundp 'finalize)) + (progn + (fset finalize (function (lambda () (canna-finalize-backend)))) + (egg-set-finalize-backend (list finalize)))) +@@ -319,8 +319,7 @@ + (unwind-protect + (progn + (setq buf (generate-new-buffer " *CANNA*")) +- (save-excursion +- (set-buffer buf) ++ (with-current-buffer buf + (erase-buffer) + (buffer-disable-undo) + (set-buffer-multibyte nil) +@@ -337,7 +336,7 @@ (setq port (substring hostname (match-end 0)) hostname (substring hostname 0 (match-beginning 0)))) (if (and (stringp port) (string-match "^[0-9]+$" port)) - (setq port (string-to-int port))) + (setq port (string-to-number port))) (and (equal hostname "") (setq hostname (or (getenv "CANNAHOST") "localhost"))) (setq host hostname) -@@ -367,7 +367,7 @@ +@@ -367,7 +366,7 @@ (setq proc (open-network-stream proc-name buf hostname port)) (error quit))))) (when (processp proc) - (process-kill-without-query proc) + (set-process-query-on-exit-flag proc nil) (set-process-coding-system proc 'binary 'binary) (set-process-sentinel proc 'canna-comm-sentinel) (set-marker-insertion-type (process-mark proc) t) -@@ -869,7 +869,7 @@ +@@ -869,7 +868,7 @@ (setq kouho-list (cdr (reverse kouho-list))) (setq kouho-list (reverse kouho-list)) (setq i 0) - (setq kouho-list (mapcar '(lambda (k) + (setq kouho-list (mapcar #'(lambda (k) (prog1 (cons k i) (setq i (1+ i)))) Index: head/editors/tamago/files/patch-egg-cannarpc.el =================================================================== --- head/editors/tamago/files/patch-egg-cannarpc.el (nonexistent) +++ head/editors/tamago/files/patch-egg-cannarpc.el (revision 378252) @@ -0,0 +1,12 @@ +--- egg/cannarpc.el.orig 2015-01-31 19:23:34.000000000 +0900 ++++ egg/cannarpc.el 2015-02-02 00:32:59.000000000 +0900 +@@ -79,8 +79,7 @@ + (list + 'let v + (append +- `(save-excursion +- (set-buffer (process-buffer proc)) ++ `(with-current-buffer (process-buffer proc) + (erase-buffer) + ,send-expr + (process-send-region proc (point-min) (point-max)) Property changes on: head/editors/tamago/files/patch-egg-cannarpc.el ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/editors/tamago/files/patch-egg-com.el =================================================================== --- head/editors/tamago/files/patch-egg-com.el (revision 378251) +++ head/editors/tamago/files/patch-egg-com.el (revision 378252) @@ -1,98 +1,118 @@ --- egg-com.el.orig 2015-01-31 19:24:09.000000000 +0900 -+++ egg-com.el 2015-01-31 19:25:52.000000000 +0900 ++++ egg-com.el 2015-02-02 00:29:50.000000000 +0900 @@ -99,9 +99,10 @@ (prog1 (- (point) pos) (goto-char pos)))) -(eval-and-compile - (if (string< mule-version "6.0") ;; for before Emacs23 - (progn +(if (and (fboundp 'make-coding-system) + (null (get 'make-coding-system 'byte-obsolete-info))) +;; since Emacs 23.1, make-coding-system has been marked as obsolete. + (eval-and-compile (define-ccl-program ccl-decode-fixed-euc-jp `(2 ((r2 = ,(charset-id 'japanese-jisx0208)) @@ -156,7 +157,8 @@ (make-coding-system 'fixed-euc-jp 4 ?W "Coding System for fixed EUC Japanese" (cons ccl-decode-fixed-euc-jp ccl-encode-fixed-euc-jp)) ) - ;; Emacs23 or later + (eval-and-compile + ;; since Emacs 23.1, make-coding-system has been marked as obsolete. ;; From Handa-san. [mule-ja : No.09414] (define-charset 'fixed-euc-jp "Fixed EUC Japanese" @@ -175,7 +177,10 @@ ;; Korean -(eval-and-compile +(if (and (fboundp 'make-coding-system) + (null (get 'make-coding-system 'byte-obsolete-info))) +;; since Emacs 23.1, make-coding-system has been marked as obsolete. + (eval-and-compile (define-ccl-program ccl-decode-fixed-euc-kr `(2 ((r2 = ,(charset-id 'korean-ksc5601)) @@ -202,12 +207,27 @@ (write-read-repeat r0))) (read r0) (repeat))))) +(make-coding-system 'fixed-euc-kr 4 ?W "Coding System for fixed EUC Korean" + (cons ccl-decode-fixed-euc-kr ccl-encode-fixed-euc-kr))) + (eval-and-compile + ;; since Emacs 23.1, make-coding-system has been marked as obsolete. + (define-charset 'fixed-euc-kr + "Fixed EUC Korean" + :dimension 2 + :superset '(ascii + (korean-ksc5601 . #x8080))) + (define-coding-system 'fixed-euc-kr + "Coding System for fixed EUC Korean" + :mnemonic ?W + :coding-type 'charset + :charset-list '(fixed-euc-kr)) + ) ) -(make-coding-system 'fixed-euc-kr 4 ?W "Coding System for fixed EUC Korean" - (cons ccl-decode-fixed-euc-kr ccl-encode-fixed-euc-kr)) ;; Chinese +;; +;; TODO: convert an obsolete make-coding-system to define-coding-system. (defconst egg-pinyin-shengmu '(("" . 0) ("B" . 1) ("C" . 2) ("Ch" . 3) ("D" . 4) -@@ -828,9 +848,10 @@ +@@ -578,8 +598,7 @@ + (set-buffer work) + (erase-buffer) + (if (null (stringp from)) +- (save-excursion +- (set-buffer buf) ++ (with-current-buffer buf + (setq from (buffer-substring from to)))) + (insert (string-as-multibyte from)) + (encode-fixed-euc-china-region 1 (point-max) type) +@@ -828,9 +847,10 @@ ;; Do not move the point, leave it where it was. (defmacro comm-accept-process-output () `(let ((p (point))) - (if (null (accept-process-output proc comm-accept-timeout)) - (egg-error "backend timeout (comm-accept-process-output)")) - (goto-char p))) + (with-local-quit + (if (null (accept-process-output proc comm-accept-timeout)) + (egg-error "backend timeout (comm-accept-process-output)")) + (goto-char p)))) (defmacro comm-require-process-output (n) `(if (< (point-max) (+ (point) ,n)) -@@ -839,10 +860,11 @@ +@@ -839,10 +859,11 @@ (defun comm-wait-for-space (proc n) (let ((p (point)) (r (+ (point) n))) - (while (< (point-max) r) - (if (null (accept-process-output proc comm-accept-timeout)) - (egg-error "backend timeout (comm-wait-for-space)")) - (goto-char p)))) + (with-local-quit + (while (< (point-max) r) + (if (null (accept-process-output proc comm-accept-timeout)) + (egg-error "backend timeout (comm-wait-for-space)")) + (goto-char p))))) (defmacro comm-following+forward-char () `(prog1 +@@ -967,8 +988,7 @@ + ,@vlist) + (if (and (memq (process-status proc) '(open run)) + (buffer-live-p buffer)) +- (save-excursion +- (set-buffer buffer) ++ (with-current-buffer buffer + (let ,euc-select + (erase-buffer) + ,send-expr Index: head/editors/tamago/files/patch-egg-sj3.el =================================================================== --- head/editors/tamago/files/patch-egg-sj3.el (revision 378251) +++ head/editors/tamago/files/patch-egg-sj3.el (revision 378252) @@ -1,11 +1,26 @@ --- egg/sj3.el.orig 2015-01-31 19:23:34.000000000 +0900 -+++ egg/sj3.el 2015-01-31 19:25:52.000000000 +0900 -@@ -146,7 +146,7 @@ ++++ egg/sj3.el 2015-02-02 00:33:30.000000000 +0900 +@@ -146,11 +146,10 @@ (setq proc (open-network-stream "SJ3" buf hostname sj3-server-port)) ((error quit) (egg-error "failed to connect sj3 server"))) - (process-kill-without-query proc) + (set-process-query-on-exit-flag proc nil) (set-process-coding-system proc 'binary 'binary) (set-marker-insertion-type (process-mark proc) t) - (save-excursion +- (save-excursion +- (set-buffer buf) ++ (with-current-buffer buf + (erase-buffer) + (buffer-disable-undo) + (set-buffer-multibyte nil)) +@@ -177,8 +176,7 @@ + ;; (let* ((buf (generate-new-buffer " *SJ3*")) + ;; (msg-form "SJ3: connecting to sj3serv at %s...") + ;; hostname proc result msg) +-;; (save-excursion +-;; (set-buffer buf) ++;; (with-current-buffer buf + ;; (erase-buffer) + ;; (buffer-disable-undo) + ;; (setq enable-multibyte-characters nil)) Index: head/editors/tamago/files/patch-egg-sj3rpc.el =================================================================== --- head/editors/tamago/files/patch-egg-sj3rpc.el (nonexistent) +++ head/editors/tamago/files/patch-egg-sj3rpc.el (revision 378252) @@ -0,0 +1,12 @@ +--- egg/sj3rpc.el.orig 2015-01-31 19:23:34.000000000 +0900 ++++ egg/sj3rpc.el 2015-02-02 00:33:47.000000000 +0900 +@@ -86,8 +86,7 @@ + (list + 'let v + (append +- `(save-excursion +- (set-buffer (process-buffer proc)) ++ `(with-current-buffer (process-buffer proc) + (erase-buffer) + ,send-expr + (process-send-region proc (point-min) (point-max)) Property changes on: head/editors/tamago/files/patch-egg-sj3rpc.el ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/editors/tamago/files/patch-egg-wnn.el =================================================================== --- head/editors/tamago/files/patch-egg-wnn.el (revision 378251) +++ head/editors/tamago/files/patch-egg-wnn.el (revision 378252) @@ -1,146 +1,161 @@ --- egg/wnn.el.orig 2015-01-31 19:24:09.000000000 +0900 -+++ egg/wnn.el 2015-01-31 19:55:02.000000000 +0900 ++++ egg/wnn.el 2015-02-02 00:53:09.000000000 +0900 @@ -82,6 +82,10 @@ (const wnn-uniq) (const wnn-uniq-kanji))) +(defcustom egg-wnn-helper-path "egg-helper" + "path of wnn unix domain connection helper program" + :group 'wnn :type 'file) + (defcustom wnn-jserver nil "jserver hostname list. Use N-th port, if hostname is followed by ':' and digit N." @@ -99,11 +103,21 @@ by ':' and digit N." :group 'wnn :type '(repeat string)) +(setq wnn-jserverenv "JSERVER") +(setq wnn-cserverenv "CSERVER") +(setq wnn-tserverenv "TSERVER") +(setq wnn-kserverenv "KSERVER") + (defcustom wnn-jport 22273 "jserver port number" :group 'wnn :type 'integer) (defcustom wnn-cport 22289 "cserver port number" :group 'wnn :type 'integer) (defcustom wnn-tport 22321 "tserver port number" :group 'wnn :type 'integer) (defcustom wnn-kport 22305 "kserver port number" :group 'wnn :type 'integer) +(defcustom wnn-judpath "/tmp/jd_sockV4" "jserver unix domain socket name" :group 'wnn :type 'string) +(defcustom wnn-cudpath "/tmp/cd_sockV4" "cserver unix domain socket name" :group 'wnn :type 'string) +(defcustom wnn-tudpath "/tmp/td_sockV4" "tserver unix domain socket name" :group 'wnn :type 'string) +(defcustom wnn-kudpath "/tmp/kd_sockV4" "kserver unix domain socket name" :group 'wnn :type 'string) + (defmacro wnn-backend-plist () ''(egg-initialize-backend wnn-init egg-start-conversion wnn-start-conversion +@@ -128,7 +142,7 @@ + (defun wnn-make-backend (lang env &optional source-lang converted-lang) + (let ((finalize (wnn-backend-func-name "wnn-finalize-backend" lang)) + (backend (wnn-backend-func-name "wnn-backend" lang env))) +- (if (null (fboundp finalize)) ++ (if (null (fboundp 'finalize)) + (progn + (fset finalize `(lambda () (wnn-finalize-backend ',lang))) + (egg-set-finalize-backend (list finalize)))) @@ -559,11 +573,11 @@ bunsetsu)) (defvar wnn-server-info-list - ;; language server port hostname proc coding-system - '((Japanese jserver wnn-jport wnn-jserver "Wnn" (fixed-euc-jp fixed-euc-jp)) - (Chinese-GB cserver wnn-cport wnn-cserver "cWnn" (fixed-euc-py-cn fixed-euc-zy-cn)) - (Chinese-CNS tserver wnn-tport wnn-tserver "tWnn" (fixed-euc-py-tw fixed-euc-zy-tw)) - (Korean kserver wnn-kport wnn-kserver "kWnn" (fixed-euc-kr fixed-euc-kr)))) + ;; language server port hostname unixdomain serverenv proc coding-system + '((Japanese jserver wnn-jport wnn-jserver wnn-judpath wnn-jserverenv "Wnn" (fixed-euc-jp fixed-euc-jp)) + (Chinese-GB cserver wnn-cport wnn-cserver wnn-cudpath wnn-cserverenv "cWnn" (fixed-euc-py-cn fixed-euc-zy-cn)) + (Chinese-CNS tserver wnn-tport wnn-tserver wnn-tudpath wnn-tserverenv "tWnn" (fixed-euc-py-tw fixed-euc-zy-tw)) + (Korean kserver wnn-kport wnn-kserver wnn-kudpath wnn-kserverenv "kWnn" (fixed-euc-kr fixed-euc-kr)))) (defsubst wnn-server-get-info (lang) (or (assq lang wnn-server-info-list) @@ -577,12 +591,16 @@ (symbol-value (nth 2 info))) (defsubst wnn-server-hostname (info) (symbol-value (nth 3 info))) +(defsubst wnn-server-udpath-name (info) + (symbol-value (nth 4 info))) +(defsubst wnn-server-env-name (info) + (symbol-value (nth 5 info))) (defsubst wnn-server-proc-name (info) - (nth 4 info)) + (nth 6 info)) (defsubst wnn-server-buffer-name (info) (concat " *" (wnn-server-proc-name info) "*")) (defsubst wnn-server-coding-system (info) - (nth 5 info)) + (nth 7 info)) (defconst wnn-accept-charset-alist '((Chinese-CNS ascii chinese-sisheng chinese-cns11643-1 chinese-cns11643-2))) -@@ -1209,9 +1227,11 @@ +@@ -1209,14 +1227,15 @@ (port (wnn-server-port server-info)) (hostname-list (wnn-server-hostname server-info)) (proc-name (wnn-server-proc-name server-info)) + (udpath (wnn-server-udpath-name server-info)) + (serverenv (wnn-server-env-name server-info)) (msg-form "Wnn: connecting to %S at %s...") (user-name (user-login-name)) - buf hostname myname port-off proc result msg) + buf hostname port-off proc result msg) (unwind-protect (progn (setq buf (generate-new-buffer (wnn-server-buffer-name server-info))) -@@ -1225,13 +1245,24 @@ +- (save-excursion +- (set-buffer buf) ++ (with-current-buffer buf + (erase-buffer) + (buffer-disable-undo) + (set-buffer-multibyte nil) +@@ -1225,13 +1244,24 @@ (setq hostname-list (list hostname-list))) (while (and hostname-list (null proc)) (setq hostname (or (car hostname-list) "") - hostname-list (cdr hostname-list) - myname (if (equal hostname "") "unix" wnn-system-name)) - (if (null (string-match ":" hostname)) - (setq port-off 0) - (setq port-off (string-to-int (substring hostname (match-end 0))) - hostname (substring hostname 0 (match-beginning 0)))) - (and (equal hostname "") (setq hostname "localhost")) + hostname-list (cdr hostname-list)) + (if (or (and (getenv serverenv) + (string-match "^unix$" (getenv serverenv))) + (and (null (getenv serverenv)) + (or (equal hostname "") + (string-match "^unix$" hostname)))) + (progn + (setq hostname "unix" + family 'local + port udpath)) + (progn + (setq hostname (or (getenv serverenv) hostname "localhost")) + (if (null (string-match ":" hostname)) + (setq port-off 0) + (setq port-off (string-to-number (substring hostname (match-end 0))) + hostname (substring hostname 0 (match-beginning 0)))) + (setq family nil))) + (setq host hostname) (let ((inhibit-quit save-inhibit-quit)) (if (and msg (null (y-or-n-p (format "%s failed. Try to %s? " -@@ -1241,16 +1272,22 @@ +@@ -1241,16 +1271,22 @@ server-type hostname)) (message "%s" msg) (let ((inhibit-quit save-inhibit-quit)) - (condition-case nil - (setq proc (open-network-stream proc-name buf hostname - (+ port port-off))) - ((error quit)))) - (when proc - (process-kill-without-query proc) + (if (fboundp 'make-network-process) + (condition-case nil + (setq proc (make-network-process :name proc-name :buffer buf :host host :service port :family family)) + ((error quit))) + (if (string-match "^unix$" hostname) + (let ((process-connection-type nil)) + (setq proc (start-process proc-name buf egg-wnn-helper-path port))) + (condition-case nil + (setq proc (open-network-stream proc-name buf hostname port)) + (error quit))))) + (when (processp proc) + (set-process-query-on-exit-flag proc nil) (set-process-coding-system proc 'binary 'binary) (set-process-sentinel proc 'wnn-comm-sentinel) (set-marker-insertion-type (process-mark proc) t) - (setq result (wnnrpc-open proc myname user-name)) + (setq result (wnnrpc-open proc host user-name)) (when (numberp result) (delete-process proc) (setq proc nil)))) Index: head/editors/tamago/files/patch-egg-wnnrpc.el =================================================================== --- head/editors/tamago/files/patch-egg-wnnrpc.el (revision 378251) +++ head/editors/tamago/files/patch-egg-wnnrpc.el (revision 378252) @@ -1,19 +1,29 @@ --- egg/wnnrpc.el.orig 2015-01-31 19:24:10.000000000 +0900 -+++ egg/wnnrpc.el 2015-01-31 19:25:52.000000000 +0900 ++++ egg/wnnrpc.el 2015-02-02 00:34:15.000000000 +0900 @@ -714,8 +714,14 @@ ,send-expr ,@rcv-exprs)) (defmacro wnnrpc-get-result (&rest body) - `(let (result) - (comm-unpack (i) result) + `(let (result resulth) + (comm-unpack (w w) resulth result) + (cond ((and (= result 65535) (= resulth 65535)) + (setq result -1)) + ((= resulth (lsh (lsh resulth 16) -16)) + (setq result (+ (lsh resulth 16) result))) + (t + (error "overflow"))) (if (< result 0) (progn (comm-unpack (i) result) +@@ -1716,8 +1722,7 @@ + (insert contents) + (if (= result 2) + (insert-file-contents local-filename nil (1- (point)))) +- (save-excursion +- (set-buffer (process-buffer proc)) ++ (with-current-buffer (process-buffer proc) + (wnnrpc-get-result))))))))) + ((quit error) + (wnnrpc-call-with-environment env () Index: head/editors/tamago/files/patch-egg.el =================================================================== --- head/editors/tamago/files/patch-egg.el (revision 378251) +++ head/editors/tamago/files/patch-egg.el (revision 378252) @@ -1,40 +1,55 @@ --- egg.el.orig 2015-01-31 19:24:09.000000000 +0900 -+++ egg.el 2015-01-31 19:48:25.000000000 +0900 ++++ egg.el 2015-02-02 00:38:37.000000000 +0900 +@@ -120,10 +120,10 @@ + + (defun egg-activate-keymap-after-command () + (while egg-change-major-mode-buffer +- (save-excursion +- (when (buffer-live-p (car egg-change-major-mode-buffer)) +- (set-buffer (car egg-change-major-mode-buffer)) +- (egg-activate-keymap)) ++ (let ((buf (car egg-change-major-mode-buffer))) ++ (if (buffer-live-p buf) ++ (with-current-buffer buf ++ (egg-activate-keymap))) + (setq egg-change-major-mode-buffer (cdr egg-change-major-mode-buffer)))) + (remove-hook 'post-command-hook 'egg-activate-keymap-after-command)) + @@ -167,16 +167,22 @@ (setq egg-modefull-mode t) (its-define-select-keys egg-modefull-map)) (setq egg-modeless-mode t)) - (setq inactivate-current-input-method-function 'egg-mode) -+ (set (if (boundp 'deactivate-current-input-method-function) ++ (set (if (fboundp 'deactivate-current-input-method-function) + 'deactivate-current-input-method-function + 'inactivate-current-input-method-function) + 'egg-mode) (setq describe-current-input-method-function 'egg-help) - (make-local-hook 'input-method-activate-hook) + (if (fboundp 'make-local-hook) + (eval '(make-local-hook 'input-method-activate-hook))) (add-hook 'input-method-activate-hook 'its-set-mode-line-title nil t) (if (eq (selected-window) (minibuffer-window)) (add-hook 'minibuffer-exit-hook 'egg-exit-from-minibuffer)) (run-hooks 'egg-mode-hook))) (defun egg-exit-from-minibuffer () - (inactivate-input-method) -+ (if (boundp 'deactivate-input-method) ++ (if (fboundp 'deactivate-input-method) + (deactivate-input-method) + (inactivate-input-method)) (if (<= (minibuffer-depth) 1) (remove-hook 'minibuffer-exit-hook 'egg-exit-from-minibuffer))) @@ -184,7 +190,10 @@ (defun egg-self-insert-char () (interactive) - (its-start last-command-char (and (eq last-command 'egg-use-context) + (its-start (if (boundp 'last-command-event) + last-command-event + last-command-char) + (and (eq last-command 'egg-use-context) egg-context))) (defun egg-remove-all-text-properties (from to &optional object) Index: head/editors/tamago/files/patch-menudiag.el =================================================================== --- head/editors/tamago/files/patch-menudiag.el (revision 378251) +++ head/editors/tamago/files/patch-menudiag.el (revision 378252) @@ -1,53 +1,62 @@ --- menudiag.el.orig 2015-01-31 19:23:34.000000000 +0900 -+++ menudiag.el 2015-01-31 19:25:52.000000000 +0900 ++++ menudiag.el 2015-02-02 00:30:59.000000000 +0900 @@ -226,6 +226,9 @@ (remove-hook 'minibuffer-setup-hook 'menudiag-minibuffer-hook) (setq menudiag-minibuffer-list (cons (current-buffer) menudiag-minibuffer-list)) + (if (boundp 'deactivate-input-method) + (deactivate-input-method) + (inactivate-input-method)) (buffer-disable-undo) (menudiag-receive-variables) (menudiag-beginning-of-items) @@ -296,7 +299,7 @@ (defun menudiag-goto-item () (interactive) (menudiag-check-current-menu) - (let ((ch last-command-char) + (let ((ch last-command-event) (n 0)) (setq n (menudiag-char-to-item-num ch)) (if (>= n (length menudiag-line)) @@ -503,7 +506,8 @@ (make-local-variable 'inhibit-read-only) (setq buffer-read-only t inhibit-read-only nil) - (make-local-hook 'post-command-hook) + (if (fboundp 'make-local-hook) + (eval '(make-local-hook 'post-command-hook))) (add-hook 'post-command-hook 'menudiag-selection-align-to-item nil t) (use-local-map menudiag-selection-map) (setq mode-name "Menudiag Selection") @@ -595,10 +599,10 @@ (set-buffer sel-buf) (setq completion-reference-buffer tmp-buf) (if event - (mouse-choose-completion event) + (choose-completion event) (choose-completion)) (set-buffer tmp-buf) - (setq n (string-to-int (buffer-string)))) + (setq n (string-to-number (buffer-string)))) (pop-to-buffer org-buf) (while (and item-list (>= n (length (car item-list)))) (setq l (1+ l) -@@ -619,7 +623,7 @@ +@@ -619,15 +623,14 @@ (unless (eq last-command 'menudiag-selection-goto) (setq menudiag-goto-number-list nil menudiag-original-point (point))) - (setq menudiag-goto-number-list (cons (- last-command-char ?0) + (setq menudiag-goto-number-list (cons (- last-command-event ?0) menudiag-goto-number-list)) (menudiag-selection-goto-internal)) + (defun menudiag-selection-goto-internal () + (let* ((list menudiag-goto-number-list) + (n (menudiag-selection-item-number list)) +- (len (save-excursion +- (set-buffer menudiag-selection-main-buffer) ++ (len (with-current-buffer menudiag-selection-main-buffer + (length menudiag-current-items)))) + (setq this-command 'menudiag-selection-goto) + (if (>= n len) Index: head/editors/tamago/pkg-plist =================================================================== --- head/editors/tamago/pkg-plist (revision 378251) +++ head/editors/tamago/pkg-plist (revision 378252) @@ -1,72 +1,38 @@ bin/egg-helper -%%ELISPDIR%%/egg/egg-cnv.el %%ELISPDIR%%/egg/egg-cnv.elc -%%ELISPDIR%%/egg/egg-com.el %%ELISPDIR%%/egg/egg-com.elc -%%ELISPDIR%%/egg/egg-edep.el %%ELISPDIR%%/egg/egg-edep.elc -%%ELISPDIR%%/egg/egg-mlh.el %%ELISPDIR%%/egg/egg-mlh.elc -%%ELISPDIR%%/egg/egg-sim.el %%ELISPDIR%%/egg/egg-sim.elc -%%ELISPDIR%%/egg/egg.el %%ELISPDIR%%/egg/egg.elc %%ELISPDIR%%/egg/egg/.nosearch -%%ELISPDIR%%/egg/egg/anthy.el %%ELISPDIR%%/egg/egg/anthy.elc -%%ELISPDIR%%/egg/egg/anthyipc.el %%ELISPDIR%%/egg/egg/anthyipc.elc -%%ELISPDIR%%/egg/egg/canna.el %%ELISPDIR%%/egg/egg/canna.elc -%%ELISPDIR%%/egg/egg/cannarpc.el %%ELISPDIR%%/egg/egg/cannarpc.elc -%%ELISPDIR%%/egg/egg/sj3.el %%ELISPDIR%%/egg/egg/sj3.elc -%%ELISPDIR%%/egg/egg/sj3rpc.el %%ELISPDIR%%/egg/egg/sj3rpc.elc -%%ELISPDIR%%/egg/egg/wnn.el %%ELISPDIR%%/egg/egg/wnn.elc -%%ELISPDIR%%/egg/egg/wnnrpc.el %%ELISPDIR%%/egg/egg/wnnrpc.elc %%ELISPDIR%%/egg/eggrc -%%ELISPDIR%%/egg/its-keydef.el %%ELISPDIR%%/egg/its-keydef.elc -%%ELISPDIR%%/egg/its.el %%ELISPDIR%%/egg/its.elc %%ELISPDIR%%/egg/its/.nosearch -%%ELISPDIR%%/egg/its/ascii.el %%ELISPDIR%%/egg/its/ascii.elc -%%HAS_JISX0213%%%%ELISPDIR%%/egg/its/aynu.el -%%HAS_JISX0213%%%%ELISPDIR%%/egg/its/aynu.elc -%%ELISPDIR%%/egg/its/bixing.el +%%ELISPDIR%%/egg/its/aynu.elc %%ELISPDIR%%/egg/its/bixing.elc -%%ELISPDIR%%/egg/its/erpin.el %%ELISPDIR%%/egg/its/erpin.elc -%%ELISPDIR%%/egg/its/greek.el %%ELISPDIR%%/egg/its/greek.elc -%%ELISPDIR%%/egg/its/hangul.el %%ELISPDIR%%/egg/its/hangul.elc -%%ELISPDIR%%/egg/its/hankata.el %%ELISPDIR%%/egg/its/hankata.elc -%%ELISPDIR%%/egg/its/hira.el %%ELISPDIR%%/egg/its/hira.elc -%%ELISPDIR%%/egg/its/jeonkak.el %%ELISPDIR%%/egg/its/jeonkak.elc -%%ELISPDIR%%/egg/its/jiskana.el %%ELISPDIR%%/egg/its/jiskana.elc -%%ELISPDIR%%/egg/its/kata.el %%ELISPDIR%%/egg/its/kata.elc -%%ELISPDIR%%/egg/its/pinyin.el %%ELISPDIR%%/egg/its/pinyin.elc -%%ELISPDIR%%/egg/its/quanjiao.el %%ELISPDIR%%/egg/its/quanjiao.elc -%%ELISPDIR%%/egg/its/thai.el %%ELISPDIR%%/egg/its/thai.elc -%%ELISPDIR%%/egg/its/zenkaku.el %%ELISPDIR%%/egg/its/zenkaku.elc -%%ELISPDIR%%/egg/its/zhuyin.el %%ELISPDIR%%/egg/its/zhuyin.elc %%ELISPDIR%%/egg/leim-list.el -%%ELISPDIR%%/egg/leim-list.elc -%%ELISPDIR%%/egg/menudiag.el %%ELISPDIR%%/egg/menudiag.elc