Date: Wed, 29 Sep 2010 18:00:30 +0900 From: Takayuki Nakao <t@nakao.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/151060: Update ports: japanese/yc.el Message-ID: <86r5gcj55d.wl@jodo.nakao.org> Resent-Message-ID: <201009290910.o8T9A1cO058931@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 151060 >Category: ports >Synopsis: Update ports: japanese/yc.el >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Wed Sep 29 09:10:01 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Takayuki Nakao <t@nakao.org> >Release: >Organization: >Environment: >Description: So far, yc.el supported emacs22 or older version of emacs. In order to support emacs23, a new patch is incorporated into this ports. >How-To-Repeat: >Fix: The recursive diff is attached below; diff -ruN yc.el.orig/Makefile yc.el/Makefile --- yc.el.orig/Makefile 2010-03-29 03:41:27.000000000 +0900 +++ yc.el/Makefile 2010-09-29 17:38:22.000000000 +0900 @@ -7,7 +7,7 @@ PORTNAME= yc.el PORTVERSION= 5.0.0 -PORTREVISION= 3 +PORTREVISION= 4 PORTEPOCH= 1 CATEGORIES= japanese elisp MASTER_SITES= http://www.ceres.dti.ne.jp/~knak/ @@ -30,10 +30,6 @@ .include <bsd.port.pre.mk> -.if $(EMACS_MAJOR_VER) >= 23 -BROKEN= Does not support emacs23.x or later -.endif - .if defined(WITH_ICANNA) RUN_DEPENDS+= ${LOCALBASE}/bin/icanna:${PORTSDIR}/japanese/icanna .endif diff -ruN yc.el.orig/files/patch-yc.el yc.el/files/patch-yc.el --- yc.el.orig/files/patch-yc.el 2009-01-31 20:31:54.000000000 +0900 +++ yc.el/files/patch-yc.el 2010-09-29 17:38:33.000000000 +0900 @@ -1,34 +1,139 @@ ---- yc.el.orig 2008-02-17 00:37:39.000000000 +0900 -+++ yc.el 2008-02-17 00:38:16.000000000 +0900 -@@ -393,7 +393,7 @@ - (error nil))))))) - (when (processp yc-server) - (put 'yc-server 'init nil) -- (process-kill-without-query yc-server) -+ (set-process-query-on-exit-flag yc-server nil) - (when yc-debug - (unwind-protect - (progn -@@ -4046,14 +4046,15 @@ - "japanese-yc" "Japanese" 'yc-activate - "あ" "Romaji -> Hiragana -> Kanji&Kana" - nil) --(set-language-info "Japanese" 'input-method "japanese-yc") --;(setq default-input-method "japanese-yc")) -+(defun force-yc-input-mode () -+ (set-language-info "Japanese" 'input-method "japanese-yc") -+ (setq default-input-method "japanese-yc")) +--- yc.el.orig 2010-09-29 13:58:36.000000000 +0900 ++++ yc.el 2010-09-29 13:58:26.000000000 +0900 +@@ -554,15 +554,51 @@ --;(yc-setup) --;(when (and yc-connect-server-at-startup (yc-server-check)) --; (yc-init) --; (force-yc-input-mode) --; ) -+(yc-setup) -+(when (and yc-connect-server-at-startup (yc-server-check)) -+ (yc-init) -+ (force-yc-input-mode) -+ ) - (defconst yc-version "5.0.0") - (provide 'yc) + (defun yc-l2n (int) +- (concat (list (logand (ash int -24) 255) +- (logand (ash int -16) 255) +- (logand (ash int -8) 255) +- (logand int 255)))) ++ (cond ++ ((>= emacs-major-version 23) ++; For Emacs 23 (Internal Encode is UTF8) ++ (string-make-unibyte ++ (concat (list (logand (ash int -24) 255) ++ (logand (ash int -16) 255) ++ (logand (ash int -8) 255) ++ (logand int 255)))) ++ ) ; clause ++ (t ++; For Emacs22, XEmacs21 ++ (concat (list (logand (ash int -24) 255) ++ (logand (ash int -16) 255) ++ (logand (ash int -8) 255) ++ (logand int 255))) ++ ) ; t ++ ) ; cond ++ ) ; defun + (defun yc-s2n (int) +- (concat (list (logand (ash int -8) 255) +- (logand int 255)))) ++ (cond ++ ((>= emacs-major-version 23) ++; For Emacs 23 (Interanal Encode is UTF8) ++ (string-make-unibyte ++ (concat (list (logand (ash int -8) 255) ++ (logand int 255)))) ++ ) ; clause ++ (t ++; For Emacs 22, XEmacs 21 ++ (concat (list (logand (ash int -8) 255) ++ (logand int 255))) ++ ) ; t ++ ) ; cond ++ ) ; defun + (defun yc-c2n (int) +- (concat (list (logand int 255)))) ++ (cond ++ ((>= emacs-major-version 23) ++; For Emacs 23 (Interanal Encode is UTF8) ++ (string-make-unibyte (concat (list (logand int 255)))) ++ ) ; clause ++ (t ++; For Emacs 22, XEmacs 21 ++ (concat (list (logand int 255))) ++ ) ; t ++ ) ; cond ++ ) ; defun + (defun yc-a2n (str) + (concat str (yc-c2n 0))) + (defun yc-w2n (str) +@@ -597,9 +633,21 @@ + (setq dst (concat + dst + (decode-coding-string +- (concat (and (/= (car src) 0) (char-to-string (car src))) +- (char-to-string (cadr src))) +- yc-coding)) ++ (cond ++ ((>= emacs-major-version 23) ++; For Emacs 23 ++ (concat (and (/= (car src) 0) ++ (char-to-string (unibyte-char-to-multibyte (car src)))) ++ (char-to-string (unibyte-char-to-multibyte (cadr src)))) ++ ) ; clause ++ ( t ++; For Emacs 22, XEmacs 21 ++ (concat (and (/= (car src) 0) (char-to-string (car src))) ++ (char-to-string (cadr src))) ++ ) ; t ++ ) ; cond ++ yc-coding) ; decode-coding-string ++ ) ; concat + src (cddr src))) + dst)) + +@@ -1732,6 +1780,7 @@ + (error nil)))) + (yc-eval-sexp (car expr))))) + (setq files (cdr files))) ++ (message "") + (if romkana-table + (setq yc-rH-conv-dic (yc-search-file-first-in-path + romkana-table (list "." (getenv "HOME") +@@ -2001,7 +2050,7 @@ + (defun yc-close () + (when yc-context + ;; deleted follow line 01/12/29 by matz@ruby-lang.org +-; (set-process-sentinel yc-server nil) ++ (set-process-sentinel yc-server nil) + (condition-case nil + (yc-finalize) + (yc-trap-server-down nil)) +@@ -2365,11 +2414,12 @@ + (setq yc-selected-window (cons (selected-window) yc-selected-window)) + (unless (featurep 'xemacs) + (set-minibuffer-window (minibuffer-window))) ++ (set-window-buffer (minibuffer-window) (get-buffer-create yc-select-buffer)) + (yc-redirect-frame-focus + (window-frame (car yc-selected-window)) + (window-frame (select-window (minibuffer-window)))) + (raise-frame (window-frame (select-window (minibuffer-window)))) +- (set-window-buffer (minibuffer-window) (get-buffer-create yc-select-buffer)) ++; (set-window-buffer (minibuffer-window) (get-buffer-create yc-select-buffer)) + (let ((l lst)) + (while l + (setq yc-select-markers (cons (point-marker) yc-select-markers)) +@@ -2477,8 +2527,19 @@ + (setq row (car (yc-wclist-liner-to-code tmp))) + (setq col (cdr (yc-wclist-liner-to-code tmp))) + (setq lst (cons +- (decode-coding-string +- (concat (char-to-string row) (char-to-string col)) 'euc-jp) ++ (cond ++ ((>= emacs-major-version 23) ++ (decode-coding-string ++ (string-make-unibyte ++ (concat (char-to-string row) (char-to-string col))) ++ 'euc-jp) ++ ) ; clause ++ ( t ++ (decode-coding-string ++ (concat (char-to-string row) (char-to-string col)) ++ 'euc-jp) ++ ) ; t ++ ) ; cond + lst)) + (setq idx (1+ idx))) + (reverse lst))) >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86r5gcj55d.wl>