From 8a583a04c1a09992d7f7ca55b63e782bfdb551fe Mon Sep 17 00:00:00 2001 From: morioka Date: Wed, 11 Mar 1998 13:00:39 +0000 Subject: [PATCH] APEL 3.3.2. --- ChangeLog | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Makefile | 30 +++++++++++++++++++------- emu-18.el | 4 ++-- emu-19.el | 12 ++--------- emu-mule.el | 6 +++--- emu-nemacs.el | 20 ++++++++--------- emu-x20.el | 35 +++++++++++++----------------- emu-xemacs.el | 20 +++++++++-------- emu.el | 32 +++++++++++++++++++++++++++- file-detect.el | 20 ++++++++--------- filename.el | 50 ++++++++++++++++++++++++++----------------- 11 files changed, 201 insertions(+), 93 deletions(-) diff --git a/ChangeLog b/ChangeLog index b46cbe7..ea2837a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,68 @@ +1997-05-09 MORIOKA Tomohiko + + * emu: Version 7.43.1 was released. + * APEL: Version 3.3.2 was released. + +Fri May 9 01:23:44 1997 MORIOKA Tomohiko + + * APEL-ELS: Add mule-caesar.el. + + * mule-caesar.el: New file. + + +1997-04-30 MORIOKA Tomohiko + + * emu: Version 7.43 was released. + * APEL: Version 3.3.1 was released. + +Wed Apr 30 12:40:32 1997 MORIOKA Tomohiko + + * Makefile: add `release'. + +Mon Apr 28 16:47:30 1997 MORIOKA Tomohiko + + * Makefile: `TARFILE' was abolished. + +Thu Apr 3 17:14:39 1997 MORIOKA Tomohiko + + * APEL-ELS: std11.el and std11-parse.el were moved from mu/. + + +1997-03-20 MORIOKA Tomohiko + + * APEL: Version 3.3 was released. + +Thu Mar 20 06:09:03 1997 MORIOKA Tomohiko + + * Makefile: Add README.en. + +Thu Mar 20 06:08:29 1997 MORIOKA Tomohiko + + * file-detect.el: Header and DOC-strings were modified. + +Thu Mar 20 06:03:51 1997 MORIOKA Tomohiko + + * README.en: New file. + +Thu Mar 20 05:48:02 1997 MORIOKA Tomohiko + + * filename.el: Add DOC-strings. + + * APEL-MK (install-apel): Use `compile-apel'. + + * Makefile (install): Don't depend on `elc'. + +Thu Mar 20 02:04:19 1997 MORIOKA Tomohiko + + * APEL-MK: Setting for load-path and requiring install were moved + from APEL-CFG. + + (install-apel): Compile apel-modules. + + * APEL-CFG: Setting for load-path and requiring install were moved + to APEL-MK. + + 1997-03-14 MORIOKA Tomohiko * APEL: Version 3.2 was released. diff --git a/Makefile b/Makefile index c2677c2..8560811 100644 --- a/Makefile +++ b/Makefile @@ -1,24 +1,27 @@ # -# $Id: Makefile,v 0.0 1997/03/14 07:24:37 morioka Exp morioka $ +# $Id: Makefile,v 0.5 1997/04/30 12:45:32 morioka Exp morioka $ # +VERSION = 3.3.2 + +TAR = gtar +RM = /bin/rm -f +CP = /bin/cp -p + EMACS = emacs FLAGS = -batch -q -no-site-file -l APEL-MK PREFIX = -FILES = emu/Makefile emu/EMU-MK emu/EMU-CFG emu/EMU-ELS \ - emu/*.el emu/README.?? \ - apel/Makefile apel/APEL-MK apel/APEL-CFG apel/APEL-ELS \ - apel/*.el +EMU_FILES = EMU-ELS *.el -TARFILE = apel-0.1.tar +APEL_FILES = README.?? Makefile APEL-MK APEL-CFG APEL-ELS *.el ChangeLog elc: $(EMACS) $(FLAGS) -f compile-apel -install: elc +install: $(EMACS) $(FLAGS) -f install-apel $(PREFIX) @@ -27,4 +30,15 @@ clean: tar: - cd ..; tar cvf $(TARFILE) $(FILES); gzip -best $(TARFILE) + -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/ + cd /pub/GNU/elisp/mime/alpha/ ; \ + ln -s ../../apel/apel-$(VERSION).tar.gz . diff --git a/emu-18.el b/emu-18.el index 61cdb99..8261107 100644 --- a/emu-18.el +++ b/emu-18.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1995,1996,1997 Free Software Foundation, Inc. ;; Author: MORIOKA Tomohiko -;; Version: $Id: emu-18.el,v 7.32 1997/03/06 21:04:03 morioka Exp $ +;; Version: $Id: emu-18.el,v 7.33 1997/04/05 06:44:01 morioka Exp $ ;; Keywords: emulation, compatibility ;; This file is part of emu. @@ -276,7 +276,7 @@ With optional non-nil ALL, force redisplay of all mode-lines. ;;; @ overlay ;;; -(defun tl:overlay-buffer (overlay)) +(defun overlay-buffer (overlay)) ;;; @ text property diff --git a/emu-19.el b/emu-19.el index 729dc6c..ba82004 100644 --- a/emu-19.el +++ b/emu-19.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1995,1996,1997 Free Software Foundation, Inc. ;; Author: MORIOKA Tomohiko -;; Version: $Id: emu-19.el,v 7.14 1997/03/06 17:48:03 morioka Exp $ +;; Version: $Id: emu-19.el,v 7.16 1997/04/05 06:46:09 morioka Exp $ ;; Keywords: emulation, compatibility ;; This file is part of emu. @@ -33,15 +33,7 @@ ) -;;; @ overlay -;;; - -(defalias 'tl:make-overlay 'make-overlay) -(defalias 'tl:overlay-put 'overlay-put) -(defalias 'tl:overlay-buffer 'overlay-buffer) - - -;;; @@ visible/invisible +;;; @ visible/invisible ;;; (defmacro enable-invisible ()) diff --git a/emu-mule.el b/emu-mule.el index c5589b7..07be434 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.61 1997/02/13 08:17:15 morioka Exp $ +;; Version: $Id: emu-mule.el,v 7.62 1997/04/05 16:18:10 morioka Exp $ ;; Keywords: emulation, compatibility, Mule ;; This file is part of emu. @@ -50,8 +50,8 @@ ) (running-emacs-18 (require 'emu-18) - (defun tl:make-overlay (beg end &optional buffer type)) - (defun tl:overlay-put (overlay prop value)) + (defun make-overlay (beg end &optional buffer type)) + (defun overlay-put (overlay prop value)) )) diff --git a/emu-nemacs.el b/emu-nemacs.el index 2accc0e..092170d 100644 --- a/emu-nemacs.el +++ b/emu-nemacs.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1995,1996,1997 MORIOKA Tomohiko ;; Author: MORIOKA Tomohiko -;; Version: $Id: emu-nemacs.el,v 7.51 1997/02/13 08:13:43 morioka Exp $ +;; Version: $Id: emu-nemacs.el,v 7.53 1997/04/05 16:23:23 morioka Exp $ ;; Keywords: emulation, compatibility, NEmacs, mule ;; This file is part of emu. @@ -395,12 +395,12 @@ Optional non-nil arg START-COLUMN specifies the starting column. ;;; @ text property emulation ;;; -(setq tl:available-face-attribute-alist - '( - ;;(bold . inversed-region) - (italic . underlined-region) - (underline . underlined-region) - )) +(defvar emu:available-face-attribute-alist + '( + ;;(bold . inversed-region) + (italic . underlined-region) + (underline . underlined-region) + )) ;; by YAMATE Keiichirou 1994/10/28 (defun attribute-add-narrow-attribute (attr from to) @@ -441,11 +441,11 @@ Optional non-nil arg START-COLUMN specifies the starting column. (setcdr (nthcdr posfrom attr-value) (nthcdr posto attr-value))))) -(defalias 'tl:make-overlay 'cons) +(defalias 'make-overlay 'cons) -(defun tl:overlay-put (overlay prop value) +(defun overlay-put (overlay prop value) (let ((ret (and (eq prop 'face) - (assq value tl:available-face-attribute-alist) + (assq value emu:available-face-attribute-alist) ))) (if ret (attribute-add-narrow-attribute (cdr ret) diff --git a/emu-x20.el b/emu-x20.el index 12a89d3..a457c50 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.53 1997/03/12 14:18:27 morioka Exp $ +;; Version: $Id: emu-x20.el,v 7.55 1997/05/08 22:21:36 morioka Exp $ ;; Keywords: emulation, compatibility, Mule, XEmacs ;; This file is part of XEmacs. @@ -25,7 +25,7 @@ ;;; Commentary: -;; This module requires XEmacs 20.1 b6 or later with mule. +;; This module requires XEmacs 20.1 b12 or later with mule. ;;; Code: @@ -36,21 +36,20 @@ ;;; @ coding-system ;;; -(defconst *noconv* 'no-conversion) +(defconst *noconv* 'binary) (defmacro as-binary-process (&rest body) `(let (selective-display ; Disable ^M to nl translation. - (coding-system-for-write 'no-conversion) - process-input-coding-system - process-output-coding-system) + (coding-system-for-read 'binary) + (coding-system-for-write 'binary)) ,@body)) (defmacro as-binary-input-file (&rest body) - `(let ((coding-system-for-read 'no-conversion)) + `(let ((coding-system-for-read 'binary)) ,@body)) (defmacro as-binary-output-file (&rest body) - `(let ((coding-system-for-write 'no-conversion)) + `(let ((coding-system-for-write 'binary)) ,@body)) @@ -64,7 +63,7 @@ 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)) + (let ((coding-system-for-read 'binary)) (insert-file-contents-literally filename visit beg end replace) )) @@ -123,7 +122,7 @@ find-file-hooks, etc. )) (defun mime-charset-to-coding-system (charset) - "Return coding-system by MIME charset. [emu-x20.el]" + "Return coding-system by MIME charset." (if (stringp charset) (setq charset (intern (downcase charset))) ) @@ -132,35 +131,32 @@ find-file-hooks, etc. )) (defun detect-mime-charset-region (start end) - "Return MIME charset for region between START and END. -\[emu-x20.el]" + "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. -\[emu-x20.el]" + "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. -\[emu-x20.el]" + "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. [emu-x20.el]" + "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. [emu-x20.el]" + "Decode the STRING as MIME CHARSET." (let ((cs (mime-charset-to-coding-system charset))) (if cs (decode-coding-string string cs) @@ -179,8 +175,7 @@ find-file-hooks, etc. (defun char-category (character) "Return string of category mnemonics for CHAR in TABLE. CHAR can be any multilingual character -TABLE defaults to the current buffer's category table. -\[emu-x20.el; Mule emulating function]" +TABLE defaults to the current buffer's category table." (mapconcat (lambda (chr) (char-to-string (int-char chr)) ) diff --git a/emu-xemacs.el b/emu-xemacs.el index 0549710..56c12c2 100644 --- a/emu-xemacs.el +++ b/emu-xemacs.el @@ -5,7 +5,7 @@ ;; Author: MORIOKA Tomohiko ;; Version: -;; $Id: emu-xemacs.el,v 7.17 1997/03/06 17:46:39 morioka Exp $ +;; $Id: emu-xemacs.el,v 7.19 1997/04/05 06:50:48 morioka Exp $ ;; Keywords: emulation, compatibility, XEmacs ;; This file is part of XEmacs. @@ -46,16 +46,18 @@ ;;; @ overlay ;;; -(defalias 'tl:make-overlay 'make-extent) -(defalias 'tl:overlay-put 'set-extent-property) -(defalias 'tl:overlay-buffer 'extent-buffer) - -(defun tl:move-overlay (extent start end &optional buffer) - (set-extent-endpoints extent start end) - ) +(condition-case err + (require 'overlay) + (error (defalias 'make-overlay 'make-extent) + (defalias 'overlay-put 'set-extent-property) + (defalias 'overlay-buffer 'extent-buffer) + (defun move-overlay (extent start end &optional buffer) + (set-extent-endpoints extent start end) + ) + )) -;;; @@ visible/invisible +;;; @ visible/invisible ;;; (defmacro enable-invisible ()) diff --git a/emu.el b/emu.el index 7cc47eb..bbb24c5 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.40 1997/03/06 21:35:37 morioka Exp $ +;; Version: $Id: emu.el,v 7.43 1997/04/08 09:47:40 morioka Exp $ ;; Keywords: emulation, compatibility, NEmacs, MULE, Emacs/mule, XEmacs ;; This file is part of emu. @@ -134,6 +134,17 @@ and `default-mime-charset'. [emu.el]" default-mime-charset))) +;;; @ Emacs 19 emulation +;;; + +(defun-maybe minibuffer-prompt-width () + "Return the display width of the minibuffer prompt." + (save-excursion + (set-buffer (window-buffer (minibuffer-window))) + (current-column) + )) + + ;;; @ Emacs 19.29 emulation ;;; @@ -246,6 +257,22 @@ Value is nil if OBJECT is not a buffer or if it has been killed. (and (consp obj)(eq (car obj) 'lambda)) )) +(defun-maybe point-at-eol (&optional arg buffer) + "Return the character position of the last character on the current line. +With argument N not nil or 1, move forward N - 1 lines first. +If scan reaches end of buffer, return that position. +This function does not move point. [XEmacs emulating function]" + (save-excursion + (if buffer + (set-buffer buffer) + ) + (if arg + (forward-line (1- arg)) + ) + (end-of-line) + (point) + )) + ;;; @ for XEmacs 20 ;;; @@ -256,6 +283,9 @@ Value is nil if OBJECT is not a buffer or if it has been killed. (or (fboundp 'int-char) (fset 'int-char (symbol-function 'identity)) ) +(or (fboundp 'char-or-char-int-p) + (fset 'char-or-char-int-p (symbol-function 'integerp)) + ) ;;; @ for text/richtext and text/enriched diff --git a/file-detect.el b/file-detect.el index 1abd8c5..2d8731a 100644 --- a/file-detect.el +++ b/file-detect.el @@ -4,10 +4,10 @@ ;; Author: MORIOKA Tomohiko ;; Version: -;; $Id: file-detect.el,v 3.2 1997/03/14 09:54:04 morioka Exp $ +;; $Id: file-detect.el,v 3.3 1997/03/20 06:08:29 morioka Exp $ ;; Keywords: install, module -;; This file is part of tl (Tiny Library). +;; This file is part of APEL (A Portable Emacs Library). ;; This program is free software; you can redistribute it and/or ;; modify it under the terms of the GNU General Public License as @@ -41,9 +41,7 @@ You can use following PATH styles: You can specify following OPTIONS: 'all-paths search from `load-path' instead of `default-load-path' - 'append add PATH to the last of `load-path' - -\[file-detect.el]" + 'append add PATH to the last of `load-path'" (let ((rest (if (memq 'all-paths options) load-path default-load-path)) @@ -77,9 +75,9 @@ of load-path instead of default-load-path. [file-detect.el]" (add-to-list 'load-path path) ))) -(defun get-latest-path (pat &optional all-paths) +(defun get-latest-path (pattern &optional all-paths) "Return latest directory in default-load-path -which is matched to regexp PAT. +which is matched to regexp PATTERN. If optional argument ALL-PATHS is specified, it is searched from all of load-path instead of default-load-path." (catch 'tag @@ -91,7 +89,7 @@ it is searched from all of load-path instead of default-load-path." (if (and (file-exists-p dir) (file-directory-p dir) ) - (let ((files (sort (directory-files dir t pat t) + (let ((files (sort (directory-files dir t pattern t) (function file-newer-than-file-p))) file) (while (setq file (car files)) @@ -105,7 +103,7 @@ it is searched from all of load-path instead of default-load-path." (defun file-installed-p (file &optional paths) "Return absolute-path of FILE if FILE exists in PATHS. -If PATHS is omitted, `load-path' is used. [file-detect.el]" +If PATHS is omitted, `load-path' is used." (if (null paths) (setq paths load-path) ) @@ -125,7 +123,7 @@ If PATHS is omitted, `load-path' is used. [file-detect.el]" (defun exec-installed-p (file &optional paths suffixes) "Return absolute-path of FILE if FILE exists in PATHS. If PATHS is omitted, `exec-path' is used. -If suffixes is omitted, `exec-suffix-list' is used. [file-detect.el]" +If suffixes is omitted, `exec-suffix-list' is used." (or paths (setq paths exec-path) ) @@ -149,7 +147,7 @@ If suffixes is omitted, `exec-suffix-list' is used. [file-detect.el]" (defun module-installed-p (module &optional paths) "Return t if module is provided or exists in PATHS. -If PATHS is omitted, `load-path' is used. [file-detect.el]" +If PATHS is omitted, `load-path' is used." (or (featurep module) (exec-installed-p (symbol-name module) load-path '(".elc" ".el")) )) diff --git a/filename.el b/filename.el index e2a59b4..9ea69bb 100644 --- a/filename.el +++ b/filename.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1996,1997 MORIOKA Tomohiko ;; Author: MORIOKA Tomohiko -;; Version: $Id: filename.el,v 1.4 1997/03/10 13:53:38 morioka Exp $ +;; Version: $Id: filename.el,v 1.6 1997/03/20 06:00:33 morioka Exp $ ;; Keywords: file name, string ;; This file is part of APEL (A Portable Emacs Library). @@ -27,39 +27,49 @@ (require 'emu) (require 'cl) -(require 'file-detect) -(defsubst poly-funcall (functions arg) +(defsubst poly-funcall (functions argument) + "Apply initial ARGUMENT to sequence of FUNCTIONS. +FUNCTIONS is list of functions. + +(poly-funcall '(f1 f2 .. fn) arg) is as same as +(fn .. (f2 (f1 arg)) ..). + +For example, (poly-funcall '(car number-to-string) '(100)) returns +\"100\"." (while functions - (setq arg (funcall (car functions) arg) + (setq argument (funcall (car functions) argument) functions (cdr functions)) ) - arg) + argument) ;;; @ variables ;;; -(defvar filename-limit-length 21) +(defvar filename-limit-length 21 "Limit size of file-name.") (defvar filename-replacement-alist '(((?\ ?\t) . "_") ((?! ?\" ?# ?$ ?% ?& ?' ?\( ?\) ?* ?/ - ?: ?; ?< ?> ?? ?\[ ?\\ ?\] ?` ?{ ?| ?}) . "_") + ?: ?\; ?< ?> ?? ?\[ ?\\ ?\] ?` ?{ ?| ?}) . "_") (filename-control-p . "") - )) + ) + "Alist list of characters vs. string as replacement. +List of characters represents characters not allowed as file-name.") (defvar filename-filters - (nconc - (and (exec-installed-p "kakasi") - '(filename-japanese-to-roman-string) - ) - '(filename-special-filter - filename-eliminate-top-low-lines - filename-canonicalize-low-lines - filename-maybe-truncate-by-size - filename-eliminate-bottom-low-lines - ))) + (let ((filters '(filename-special-filter + filename-eliminate-top-low-lines + filename-canonicalize-low-lines + filename-maybe-truncate-by-size + filename-eliminate-bottom-low-lines + ))) + (require 'file-detect) + (if (exec-installed-p "kakasi") + (cons 'filename-japanese-to-roman-string filters) + filters)) + "List of functions for file-name filter.") ;;; @ filters @@ -136,7 +146,9 @@ ;;; (defun replace-as-filename (string) - "Return safety filename from STRING. [filename.el]" + "Return safety filename from STRING. +It refers variable `filename-filters' and default filters refers +`filename-limit-length', `filename-replacement-alist'." (and string (poly-funcall filename-filters string) )) -- 1.7.10.4