From: morioka Date: Wed, 11 Mar 1998 13:05:17 +0000 (+0000) Subject: APEL 3.4.1. X-Git-Tag: apel-3_4_1~1 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0062dd8f56fc6674814da30ede24c2e8c87ca7ae;p=elisp%2Fapel.git APEL 3.4.1. --- diff --git a/ChangeLog b/ChangeLog index f0edec8..193b0ea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,101 @@ +1997-09-02 MORIOKA Tomohiko + + * APEL: Version 3.4.1 was released. + +1997-08-30 MAEDA Shugo + + * emu-mule.el (decode-coding-region, encode-coding-string): New + function. + (decode-coding-string): Modify DOC-string. (cf. [cmail:3366]) + +1997-08-30 MORIOKA Tomohiko + + * emu.el (defconst-maybe): New macro. + + (emacs-major-version, emacs-minor-version): Use `defconst-maybe'. + + * emu.el (charsets-to-mime-charset): Abolish unused local variable + `csl'. + + * emu-e20.el, emu-20.el: Move function + `detect-mime-charset-region' from emu-e20.el to emu-20.el. + + * emu-20.el: Use `defsubst' for + `{encode|decode}-mime-charset-{region|string}'. + + * emu-e20.el (detect-mime-charset-region): Use + `find-charset-region'. + +1997-08-30 MORIOKA Tomohiko + + * emu-x20.el, emu-e20.el, emu-20.el: Move function + `{encode|decode}-mime-charset-{region|string}' from emu-e20.el and + emu-x20.el to emu-20.el. + + * emu-x20.el, emu-e20.el, emu-20.el: Move `default-mime-charset' + from emu-e20.el and emu-x20.el to emu-20.el. + +1997-08-30 MORIOKA Tomohiko + + * emu-20.el (mime-charset-coding-system-alist): Don't use + `coding-system-p' for symbol. + (mime-charset-to-coding-system): Ditto; modify DOC-string. + +1997-08-30 MORIOKA Tomohiko + + * emu-20.el (mime-charset-coding-system-alist): Check MIME charset + is defined as coding-system. + + * emu-x20.el, emu-e20.el, emu-20.el: Move + `mime-charset-coding-system-alist' from emu-e20.el and emu-x20.el + to emu-20.el. + + * emu-20.el (*noconv*): Add DOC-string. + +1997-08-30 MORIOKA Tomohiko + + * emu-20.el (mime-charset-to-coding-system): Check coding-system-p + even if CHARSET is found in `mime-charset-coding-system-alist'. + + * emu-x20.el: Use function `mime-charset-to-coding-system' in + emu-20.el. + + * emu-20.el (mime-charset-to-coding-system): Use `defsubst'. + + * emu-e20.el, emu-20.el: Move function + `mime-charset-to-coding-system' from emu-e20.el to emu-20.el. + +1997-08-30 MORIOKA Tomohiko + + * emu-x20.el, emu-e20.el, emu-20.el: Move features about Binary + accessing from emu-e20.el and emu-x20.el to emu-20.el. + + * EMU-ELS (emu-modules): Add emu-20 for Emacs 20 and XEmacs/mule. + +1997-08-30 MORIOKA Tomohiko + + * emu-x20.el (mime-charset-to-coding-system): Use `defsubst'. + + * emu-x20.el (default-mime-charset): Add DOC-string. + + (mime-charset-coding-system-alist): Add `us-ascii'. + +1997-08-25 MORIOKA Tomohiko + + * emu-x20.el (mime-charset-coding-system-alist): iso-2022-jp-2 is + defined as coding-system. + + 1997-07-14 MORIOKA Tomohiko * emu: Version 7.44 was released. * APEL: Version 3.4 was released. +1997-07-13 MORIOKA Tomohiko + + * emu-e20.el (mime-charset-coding-system-alist): `iso-2022-ss2-7' + -> `iso-2022-7bit-ss2'. (for Emacs 20.0.90) + 1997-07-13 MORIOKA Tomohiko * std11-parse.el (std11-parse-ascii-token): Allow non-ASCII @@ -10,11 +103,32 @@ 1997-06-28 MORIOKA Tomohiko + * richtext.el: Add autoload comments for `richtext-encode' and + `richtext-decode'. + + * emu.el: Check richtext.el is bundled. + +1997-06-28 MORIOKA Tomohiko + * file-detect.el: Add autoload comments for function `add-path', `add-latest-path', `get-latest-path', `file-installed-p', `exec-installed-p', `module-installed-p' and variable `exec-suffix-list'. +1997-06-08 MORIOKA Tomohiko + + * emu-x20.el (mime-charset-coding-system-alist): iso-8859-1, + hz-gb-2312, cn-gb-2312, gb2312, cn-big5 and koi8-r were defined as + coding-system. + + * emu-x20.el: Don't require cyrillic. + +Thu May 22 04:46:57 1997 MORIOKA Tomohiko + + * emu-mule.el (make-char): New alias. + + * emu-e20.el: Alias `make-character' was abolished. + Sat May 10 19:39:12 1997 MORIOKA Tomohiko * README.en (What's APEL?): Add std11 and mule-caesar.el. @@ -31,12 +145,18 @@ Fri May 9 01:23:44 1997 MORIOKA Tomohiko * mule-caesar.el: New file. +Thu May 8 22:21:36 1997 MORIOKA Tomohiko + + * emu-x20.el: Use `binary' instead of `no-conversion' temporary. + 1997-04-30 MORIOKA Tomohiko * emu: Version 7.43 was released. * APEL: Version 3.3.1 was released. + * emu-x20.el: several changes for XEmacs 20.1-b12. + Wed Apr 30 12:40:32 1997 MORIOKA Tomohiko * Makefile: add `release'. @@ -45,6 +165,36 @@ Mon Apr 28 16:47:30 1997 MORIOKA Tomohiko * Makefile: `TARFILE' was abolished. +Tue Apr 8 09:47:40 1997 MORIOKA Tomohiko + + * emu.el (point-at-eol): New function. + +Sat Apr 5 16:23:23 1997 MORIOKA Tomohiko + + * emu-nemacs.el: `tl:available-face-attribute-alist' -> + `emu:available-face-attribute-alist'. + + * emu-nemacs.el, emu-mule.el: `tl:make-overlay' -> `make-overlay'; + `tl:overlay-put' -> `overlay-put'. + +Sat Apr 5 06:50:48 1997 MORIOKA Tomohiko + + * emu-xemacs.el: Alias `tl:make-overlay', `tl:overlay-put' and + `tl:overlay-buffer' were abolished; Function `tl:move-overlay' + were abolished. + + * emu-19.el: Alias `tl:make-overlay', `tl:overlay-put' and + `tl:overlay-buffer' were abolished. + + * emu-18.el: `tl:overlay-buffer' -> `overlay-buffer'. + + * emu-xemacs.el: Require overlay. + + * emu.el (char-or-char-int-p): New XEmacs 20 emulating alias. + + * emu.el (minibuffer-prompt-width): New function for Emacs 18 and + XEmacs. + Thu Apr 3 17:14:39 1997 MORIOKA Tomohiko * APEL-ELS: std11.el and std11-parse.el were moved from mu/. diff --git a/Makefile b/Makefile index 8df9f60..870b56a 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,8 @@ # -# $Id: Makefile,v 0.6 1997/07/14 13:31:48 morioka Exp $ +# $Id: Makefile,v 0.10 1997/09/02 08:18:34 morioka Exp $ # -VERSION = 3.4 +VERSION = 3.4.1 TAR = gtar RM = /bin/rm -f @@ -30,15 +30,25 @@ clean: tar: - -cd ..; mkdir apel-$(VERSION) - -cd ../emu; $(CP) $(EMU_FILES) ../apel-$(VERSION) - -cd ../emu; $(CP) ChangeLog ../apel-$(VERSION)/ChangeLog.emu - -$(CP) $(APEL_FILES) ../apel-$(VERSION) - cd ..; $(TAR) cvzf apel-$(VERSION).tar.gz apel-$(VERSION) - cd ..; $(RM) -r apel-$(VERSION) + cvs commit + sh -c 'cvs tag -RF apel-`echo $(VERSION) \ + | sed s/\\\\./_/ | sed s/\\\\./_/`; \ + cd /tmp; cvs export -d apel-$(VERSION) \ + -r apel-`echo $(VERSION) \ + | sed s/\\\\./_/ | sed s/\\\\./_/` APEL' + cd /tmp; $(RM) apel-$(VERSION)/ftp.in ; \ + $(TAR) cvzf apel-$(VERSION).tar.gz apel-$(VERSION) + cd /tmp; $(RM) -r apel-$(VERSION) + sed "s/VERSION/$(VERSION)/" < ftp.in > ftp +# -cd ..; mkdir apel-$(VERSION) +# -cd ../emu; $(CP) $(EMU_FILES) ../apel-$(VERSION) +# -cd ../emu; $(CP) ChangeLog ../apel-$(VERSION)/ChangeLog.emu +# -$(CP) $(APEL_FILES) ../apel-$(VERSION) +# cd ..; $(TAR) cvzf apel-$(VERSION).tar.gz apel-$(VERSION) +# cd ..; $(RM) -r apel-$(VERSION) release: -$(RM) /pub/GNU/elisp/apel/apel-$(VERSION).tar.gz - cd ..; mv apel-$(VERSION).tar.gz /pub/GNU/elisp/apel/ + mv /tmp/apel-$(VERSION).tar.gz /pub/GNU/elisp/apel/ cd /pub/GNU/elisp/mime/alpha/ ; \ ln -s ../../apel/apel-$(VERSION).tar.gz . diff --git a/emu-20.el b/emu-20.el new file mode 100644 index 0000000..db66d36 --- /dev/null +++ b/emu-20.el @@ -0,0 +1,154 @@ +;;; emu-20.el --- emu API implementation for Emacs 20 and XEmacs/mule + +;; Copyright (C) 1997 Free Software Foundation, Inc. + +;; Author: MORIOKA Tomohiko +;; Version: $Id: emu-20.el,v 7.11 1997/08/30 07:46:38 morioka Exp $ +;; Keywords: emulation, compatibility, Mule + +;; This file is part of emu. + +;; This program is free software; you can redistribute it and/or +;; modify it under the terms of the GNU General Public License as +;; published by the Free Software Foundation; either version 2, or (at +;; your option) any later version. + +;; This program is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + +;;; Commentary: + +;; This module requires Emacs 20.0.93, XEmacs 20.3-b5 (with mule) +;; or later. + +;;; Code: + +;;; @ binary access +;;; + +(defmacro as-binary-process (&rest body) + `(let (selective-display ; Disable ^M to nl translation. + (coding-system-for-read 'binary) + (coding-system-for-write 'binary)) + ,@body)) + +(defmacro as-binary-input-file (&rest body) + `(let ((coding-system-for-read 'binary)) + ,@body)) + +(defmacro as-binary-output-file (&rest body) + `(let ((coding-system-for-write 'binary)) + ,@body)) + +(defun insert-binary-file-contents-literally + (filename &optional visit beg end replace) + "Like `insert-file-contents-literally', q.v., but don't code conversion. +A buffer may be modified in several ways after reading into the buffer due +to advanced Emacs features, such as file-name-handlers, format decoding, +find-file-hooks, etc. + This function ensures that none of these modifications will take place." + (let ((coding-system-for-read 'binary)) + (insert-file-contents-literally filename visit beg end replace) + )) + +;;; @@ Mule emulating aliases +;;; +;;; You should not use it. + +(defconst *noconv* 'binary + "Coding-system for binary. +This constant is defined to emulate old MULE anything older than MULE +2.3. It is obsolete, so don't use it.") + + +;;; @ MIME charset +;;; + +(defvar mime-charset-coding-system-alist + `,(let ((rest + '((us-ascii . iso-8859-1) + (gb2312 . cn-gb-2312) + (iso-2022-jp-2 . iso-2022-7bit-ss2) + (x-ctext . ctext) + )) + (css (coding-system-list)) + dest) + (while rest + (let ((pair (car rest))) + (or (memq (car pair) css) + (setq dest (cons pair dest)) + )) + (setq rest (cdr rest)) + ) + dest) + "Alist MIME CHARSET vs CODING-SYSTEM. +MIME CHARSET and CODING-SYSTEM must be symbol.") + +(defsubst mime-charset-to-coding-system (charset &optional lbt) + "Return coding-system corresponding with CHARSET. +CHARSET is a symbol whose name is MIME charset. +If optional argument LBT (`unix', `dos' or `mac') is specified, it is +used as line break code type of coding-system." + (if (stringp charset) + (setq charset (intern (downcase charset))) + ) + (let ((ret (assq charset mime-charset-coding-system-alist))) + (if ret + (setq charset (cdr ret)) + )) + (if (memq charset (coding-system-list)) + (if lbt + (intern (concat (symbol-name charset) "-" (symbol-name lbt))) + charset))) + +(defsubst encode-mime-charset-region (start end charset) + "Encode the text between START and END as MIME CHARSET." + (let ((cs (mime-charset-to-coding-system charset))) + (if cs + (encode-coding-region start end cs) + ))) + +(defsubst decode-mime-charset-region (start end charset) + "Decode the text between START and END as MIME CHARSET." + (let ((cs (mime-charset-to-coding-system charset))) + (if cs + (decode-coding-region start end cs) + ))) + +(defsubst encode-mime-charset-string (string charset) + "Encode the STRING as MIME CHARSET." + (let ((cs (mime-charset-to-coding-system charset))) + (if cs + (encode-coding-string string cs) + string))) + +(defsubst decode-mime-charset-string (string charset) + "Decode the STRING as MIME CHARSET." + (let ((cs (mime-charset-to-coding-system charset))) + (if cs + (decode-coding-string string cs) + string))) + + +(defvar default-mime-charset 'x-ctext + "Default value of MIME charset used when MIME charset is not specified. +It must be symbol.") + +(defsubst detect-mime-charset-region (start end) + "Return MIME charset for region between START and END." + (charsets-to-mime-charset (find-charset-region start end))) + + +;;; @ end +;;; + +(provide 'emu-20) + +;;; emu-20.el ends here diff --git a/emu-e20.el b/emu-e20.el index f545fb3..1dec5ef 100644 --- a/emu-e20.el +++ b/emu-e20.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1996,1997 Free Software Foundation, Inc. ;; Author: MORIOKA Tomohiko -;; Version: $Id: emu-e20.el,v 7.15 1997/07/13 06:23:00 morioka Exp $ +;; Version: $Id: emu-e20.el,v 7.22 1997/08/30 07:46:40 morioka Exp $ ;; Keywords: emulation, compatibility, Mule ;; This file is part of emu. @@ -29,9 +29,6 @@ ;;; Code: -;;; @ version specific features -;;; - (require 'emu-19) (defun fontset-pixel-size (fontset) @@ -47,6 +44,8 @@ (t 0) ))) +(require 'emu-20) + ;;; @ character set ;;; @@ -68,42 +67,9 @@ in the region between START and END." ;;; @ coding system ;;; -(defconst *noconv* 'no-conversion) - -(defmacro as-binary-process (&rest body) - `(let (selective-display ; Disable ^M to nl translation. - ;; for Emacs/mule - (coding-system-for-read 'no-conversion) - (coding-system-for-write 'no-conversion) - ) - ,@ body)) - -(defmacro as-binary-input-file (&rest body) - `(let ((coding-system-for-read 'no-conversion)) - ,@body)) - -(defmacro as-binary-output-file (&rest body) - `(let ((coding-system-for-write 'no-conversion)) - ,@body)) - (defalias 'set-process-input-coding-system 'set-process-coding-system) -;;; @ binary access -;;; - -(defun insert-binary-file-contents-literally - (filename &optional visit beg end replace) - "Like `insert-file-contents-literally', q.v., but don't code conversion. -A buffer may be modified in several ways after reading into the buffer due -to advanced Emacs features, such as file-name-handlers, format decoding, -find-file-hooks, etc. - This function ensures that none of these modifications will take place." - (let ((coding-system-for-read 'no-conversion)) - (insert-file-contents-literally filename visit beg end replace) - )) - - ;;; @ MIME charset ;;; @@ -144,63 +110,6 @@ find-file-hooks, etc. chinese-cns11643-7) . iso-2022-int-1) )) -(defvar default-mime-charset 'x-ctext) - -(defvar mime-charset-coding-system-alist - '((x-ctext . ctext) - (gb2312 . cn-gb-2312) - (iso-2022-jp-2 . iso-2022-7bit-ss2) - )) - -(defun mime-charset-to-coding-system (charset &optional lbt) - "Return coding-system corresponding with charset. -If optional argument LBT (`unix', `dos' or `mac') is specified, it is -used as line break code type of coding-system." - (if (stringp charset) - (setq charset (intern (downcase charset))) - ) - (let ((cs - (or (cdr (assq charset mime-charset-coding-system-alist)) - (and (coding-system-p charset) charset) - ))) - (if lbt - (intern (concat (symbol-name cs) "-" (symbol-name lbt))) - cs))) - -(defun detect-mime-charset-region (start end) - "Return MIME charset for region between START and END." - (charsets-to-mime-charset - (find-charset-string (buffer-substring start end)) - )) - -(defun encode-mime-charset-region (start end charset) - "Encode the text between START and END as MIME CHARSET." - (let ((cs (mime-charset-to-coding-system charset))) - (if cs - (encode-coding-region start end cs) - ))) - -(defun decode-mime-charset-region (start end charset) - "Decode the text between START and END as MIME CHARSET." - (let ((cs (mime-charset-to-coding-system charset))) - (if cs - (decode-coding-region start end cs) - ))) - -(defun encode-mime-charset-string (string charset) - "Encode the STRING as MIME CHARSET." - (let ((cs (mime-charset-to-coding-system charset))) - (if cs - (encode-coding-string string cs) - string))) - -(defun decode-mime-charset-string (string charset) - "Decode the STRING as MIME CHARSET." - (let ((cs (mime-charset-to-coding-system charset))) - (if cs - (decode-coding-string string cs) - string))) - ;;; @ character ;;; diff --git a/emu-mule.el b/emu-mule.el index eee6a29..1ae0651 100644 --- a/emu-mule.el +++ b/emu-mule.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1995,1996,1997 MORIOKA Tomohiko ;; Author: MORIOKA Tomohiko -;; Version: $Id: emu-mule.el,v 7.63 1997/05/22 04:46:57 morioka Exp $ +;; Version: $Id: emu-mule.el,v 7.64 1997/08/30 09:42:40 morioka Exp $ ;; Keywords: emulation, compatibility, Mule ;; This file is part of emu. @@ -79,9 +79,21 @@ (code-convert-region start end *internal* coding-system) ) +(defun decode-coding-region (start end coding-system) + "Decode the text between START and END which is encoded in CODING-SYSTEM. +\[emu-mule.el; EMACS 20 emulating function]" + (code-convert-region start end coding-system *internal*) + ) + +(defun encode-coding-string (str coding-system) + "Encode the STRING to CODING-SYSTEM. +\[emu-mule.el; EMACS 20 emulating function]" + (code-convert-string str *internal* coding-system) + ) + (defun decode-coding-string (str coding-system) "Decode the string STR which is encoded in CODING-SYSTEM. -\[emu-mule.el]" +\[emu-mule.el; EMACS 20 emulating function]" (let ((len (length str)) ret) (while (and diff --git a/emu-x20.el b/emu-x20.el index 004ce9f..ba3240a 100644 --- a/emu-x20.el +++ b/emu-x20.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1994,1995,1996,1997 MORIOKA Tomohiko ;; Author: MORIOKA Tomohiko -;; Version: $Id: emu-x20.el,v 7.58 1997/06/08 17:34:17 morioka Exp $ +;; Version: $Id: emu-x20.el,v 7.66 1997/08/30 07:09:21 morioka Exp $ ;; Keywords: emulation, compatibility, Mule, XEmacs ;; This file is part of XEmacs. @@ -25,46 +25,12 @@ ;;; Commentary: -;; This module requires XEmacs 20.3-b5 or later with mule. +;; This module requires XEmacs 20.3-b5 or later with mule. ;;; Code: (require 'emu-xemacs) - - -;;; @ coding-system -;;; - -(defconst *noconv* 'binary) - -(defmacro as-binary-process (&rest body) - `(let (selective-display ; Disable ^M to nl translation. - (coding-system-for-read 'binary) - (coding-system-for-write 'binary)) - ,@body)) - -(defmacro as-binary-input-file (&rest body) - `(let ((coding-system-for-read 'binary)) - ,@body)) - -(defmacro as-binary-output-file (&rest body) - `(let ((coding-system-for-write 'binary)) - ,@body)) - - -;;; @ binary access -;;; - -(defun insert-binary-file-contents-literally - (filename &optional visit beg end replace) - "Like `insert-file-contents-literally', q.v., but don't code conversion. -A buffer may be modified in several ways after reading into the buffer due -to advanced Emacs features, such as file-name-handlers, format decoding, -find-file-hooks, etc. - This function ensures that none of these modifications will take place." - (let ((coding-system-for-read 'binary)) - (insert-file-contents-literally filename visit beg end replace) - )) +(require 'emu-20) ;;; @ MIME charset @@ -107,54 +73,10 @@ find-file-hooks, etc. chinese-cns11643-7) . iso-2022-int-1) )) -(defvar default-mime-charset 'x-ctext) - -(defvar mime-charset-coding-system-alist - '((x-ctext . ctext) - (iso-2022-jp-2 . iso-2022-ss2-7) - )) - -(defun mime-charset-to-coding-system (charset) - "Return coding-system by MIME charset." - (if (stringp charset) - (setq charset (intern (downcase charset))) - ) - (or (cdr (assq charset mime-charset-coding-system-alist)) - (and (memq charset (coding-system-list)) charset) - )) - (defun detect-mime-charset-region (start end) "Return MIME charset for region between START and END." (charsets-to-mime-charset (charsets-in-region start end))) -(defun encode-mime-charset-region (start end charset) - "Encode the text between START and END as MIME CHARSET." - (let ((cs (mime-charset-to-coding-system charset))) - (if cs - (encode-coding-region start end cs) - ))) - -(defun decode-mime-charset-region (start end charset) - "Decode the text between START and END as MIME CHARSET." - (let ((cs (mime-charset-to-coding-system charset))) - (if cs - (decode-coding-region start end cs) - ))) - -(defun encode-mime-charset-string (string charset) - "Encode the STRING as MIME CHARSET." - (let ((cs (mime-charset-to-coding-system charset))) - (if cs - (encode-coding-string string cs) - string))) - -(defun decode-mime-charset-string (string charset) - "Decode the STRING as MIME CHARSET." - (let ((cs (mime-charset-to-coding-system charset))) - (if cs - (decode-coding-string string cs) - string))) - ;;; @ character ;;; diff --git a/emu.el b/emu.el index ad4a064..ea58c00 100644 --- a/emu.el +++ b/emu.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1995,1996,1997 Free Software Foundation, Inc. ;; Author: MORIOKA Tomohiko -;; Version: $Id: emu.el,v 7.44 1997/06/28 10:21:24 morioka Exp $ +;; Version: $Id: emu.el,v 7.46 1997/08/30 08:10:50 morioka Exp $ ;; Keywords: emulation, compatibility, NEmacs, MULE, Emacs/mule, XEmacs ;; This file is part of emu. @@ -50,16 +50,24 @@ (put 'defun-maybe 'lisp-indent-function 'defun) (put 'defmacro-maybe 'lisp-indent-function 'defun) +(defmacro defconst-maybe (name &rest everything-else) + (or (and (boundp name) + (not (get name 'defconst-maybe)) + ) + (` (or (boundp (quote (, name))) + (progn + (defconst (, name) (,@ everything-else)) + (put (quote (, name)) 'defconst-maybe t) + )) + ))) + -(or (boundp 'emacs-major-version) - (defconst emacs-major-version (string-to-int emacs-version))) -(or (boundp 'emacs-minor-version) - (defconst emacs-minor-version - (string-to-int - (substring - emacs-version - (string-match (format "%d\\." emacs-major-version) emacs-version) - )))) +(defconst-maybe emacs-major-version (string-to-int emacs-version)) +(defconst-maybe emacs-minor-version + (string-to-int + (substring emacs-version + (string-match (format "%d\\." emacs-major-version) + emacs-version)))) (defvar running-emacs-18 (<= emacs-major-version 18)) (defvar running-xemacs (string-match "XEmacs" emacs-version)) @@ -109,11 +117,11 @@ (defun charsets-to-mime-charset (charsets) "Return MIME charset from list of charset CHARSETS. This function refers variable `charsets-mime-charset-alist' -and `default-mime-charset'. [emu.el]" +and `default-mime-charset'." (if charsets (or (catch 'tag (let ((rest charsets-mime-charset-alist) - cell csl) + cell) (while (setq cell (car rest)) (if (catch 'not-subset (let ((set1 charsets)