diff options
author | hrs <hrs@FreeBSD.org> | 2010-03-02 04:48:56 +0800 |
---|---|---|
committer | hrs <hrs@FreeBSD.org> | 2010-03-02 04:48:56 +0800 |
commit | 407fade4cb70c195796e1b913e721534f2922ec9 (patch) | |
tree | c958bc9a1826536d0653dbd7d633b35247f7ece6 /editors/tamago | |
parent | bcbe2fe895f112fb9255b6ff9cd70c573b651647 (diff) | |
download | freebsd-ports-gnome-407fade4cb70c195796e1b913e721534f2922ec9.tar.gz freebsd-ports-gnome-407fade4cb70c195796e1b913e721534f2922ec9.tar.zst freebsd-ports-gnome-407fade4cb70c195796e1b913e721534f2922ec9.zip |
Add emacs23 support.
Feature safe: yes
PR: ports/144393
Diffstat (limited to 'editors/tamago')
-rw-r--r-- | editors/tamago/Makefile | 2 | ||||
-rw-r--r-- | editors/tamago/files/post-patch-egg-com.el | 96 | ||||
-rw-r--r-- | editors/tamago/pkg-plist | 1 |
3 files changed, 98 insertions, 1 deletions
diff --git a/editors/tamago/Makefile b/editors/tamago/Makefile index a79543092a6e..c6ab467caf6f 100644 --- a/editors/tamago/Makefile +++ b/editors/tamago/Makefile @@ -7,7 +7,7 @@ PORTNAME= tamago PORTVERSION= 4.0.6.0.20041122.11 -PORTREVISION= 7 +PORTREVISION= 8 CATEGORIES= editors elisp MASTER_SITES= ${MASTER_SITE_DEBIAN} MASTER_SITE_SUBDIR= pool/main/e/egg diff --git a/editors/tamago/files/post-patch-egg-com.el b/editors/tamago/files/post-patch-egg-com.el new file mode 100644 index 000000000000..bf83d1d06c61 --- /dev/null +++ b/editors/tamago/files/post-patch-egg-com.el @@ -0,0 +1,96 @@ +--- egg-com.el.2 2010-03-02 05:19:01.000000000 +0900 ++++ egg-com.el 2010-03-02 05:19:04.000000000 +0900 +@@ -44,8 +44,65 @@ + + ;; Japanese + ++(defun fixed-euc-jp-pre-write-conversion (from to) ++ (let ((work-buf (generate-new-buffer " *temp*")) ++ ch) ++ (if (stringp from) ++ (encode-coding-string from 'euc-japan nil work-buf) ++ (encode-coding-region from to 'euc-japan work-buf)) ++ (set-buffer work-buf) ++ (set-buffer-multibyte nil) ++ (goto-char (point-min)) ++ (while (not (eobp)) ++ (setq ch (following-char)) ++ (cond ((= ch #x8E) ; SS2 for JISX0201-kana ++ (delete-char 1) ; SS2 BYTE -> 0 BYTE&0x7F ++ (insert 0) ++ (forward-char 1)) ++ ((= ch #x8F) ; SS3 for JISX0212 ++ (delete-char 1) ; SS3 BYTE1 BYTE2 -> BYTE1 BYTE2&0x7F ++ (forward-char 1) ++ (setq ch (following-char)) ++ (delete-char 1) ++ (insert (logand ch #x7F))) ++ ((>= ch #xA0) ; JISX0208 ++ (forward-char 2)) ++ (t ; ASCII ++ (insert 0) ; BYTE -> 0 BYTE ++ (forward-char 1)))))) ++ ++(defun fixed-euc-jp-post-read-conversion (len) ++ (let ((str (string-as-unibyte (buffer-substring (point) (+ (point) len)))) ++ (pos (point)) ++ i ch1 ch2) ++ (delete-region (point) (+ (point) len)) ++ (setq i 0) ++ (while (< i len) ++ (setq ch1 (aref str i)) ++ (setq ch2 (aref str (1+ i))) ++ (cond ((>= ch1 #x80) ++ (if (>= ch2 #x80) ++ (setq ch1 ; JISX0208 ++ (decode-char 'japanese-jisx0208 ++ (logior (lsh (logand ch1 #x7F) 8) ++ (logand ch2 #x7F)))) ++ (setq ch1 ; JISX0212 ++ (decode-char 'japanese-jisx0212 ++ (logior (lsh (logand ch1 #x7F) 8) ch2))))) ++ (t ++ (if (>= ch2 #x80) ++ (setq ch1 ; JISX0201-kana ++ (decode-char 'katakana-jisx0201 (logand ch2 #x7F))) ++ (setq ch1 ch2)))) ++ (insert ch1) ++ (setq i (+ i 2))) ++ (prog1 (- (point) pos) ++ (goto-char pos)))) ++ + (eval-and-compile +-(define-ccl-program ccl-decode-fixed-euc-jp ++ (if (string< mule-version "6.0") ++ (progn ++ (define-ccl-program ccl-decode-fixed-euc-jp + `(2 + ((r2 = ,(charset-id 'japanese-jisx0208)) + (r3 = ,(charset-id 'japanese-jisx0212)) +@@ -96,11 +153,24 @@ + (write-read-repeat r0))) + (read r0) + (repeat))))) +-) + + (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)) +- ++) ++ (define-charset 'fixed-euc-jp ++ "Fixed EUC Japanese" ++ :dimension 2 ++ :superset '(ascii ++ (katakana-jisx0201 . #x80) ++ (japanese-jisx0208 . #x8080) ++ (japanese-jisx0212 . #x8000))) ++ (define-coding-system 'fixed-euc-jp ++ "Coding System for fixed EUC Japanese" ++ :mnemonic ?W ++ :coding-type 'charset ++ :charset-list '(fixed-euc-jp)) ++ ) ++) + ;; Korean + + (eval-and-compile diff --git a/editors/tamago/pkg-plist b/editors/tamago/pkg-plist index 00053a34f8cf..ab8767d34865 100644 --- a/editors/tamago/pkg-plist +++ b/editors/tamago/pkg-plist @@ -1,3 +1,4 @@ +@comment $FreeBSD$ bin/egg-helper %%ELISPDIR%%/egg/egg-cnv.el %%ELISPDIR%%/egg/egg-cnv.elc |