From d1b6d13953a652e136e4f86647dc1935cc7997b1 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Mon, 5 Jan 2004 10:30:06 +0000 Subject: [PATCH] * sample.lpath.el: Remove. * contrib/cus-dep.el: Remove. * contrib/gnus-idna.el: Remove. * contrib/passwd.el: Remove. * contrib/regexp-opt.el: Remove. * contrib/timer.el: Remove. * lisp/canlock-om.el: Remove. * lisp/dgnushack.el: Add `early-package-load-path' to `load-path' for XEmacs; remove Mule 2 stuff. * lisp/gnus-agent.el: Remove Mule 2 stuff. * lisp/gnus-art.el: Ditto. * lisp/gnus-cite.el: Ditto. * lisp/gnus-ems.el: Ditto. * lisp/gnus-msg.el: Ditto. * lisp/gnus-namazu.el: Ditto. * lisp/gnus-offline.el: Ditto. * lisp/gnus-start.el: Ditto. * lisp/gnus-util.el: Ditto. * lisp/gnus-uu.el: Ditto. * lisp/gnus.el: Ditto. * lisp/lpath.el: Ditto. * lisp/mail-source.el: Ditto. * lisp/message.el: Ditto. * lisp/mm-url.el: Ditto. * lisp/nnfolder.el: Ditto. * lisp/nnheader.el: Ditto. * lisp/nnkiboze.el: Ditto. * lisp/nnmail.el: Ditto. * lisp/nnmaildir.el: Ditto. * lisp/nnmbox.el: Ditto. * lisp/nnmh.el: Ditto. * lisp/nnml.el: Ditto. * lisp/nnrss.el: Ditto. * lisp/nnshimbun.el: Ditto. * lisp/nntp.el: Ditto. * lisp/score-mode.el: Ditto. * texi/infohack.el: Ditto. * texi/ptexinfmt.el: Ditto. --- ChangeLog | 41 ++++++ Mule23@1934.en | 180 +---------------------- Mule23@1934.ja | 184 +---------------------- contrib/cus-dep.el | 171 ---------------------- contrib/gnus-idna.el | 154 -------------------- contrib/passwd.el | 386 ------------------------------------------------- contrib/regexp-opt.el | 238 ------------------------------ contrib/timer.el | 308 --------------------------------------- lisp/canlock-om.el | 215 --------------------------- lisp/dgnushack.el | 182 +++++------------------ lisp/gnus-agent.el | 7 +- lisp/gnus-art.el | 3 +- lisp/gnus-cite.el | 2 +- lisp/gnus-ems.el | 21 +-- lisp/gnus-msg.el | 1 - lisp/gnus-namazu.el | 21 +-- lisp/gnus-offline.el | 36 +---- lisp/gnus-start.el | 9 +- lisp/gnus-util.el | 20 +-- lisp/gnus-uu.el | 3 +- lisp/gnus.el | 5 +- lisp/lpath.el | 15 -- lisp/mail-source.el | 5 - lisp/message.el | 29 +--- lisp/mm-url.el | 4 +- lisp/nnfolder.el | 10 +- lisp/nnheader.el | 28 +--- lisp/nnkiboze.el | 6 +- lisp/nnmail.el | 9 +- lisp/nnmaildir.el | 10 -- lisp/nnmbox.el | 5 +- lisp/nnmh.el | 8 +- lisp/nnml.el | 11 +- lisp/nnrss.el | 4 - lisp/nnshimbun.el | 4 - lisp/nntp.el | 2 +- lisp/score-mode.el | 4 +- sample.lpath.el | 42 ------ texi/infohack.el | 28 +--- texi/ptexinfmt.el | 7 +- 40 files changed, 157 insertions(+), 2261 deletions(-) delete mode 100644 contrib/cus-dep.el delete mode 100644 contrib/gnus-idna.el delete mode 100644 contrib/passwd.el delete mode 100644 contrib/regexp-opt.el delete mode 100644 contrib/timer.el delete mode 100644 lisp/canlock-om.el delete mode 100644 sample.lpath.el diff --git a/ChangeLog b/ChangeLog index f47f15b..87e5a59 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,46 @@ 2004-01-05 Katsumi Yamaoka + * sample.lpath.el: Remove. + * contrib/cus-dep.el: Remove. + * contrib/gnus-idna.el: Remove. + * contrib/passwd.el: Remove. + * contrib/regexp-opt.el: Remove. + * contrib/timer.el: Remove. + * lisp/canlock-om.el: Remove. + * lisp/dgnushack.el: Add `early-package-load-path' to `load-path' + for XEmacs 21.5; remove Mule 2 stuff. + * lisp/gnus-agent.el: Remove Mule 2 stuff. + * lisp/gnus-art.el: Ditto. + * lisp/gnus-cite.el: Ditto. + * lisp/gnus-ems.el: Ditto. + * lisp/gnus-msg.el: Ditto. + * lisp/gnus-namazu.el: Ditto. + * lisp/gnus-offline.el: Ditto. + * lisp/gnus-start.el: Ditto. + * lisp/gnus-util.el: Ditto. + * lisp/gnus-uu.el: Ditto. + * lisp/gnus.el: Ditto. + * lisp/lpath.el: Ditto. + * lisp/mail-source.el: Ditto. + * lisp/message.el: Ditto. + * lisp/mm-url.el: Ditto. + * lisp/nnfolder.el: Ditto. + * lisp/nnheader.el: Ditto. + * lisp/nnkiboze.el: Ditto. + * lisp/nnmail.el: Ditto. + * lisp/nnmaildir.el: Ditto. + * lisp/nnmbox.el: Ditto. + * lisp/nnmh.el: Ditto. + * lisp/nnml.el: Ditto. + * lisp/nnrss.el: Ditto. + * lisp/nnshimbun.el: Ditto. + * lisp/nntp.el: Ditto. + * lisp/score-mode.el: Ditto. + * texi/infohack.el: Ditto. + * texi/ptexinfmt.el: Ditto. + +2004-01-05 Katsumi Yamaoka + * lisp/hex-util.el: Remove. * lisp/md5.el: Remove. * lisp/sha1-el.el: Remove. diff --git a/Mule23@1934.en b/Mule23@1934.en index ba70609..caac6f9 100644 --- a/Mule23@1934.en +++ b/Mule23@1934.en @@ -1,179 +1 @@ -How to build T-gnus with Mule 2.3 based on Emacs 19.34. - -FIXING loaddefs.el -================== - -Unfortunately, some variables for `message' are predefined in lisp/ -loaddefs.el which is dumped in Mule executable file. It is uninvited, -moreover, it has a bad influence. So you should remove these -definitions from lisp/loaddefs.el and rebuild Mule. However, if you -don't want to rebuild Mule, you may put the following lines in the -beginning of .emacs file instead of rebuilding Mule. - -(let ((symbols '(citation-line-function - cite-function courtesy-message default-headers - default-mail-headers default-news-headers - deletable-headers fcc-handler-function - followup-to-function from-style - generate-headers-first generate-new-buffers - ignored-bounced-headers ignored-cited-headers - ignored-mail-headers ignored-news-headers - ignored-resent-headers ignored-supersedes-headers - included-forward-headers indent-citation-function - interactive kill-buffer-on-exit post-method - reply-to-function required-mail-headers - required-news-headers send-mail-function - send-news-function signature - signature-before-forwarded-message signature-file - signature-separator syntax-checks use-followup-to - user-organization-file wide-reply-to-function - yank-prefix)) - symbol) - (while symbols - (setq symbol (car symbols) - symbols (cdr symbol)) - (makunbound (intern (format "message-%s" symbol))))) - - -INSTALL CUSTOM, APEL, CLIME, SEMI -================================= - -T-gnus requires the latest version of CUSTOM, APEL, CLIME and SEMI; -CLIME 1.14 provides the same features as FLIM 1.14 for old Emacsen, -which is currently available from: - -ftp://ftp.jpl.org/pub/m17n/clime-1_14-************.tar.gz - -You should install these packages before installing T-gnus. As for -CUSTOM, you should apply the following patch before building it. - ------- cut here ------ cut here ------ cut here ------ cut here ------ ---- custom-1.9962/cus-face.el~ Wed Mar 4 19:52:39 1998 -+++ custom-1.9962/cus-face.el Mon Mar 9 08:05:33 1998 -@@ -96,7 +96,7 @@ - "Define a new FACE on all frames, ignoring X resources." - (interactive "SMake face: ") - (or (internal-find-face name) -- (let ((face (make-vector 8 nil))) -+ (let ((face (make-vector face-vector-length nil))) - (aset face 0 'face) - (aset face 1 name) - (let* ((frames (frame-list)) ------- cut here ------ cut here ------ cut here ------ cut here ------ - -By the way, the latest CUSTOM package for Emacs v19 is available from: - -ftp://ftp.dina.kvl.dk/pub/Staff/Per.Abrahamsen/custom/custom-1.9962.tar.gz - -However, since the `custom-make-dependencies' function does not exist -in this version of CUSTOM, we will use the contrib/cus-dep.el which is -imported from Emacs 20.7 when building T-gnus. - - -INSTALL regexp-opt.el -===================== - -Some T-gnus modules use the functions `regexp-opt', etc. That -functions are defined in regexp-opt.el(c) in the recent Emacsen, -however, Mule 2.3 does not contain it in the standard Lisp libraries. -Copy the file contrib/regexp-opt.el to site-lisp directory (or any -other directory), and byte-compile it as follows: - - % cp -p contrib/regexp-opt.el /usr/local/share/mule/site-lisp - % cd /usr/local/share/mule/site-lisp/ - % mule -batch -q -no-site-file -f batch-byte-compile regexp-opt.el - - -INSTALL passwd.el -================= - -This module provide the `read-passwd' function. You have to install -it if you don't have that function. To do this: - - % cp -p contrib/passwd.el /usr/local/share/mule/site-lisp - % cd /usr/local/share/mule/site-lisp/ - % mule -batch -q -no-site-file -f batch-byte-compile passwd.el - -And add the following line in your .emacs file: - - (autoload 'read-passwd "passwd") - - -INSTALL T-gnus -============== - -There are three ways of making T-gnus with Mule 2.3 based on Emacs 19.34. - -1. If you have installed EMU, APEL, CLIME and SEMI packages under the - standard load-path, for instance: - - EMU: /usr/local/share/mule/19.34/site-lisp/ - APEL: /usr/local/share/mule/site-lisp/apel/ - CLIME: /usr/local/share/mule/site-lisp/flim/ - SEMI: /usr/local/share/mule/site-lisp/semi/ - - What is more, if you have been replaced old CUSTOM with new CUSTOM - or if you have installed new CUSTOM directly under the standard - load-path as such as /usr/local/share/mule/19.34/site-lisp/, you - may have nothing to be done; type the following commands right now. - - % ./configure --with-emacs=mule - % make install - - However, if you have installed new CUSTOM in the subdirectory under - the standard load-path, use the configure option `--with-addpath=' - as follows: - - % ./configure --with-emacs=mule\ - --with-addpath=/usr/local/share/mule/site-lisp/custom/ - % make install - - or you can use the file subdirs.el under the parent directory of - the subdirectory of CUSTOM to add it into load-path which contain - the following contents: - - (normal-top-level-add-to-load-path - '("custom/" "and the other subdirectories.../")) - - and then just type: - - % ./configure --with-emacs=mule - % make install - -2. If you have installed EMU, APEL, CLIME and SEMI packages in the - non-standard load-path, use the configure option `--with-addpath=' - with the colon separated directory names where EMU, APEL or CUSTOM - packages are installed. For example: - - % ./configure --with-emacs=mule\ - --with-addpath=~/elisp/emu/:~/elisp/apel/:~/elisp/custom/ - % make install - - In this case, you have no need to add paths of CLIME, SEMI if they - are installed under the directory which is same as the parent - directory of APEL. - -3. This is another way to install T-gnus when you have installed EMU, - APEL, CLIME and SEMI packages in the non-standard load-path. Copy - the file `sample.lpath.el' which is included in the distribution to - `~/.lpath.el' and modify it suitably for your environment. And - then type the following command. - - % ./configure --with-emacs=mule - % make install - - -USING emacs-w3m (and Emacs/W3) -============================== -The `nnshimbun' web based back end has been moved to the emacs-w3m -package at 18 June 2003. You need to install the latest version of -emacs-w3m if you want to browse web newspapers using T-gnus as before. -In that case, you *must* delete nnshimbun.el and nnshimbun.elc files -originated by T-gnus. Emacs-w3m is an Emacs interface to the external -command w3m, visit the following pages for more information: - - http://emacs-w3m.namazu.org/ - http://w3m.sourceforge.net/ - -Please give up the idea to use Emacs/W3 under Mule 2.3. There is no -information, sorry. +T-gnus no longer supports Mule 2.3 based on Emacs 19.34. diff --git a/Mule23@1934.ja b/Mule23@1934.ja index 65b6607..e01d89e 100644 --- a/Mule23@1934.ja +++ b/Mule23@1934.ja @@ -1,183 +1 @@ -Emacs 19.34 をベースにした Mule 2.3 で T-gnus を作る方法。 - -FIXING loaddefs.el -================== - -残念なことにいくつかの `message' で使う変数が lisp/loaddefs.el で定義 -されていて Mule の実行ファイルに組み込まれてしまっています。これは余計 -なお世話だし、しかも悪影響があります。そこであなたはそれらの定義を -lisp/loaddefs.el から削除して、Mule を作り直さなければなりません。 -しかし、もしあなたが Mule を作り直すことを望まないならば、.emacs ファ -イルの先頭に以下の各行を書き込むことで、Mule を作り直す代わりにするこ -とができます。 - -(let ((symbols '(citation-line-function - cite-function courtesy-message default-headers - default-mail-headers default-news-headers - deletable-headers fcc-handler-function - followup-to-function from-style - generate-headers-first generate-new-buffers - ignored-bounced-headers ignored-cited-headers - ignored-mail-headers ignored-news-headers - ignored-resent-headers ignored-supersedes-headers - included-forward-headers indent-citation-function - interactive kill-buffer-on-exit post-method - reply-to-function required-mail-headers - required-news-headers send-mail-function - send-news-function signature - signature-before-forwarded-message signature-file - signature-separator syntax-checks use-followup-to - user-organization-file wide-reply-to-function - yank-prefix)) - symbol) - (while symbols - (setq symbol (car symbols) - symbols (cdr symbol)) - (makunbound (intern (format "message-%s" symbol))))) - - -INSTALL CUSTOM, APEL, CLIME, SEMI -================================= - -T-gnus は最新版の CUSTOM, APEL, CLIME および SEMI を必要とします。 -CLIME 1.14 は古い Emacs に FLIM 1.14 と同じ機能を提供するもので、現在 -以下のものが入手できます。 - -ftp://ftp.jpl.org/pub/m17n/clime-1_14-************.tar.gz - -あなたはこれらのパッケージを T-gnus の前にインストールしなければなりま -せん。CUSTOM については、作る前にあなたは以下のパッチを当てる必要があ -ります。 - ------- cut here ------ cut here ------ cut here ------ cut here ------ ---- custom-1.9962/cus-face.el~ Wed Mar 4 19:52:39 1998 -+++ custom-1.9962/cus-face.el Mon Mar 9 08:05:33 1998 -@@ -96,7 +96,7 @@ - "Define a new FACE on all frames, ignoring X resources." - (interactive "SMake face: ") - (or (internal-find-face name) -- (let ((face (make-vector 8 nil))) -+ (let ((face (make-vector face-vector-length nil))) - (aset face 0 'face) - (aset face 1 name) - (let* ((frames (frame-list)) ------- cut here ------ cut here ------ cut here ------ cut here ------ - -なお、Emacs v19 用の最新の CUSTOM は以下のものを入手することができます。 - -ftp://ftp.dina.kvl.dk/pub/Staff/Per.Abrahamsen/custom/custom-1.9962.tar.gz - -ただし、この版の CUSTOM には `custom-make-dependencies' 関数が無いので、 -T-gnus の生成時に Emacs 20.7 から移入した contrib/cus-dep.el を使いま -す。 - - -INSTALL regexp-opt.el -===================== - -T-gnus のいくつかのモジュールは `regexp-opt' などの関数を使います。そ -れらの関数は、最近の Emacsen では regexp-opt.el(c) で定義されているの -ですが、Mule 2.3 はそれを標準の Lisp ライブラリの中に含んでいません。 -以下のように contrib/regexp-opt.el を site-lisp ディレクトリ (または他 -のディレクトリ) にコピーして、byte-compile して下さい。 - - % cp -p contrib/regexp-opt.el /usr/local/share/mule/site-lisp - % cd /usr/local/share/mule/site-lisp/ - % mule -batch -q -no-site-file -f batch-byte-compile regexp-opt.el - - -INSTALL passwd.el -================= - -このモジュールは `read-passwd' 関数を提供します。無い場合はインストー -ルしなければなりません。それにはこうして下さい。 - - % cp -p contrib/passwd.el /usr/local/share/mule/site-lisp - % cd /usr/local/share/mule/site-lisp/ - % mule -batch -q -no-site-file -f batch-byte-compile passwd.el - -そして .emacs ファイルに以下の行を追加して下さい。 - - (autoload 'read-passwd "passwd") - - -INSTALL T-gnus -============== - -Emacs 19.34 をベースにした Mule 2.3 で gnus を作るには三つの方法があり -ます。 - -1. もしあなたが EMU, APEL, CLIME および SEMI の各パッケージを標準の - load-path の下にインストールしているとします。例えばこう。 - - EMU: /usr/local/share/mule/19.34/site-lisp/ - APEL: /usr/local/share/mule/site-lisp/apel/ - CLIME: /usr/local/share/mule/site-lisp/flim/ - SEMI: /usr/local/share/mule/site-lisp/semi/ - - しかも、もしあなたが古い CUSTOM を新しい CUSTOM で置き換えているか、 - 新しい CUSTOM を /usr/local/share/mule/19.34/site-lisp/ のような標 - 準の load-path の直下にインストールしているならば、あなたは何もす - る必要がありません。今すぐに以下のコマンドをタイプして下さい。 - - % ./configure --with-emacs=mule - % make install - - しかし、もしあなたが新しい CUSTOM を標準の load-path の下のサブディ - レクトリにインストールしてあるならば、以下のように configure オプ - ションの `--with-addpath=' を使うか、 - - % ./configure --with-emacs=mule\ - --with-addpath=/usr/local/share/mule/site-lisp/custom/ - % make install - - あるいはあなたは以下の内容を含む、CUSTOM サブディレクトリの親ディ - レクトリの下の subdirs.el ファイルを使うことができます。 - - (normal-top-level-add-to-load-path - '("custom/" "and the other subdirectories.../")) - - そして単に - - % ./configure --with-emacs=mule - % make install - - とタイプして下さい。 - -2. もしあなたが EMU, APEL, CLIME および SEMI の各パッケージを標準では - ない load-path にインストールしているならば、コロンで区切られた - EMU, APEL および CUSTOM がインストールされているディレクトリ名と - configure オプションの `--with-addpath=' を使って下さい。例えば - - % ./configure --with-emacs=mule\ - --with-addpath=~/elisp/emu/:~/elisp/apel/:~/elisp/custom/ - % make - - この場合、もし CLIME, SEMI が APEL の親ディレクトリと同じディレクト - リの下にインストールされているならば、それらの path を追加する必要 - はありません。 - -3. これは、EMU, APEL, CLIME および SEMI の各パッケージを標準ではない - load-path にインストールしている場合の、別の方法です。配布に含まれ - ているファイル `sample.lpath.el' を `~/.lpath.el' にコピーして、あ - なたの環境に合うように書き換えて下さい。そして次のコマンドをタイプ - して下さい。 - - % ./configure --with-emacs=mule - % make install - - -USING emacs-w3m (and Emacs/W3) -============================== -ウェブに基づいたバックエンドである `nnshimbun' は、2003年6月18日を以て -emacs-w3m パッケージに移籍されました。今までのように T-gnus でウェブの -新聞を閲覧したいのであれば、最新版の emacs-w3m をインストールする必要 -があります。その際、*必ず* T-gnus 由来の nnshimbun.el と nnshimbun.elc -ファイルを消して下さい。Emacs-w3m は外部コマンド w3m への Emacs のイン -ターフェースです。詳細情報については以下のページを訪ねてみて下さい。 - - http://emacs-w3m.namazu.org/ - http://w3m.sourceforge.net/ - -Mule 2.3 で Emacs/W3 を使うことは諦めて下さい。すみませんが情報はあり -ません。 +T-gnus はもはや Emacs 19.34 をベースにした Mule 2.3 をサポートしません。 diff --git a/contrib/cus-dep.el b/contrib/cus-dep.el deleted file mode 100644 index 8b689bf..0000000 --- a/contrib/cus-dep.el +++ /dev/null @@ -1,171 +0,0 @@ -;;; cus-dep.el --- Find customization dependencies. -;; -;; Copyright (C) 1997 Free Software Foundation, Inc. -;; -;; Author: Per Abrahamsen -;; Keywords: internal - -;; This file is part of GNU Emacs. - -;; GNU Emacs 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. - -;; GNU Emacs 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. - -;;; Code: - -(require 'cl) -(require 'widget) -(require 'cus-face) -(require 'autoload) - -(defun custom-make-dependencies () - "Batch function to extract custom dependencies from .el files. -Usage: emacs -batch -l ./cus-dep.el -f custom-make-dependencies DIRS" - (let ((enable-local-eval nil) - (all-subdirs command-line-args-left) - (start-directory default-directory)) - (get-buffer-create " cus-dep temp") - (set-buffer " cus-dep temp") - (while all-subdirs - (message "Directory %s" (car all-subdirs)) - (let ((files (directory-files (car all-subdirs) nil "\\`[^=].*\\.el\\'")) - (default-directory default-directory) - file - is-autoloaded) - (cd (car all-subdirs)) - (while files - (setq file (car files) - files (cdr files)) - (when (file-exists-p file) - (erase-buffer) - (insert-file-contents file) - (goto-char (point-min)) - (string-match "\\`\\(.*\\)\\.el\\'" file) - (let ((name (file-name-nondirectory (match-string 1 file)))) - (condition-case nil - (while (re-search-forward "^(defcustom\\|^(defface\\|^(defgroup" - nil t) - (setq is-autoloaded nil) - (beginning-of-line) - (save-excursion - (forward-line -1) - (if (looking-at generate-autoload-cookie) - (setq is-autoloaded t))) - (let ((expr (read (current-buffer)))) - (condition-case nil - (progn - (eval expr) - (put (nth 1 expr) 'custom-autoloaded is-autoloaded) - (put (nth 1 expr) 'custom-where name)) - (error nil)))) - (error nil))))) - (setq all-subdirs (cdr all-subdirs))))) - (message "Generating cus-load.el...") - (find-file "cus-load.el") - (erase-buffer) - (insert "\ -;;; cus-load.el --- automatically extracted custom dependencies -;; -;;; Code: - -") - (mapatoms (lambda (symbol) - (let ((members (get symbol 'custom-group)) - item where found) - (when members - (while members - (setq item (car (car members)) - members (cdr members) - where (get item 'custom-where)) - (unless (or (null where) - (member where found)) - (if found - (insert " ") - (insert "(put '" (symbol-name symbol) - " 'custom-loads '(")) - (prin1 where (current-buffer)) - (push where found))) - (when found - (insert "))\n")))))) - (insert "\ -;;; These are for handling :version. We need to have a minimum of -;;; information so `custom-changed-variables' could do its job. -;;; For both groups and variables we have to set `custom-version'. -;;; For variables we also set the `standard-value' and for groups -;;; `group-documentation' (which is shown in the customize buffer), so -;;; we don't have to load the file containing the group. - -;;; `custom-versions-load-alist' is an alist that has as car a version -;;; number and as elts the files that have variables that contain that -;;; version. These files should be loaded before showing the -;;; customization buffer that `customize-changed-options' generates. - - -;;; This macro is used so we don't modify the information about -;;; variables and groups if it's already set. (We don't know when -;;; cus-load.el is going to be loaded and at that time some of the -;;; files might be loaded and some others might not). -(defmacro custom-put-if-not (symbol propname value) - `(unless (get ,symbol ,propname) - (put ,symbol ,propname ,value))) - -") - (let ((version-alist nil)) - (mapatoms (lambda (symbol) - (let ((version (get symbol 'custom-version)) - where) - (when version - (setq where (get symbol 'custom-where)) - (when (and where - ;; Don't bother to do anything if it's - ;; autoloaded because we will have all - ;; this info when emacs is running - ;; anyway. - (not (get symbol 'custom-autoloaded))) - (insert "(custom-put-if-not '" (symbol-name symbol) - " 'custom-version ") - (prin1 version (current-buffer)) - (insert ")\n") - (insert "(custom-put-if-not '" (symbol-name symbol)) - (if (get symbol 'standard-value) - ;; This means it's a variable - (progn - (insert " 'standard-value t)\n") - (if (assoc version version-alist) - (unless - (member where - (cdr (assoc version version-alist))) - (push where (cdr (assoc version version-alist)))) - (push (cons version (list where)) version-alist))) - ;; This is a group - (insert " 'group-documentation ") - (prin1 (get symbol 'group-documentation) (current-buffer)) - (insert ")\n"))))))) - - (insert "\n(defvar custom-versions-load-alist " - (if version-alist "'" "")) - (prin1 version-alist (current-buffer)) - (insert "\n \"For internal use by custom.\")\n")) - - (insert "\ - -\(provide 'cus-load) - -;;; cus-load.el ends here\n") - (let ((kept-new-versions 10000000)) - (save-buffer)) - (message "Generating cus-load.el...done") - (kill-emacs)) - -;;; cus-dep.el ends here diff --git a/contrib/gnus-idna.el b/contrib/gnus-idna.el deleted file mode 100644 index 15c47b6..0000000 --- a/contrib/gnus-idna.el +++ /dev/null @@ -1,154 +0,0 @@ -;;; gnus-idna.el --- Internationalized domain names support for Gnus. - -;; Copyright (C) 2003 Free Software Foundation, Inc. - -;; Author: Simon Josefsson -;; Keywords: news, mail - -;; This file is part of GNU Emacs. - -;; GNU Emacs 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. - -;; GNU Emacs 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 package implement crude support for internationalized domain -;; names in Gnus. - -;; Theory of Operation: - -;; RFC 2822 RHS's inside the From:, To:, and CC: headers are encoded -;; using IDNA ToASCII() when you send mail using Message. The hook -;; used is message-send-hook. -;; -;; For incoming articles, when QP in headers are decoded (i.e., when -;; gnus-article-decode-hook is invoked), it searches for "xn--" -;; prefixes and decode them if they are found inside (heuristically -;; determined) RHS in From:, To: and Cc:, using IDNA ToUnicode(). - -;; Usage: - -;; You need to install GNU Libidn (0.1.11 or later) and make sure the -;; idna.el installed by it is found by emacs. - -;; If you use an older Gnus, you may need to put the following in your -;; init scripts too, but keep in mind that most older Gnuses either -;; doesn't have these hooks or are buggy in other regards so it -;; doesn't work anyway. (The window of Gnus versions that this works -;; on is a few weeks during the Oort CVS in winter 2003.) Update to a -;; recent Gnus instead, then you don't have to do anything. - -;; (add-hook 'message-send-hook 'message-idna-to-ascii-rhs) -;; (add-hook 'gnus-article-decode-hook 'gnus-idna-to-unicode-rhs 'append) - -;; Revision history: - -;; 2003-02-26 Initial release -;; -;; 2003-03-19 Cleanup. Fixes a bug that may corrupt outgoing mail if -;; it contains From:, To: or Cc: headers in the body. - -;;; Code: - -(require 'gnus) -(require 'gnus-util) -(require 'rfc822) -(autoload 'idna-to-ascii "idna") -(autoload 'idna-to-unicode "idna") - -(defcustom message-use-idna 'ask - "Whether to encode non-ASCII in domain names into ASCII according to IDNA." - :type '(choice (const :tag "Ask" ask) - (const :tag "Never" nil) - (const :tag "Always" t))) - -(defun message-idna-inside-rhs-p () - "Return t iff point is inside a RHS (heuristically). -Only works properly if header contains mailbox-list or address-list. -I.e., calling it on a Subject: header is useless." - (if (re-search-backward - "[\\\n\r\t ]" (save-excursion (search-backward "@" nil t)) t) - ;; whitespace between @ and point - nil - (let ((dquote 1) (paren 1)) - (while (save-excursion (re-search-backward "[^\\]\"" nil t dquote)) - (incf dquote)) - (while (save-excursion (re-search-backward "[^\\]\(" nil t paren)) - (incf paren)) - (and (= (% dquote 2) 1) (= (% paren 2) 1))))) - -(defun message-idna-to-ascii-rhs-1 (header) - "Interactively potentially IDNA encode domain names in HEADER." - (let (rhs ace start end startpos endpos) - (goto-char (point-min)) - (setq start (re-search-forward (concat "^" header) nil t) - end (or (save-excursion (re-search-forward "^[ \t]" nil t)) - (point-max))) - (when (and start end) - (while (re-search-forward "@\\([^ \t\r\n>]+\\)" end t) - (setq rhs (match-string-no-properties 1) - startpos (match-beginning 1) - endpos (match-end 1)) - (when (save-match-data - (and (message-idna-inside-rhs-p) - (setq ace (idna-to-ascii rhs)) - (not (string= rhs ace)) - (if (eq message-use-idna 'ask) - (unwind-protect - (progn - (replace-highlight startpos endpos) - (y-or-n-p - (format "Replace with `%s'? " ace))) - (message "") - (replace-dehighlight)) - message-use-idna))) - (replace-match (concat "@" ace))))))) - -;;;###autoload -(defun message-idna-to-ascii-rhs () - "Possibly IDNA encode non-ASCII domain names in From:, To: and Cc: headers. -See `message-idna-encode'." - (interactive) - (when (condition-case nil (require 'idna) (file-error)) - (save-excursion - (save-restriction - (message-narrow-to-head) - (message-idna-to-ascii-rhs-1 "From") - (message-idna-to-ascii-rhs-1 "To") - (message-idna-to-ascii-rhs-1 "Cc"))))) - -;;;###autoload -(defun gnus-idna-to-unicode-rhs () - "Decode IDNA strings in RHS in From:, To: and Cc: headers in current buffer." - (when (condition-case nil (require 'idna) (file-error)) - (let ((inhibit-point-motion-hooks t) - buffer-read-only) - (article-narrow-to-head) - (goto-char (point-min)) - (while (re-search-forward "\\(xn--.*\\)[ \t\n\r,>]" nil t) - (let (ace unicode) - (when (save-match-data - (and (setq ace (match-string 1)) - (save-excursion (and (re-search-backward "^[^ \t]" nil t) - (looking-at "From\\|To\\|Cc"))) - (save-excursion (backward-char) - (message-idna-inside-rhs-p)) - (setq unicode (idna-to-unicode ace)))) - (unless (string= ace unicode) - (replace-match unicode nil nil nil 1)))))))) - -(provide 'gnus-idna) - -;; gnus-idna.el ends here diff --git a/contrib/passwd.el b/contrib/passwd.el deleted file mode 100644 index 0257469..0000000 --- a/contrib/passwd.el +++ /dev/null @@ -1,386 +0,0 @@ -;;; passwd.el --- Prompting for passwords semi-securely - -;; Copyright (C) 1994 Free Software Foundation, Inc. -;; Keywords: comm, extensions - -;; Author: Jamie Zawinski - -;; This file is part of XEmacs. - -;; XEmacs 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. - -;; XEmacs 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. - -;;; Synched up with: Not in FSF. - -;; You should have received a copy of the GNU General Public License -;; along with XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. - -;;; Change Log: -;; -;; Sun Jun 12 04:19:30 1994 by sandy on ibm550.sissa.it -;; Added support for password histories and (provide 'passwd) -;; (jwz says: this "history" thing is completely undocumented, you loser!) -;; 2-Jan-95 (mon); 4:13 AM by jwz@netscape.com -;; Fixed Sandy's extreme keymap bogosity. Made it invert the screen when -;; reading securely (this could be better; maybe use red text or something -;; instead...) -;; 9-Jul-95 (fri); 4:55 AM by jwz@netscape.com -;; Made it work with XEmacs 19.12. -;; 7-Jul-95 by cthomp@cs.uiuc.edu -;; Added variable to control inverting frame when keyboard grabbed - -;;; Code: - -(defvar passwd-invert-frame-when-keyboard-grabbed t - "*If non-nil swap the foreground and background colors of all faces. -This is done while the keyboard is grabbed in order to give a visual -clue that a grab is in effect.") - -(defvar passwd-echo ?. - "*The character which should be echoed when typing a password, -or nil, meaning echo nothing.") - -(defvar read-passwd-map - (let ((i 0) - (s (make-string 1 0)) - map) - (cond ((fboundp 'set-keymap-parent) - (setq map (make-keymap)) - (set-keymap-parent map minibuffer-local-map)) - (t ; v18/FSFmacs compatibility - (setq map (copy-keymap minibuffer-local-map)))) - (if (fboundp 'set-keymap-name) - (set-keymap-name map 'read-passwd-map)) - - (while (< i 127) - (aset s 0 i) - (or (and (boundp 'meta-prefix-char) (eq i meta-prefix-char)) - (define-key map s 'self-insert-command)) - (setq i (1+ i))) - - (define-key map "\C-g" 'keyboard-quit) - (define-key map "\C-h" 'delete-backward-char) - (define-key map "\r" 'exit-minibuffer) - (define-key map "\n" 'exit-minibuffer) - (define-key map "\C-u" 'passwd-erase-buffer) - (define-key map "\C-q" 'quoted-insert) - (define-key map "\177" 'delete-backward-char) - (define-key map "\M-n" 'passwd-next-history-element) - (define-key map "\M-p" 'passwd-previous-history-element) - map) - "Keymap used for reading passwords in the minibuffer. -The \"bindings\" in this map are not real commands; only a limited -number of commands are understood. The important bindings are: -\\ - \\[passwd-erase-buffer] Erase all input. - \\[quoted-insert] Insert the next character literally. - \\[delete-backward-char] Delete the previous character. - \\[exit-minibuffer] Accept what you have typed. - \\[keyboard-quit] Abort the command. - -All other characters insert themselves (but do not echo.)") - -;;; internal variables - -(defvar passwd-history nil) -(defvar passwd-history-posn 0) - -;;;###autoload -(defun read-passwd (prompt &optional confirm default) - "Prompts for a password in the minibuffer, and returns it as a string. -If PROMPT may be a prompt string or an alist of elements -'\(prompt . default\). -If optional arg CONFIRM is true, then ask the user to type the password -again to confirm that they typed it correctly. -If optional arg DEFAULT is provided, then it is a string to insert as -the default choice (it is not, of course, displayed.) - -If running under X, the keyboard will be grabbed (with XGrabKeyboard()) -to reduce the possibility that evesdropping is occuring. - -When reading a password, all keys self-insert, except for: -\\ - \\[read-passwd-erase-line] Erase the entire line. - \\[quoted-insert] Insert the next character literally. - \\[delete-backward-char] Delete the previous character. - \\[exit-minibuffer] Accept what you have typed. - \\[keyboard-quit] Abort the command. - -The returned value is always a newly-created string. No additional copies -of the password remain after this function has returned. - -NOTE: unless great care is taken, the typed password will exist in plaintext -form in the running image for an arbitrarily long time. Priveleged users may -be able to extract it from memory. If emacs crashes, it may appear in the -resultant core file. - -Some steps you can take to prevent the password from being copied around: - - - as soon as you are done with the returned string, destroy it with - (fillarray string 0). The same goes for any default passwords - or password histories. - - - do not copy the string, as with concat or substring - if you do, be - sure to keep track of and destroy all copies. - - - do not insert the password into a buffer - if you do, be sure to - overwrite the buffer text before killing it, as with the functions - `passwd-erase-buffer' or `passwd-kill-buffer'. Note that deleting - the text from the buffer does NOT necessarily remove the text from - memory. - - - be careful of the undo history - if you insert the password into a - buffer which has undo recording turned on, the password will be - copied onto the undo list, and thus recoverable. - - - do not pass it as an argument to a shell command - anyone will be - able to see it if they run `ps' at the right time. - -Note that the password will be temporarily recoverable with the `view-lossage' -command. This data will not be overwritten until another hundred or so -characters are typed. There's not currently a way around this." - - (save-excursion - (let ((input (get-buffer-create " *password*")) - (passwd-history-posn 0) - passwd-history) - (if (listp prompt) - (setq passwd-history prompt - default (cdr (car passwd-history)))) - (set-buffer input) - (buffer-disable-undo input) - (use-local-map read-passwd-map) - (unwind-protect - (progn - (if (passwd-grab-keyboard) - (passwd-secure-display)) - (read-passwd-1 input prompt nil default) - (set-buffer input) - - (if (not confirm) - (buffer-string) - (let ((ok nil) - passwd) - (while (not ok) - (set-buffer input) - (setq passwd (buffer-string)) - (read-passwd-1 input prompt "[Retype to confirm]") - (if (passwd-compare-string-to-buffer passwd input) - (setq ok t) - (fillarray passwd 0) - (setq passwd nil) - (beep) - (read-passwd-1 input prompt "[Mismatch. Start over]") - )) - passwd))) - ;; protected - (passwd-ungrab-keyboard) - (passwd-insecure-display) - (passwd-kill-buffer input) - (if (fboundp 'clear-message) ;XEmacs - (clear-message) - (message "")) - )))) - - -(defun read-passwd-1 (buffer prompt &optional prompt2 default) - (set-buffer buffer) - (passwd-erase-buffer) - (if default (insert default)) - (catch 'exit ; exit-minibuffer throws here - (while t - (set-buffer buffer) - (let* ((minibuffer-completion-table nil) - (cursor-in-echo-area t) - (echo-keystrokes 0) - (key (passwd-read-key-sequence - (concat (if (listp prompt) - (car (nth passwd-history-posn passwd-history)) - prompt) - prompt2 - (if passwd-echo - (make-string (buffer-size) passwd-echo))))) - (binding (key-binding key))) - (setq prompt2 nil) - (set-buffer buffer) ; just in case... - (if (fboundp 'event-to-character) ;; lemacs - (setq last-command-event (aref key (1- (length key))) - last-command-char (event-to-character last-command-event)) - ;; v18/FSFmacs compatibility - (setq last-command-char (aref key (1- (length key))))) - (setq this-command binding) - (condition-case c - (command-execute binding) - (error - (beep) - (if (fboundp 'display-error) - (display-error c t) - ;; v18/FSFmacs compatibility - (message (concat (or (get (car-safe c) 'error-message) "???") - (if (cdr-safe c) ": ") - (mapconcat - (function (lambda (x) (format "%s" x))) - (cdr-safe c) ", ")))) - (sit-for 2))) - )))) - -(defun passwd-previous-history-element (n) - (interactive "p") - (or passwd-history - (error "Password history is empty.")) - (let ((l (length passwd-history))) - (setq passwd-history-posn - (% (+ n passwd-history-posn) l)) - (if (< passwd-history-posn 0) - (setq passwd-history-posn (+ passwd-history-posn l)))) - (let ((obuff (current-buffer))) ; want to move point in passwd buffer - (unwind-protect - (progn - (set-buffer " *password*") - (passwd-erase-buffer) - (insert (cdr (nth passwd-history-posn passwd-history)))) - (set-buffer obuff)))) - -(defun passwd-next-history-element (n) - (interactive "p") - (passwd-previous-history-element (- n))) - -(defun passwd-erase-buffer () - ;; First erase the buffer, which will simply enlarge the gap. - ;; Then insert null characters until the gap is filled with them - ;; to prevent the old text from being visible in core files or kmem. - ;; (Actually use 3x the size of the buffer just to be safe - a longer - ;; passwd might have been typed and backspaced over.) - (interactive) - (widen) - (let ((s (* (buffer-size) 3))) - (erase-buffer) - (while (> s 0) - (insert ?\000) - (setq s (1- s))) - (erase-buffer))) - -(defun passwd-kill-buffer (buffer) - (save-excursion - (set-buffer buffer) - (buffer-disable-undo buffer) - (passwd-erase-buffer) - (set-buffer-modified-p nil)) - (kill-buffer buffer)) - - -(defun passwd-compare-string-to-buffer (string buffer) - ;; same as (equal string (buffer-string)) but with no dangerous consing. - (save-excursion - (set-buffer buffer) - (goto-char (point-min)) - (let ((L (length string)) - (i 0)) - (if (/= L (- (point-max) (point-min))) - nil - (while (not (eobp)) - (if (/= (following-char) (aref string i)) - (goto-char (point-max)) - (setq i (1+ i)) - (forward-char))) - (= (point) (+ i (point-min))))))) - - -(defvar passwd-face-data nil) -(defun passwd-secure-display () - ;; Inverts the screen - used to indicate secure input, like xterm. - (cond - ((and passwd-invert-frame-when-keyboard-grabbed - (fboundp 'set-face-foreground)) - (setq passwd-face-data - (delq nil (mapcar (function - (lambda (face) - (let ((fg (face-foreground face)) - (bg (face-background face))) - (if (or fg bg) - (if (fboundp 'color-name) - (list face - (color-name fg) - (color-name bg)) - (list face fg bg)) - nil)))) - (if (fboundp 'list-faces) - (list-faces) ; lemacs - (face-list) ; FSFmacs - )))) - (let ((rest passwd-face-data)) - (while rest - (set-face-foreground (nth 0 (car rest)) (nth 2 (car rest))) - (set-face-background (nth 0 (car rest)) (nth 1 (car rest))) - (setq rest (cdr rest)))))) - nil) - -(defun passwd-insecure-display () - ;; Undoes the effect of `passwd-secure-display'. - (cond - (passwd-invert-frame-when-keyboard-grabbed - (while passwd-face-data - (set-face-foreground (nth 0 (car passwd-face-data)) - (nth 1 (car passwd-face-data))) - (set-face-background (nth 0 (car passwd-face-data)) - (nth 2 (car passwd-face-data))) - (setq passwd-face-data (cdr passwd-face-data))) - nil))) - -(defun passwd-grab-keyboard () - (cond ((not (and (fboundp 'x-grab-keyboard) ; lemacs 19.10+ - (eq 'x (if (fboundp 'frame-type) - (frame-type (selected-frame)) - (live-screen-p (selected-screen)))))) - nil) - ((x-grab-keyboard) - t) - (t - (message "Unable to grab keyboard - waiting a second...") - (sleep-for 1) - (cond ((x-grab-keyboard) - (message "Keyboard grabbed on second try.") - t) - (t - (beep) - (message "WARNING: keyboard is insecure (unable to grab!)") - (sleep-for 3) - nil))))) - -(defun passwd-ungrab-keyboard () - (if (and (fboundp 'x-ungrab-keyboard) ; lemacs 19.10+ - (eq 'x (if (fboundp 'frame-type) - (frame-type (selected-frame)) - (live-screen-p (selected-screen))))) - (x-ungrab-keyboard))) - -;; v18 compatibility -(or (fboundp 'buffer-disable-undo) - (fset 'buffer-disable-undo 'buffer-flush-undo)) - -;; read-key-sequence echoes the key sequence in Emacs 18. -(defun passwd-read-key-sequence (prompt) - (let ((inhibit-quit t) - str) - (while (or (null str) (keymapp (key-binding str))) - (if (fboundp 'display-message) - (display-message 'prompt prompt) - (message prompt)) - (setq str (concat str (char-to-string (read-char))))) - (setq quit-flag nil) - str)) - -(or (string-match "^18" emacs-version) - (fset 'passwd-read-key-sequence 'read-key-sequence)) - -(provide 'passwd) - -;;; passwd.el ends here diff --git a/contrib/regexp-opt.el b/contrib/regexp-opt.el deleted file mode 100644 index 589f1b7..0000000 --- a/contrib/regexp-opt.el +++ /dev/null @@ -1,238 +0,0 @@ -;;; regexp-opt.el --- generate efficient regexps to match strings. - -;; Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc. - -;; Author: Simon Marshall -;; Keywords: strings, regexps - -;; This file is part of GNU Emacs. - -;; GNU Emacs 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. - -;; GNU Emacs 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: - -;; The "opt" in "regexp-opt" stands for "optim\\(al\\|i\\(se\\|ze\\)\\)". -;; -;; This package generates a regexp from a given list of strings (which matches -;; one of those strings) so that the regexp generated by: -;; -;; (regexp-opt strings) -;; -;; is equivalent to, but more efficient than, the regexp generated by: -;; -;; (mapconcat 'regexp-quote strings "\\|") -;; -;; For example: -;; -;; (let ((strings '("cond" "if" "when" "unless" "while" -;; "let" "let*" "progn" "prog1" "prog2" -;; "save-restriction" "save-excursion" "save-window-excursion" -;; "save-current-buffer" "save-match-data" -;; "catch" "throw" "unwind-protect" "condition-case"))) -;; (concat "(" (regexp-opt strings t) "\\>")) -;; => "(\\(c\\(atch\\|ond\\(ition-case\\)?\\)\\|if\\|let\\*?\\|prog[12n]\\|save-\\(current-buffer\\|excursion\\|match-data\\|restriction\\|window-excursion\\)\\|throw\\|un\\(less\\|wind-protect\\)\\|wh\\(en\\|ile\\)\\)\\>" -;; -;; Searching using the above example `regexp-opt' regexp takes approximately -;; two-thirds of the time taken using the equivalent `mapconcat' regexp. - -;; Since this package was written to produce efficient regexps, not regexps -;; efficiently, it is probably not a good idea to in-line too many calls in -;; your code, unless you use the following trick with `eval-when-compile': -;; -;; (defvar definition-regexp -;; (eval-when-compile -;; (concat "^(" -;; (regexp-opt '("defun" "defsubst" "defmacro" "defalias" -;; "defvar" "defconst") t) -;; "\\>"))) -;; -;; The `byte-compile' code will be as if you had defined the variable thus: -;; -;; (defvar definition-regexp -;; "^(\\(def\\(alias\\|const\\|macro\\|subst\\|un\\|var\\)\\)\\>") -;; -;; Note that if you use this trick for all instances of `regexp-opt' and -;; `regexp-opt-depth' in your code, regexp-opt.el would only have to be loaded -;; at compile time. But note also that using this trick means that should -;; regexp-opt.el be changed, perhaps to fix a bug or to add a feature to -;; improve the efficiency of `regexp-opt' regexps, you would have to recompile -;; your code for such changes to have effect in your code. - -;; Originally written for font-lock.el, from an idea from Stig's hl319.el, with -;; thanks for ideas also to Michael Ernst, Bob Glickstein and Dan Nicolaescu. -;; Please don't tell me that it doesn't produce optimal regexps; I know that -;; already. For example, the above explanation for the meaning of "opt" would -;; be more efficient as "optim\\(al\\|i[sz]e\\)", but this requires complex -;; forward looking. But (ideas or) code to improve things (are) is welcome. - -;;; Code: - -;;;###autoload -(defun regexp-opt (strings &optional paren) - "Return a regexp to match a string in STRINGS. -Each string should be unique in STRINGS and should not contain any regexps, -quoted or not. If optional PAREN is non-nil, ensure that the returned regexp -is enclosed by at least one regexp grouping construct. -The returned regexp is typically more efficient than the equivalent regexp: - - (let ((open-paren (if PAREN \"\\\\(\" \"\")) (close-paren (if PAREN \"\\\\)\" \"\"))) - (concat open-paren (mapconcat 'regexp-quote STRINGS \"\\\\|\") close-paren)) - -but typically contains more regexp grouping constructs. -Use `regexp-opt-depth' to count them." - (save-match-data - ;; Recurse on the sorted list. - (let ((max-lisp-eval-depth (* 1024 1024)) - (completion-ignore-case nil)) - (regexp-opt-group (sort (copy-sequence strings) 'string-lessp) paren)))) - -;;;###autoload -(defun regexp-opt-depth (regexp) - "Return the depth of REGEXP. -This means the number of regexp grouping constructs (parenthesised expressions) -in REGEXP." - (save-match-data - ;; Hack to signal an error if REGEXP does not have balanced parentheses. - (string-match regexp "") - ;; Count the number of open parentheses in REGEXP. - (let ((count 0) start) - (while (string-match "\\\\(" regexp start) - (setq count (1+ count) start (match-end 0))) - count))) - -;;; Workhorse functions. - -(eval-when-compile - (require 'cl)) - -(unless (fboundp 'make-bool-vector) - (defalias 'make-bool-vector 'make-vector)) - -(defun regexp-opt-group (strings &optional paren lax) - ;; - ;; Return a regexp to match a string in STRINGS. - ;; If PAREN non-nil, output regexp parentheses around returned regexp. - ;; If LAX non-nil, don't output parentheses if it doesn't require them. - ;; Merges keywords to avoid backtracking in Emacs' regexp matcher. - ;; - ;; The basic idea is to find the shortest common prefix, remove it and - ;; recurse. If there is no prefix, we divide the list into two so that (at - ;; least) one half will have at least a one-character common prefix. - ;; - ;; Also we delay the addition of grouping parenthesis as long as possible - ;; until we're sure we need them, and try to remove one-character sequences - ;; so we can use character sets rather than grouping parenthesis. - ;; - (let* ((open-group (if paren "\\(" "")) - (close-group (if paren "\\)" "")) - (open-charset (if lax "" open-group)) - (close-charset (if lax "" close-group))) - (cond - ;; - ;; If there is only one string, just return it. - ((= (length strings) 1) - (if (= (length (car strings)) 1) - (concat open-charset (regexp-quote (car strings)) close-charset) - (concat open-group (regexp-quote (car strings)) close-group))) - ;; - ;; If there is an empty string, remove it and recurse on the rest. - ((= (length (car strings)) 0) - (concat open-charset - (regexp-opt-group (cdr strings) t t) "?" - close-charset)) - ;; - ;; If all are one-character strings, just return a character set. - ((= (length strings) (apply '+ (mapcar 'length strings))) - (concat open-charset - (regexp-opt-charset strings) - close-charset)) - ;; - ;; We have a list of different length strings. - (t - (let ((prefix (try-completion "" (mapcar 'list strings))) - (letters (let ((completion-regexp-list '("^.$"))) - (all-completions "" (mapcar 'list strings))))) - (cond - ;; - ;; If there is a common prefix, remove it and recurse on the suffixes. - ((> (length prefix) 0) - (let* ((length (length prefix)) - (suffixes (mapcar (lambda (s) (substring s length)) strings))) - (concat open-group - (regexp-quote prefix) (regexp-opt-group suffixes t t) - close-group))) - ;; - ;; If there are several one-character strings, remove them and recurse - ;; on the rest (first so the final regexp finds the longest match). - ((> (length letters) 1) - (let ((rest (let ((completion-regexp-list '("^..+$"))) - (all-completions "" (mapcar 'list strings))))) - (concat open-group - (regexp-opt-group rest) "\\|" (regexp-opt-charset letters) - close-group))) - ;; - ;; Otherwise, divide the list into those that start with a particular - ;; letter and those that do not, and recurse on them. - (t - (let* ((char (substring (car strings) 0 1)) - (half1 (all-completions char (mapcar 'list strings))) - (half2 (nthcdr (length half1) strings))) - (concat open-group - (regexp-opt-group half1) "\\|" (regexp-opt-group half2) - close-group))))))))) - -(defun regexp-opt-charset (chars) - ;; - ;; Return a regexp to match a character in CHARS. - ;; - ;; The basic idea is to find character ranges. Also we take care in the - ;; position of character set meta characters in the character set regexp. - ;; - (let* ((charwidth 256) ; Yeah, right. - (charmap (make-bool-vector charwidth nil)) - (charset "") - (bracket "") (dash "") (caret "")) - ;; - ;; Make a character map but extract character set meta characters. - (dolist (char (mapcar 'string-to-char chars)) - (case char - (?\] - (setq bracket "]")) - (?^ - (setq caret "^")) - (?- - (setq dash "-")) - (otherwise - (aset charmap char t)))) - ;; - ;; Make a character set from the map using ranges where applicable. - (dotimes (char charwidth) - (let ((start char)) - (while (and (< char charwidth) (aref charmap char)) - (incf char)) - (cond ((> char (+ start 3)) - (setq charset (format "%s%c-%c" charset start (1- char)))) - ((> char start) - (setq charset (format "%s%c" charset (setq char start))))))) - ;; - ;; Make sure a caret is not first and a dash is first or last. - (if (and (string-equal charset "") (string-equal bracket "")) - (concat "[" dash caret "]") - (concat "[" bracket charset caret dash "]")))) - -(provide 'regexp-opt) - -;;; regexp-opt.el ends here diff --git a/contrib/timer.el b/contrib/timer.el deleted file mode 100644 index 70d9940..0000000 --- a/contrib/timer.el +++ /dev/null @@ -1,308 +0,0 @@ -;;; timer.el --- run a function with args at some time in future. - -;; Copyright (C) 1996 Free Software Foundation, Inc. - -;; Maintainer: FSF - -;; This file is part of GNU Emacs. - -;; GNU Emacs 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. - -;; GNU Emacs 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 package gives you the capability to run Emacs Lisp commands at -;; specified times in the future, either as one-shots or periodically. - -;;; Code: - -(require 'itimer) - -(fset 'timer-create 'make-itimer) - -(fset 'timerp 'itimerp) - -;(defvar timer-idle-list nil -; "List of active idle-time timers in order of increasing time") -(defvaralias 'timer-idle-list 'itimer-list) -(defvaralias 'timer-list 'itimer-list) - - -(defun timer-set-time (timer time &optional delta) - "Set the trigger time of TIMER to TIME. -TIME must be in the internal format returned by, e.g., `current-time'. -If optional third argument DELTA is a non-zero integer, make the timer -fire repeatedly that many seconds apart." - (set-itimer-value timer (itimer-time-difference time (current-time))) - (and delta (check-nonnegative-number delta)) - (and delta (set-itimer-restart timer delta)) - timer) - -(defun timer-set-idle-time (timer secs &optional repeat) - "Set the trigger idle time of TIMER to SECS. -If optional third argument REPEAT is non-nil, make the timer -fire each time Emacs is idle for that many seconds." - (set-itimer-is-idle timer t) - (set-itimer-value timer secs) - (when repeat - (set-itimer-restart timer secs)) - timer) - -(defun timer-relative-time (time secs &optional usecs) - "Advance TIME by SECS seconds and optionally USECS microseconds. -SECS may be a fraction." - (let ((high (car time)) - (low (if (consp (cdr time)) (nth 1 time) (cdr time))) - (micro (if (numberp (car-safe (cdr-safe (cdr time)))) - (nth 2 time) - 0))) - ;; Add - (if usecs (setq micro (+ micro usecs))) - (if (floatp secs) - (setq micro (+ micro (floor (* 1000000 (- secs (floor secs))))))) - (setq low (+ low (floor secs))) - - ;; Normalize - (setq low (+ low (/ micro 1000000))) - (setq micro (mod micro 1000000)) - (setq high (+ high (/ low 65536))) - (setq low (logand low 65535)) - - (list high low (and (/= micro 0) micro)))) - -(defun timer-inc-time (timer secs &optional usecs) - "Increment the time set in TIMER by SECS seconds and USECS microseconds. -SECS may be a fraction." - (let ((time (itimer-value timer))) - (setq time (+ time secs (if (and usecs (fboundp 'lisp-float-type)) - (/ usecs (float 1000000)) - 0))) - (set-itimer-value timer time))) - -(defun timer-set-time-with-usecs (timer time usecs &optional delta) - "Set the trigger time of TIMER to TIME. -TIME must be in the internal format returned by, e.g., `current-time'. -If optional third argument DELTA is a non-zero integer, make the timer -fire repeatedly that many seconds apart." - (let ((list (list nil nil nil))) - (setcar list (car time)) - (setcar (nthcdr 1 list) (if (consp (cdr time)) - (car (cdr time)) - (cdr time))) - (setcar (nthcdr 2 list) usecs) - (set-itimer-value timer (itimer-time-difference list (current-time))) - (set-itimer-restart timer delta) - timer)) - -(defun timer-set-function (timer function &optional args) - "Make TIMER call FUNCTION with optional ARGS when triggering." - (set-itimer-function timer function) - (set-itimer-function-arguments timer args) - (set-itimer-uses-arguments timer t) - timer) - -(defun timer-activate (timer) - "Put TIMER on the list of active timers." - (activate-itimer timer)) - -(defun timer-activate-when-idle (timer) - "Arrange to activate TIMER whenever Emacs is next idle." - (set-itimer-is-idle timer t) - ;(set-itimer-uses-arguments timer nil) - ;(unless (memq timer timer-idle-list) - ;(setq timer-idle-list (cons timer timer-idle-list))) - (activate-itimer timer)) - -;; can't do this, different kind of timer -;;(defalias 'disable-timeout 'cancel-timer) - -(defun cancel-timer (timer) - "Remove TIMER from the list of active timers." - ;(setq timer-idle-list (delq timer timer-idle-list)) - (delete-itimer timer)) - -(defun cancel-function-timers (function) - "Cancel all timers scheduled by `run-at-time' which would run FUNCTION." - (interactive "aCancel timers of function: ") - (let ((p itimer-list)) - (while p - (if (eq function (itimer-function p)) - (progn - (setq p (cdr p)) - (delete-itimer (car p))) - (setq p (cdr p)))))) - -;;;###autoload -(defun run-at-time (time repeat function &rest args) - "Perform an action after a delay of SECS seconds. -Repeat the action every REPEAT seconds, if REPEAT is non-nil. -TIME should be a string like \"11:23pm\", nil meaning now, a number of seconds -from now, or a value from `encode-time'. -REPEAT may be an integer or floating point number. -The action is to call FUNCTION with arguments ARGS. - -This function returns a timer object which you can use in `cancel-timer'." - (interactive "sRun at time: \nNRepeat interval: \naFunction: ") - - ;; Special case: nil means "now" and is useful when repeating. - (if (null time) - (setq time (current-time))) - - ;; Handle numbers as relative times in seconds. - (if (numberp time) - (setq time (timer-relative-time (current-time) time))) - - ;; Handle relative times like "2 hours and 35 minutes" - (if (stringp time) - (let ((secs (timer-duration time))) - (if secs - (setq time (timer-relative-time (current-time) secs))))) - - ;; Handle "11:23pm" and the like. Interpret it as meaning today - ;; which admittedly is rather stupid if we have passed that time - ;; already. (Though only Emacs hackers hack Emacs at that time.) - (if (stringp time) - (progn - (require 'diary-lib) - (let ((hhmm (diary-entry-time time)) - (now (decode-time))) - (if (>= hhmm 0) - (setq time - (encode-time 0 (% hhmm 100) (/ hhmm 100) (nth 3 now) - (nth 4 now) (nth 5 now) (nth 8 now))))))) - - (or (consp time) - (error "Invalid time format")) - - (or (null repeat) - (numberp repeat) - (error "Invalid repetition interval")) - - (let ((timer (timer-create))) - (timer-set-time timer time repeat) - (timer-set-function timer function args) - (timer-activate timer) - timer)) - -;;;###autoload -(defun run-with-timer (secs repeat function &rest args) - "Perform an action after a delay of SECS seconds. -Repeat the action every REPEAT seconds, if REPEAT is non-nil. -SECS and REPEAT may be integers or floating point numbers. -The action is to call FUNCTION with arguments ARGS. - -This function returns a timer object which you can use in `cancel-timer'." - (interactive "sRun after delay (seconds): \nNRepeat interval: \naFunction: ") - (apply 'run-at-time secs repeat function args)) - -;;;###autoload -(defun run-with-idle-timer (secs repeat function &rest args) - "Perform an action the next time Emacs is idle for SECS seconds. -If REPEAT is non-nil, do this each time Emacs is idle for SECS seconds. -SECS may be an integer or a floating point number. -The action is to call FUNCTION with arguments ARGS. - -This function returns a timer object which you can use in `cancel-timer'." - (interactive - (list (read-from-minibuffer "Run after idle (seconds): " nil nil t) - (y-or-n-p "Repeat each time Emacs is idle? ") - (intern (completing-read "Function: " obarray 'fboundp t)))) - (let ((timer (timer-create))) - (timer-set-function timer function args) - (timer-set-idle-time timer secs repeat) - (timer-activate-when-idle timer) - timer)) - -(defun with-timeout-handler (tag) - (throw tag 'timeout)) - -;;;###autoload (put 'with-timeout 'lisp-indent-function 1) - -;;;###autoload -(defmacro with-timeout (list &rest body) - "Run BODY, but if it doesn't finish in SECONDS seconds, give up. -If we give up, we run the TIMEOUT-FORMS and return the value of the last one. -The call should look like: - (with-timeout (SECONDS TIMEOUT-FORMS...) BODY...) -The timeout is checked whenever Emacs waits for some kind of external -event \(such as keyboard input, input from subprocesses, or a certain time); -if the program loops without waiting in any way, the timeout will not -be detected." - (let ((seconds (car list)) - (timeout-forms (cdr list))) - `(let ((with-timeout-tag (cons nil nil)) - with-timeout-value with-timeout-timer) - (if (catch with-timeout-tag - (progn - (setq with-timeout-timer - (run-with-timer ,seconds nil - 'with-timeout-handler - with-timeout-tag)) - (setq with-timeout-value (progn . ,body)) - nil)) - (progn . ,timeout-forms) - (cancel-timer with-timeout-timer) - with-timeout-value)))) - -(defun y-or-n-p-with-timeout (prompt seconds default-value) - "Like (y-or-n-p PROMPT), with a timeout. -If the user does not answer after SECONDS seconds, return DEFAULT-VALUE." - (with-timeout (seconds default-value) - (y-or-n-p prompt))) - -(defvar timer-duration-words - (list (cons "microsec" 0.000001) - (cons "microsecond" 0.000001) - (cons "millisec" 0.001) - (cons "millisecond" 0.001) - (cons "sec" 1) - (cons "second" 1) - (cons "min" 60) - (cons "minute" 60) - (cons "hour" (* 60 60)) - (cons "day" (* 24 60 60)) - (cons "week" (* 7 24 60 60)) - (cons "fortnight" (* 14 24 60 60)) - (cons "month" (* 30 24 60 60)) ; Approximation - (cons "year" (* 365.25 24 60 60)) ; Approximation - ) - "Alist mapping temporal words to durations in seconds") - -(defun timer-duration (string) - "Return number of seconds specified by STRING, or nil if parsing fails." - (let ((secs 0) - (start 0) - (case-fold-search t)) - (while (string-match - "[ \t]*\\([0-9.]+\\)?[ \t]*\\([a-z]+[a-rt-z]\\)s?[ \t]*" - string start) - (let ((count (if (match-beginning 1) - (string-to-number (match-string 1 string)) - 1)) - (itemsize (cdr (assoc (match-string 2 string) - timer-duration-words)))) - (if itemsize - (setq start (match-end 0) - secs (+ secs (* count itemsize))) - (setq secs nil - start (length string))))) - (if (= start (length string)) - secs - (if (string-match "\\`[0-9.]+\\'" string) - (string-to-number string))))) - -(provide 'timer) - -;;; timer.el ends here diff --git a/lisp/canlock-om.el b/lisp/canlock-om.el deleted file mode 100644 index 831b7f5..0000000 --- a/lisp/canlock-om.el +++ /dev/null @@ -1,215 +0,0 @@ -;;; canlock-om.el --- Mule 2 specific functions for canlock -;; Copyright (C) 2001 Katsumi Yamaoka - -;; Author: Katsumi Yamaoka -;; Keywords: mule, cancel-lock - -;; 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 this program; 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 program is used to make canlock.el work with Mule 2.3 based on -;; Emacs 19.34. See README.ja in the canlock distribution for details. - -;;; Code: - -(eval-and-compile - (cond ((and (boundp 'emacs-major-version) - (> emacs-major-version 19)) - (error "\ -Error: You should never use canlock-om.el(c) for this environment")) - ((and (boundp 'MULE) - (boundp 'emacs-major-version) - (= emacs-major-version 19) - (>= emacs-minor-version 29))) - (t - (error "Error: Canlock does not support this version of Emacs")))) - -(eval-when-compile - (require 'cl)) - -(require 'custom) -(eval-and-compile - (unless (fboundp 'custom-declare-variable) - (error "Error: Canlock requires new custom"))) - -(eval-when-compile - (unless (fboundp 'byte-compile-file-form-custom-declare-variable) - (defun byte-compile-file-form-custom-declare-variable (form) - ;; Bind defcustom'ed variables. - (if (memq 'free-vars byte-compile-warnings) - (setq byte-compile-bound-variables - (cons (nth 1 (nth 1 form)) byte-compile-bound-variables))) - (if (memq ':version (nthcdr 4 form)) - ;; Make the variable uncustomizable. - `(defvar ,(nth 1 (nth 1 form)) ,(nth 1 (nth 2 form)) - ,(substring (nth 3 form) - (if (string-match "^[\t *]+" (nth 3 form)) - (match-end 0) - 0))) - ;; Ignore unsupported keyword(s). - (if (memq ':set-after (nthcdr 4 form)) - (let ((newform (list (car form) (nth 1 form) - (nth 2 form) (nth 3 form))) - (args (nthcdr 4 form))) - (while args - (or (eq (car args) ':set-after) - (setq newform (nconc newform (list (car args) - (car (cdr args)))))) - (setq args (cdr (cdr args)))) - newform) - form))) - (put 'custom-declare-variable 'byte-hunk-handler - 'byte-compile-file-form-custom-declare-variable)) - - (define-compiler-macro with-temp-buffer (&whole form &rest forms) - (let ((def (if (fboundp 'with-temp-buffer) - (symbol-function 'with-temp-buffer)))) - (if (and def - (consp def) - (or (eq (car def) 'macro) - (and (eq (car def) 'autoload) - (memq (nth 4 def) '(macro t))))) - form - ;; The function definition is imported from APEL. - `(let ((obuffer (current-buffer)) - (buffer (generate-new-buffer " *temp*"))) - (unwind-protect - (progn - (set-buffer buffer) - ,@forms) - (if (buffer-name buffer) - (kill-buffer buffer)) - (if (buffer-live-p obuffer) - (set-buffer obuffer)))))))) - -(autoload 'base64-encode "base64") - -(defcustom canlock-base64-encode-function 'base64-encode-string - "Function to call to base64 encode a string." - :type '(radio (function-item base64-encode-string) - (function-item base64-encode) - (function-item canlock-base64-encode-string-with-mmencode) - (function :tag "Other")) - :group 'canlock) - -(defcustom canlock-mmencode-program "mmencode" - "Name of mmencode program." - :type 'string - :group 'canlock) - -(defcustom canlock-mmencode-args-for-encoding nil - "Arguments passed to mmencode program for encoding." - :type 'sexp - :group 'canlock) - -(defun canlock-base64-encode-string-with-mmencode (string) - "Base64 encode a string using mmencode." - (with-temp-buffer - (setq mc-flag nil) - (insert string) - (let ((default-process-coding-system (cons *iso-2022-jp*dos *noconv*)) - program-coding-system-alist selective-display) - (apply 'call-process-region (point-min) (point-max) - canlock-mmencode-program t t nil - canlock-mmencode-args-for-encoding)) - (goto-char (point-max)) - (skip-chars-backward "\n") - (buffer-substring (point-min) (point)))) - -;; The following macros will only be used to byte-compile canlock.el. -(eval-when-compile - (define-compiler-macro base64-encode-string - (&whole form string &optional no-line-break) - (if (and (string-equal (buffer-name) " *Compiler Input*") - (string-equal ";;; canlock.el" - (buffer-substring (point-min) - (min (+ (point-min) 14) - (point-max))))) - (if no-line-break - `(let ((string ,string)) - (if ,no-line-break - (with-temp-buffer - (insert (funcall canlock-base64-encode-function string)) - (goto-char (point-min)) - (while (search-forward "\n" nil t) - (delete-char -1)) - (buffer-string)) - (funcall canlock-base64-encode-function string))) - `(funcall canlock-base64-encode-function ,string)) - form)) - - (define-compiler-macro split-string (&whole form string &optional pattern) - (if (and (string-equal (buffer-name) " *Compiler Input*") - (string-equal ";;; canlock.el" - (buffer-substring (point-min) - (min (+ (point-min) 14) - (point-max))))) - ;; The function definition is imported from APEL. - (if pattern - `(let ((string ,string) - (pattern ,pattern) - (start 0) - parts) - (while (string-match pattern string start) - (setq parts (cons (substring string - start (match-beginning 0)) - parts) - start (match-end 0))) - (nreverse (cons (substring string start) parts))) - `(let ((string ,string) - (start 0) - parts) - (while (string-match "[ \f\t\n\r\v]+" string start) - (setq parts (cons (substring string - start (match-beginning 0)) - parts) - start (match-end 0))) - (nreverse (cons (substring string start) parts)))) - form))) - -;; The following variables might not be bound if the old version of -;; canlock.el(c) exists. -(eval-when-compile - (defvar canlock-openssl-args) - (defvar canlock-openssl-program)) - -(defun canlock-om-sha1-with-openssl (message) - "Make a SHA-1 digest of MESSAGE using OpenSSL." - (with-temp-buffer - (setq mc-flag nil) - (insert message) - (let ((default-process-coding-system (cons *iso-2022-jp*dos *noconv*)) - program-coding-system-alist selective-display) - (apply 'call-process-region (point-min) (point-max) - canlock-openssl-program t t nil canlock-openssl-args)) - (goto-char (point-min)) - (insert "\"") - (while (re-search-forward "\\([0-9A-Fa-f][0-9A-Fa-f]\\)" nil t) - (replace-match "\\\\x\\1")) - (insert "\"") - (goto-char (point-min)) - (read (current-buffer)))) - -;; Override the original function. -(eval-after-load "canlock" - '(defalias 'canlock-sha1-with-openssl 'canlock-om-sha1-with-openssl)) - -(provide 'canlock-om) - -(require 'canlock) - -;;; canlock-om.el ends here diff --git a/lisp/dgnushack.el b/lisp/dgnushack.el index 97670f4..0e4ecf3 100644 --- a/lisp/dgnushack.el +++ b/lisp/dgnushack.el @@ -37,8 +37,6 @@ (if (memq 'shift-jis (coding-priority-list)) (set-coding-priority-list (append (delq 'shift-jis (coding-priority-list)) '(shift-jis))))) - ((boundp 'MULE) - (put '*coding-category-sjis* 'priority (length *predefined-category*))) ((featurep 'mule) (if (memq 'coding-category-sjis coding-category-list) (set-coding-priority @@ -136,35 +134,6 @@ than subr.el." (put 'car 'side-effect-free tmp))) ad-do-it)))) -(when (boundp 'MULE) - (let (current-load-list) - ;; Make the function to be silent at compile-time. - (defun locate-library (library &optional nosuffix) - "Show the full path name of Emacs library LIBRARY. -This command searches the directories in `load-path' like `M-x load-library' -to find the file that `M-x load-library RET LIBRARY RET' would load. -Optional second arg NOSUFFIX non-nil means don't add suffixes `.elc' or `.el' -to the specified name LIBRARY (a la calling `load' instead of `load-library')." - (interactive "sLocate library: ") - (catch 'answer - (mapcar - '(lambda (dir) - (mapcar - '(lambda (suf) - (let ((try (expand-file-name (concat library suf) dir))) - (and (file-readable-p try) - (null (file-directory-p try)) - (progn - (or noninteractive - (message "Library is file %s" try)) - (throw 'answer try))))) - (if nosuffix '("") '(".elc" ".el" "")))) - load-path) - (or noninteractive - (message "No library %s in search path" library)) - nil)) - (byte-compile 'locate-library))) - (setq max-specpdl-size 3000) (when (equal @@ -215,6 +184,33 @@ It has already been fixed in XEmacs since 1999-12-06." '(char-before (point)) form)))) +;; Add `early-package-load-path' to `load-path' for XEmacs. Those paths +;; won't appear in `load-path' when XEmacs starts with the `-no-autoloads' +;; option because of a bug. :< +(when (and (featurep 'xemacs) + (string-match "--package-path=\\([^ ]+\\)" + system-configuration-options)) + (let ((paths + (apply 'nconc + (mapcar + (lambda (path) + (when (file-directory-p + (setq path (expand-file-name "lisp" path))) + (directory-files path t))) + (split-string (match-string 1 system-configuration-options) + "::")))) + path adds) + (while paths + (setq path (car paths) + paths (cdr paths)) + (when (and path + (not (or (string-match "/\\.\\.?\\'" path) + (member (file-name-as-directory path) load-path) + (member path load-path))) + (file-directory-p path)) + (push (file-name-as-directory path) adds))) + (setq load-path (nconc (nreverse adds) load-path)))) + (load (expand-file-name "dgnuspath.el" srcdir) nil nil t) (condition-case err @@ -279,14 +275,6 @@ Try to re-configure with --with-addpath=FLIM_PATH and run make again. (load (expand-file-name "gnus-clfns.el" srcdir) nil t t) -(when (boundp 'MULE) - ;; Bind the function `base64-encode-string' before loading canlock. - ;; Since canlock will bind it as an autoloaded function, it causes - ;; damage to define the function by MEL. - (load (expand-file-name "base64.el" srcdir) nil t t) - ;; Load special macros for compiling canlock.el. - (load (expand-file-name "canlock-om.el" srcdir) nil t t)) - (require 'custom) ;; Bind functions defined by `defun-maybe'. @@ -351,16 +339,11 @@ Try to re-configure with --with-addpath=FLIM_PATH and run make again. (if (string-match "\\(\\.gz$\\)\\|\\.bz2$" file) (let ((temp (expand-file-name "dgnustemp.el" srcdir))) (when - (let* ((binary (if (boundp 'MULE) - '*noconv* - 'binary)) - (coding-system-for-read binary) - (coding-system-for-write binary) - (input-coding-system binary) - (output-coding-system binary) - (default-process-coding-system - (cons binary binary)) - call-process-hook) + (let ((coding-system-for-read 'binary) + (coding-system-for-write 'binary) + (default-process-coding-system + '(binary . binary)) + call-process-hook) (insert-file-contents file nil nil nil t) (when (condition-case code @@ -422,76 +405,7 @@ Try to re-configure with --with-addpath=FLIM_PATH and run make again. (byte-compile 'dgnushack-bind-colon-keywords) (dgnushack-bind-colon-keywords))) -(when (boundp 'MULE) - (setq :version ':version - :set-after ':set-after) - (require 'custom) - (defadvice custom-handle-keyword - (around dont-signal-an-error-even-if-unsupported-keyword-is-given - activate) - "Don't signal an error even if unsupported keyword is given." - (if (not (memq (ad-get-arg 1) '(:version :set-after))) - ad-do-it))) - -(when (boundp 'MULE) - (put 'custom-declare-face 'byte-optimizer - 'byte-optimize-ignore-unsupported-custom-keywords) - (put 'custom-declare-group 'byte-optimizer - 'byte-optimize-ignore-unsupported-custom-keywords) - (defun byte-optimize-ignore-unsupported-custom-keywords (form) - (if (or (memq ':version (nthcdr 4 form)) - (memq ':set-after (nthcdr 4 form))) - (let ((newform (list (car form) (nth 1 form) - (nth 2 form) (nth 3 form))) - (args (nthcdr 4 form))) - (while args - (or (memq (car args) '(:version :set-after)) - (setq newform (nconc newform (list (car args) - (car (cdr args)))))) - (setq args (cdr (cdr args)))) - newform) - form)) - - (put 'custom-declare-variable 'byte-hunk-handler - 'byte-compile-file-form-custom-declare-variable) - (defun byte-compile-file-form-custom-declare-variable (form) - ;; Bind defcustom'ed variables. - (if (memq 'free-vars byte-compile-warnings) - (setq byte-compile-bound-variables - (cons (nth 1 (nth 1 form)) byte-compile-bound-variables))) - (if (memq ':version (nthcdr 4 form)) - ;; Make the variable uncustomizable. - `(defvar ,(nth 1 (nth 1 form)) ,(nth 1 (nth 2 form)) - ,(substring (nth 3 form) (if (string-match "^[\t *]+" (nth 3 form)) - (match-end 0) - 0))) - ;; Ignore unsupported keyword(s). - (if (memq ':set-after (nthcdr 4 form)) - (let ((newform (list (car form) (nth 1 form) - (nth 2 form) (nth 3 form))) - (args (nthcdr 4 form))) - (while args - (or (eq (car args) ':set-after) - (setq newform (nconc newform (list (car args) - (car (cdr args)))))) - (setq args (cdr (cdr args)))) - newform) - form))) - - (defadvice byte-compile-inline-expand (around ignore-built-in-functions - (form) activate) - "Ignore built-in functions." - (let* ((name (car form)) - (fn (and (fboundp name) - (symbol-function name)))) - (if (subrp fn) - ;; Give up on inlining. - (setq ad-return-value form) - ad-do-it)))) - ;; Unknown variables and functions. -(unless (boundp 'buffer-file-coding-system) - (defvar buffer-file-coding-system (symbol-value 'file-coding-system))) (unless (featurep 'xemacs) (defalias 'Custom-make-dependencies 'ignore) (defalias 'update-autoloads-from-directory 'ignore)) @@ -630,16 +544,11 @@ Try to re-configure with --with-addpath=FLIM_PATH and run make again. '("gnus-bbdb.el"))) (unless (featurep 'xemacs) '("gnus-xmas.el" "messagexmas.el" "nnheaderxm.el")) - (when (and (not (featurep 'xemacs)) - (<= emacs-major-version 20)) - '("smiley.el")) (when (and (fboundp 'base64-decode-string) (subrp (symbol-function 'base64-decode-string))) '("base64.el")) (when (and (fboundp 'md5) (subrp (symbol-function 'md5))) '("md5.el")) - (unless (boundp 'MULE) - '("canlock-om.el")) (when (featurep 'xemacs) '("gnus-load.el"))) "Files which will not be installed.") @@ -671,9 +580,6 @@ dgnushack-compile." (defun dgnushack-compile (&optional warn) ;;(setq byte-compile-dynamic t) - (when (and (not (featurep 'xemacs)) - (< emacs-major-version 21)) - (setq max-specpdl-size 1200)) (unless warn (setq byte-compile-warnings '(free-vars unresolved callargs redefine))) @@ -729,22 +635,14 @@ Modify to suit your needs.")) (expand-file-name "cus-load.el" srcdir))) (defun dgnushack-make-cus-load () - (when (condition-case nil - (load "cus-dep") - (error - (when (boundp 'MULE) - (if (file-exists-p "../contrib/cus-dep.el") - ;; Use cus-dep.el of the version of Emacs 20.7. - (load-file "../contrib/cus-dep.el") - (error "\ -You need contrib/cus-dep.el to build T-gnus with Mule 2.3@19.34; exiting."))))) - (let ((cusload-base-file dgnushack-cus-load-file)) - (if (fboundp 'custom-make-dependencies) - (custom-make-dependencies) - (Custom-make-dependencies)) - (when (featurep 'xemacs) - (message "Compiling %s..." dgnushack-cus-load-file) - (byte-compile-file dgnushack-cus-load-file))))) + (load "cus-dep") + (let ((cusload-base-file dgnushack-cus-load-file)) + (if (fboundp 'custom-make-dependencies) + (custom-make-dependencies) + (Custom-make-dependencies)) + (when (featurep 'xemacs) + (message "Compiling %s..." dgnushack-cus-load-file) + (byte-compile-file dgnushack-cus-load-file)))) (defun dgnushack-make-auto-load () (require 'autoload) diff --git a/lisp/gnus-agent.el b/lisp/gnus-agent.el index 4b2eea2..e0d2129 100644 --- a/lisp/gnus-agent.el +++ b/lisp/gnus-agent.el @@ -899,9 +899,7 @@ be a select method." "Write the alist of covered servers." (gnus-make-directory (nnheader-concat gnus-agent-directory "lib")) (let ((coding-system-for-write nnheader-file-coding-system) - (output-coding-system nnheader-file-coding-system) - (file-name-coding-system nnmail-pathname-coding-system) - (pathname-coding-system nnmail-pathname-coding-system)) + (file-name-coding-system nnmail-pathname-coding-system)) (with-temp-file (nnheader-concat gnus-agent-directory "lib/servers") (prin1 gnus-agent-covered-methods (current-buffer))))) @@ -1203,9 +1201,7 @@ downloaded into the agent." (when (gnus-agent-method-p method) (let* ((gnus-command-method method) (coding-system-for-write nnheader-file-coding-system) - (output-coding-system nnheader-file-coding-system) (file-name-coding-system nnmail-pathname-coding-system) - (pathname-coding-system nnmail-pathname-coding-system) (file (gnus-agent-lib-file "active")) oactive-min oactive-max) (gnus-make-directory (file-name-directory file)) @@ -1806,7 +1802,6 @@ FILE and places the combined headers into `nntp-server-buffer'." (defun gnus-agent-save-alist (group &optional articles state dir) "Save the article-state alist for GROUP." (let* ((file-name-coding-system nnmail-pathname-coding-system) - (pathname-coding-system nnmail-pathname-coding-system) (prev (cons nil gnus-agent-article-alist)) (all prev) print-level print-length item article) diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index 5b002b5..c1861d6 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -5294,8 +5294,7 @@ Provided for backwards compatibility." ;; save it to file. (goto-char (point-max)) (insert "\n") - (let ((file-name-coding-system nnmail-pathname-coding-system) - (pathname-coding-system nnmail-pathname-coding-system)) + (let ((file-name-coding-system nnmail-pathname-coding-system)) (write-region-as-binary (point-min) (point-max) file-name 'append)) t))) diff --git a/lisp/gnus-cite.el b/lisp/gnus-cite.el index 779163a..2028d78 100644 --- a/lisp/gnus-cite.el +++ b/lisp/gnus-cite.el @@ -722,7 +722,7 @@ See also the documentation for `gnus-article-highlight-citation'." (gnus-article-search-signature) (point))) (prefix-regexp (concat "^\\(" message-cite-prefix-regexp "\\)")) - alist entry start begin end numbers prefix guess-limit mc-flag) + alist entry start begin end numbers prefix guess-limit) ;; Get all potential prefixes in `alist'. (while (< (point) max) ;; Each line. diff --git a/lisp/gnus-ems.el b/lisp/gnus-ems.el index d2dde41..4bd23d4 100644 --- a/lisp/gnus-ems.el +++ b/lisp/gnus-ems.el @@ -50,11 +50,7 @@ (autoload 'gnus-get-buffer-create "gnus") (autoload 'nnheader-find-etc-directory "nnheader")) -(if (or (featurep 'xemacs) - (>= emacs-major-version 21)) - (autoload 'smiley-region "smiley") - (autoload 'smiley-region "smiley-mule")) - +(autoload 'smiley-region "smiley") ;; Fixme: shouldn't require message (autoload 'message-text-with-property "message") @@ -102,16 +98,13 @@ ((featurep 'mule) ;; Mule and new Emacs definitions - ;; [Note] Now there are three kinds of mule implementations, - ;; original MULE, XEmacs/mule and Emacs 20+ including - ;; MULE features. Unfortunately these APIs are different. In - ;; particular, Emacs (including original Mule) and XEmacs are - ;; quite different. However, this version of Gnus doesn't support - ;; anything other than XEmacs 20+ and Emacs 20.3+. + ;; [Note] Now there are two kinds of mule implementations, + ;; XEmacs/mule and Emacs 20+ including Mule features. + ;; Unfortunately these APIs are different. In particular, Emacs + ;; and XEmacs are quite different. However, this version of Gnus + ;; doesn't support anything other than XEmacs 21+ and Emacs 21+. - ;; Predicates to check are following: - ;; (boundp 'MULE) is t only if Mule (original; anything older than - ;; Mule 2.3) is running. + ;; Predicate to check is the following: ;; (featurep 'mule) is t when other mule variants are running. ;; It is possible to detect XEmacs/mule by (featurep 'mule) and diff --git a/lisp/gnus-msg.el b/lisp/gnus-msg.el index af67d36..0430000 100644 --- a/lisp/gnus-msg.el +++ b/lisp/gnus-msg.el @@ -1830,7 +1830,6 @@ this is a reply." (message-narrow-to-headers) (let ((gcc (or gcc (mail-fetch-field "gcc" nil t))) (coding-system-for-write 'raw-text) - (output-coding-system 'raw-text) groups group method group-art mml-externalize-attachments) (when gcc diff --git a/lisp/gnus-namazu.el b/lisp/gnus-namazu.el index ee43a56..def49fc 100644 --- a/lisp/gnus-namazu.el +++ b/lisp/gnus-namazu.el @@ -164,10 +164,9 @@ options make any sense in this context." (defcustom gnus-namazu-make-index-arguments (nconc (list "--all" "--mailnews" "--deny=^.*[^0-9].*$") - (when (or (and (boundp 'current-language-environment) - (string= "Japanese" - (symbol-value 'current-language-environment))) - (boundp 'MULE)) + (when (and (boundp 'current-language-environment) + (string= "Japanese" + (symbol-value 'current-language-environment))) (list "--indexing-lang=ja"))) "*Arguments of the indexer of Namazu." :type '(repeat string) @@ -181,8 +180,8 @@ options make any sense in this context." (defcustom gnus-namazu-coding-system (if (memq system-type '(windows-nt OS/2 emx)) - (if (boundp 'MULE) '*sjis* 'shift_jis) - (if (boundp 'MULE) '*euc-japan* 'euc-japan)) + 'shift_jis + 'euc-japan) "*Coding system for Namazu process." :type 'coding-system :group 'gnus-namazu) @@ -223,9 +222,8 @@ options make any sense in this context." (fboundp 'gnus-group-decoded-name) (let ((gnus-group-name-charset-group-alist (list (cons gnus-namazu/group-name-regexp gnus-namazu-coding-system))) - (query (decode-coding-string - (string 27 36 66 52 65 59 122 27 40 66) - (if (boundp 'MULE) '*iso-2022-jp* 'iso-2022-7bit)))) + (query (decode-coding-string (string 27 36 66 52 65 59 122 27 40 66) + 'iso-2022-7bit))) (not (string-match query (gnus-summary-buffer-name (encode-coding-string @@ -296,13 +294,10 @@ options make any sense in this context." (defsubst gnus-namazu/call-namazu (query) (let ((coding-system-for-read gnus-namazu-coding-system) (coding-system-for-write gnus-namazu-coding-system) - (input-coding-system gnus-namazu-coding-system) - (output-coding-system gnus-namazu-coding-system) (default-process-coding-system (cons gnus-namazu-coding-system gnus-namazu-coding-system)) program-coding-system-alist - (file-name-coding-system gnus-namazu-coding-system) - (pathname-coding-system gnus-namazu-coding-system)) + (file-name-coding-system gnus-namazu-coding-system)) (apply 'call-process `(,gnus-namazu-command nil ; input from /dev/null diff --git a/lisp/gnus-offline.el b/lisp/gnus-offline.el index 79eaa10..0e1655a 100644 --- a/lisp/gnus-offline.el +++ b/lisp/gnus-offline.el @@ -846,35 +846,13 @@ Please check your .emacs or .gnus.el to work nnspool fine.") ((featurep 'xemacs) (popup-menu menu)) (t - (let ((menu-func (or (and (fboundp 'easy-menu-create-menu) - 'easy-menu-create-menu) - 'easy-menu-create-keymaps)) - keymap pop func) - (static-cond ((< emacs-major-version 20) - ;; For Emacsen from 19.34 down to 19.28. - ;; Seems the first item in MENU will be ignored. - (or (keymapp menu) - (setq menu - (append (list "" ;; This will be ignored. - (or title "Popup Menu") - "-----" - "-----") - (cdr menu)))) - (setq keymap - (if (keymapp menu) - (append (list 'keymap - (if title - `(nil ,title) - '(nil "Popup Menu")) - '(nil "") - '(nil "")) - (cdr menu)) - (funcall menu-func (car menu) (cdr menu))))) - (t - (setq keymap - (if (keymapp menu) - menu - (funcall menu-func (car menu) (cdr menu)))))) + (let* ((menu-func (or (and (fboundp 'easy-menu-create-menu) + 'easy-menu-create-menu) + 'easy-menu-create-keymaps)) + (keymap (if (keymapp menu) + menu + (funcall menu-func (car menu) (cdr menu)))) + pop func) ;; Display the popup menu. (if (and (setq pop (x-popup-menu t keymap)) (setq func (lookup-key keymap diff --git a/lisp/gnus-start.el b/lisp/gnus-start.el index 122288a..584cbfa 100644 --- a/lisp/gnus-start.el +++ b/lisp/gnus-start.el @@ -454,9 +454,7 @@ Can be used to turn version control on or off." ;;; Internal variables -(defvar gnus-ding-file-coding-system (static-if (boundp 'MULE) - '*ctext* - 'ctext) +(defvar gnus-ding-file-coding-system 'ctext "Coding system for ding file.") ;; Note that the ding file for T-gnus ought not to have byte-codes. @@ -2303,8 +2301,7 @@ If FORCE is non-nil, the .newsrc file is read." &rest variables) (let (error gnus-product-file-version method file-ver) (when (or (condition-case err - (let ((coding-system-for-read coding) - (input-coding-system coding)) + (let ((coding-system-for-read coding)) (load (expand-file-name file gnus-product-directory) nil nil t) nil) @@ -2692,13 +2689,11 @@ If FORCE is non-nil, the .newsrc file is read." (if gnus-save-startup-file-via-temp-buffer (let ((coding-system-for-write gnus-ding-file-coding-system) - (output-coding-system gnus-ding-file-coding-system) (standard-output (current-buffer))) (gnus-gnus-to-quick-newsrc-format) (gnus-run-hooks 'gnus-save-quick-newsrc-hook) (save-buffer)) (let ((coding-system-for-write gnus-ding-file-coding-system) - (output-coding-system gnus-ding-file-coding-system) (version-control gnus-backup-startup-file) (startup-file (concat gnus-current-startup-file ".eld")) (working-dir (file-name-directory gnus-current-startup-file)) diff --git a/lisp/gnus-util.el b/lisp/gnus-util.el index 09cf62b..d3bad27 100644 --- a/lisp/gnus-util.el +++ b/lisp/gnus-util.el @@ -681,8 +681,7 @@ and `print-level' to nil." (defun gnus-make-directory (directory) "Make DIRECTORY (and all its parents) if it doesn't exist." (require 'nnmail) - (let ((file-name-coding-system nnmail-pathname-coding-system) - (pathname-coding-system nnmail-pathname-coding-system)) + (let ((file-name-coding-system nnmail-pathname-coding-system)) (when (and directory (not (file-exists-p directory))) (make-directory directory t))) @@ -692,8 +691,7 @@ and `print-level' to nil." "Write the current buffer's contents to FILE." ;; Make sure the directory exists. (gnus-make-directory (file-name-directory file)) - (let ((file-name-coding-system nnmail-pathname-coding-system) - (pathname-coding-system nnmail-pathname-coding-system)) + (let ((file-name-coding-system nnmail-pathname-coding-system)) ;; Write the buffer. (write-region (point-min) (point-max) file nil 'quietly))) @@ -902,8 +900,7 @@ with potentially long computations." ;; Decide whether to append to a file or to an Emacs buffer. (let ((outbuf (get-file-buffer filename))) (if (not outbuf) - (let ((file-name-coding-system nnmail-pathname-coding-system) - (pathname-coding-system nnmail-pathname-coding-system)) + (let ((file-name-coding-system nnmail-pathname-coding-system)) (write-region-as-binary (point-min) (point-max) filename 'append)) ;; File has been visited, in buffer OUTBUF. @@ -974,8 +971,7 @@ with potentially long computations." (insert "\n")) (insert "\n")) (goto-char (point-max)) - (let ((file-name-coding-system nnmail-pathname-coding-system) - (pathname-coding-system nnmail-pathname-coding-system)) + (let ((file-name-coding-system nnmail-pathname-coding-system)) (write-region-as-binary (point-min) (point-max) filename 'append)))) ;; File has been visited, in buffer OUTBUF. @@ -1089,8 +1085,7 @@ Return the modified alist." t)) (defun gnus-write-active-file (file hashtb &optional full-names) - (let ((output-coding-system nnmail-active-file-coding-system) - (coding-system-for-write nnmail-active-file-coding-system)) + (let ((coding-system-for-write nnmail-active-file-coding-system)) (with-temp-file file (mapatoms (lambda (sym) @@ -1526,10 +1521,7 @@ predicate on the elements." ((eq gnus-user-agent 'gnus) nil) ((string-match "^\\(\\([.0-9]+\\)*\\)\\.[0-9]+$" emacs-version) - (concat (format (if (boundp 'MULE) - "Mule/2.3 (based on Emacs %s)" - "Emacs/%s") - (match-string 1 emacs-version)) + (concat "Emacs/%s" (match-string 1 emacs-version) (if system-v (concat " (" system-v ")") ""))) diff --git a/lisp/gnus-uu.el b/lisp/gnus-uu.el index c6703be..de66b8d 100644 --- a/lisp/gnus-uu.el +++ b/lisp/gnus-uu.el @@ -915,8 +915,7 @@ When called interactively, prompt for REGEXP." (with-current-buffer gnus-uu-digest-buffer (goto-char (point-max)) (insert-buffer "*gnus-uu-body*")) - (let ((file-name-coding-system nnmail-pathname-coding-system) - (pathname-coding-system nnmail-pathname-coding-system)) + (let ((file-name-coding-system nnmail-pathname-coding-system)) (write-region-as-coding-system nnheader-text-coding-system (point-min) (point-max) gnus-uu-saved-article-name t))))) diff --git a/lisp/gnus.el b/lisp/gnus.el index 93681e4..9279231 100644 --- a/lisp/gnus.el +++ b/lisp/gnus.el @@ -2536,8 +2536,7 @@ This variable can be nil, gnus or gnus-ja." "Gnus variables saved in the quick startup file.") (defvar gnus-product-variable-file-list - (let ((version (product-version (product-find 'gnus-vers))) - (codesys (static-if (boundp 'MULE) '*ctext* 'ctext))) + (let ((version (product-version (product-find 'gnus-vers)))) `(("strict-cache" ((product-version ,version) (emacs-version) @@ -2548,7 +2547,7 @@ This variable can be nil, gnus or gnus-ja." ((product-version ,version) (emacs-version) (correct-string-widths)) - ,codesys + ctext gnus-format-specs))) "Alist of the methods for checking whether the contents of the T-gnus quick startup files are valid. One is for the byte-compiled format diff --git a/lisp/lpath.el b/lisp/lpath.el index 0529e9a..36db29f 100644 --- a/lisp/lpath.el +++ b/lisp/lpath.el @@ -85,16 +85,6 @@ (cond ((featurep 'xemacs) '(frame-char-height frame-char-width)) - ((>= emacs-major-version 21) - '(function-max-args smiley-encode-buffer)) - ((boundp 'MULE) - '(charsetp - coding-system-base coding-system-get coding-system-list - coding-system-to-mime-charset compose-mail - file-name-extension find-coding-systems-for-charsets - find-coding-systems-region function-max-args get-charset-property - read-passwd ;; See the Mule23@1934 file. - smiley-encode-buffer smtpmail-send-it)) (t '(function-max-args smiley-encode-buffer)))) (common-fns @@ -103,11 +93,6 @@ (cond ((featurep 'xemacs) '(font-lock-defaults)) - ((>= emacs-major-version 21) - nil) - ((boundp 'MULE) - '(adaptive-fill-first-line-regexp - default-enable-multibyte-characters enable-multibyte-characters)) (t nil))) (common-vars diff --git a/lisp/mail-source.el b/lisp/mail-source.el index 0942443..7bf272c 100644 --- a/lisp/mail-source.el +++ b/lisp/mail-source.el @@ -939,10 +939,6 @@ This only works when `display-time' is enabled." (let ((coding-system-for-write nnheader-text-coding-system) (coding-system-for-read - nnheader-text-coding-system) - (output-coding-system - nnheader-text-coding-system) - (input-coding-system nnheader-text-coding-system)) (with-temp-file mail-source-crash-box (insert-file-contents file) @@ -997,7 +993,6 @@ This only works when `display-time' is enabled." password) buf) (imap-mailbox-select mailbox nil buf)) (let ((coding-system-for-write mail-source-imap-file-coding-system) - (output-coding-system mail-source-imap-file-coding-system) str) (with-temp-file mail-source-crash-box ;; Avoid converting 8-bit chars from inserted strings to diff --git a/lisp/message.el b/lisp/message.el index 6784330..66c7340 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -41,12 +41,7 @@ (require 'smtp) (defvar gnus-message-group-art) (defvar gnus-list-identifiers)) ; gnus-sum is required where necessary -(eval-and-compile - (if (boundp 'MULE) - (progn - (require 'base64) - (require 'canlock-om)) - (require 'canlock))) +(require 'canlock) (require 'mailheader) (require 'nnheader) ;; This is apparently necessary even though things are autoloaded. @@ -1206,9 +1201,6 @@ actually occur." (defvar message-user-agent nil "String of the form of PRODUCT/VERSION. Used for User-Agent header field.") -(static-when (boundp 'MULE) - (require 'reporter));; `define-mail-user-agent' is here. - ;;;###autoload (define-mail-user-agent 'message-user-agent 'message-mail 'message-send-and-exit @@ -3743,10 +3735,9 @@ Instead, just auto-save the buffer and then bury it." (defun message-delete-frame (frame org-frame) "Delete frame for editing message." - (when (and (or (static-if (featurep 'xemacs) - (device-on-window-system-p) - window-system) - (>= emacs-major-version 20)) + (when (and (static-if (featurep 'xemacs) + (device-on-window-system-p) + window-system) (or (and (eq message-delete-frame-on-exit t) (select-frame frame) (or (eq frame org-frame) @@ -5023,7 +5014,6 @@ Otherwise, generate and save a value for `canlock-password' first." "Process Fcc headers in the current buffer." (let ((case-fold-search t) (coding-system-for-write 'raw-text) - (output-coding-system 'raw-text) list file (mml-externalize-attachments message-fcc-externalize-attachments)) (save-excursion @@ -5950,10 +5940,9 @@ beginning of line." (defun message-pop-to-buffer (name) "Pop to buffer NAME, and warn if it already exists and is modified." (let ((buffer (get-buffer name)) - (pop-up-frames (and (or (static-if (featurep 'xemacs) - (device-on-window-system-p) - window-system) - (>= emacs-major-version 20)) + (pop-up-frames (and (static-if (featurep 'xemacs) + (device-on-window-system-p) + window-system) message-use-multi-frames))) (if (and buffer (buffer-name buffer)) @@ -6160,9 +6149,7 @@ are not included." message-auto-save-directory)) (setq buffer-auto-save-file-name (make-auto-save-file-name))) (clear-visited-file-modtime) - (static-if (boundp 'MULE) - (set-file-coding-system message-draft-coding-system) - (setq buffer-file-coding-system message-draft-coding-system)))) + (setq buffer-file-coding-system message-draft-coding-system))) (defun message-disassociate-draft () "Disassociate the message buffer from the drafts directory." diff --git a/lisp/mm-url.el b/lisp/mm-url.el index 7ff8140..8f20ac9 100644 --- a/lisp/mm-url.el +++ b/lisp/mm-url.el @@ -400,9 +400,7 @@ spaces. Die Die Die." (encode-coding-string chunk (if (fboundp 'find-coding-systems-string) (car (find-coding-systems-string chunk)) - (static-if (boundp 'MULE) - file-coding-system - buffer-file-coding-system))) + buffer-file-coding-system)) chunk) "")) diff --git a/lisp/nnfolder.el b/lisp/nnfolder.el index 1102078..643eb39 100644 --- a/lisp/nnfolder.el +++ b/lisp/nnfolder.el @@ -713,8 +713,7 @@ deleted. Point is left where the deleted region was." (setq nnfolder-current-buffer nil nnfolder-current-group nil)) ;; Change group. - (let ((file-name-coding-system nnmail-pathname-coding-system) - (pathname-coding-system nnmail-pathname-coding-system)) + (let ((file-name-coding-system nnmail-pathname-coding-system)) (when (and group (not (equal group nnfolder-current-group)) (progn @@ -1072,10 +1071,9 @@ This command does not work if you use short group names." (when (buffer-modified-p) (run-hooks 'nnfolder-save-buffer-hook) (gnus-make-directory (file-name-directory (buffer-file-name))) - (let* ((coding-system-for-write - (or nnfolder-file-coding-system-for-write - nnfolder-file-coding-system)) - (output-coding-system coding-system-for-write)) + (let ((coding-system-for-write + (or nnfolder-file-coding-system-for-write + nnfolder-file-coding-system))) (save-buffer))) (unless (or gnus-nov-is-evil nnfolder-nov-is-evil) (nnfolder-save-nov))) diff --git a/lisp/nnheader.el b/lisp/nnheader.el index 49f2ba5..0928e90 100644 --- a/lisp/nnheader.el +++ b/lisp/nnheader.el @@ -119,7 +119,6 @@ This variable is a substitute for `mm-text-coding-system-for-write'.") (defvar nnheader-auto-save-coding-system (cond - ((boundp 'MULE) '*junet*) ((not (fboundp 'find-coding-system)) nil) ((find-coding-system 'emacs-mule) (if (memq system-type '(windows-nt ms-dos ms-windows)) @@ -155,13 +154,7 @@ This variable is a substitute for `mm-text-coding-system-for-write'.") (defalias 'mm-image-load-path 'nnheader-image-load-path) ;; Should keep track of `mm-read-coding-system' in mm-util.el. - (defalias 'mm-read-coding-system - (if (or (and (featurep 'xemacs) - (<= (string-to-number emacs-version) 21.1)) - (boundp 'MULE)) - (lambda (prompt &optional default-coding-system) - (read-coding-system prompt)) - 'read-coding-system)) + (defalias 'mm-read-coding-system 'read-coding-system) ;; Should keep track of `mm-%s' in mm-util.el. (defalias 'mm-multibyte-string-p @@ -174,10 +167,7 @@ This variable is a substitute for `mm-text-coding-system-for-write'.") ;; Should keep track of `mm-detect-coding-region' in mm-util.el. (defun nnheader-detect-coding-region (start end) "Like 'detect-coding-region' except returning the best one." - (let ((coding-systems - (static-if (boundp 'MULE) - (code-detect-region (point) (point-max)) - (detect-coding-region (point) (point-max))))) + (let ((coding-systems (detect-coding-region (point) (point-max)))) (or (car-safe coding-systems) coding-systems))) (defalias 'mm-detect-coding-region 'nnheader-detect-coding-region) @@ -194,7 +184,7 @@ This variable is a substitute for `mm-text-coding-system-for-write'.") (defmacro nnheader-with-unibyte-buffer (&rest forms) "Create a temporary buffer, and evaluate FORMS there like `progn'. Use unibyte mode for this." - `(let (default-enable-multibyte-characters default-mc-flag) + `(let (default-enable-multibyte-characters) (with-temp-buffer ,@forms))) (put 'nnheader-with-unibyte-buffer 'lisp-indent-function 0) (put 'nnheader-with-unibyte-buffer 'edebug-form-spec '(body)) @@ -212,15 +202,6 @@ Equivalent to `progn' in XEmacs" (cond ((featurep 'xemacs) `(let (default-enable-multibyte-characters) ,@forms)) - ((boundp 'MULE) - `(let ((,multibyte mc-flag) - (,buffer (current-buffer))) - (unwind-protect - (let (default-enable-multibyte-characters default-mc-flag) - (setq mc-flag nil) - ,@forms) - (set-buffer ,buffer) - (setq mc-flag ,multibyte)))) (t `(let ((,multibyte enable-multibyte-characters) (,buffer (current-buffer))) @@ -284,8 +265,6 @@ nil, ." (lambda nil t)) ((featurep 'xemacs) (lambda nil nil)) - ((boundp 'MULE) - (lambda nil mc-flag)) (t (lambda nil enable-multibyte-characters)))) @@ -951,7 +930,6 @@ the line could be found." (number (length articles)) (count 0) (file-name-coding-system 'binary) - (pathname-coding-system 'binary) (case-fold-search t) (cur (current-buffer)) article diff --git a/lisp/nnkiboze.el b/lisp/nnkiboze.el index 07aa565..4c67880 100644 --- a/lisp/nnkiboze.el +++ b/lisp/nnkiboze.el @@ -150,8 +150,7 @@ ;; Remove NOV lines of articles that are marked as read. (when (and (file-exists-p (nnkiboze-nov-file-name)) nnkiboze-remove-read-articles) - (let ((coding-system-for-write nnkiboze-file-coding-system) - (output-coding-system nnkiboze-file-coding-system)) + (let ((coding-system-for-write nnkiboze-file-coding-system)) (with-temp-file (nnkiboze-nov-file-name) (let ((cur (current-buffer)) (nnheader-file-coding-system nnkiboze-file-coding-system)) @@ -255,8 +254,7 @@ Finds out what articles are to be part of the nnkiboze groups." (mm-with-unibyte (when (file-exists-p newsrc-file) (load newsrc-file)) - (let ((coding-system-for-write nnkiboze-file-coding-system) - (output-coding-system nnkiboze-file-coding-system)) + (let ((coding-system-for-write nnkiboze-file-coding-system)) (gnus-make-directory (file-name-directory nov-file)) (with-temp-file nov-file (when (file-exists-p nov-file) diff --git a/lisp/nnmail.el b/lisp/nnmail.el index 2e5d87a..d632ba7 100644 --- a/lisp/nnmail.el +++ b/lisp/nnmail.el @@ -622,8 +622,7 @@ by anything." (after-insert-file-functions nil)) (condition-case () (let ((auto-mode-alist (nnheader-auto-mode-alist)) - (file-name-coding-system nnmail-pathname-coding-system) - (pathname-coding-system nnmail-pathname-coding-system)) + (file-name-coding-system nnmail-pathname-coding-system)) (insert-file-contents-as-coding-system nnmail-file-coding-system file) t) @@ -689,8 +688,7 @@ nn*-request-list should have been called before calling this function." (defun nnmail-save-active (group-assoc file-name) "Save GROUP-ASSOC in ACTIVE-FILE." - (let ((coding-system-for-write nnmail-active-file-coding-system) - (output-coding-system nnmail-active-file-coding-system)) + (let ((coding-system-for-write nnmail-active-file-coding-system)) (when file-name (with-temp-file file-name (nnmail-generate-active group-assoc))))) @@ -1889,8 +1887,7 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details." (defun nnmail-write-region (start end filename &optional append visit lockname) "Do a `write-region', and then set the file modes." - (let ((file-name-coding-system nnmail-pathname-coding-system) - (pathname-coding-system nnmail-pathname-coding-system)) + (let ((file-name-coding-system nnmail-pathname-coding-system)) (write-region-as-coding-system nnmail-file-coding-system start end filename append visit lockname) (set-file-modes filename nnmail-default-file-modes))) diff --git a/lisp/nnmaildir.el b/lisp/nnmaildir.el index 65bb5bd..5391192 100644 --- a/lisp/nnmaildir.el +++ b/lisp/nnmaildir.el @@ -768,9 +768,7 @@ by nnmaildir-request-article.") (defun nnmaildir-request-scan (&optional scan-group server) (let ((coding-system-for-write nnheader-file-coding-system) - (output-coding-system nnheader-file-coding-system) (buffer-file-coding-system nil) - (file-coding-system nil) (file-coding-system-alist nil) (nnmaildir-get-new-mail t) (nnmaildir-group-alist nil) @@ -1007,9 +1005,7 @@ by nnmaildir-request-article.") (defun nnmaildir-request-rename-group (gname new-name &optional server) (let ((group (nnmaildir--prepare server gname)) (coding-system-for-write nnheader-file-coding-system) - (output-coding-system nnheader-file-coding-system) (buffer-file-coding-system nil) - (file-coding-system nil) (file-coding-system-alist nil) srv-dir x groups) (catch 'return @@ -1221,9 +1217,7 @@ by nnmaildir-request-article.") (defun nnmaildir-request-replace-article (number gname buffer) (let ((group (nnmaildir--prepare nil gname)) (coding-system-for-write nnheader-file-coding-system) - (output-coding-system nnheader-file-coding-system) (buffer-file-coding-system nil) - (file-coding-system nil) (file-coding-system-alist nil) dir file article suffix tmpfile deactivate-mark) (catch 'return @@ -1299,9 +1293,7 @@ by nnmaildir-request-article.") (defun nnmaildir-request-accept-article (gname &optional server last) (let ((group (nnmaildir--prepare server gname)) (coding-system-for-write nnheader-file-coding-system) - (output-coding-system nnheader-file-coding-system) (buffer-file-coding-system nil) - (file-coding-system nil) (file-coding-system-alist nil) srv-dir dir file time tmpfile curfile 24h article) (catch 'return @@ -1489,9 +1481,7 @@ by nnmaildir-request-article.") (defun nnmaildir-request-set-mark (gname actions &optional server) (let ((group (nnmaildir--prepare server gname)) (coding-system-for-write nnheader-file-coding-system) - (output-coding-system nnheader-file-coding-system) (buffer-file-coding-system nil) - (file-coding-system nil) (file-coding-system-alist nil) del-mark del-action add-action set-action marksdir markfile nlist ranges begin end article all-marks todo-marks did-marks mdir mfile diff --git a/lisp/nnmbox.el b/lisp/nnmbox.el index efa5e5a..c3a5931 100644 --- a/lisp/nnmbox.el +++ b/lisp/nnmbox.el @@ -190,9 +190,8 @@ (car active) (cdr active) group))))) (defun nnmbox-save-buffer () - (let* ((coding-system-for-write (or nnmbox-file-coding-system-for-write - nnmbox-file-coding-system)) - (output-coding-system coding-system-for-write)) + (let ((coding-system-for-write (or nnmbox-file-coding-system-for-write + nnmbox-file-coding-system))) (save-buffer))) (defun nnmbox-save-active (group-alist active-file) diff --git a/lisp/nnmh.el b/lisp/nnmh.el index cfefeb4..18ab15a 100644 --- a/lisp/nnmh.el +++ b/lisp/nnmh.el @@ -89,7 +89,6 @@ as unread by Gnus.") (> number nnmail-large-newsgroup))) (count 0) (file-name-coding-system nnmail-pathname-coding-system) - (pathname-coding-system nnmail-pathname-coding-system) beg article) (nnmh-possibly-change-directory newsgroup server) ;; We don't support fetching by Message-ID. @@ -149,7 +148,6 @@ as unread by Gnus.") nil (concat nnmh-current-directory (int-to-string id)))) (file-name-coding-system nnmail-pathname-coding-system) - (pathname-coding-system nnmail-pathname-coding-system) (nntp-server-buffer (or buffer nntp-server-buffer))) (and (stringp file) (file-exists-p file) @@ -162,7 +160,6 @@ as unread by Gnus.") (nnmh-possibly-change-directory group server) (let ((pathname (nnmail-group-pathname group nnmh-directory)) (file-name-coding-system nnmail-pathname-coding-system) - (pathname-coding-system nnmail-pathname-coding-system) dir) (cond ((not (file-directory-p pathname)) @@ -206,7 +203,6 @@ as unread by Gnus.") (nnheader-insert "") (nnmh-possibly-change-directory nil server) (let ((file-name-coding-system nnmail-pathname-coding-system) - (pathname-coding-system nnmail-pathname-coding-system) (nnmh-toplev (file-truename (or dir (file-name-as-directory nnmh-directory))))) (nnmh-request-list-1 nnmh-toplev)) @@ -433,8 +429,7 @@ as unread by Gnus.") (nnmh-open-server server)) (when newsgroup (let ((pathname (nnmail-group-pathname newsgroup nnmh-directory)) - (file-name-coding-system nnmail-pathname-coding-system) - (pathname-coding-system nnmail-pathname-coding-system)) + (file-name-coding-system nnmail-pathname-coding-system)) (if (file-directory-p pathname) (setq nnmh-current-directory pathname) (nnheader-report 'nnmh "Not a directory: %s" nnmh-directory))))) @@ -484,7 +479,6 @@ as unread by Gnus.") (let ((active (cadr (assoc group nnmh-group-alist))) (dir (nnmail-group-pathname group nnmh-directory)) (file-name-coding-system nnmail-pathname-coding-system) - (pathname-coding-system nnmail-pathname-coding-system) file) (unless active ;; The group wasn't known to nnmh, so we just create an active diff --git a/lisp/nnml.el b/lisp/nnml.el index 7b0ae9c..ba778e2 100644 --- a/lisp/nnml.el +++ b/lisp/nnml.el @@ -126,7 +126,6 @@ marks file will be regenerated properly by Gnus.") (number (length sequence)) (count 0) (file-name-coding-system nnmail-pathname-coding-system) - (pathname-coding-system nnmail-pathname-coding-system) beg article) (if (stringp (car sequence)) 'headers @@ -188,7 +187,6 @@ marks file will be regenerated properly by Gnus.") (nnml-possibly-change-directory group server) (let* ((nntp-server-buffer (or buffer nntp-server-buffer)) (file-name-coding-system nnmail-pathname-coding-system) - (pathname-coding-system nnmail-pathname-coding-system) path gpath group-num) (if (stringp id) (when (and (setq group-num (nnml-find-group-number id)) @@ -219,8 +217,7 @@ marks file will be regenerated properly by Gnus.") (string-to-int (file-name-nondirectory path))))))) (deffoo nnml-request-group (group &optional server dont-check) - (let ((file-name-coding-system nnmail-pathname-coding-system) - (pathname-coding-system nnmail-pathname-coding-system)) + (let ((file-name-coding-system nnmail-pathname-coding-system)) (cond ((not (nnml-possibly-change-directory group server)) (nnheader-report 'nnml "Invalid group (no such directory)")) @@ -278,8 +275,7 @@ marks file will be regenerated properly by Gnus.") (deffoo nnml-request-list (&optional server) (save-excursion (let ((nnmail-file-coding-system nnmail-active-file-coding-system) - (file-name-coding-system nnmail-pathname-coding-system) - (pathname-coding-system nnmail-pathname-coding-system)) + (file-name-coding-system nnmail-pathname-coding-system)) (nnmail-find-file nnml-active-file)) (setq nnml-group-alist (nnmail-get-active)) t)) @@ -612,8 +608,7 @@ marks file will be regenerated properly by Gnus.") (if (not group) t (let ((pathname (nnmail-group-pathname group nnml-directory)) - (file-name-coding-system nnmail-pathname-coding-system) - (pathname-coding-system nnmail-pathname-coding-system)) + (file-name-coding-system nnmail-pathname-coding-system)) (when (not (equal pathname nnml-current-directory)) (setq nnml-current-directory pathname nnml-current-group group diff --git a/lisp/nnrss.el b/lisp/nnrss.el index 89494fa..35739a6 100644 --- a/lisp/nnrss.el +++ b/lisp/nnrss.el @@ -323,7 +323,6 @@ ARTICLE is the article number of the current headline.") (when (file-exists-p file) (with-temp-buffer (let ((coding-system-for-read 'binary) - (input-coding-system 'binary) emacs-lisp-mode-hook) (insert-file-contents file) (emacs-lisp-mode) @@ -340,7 +339,6 @@ ARTICLE is the article number of the current headline.") server ".el")) nnrss-directory))) (let ((coding-system-for-write 'binary) - (output-coding-system 'binary) print-level print-length) (with-temp-file file (insert "(setq nnrss-group-alist '" @@ -366,7 +364,6 @@ ARTICLE is the article number of the current headline.") (when (file-exists-p file) (with-temp-buffer (let ((coding-system-for-read 'binary) - (input-coding-system 'binary) emacs-lisp-mode-hook) (insert-file-contents file) (emacs-lisp-mode) @@ -389,7 +386,6 @@ ARTICLE is the article number of the current headline.") server ".el")) nnrss-directory))) (let ((coding-system-for-write 'binary) - (output-coding-system 'binary) print-level print-length) (with-temp-file file (insert "(setq nnrss-group-data '" diff --git a/lisp/nnshimbun.el b/lisp/nnshimbun.el index 87675c9..3a7a853 100644 --- a/lisp/nnshimbun.el +++ b/lisp/nnshimbun.el @@ -289,7 +289,6 @@ GROUP has a full name." (error (nnheader-report 'nnshimbun "%s" (error-message-string err)))) (let ((file-name-coding-system nnmail-pathname-coding-system) - (pathname-coding-system nnmail-pathname-coding-system) (dir (nnshimbun-current-directory group))) (or (file-directory-p dir) (ignore-errors @@ -304,7 +303,6 @@ GROUP has a full name." (deffoo nnshimbun-open-server (server &optional defs) (or (nnshimbun-server-opened server) (let ((file-name-coding-system nnmail-pathname-coding-system) - (pathname-coding-system nnmail-pathname-coding-system) (shimbun)) (when (condition-case err (setq shimbun @@ -636,7 +634,6 @@ also be nil." (with-current-buffer (gnus-get-buffer-create buffer) (erase-buffer) (let ((file-name-coding-system nnmail-pathname-coding-system) - (pathname-coding-system nnmail-pathname-coding-system) (nov (nnshimbun-nov-file-name group))) (when (file-exists-p nov) (nnheader-insert-file-contents nov))) @@ -648,7 +645,6 @@ also be nil." (when (gnus-buffer-live-p buffer) (with-current-buffer buffer (let ((file-name-coding-system nnmail-pathname-coding-system) - (pathname-coding-system nnmail-pathname-coding-system) (nov (nnshimbun-nov-file-name group))) (when (and (buffer-modified-p) (or (> (buffer-size) 0) diff --git a/lisp/nntp.el b/lisp/nntp.el index 784d7c0..a3f1e18 100644 --- a/lisp/nntp.el +++ b/lisp/nntp.el @@ -545,7 +545,7 @@ be restored and the command retried." (symbol-value 'enable-multibyte-characters)))) (unwind-protect ;; Some encoded unicode text contains character 0x80-0x9f e.g. Euro. - (let (default-enable-multibyte-characters mc-flag) + (let (default-enable-multibyte-characters) ;; `set-buffer-multibyte' will be provided by APEL for all Emacsen. (set-buffer-multibyte nil) (process-send-region (nntp-find-connection nntp-server-buffer) diff --git a/lisp/score-mode.el b/lisp/score-mode.el index 66ed642..0e63ef1 100644 --- a/lisp/score-mode.el +++ b/lisp/score-mode.el @@ -52,9 +52,7 @@ table) "Syntax table used in score-mode buffers.") -(defvar score-mode-coding-system (static-if (boundp 'MULE) - '*ctext* - 'ctext)) +(defvar score-mode-coding-system 'ctext) ;;;###autoload (defun gnus-score-mode () diff --git a/sample.lpath.el b/sample.lpath.el deleted file mode 100644 index 95e40cc..0000000 --- a/sample.lpath.el +++ /dev/null @@ -1,42 +0,0 @@ -;; This is a sample of `~/.lpath.el' file. -;; -;; This file will be loaded from dgnushack.el at the compile time. It -;; is supposed to be used for telling old Emacsen where EMU, APEL or -;; CUSTOM packages have already installed. -;; -;; For instance, if you would like to build T-gnus with Mule 2.3 based -;; on Emacs 19.34, copy this file to `~/.lpath.el' and edit it suitably -;; for your environment. - -(if (boundp 'MULE) - (let ((additional-load-path - (list - ;; Where is EMU packege? - "/usr/local/share/mule/19.34/site-lisp/" - ;; Where is APEL package? - "/usr/local/share/mule/site-lisp/apel/" - ;; Where is CUSTOM package? - "/usr/local/share/mule/site-lisp/custom/" - - ;; Note that you have no need to specify paths of FLIM and - ;; SEMI if they are installed under the directory which is - ;; same as the parent directory of APEL. - - ;; If you have installed Emacs/W3 package, - ;; uncomment and edit the following line appropriately. - ;; "/usr/local/share/mule/site-lisp/w3/" - ))) - ;; No user serviceable parts beyond this point. - - (let ((i (length additional-load-path)) - p) - (while (> i 0) - (setq i (1- i) - p (nth i additional-load-path)) - (if (file-directory-p p) - (progn - (if (string-match "/apel/?$" p) - (setq load-path - (cons (substring p 0 (1+ (match-beginning 0))) - load-path))) - (setq load-path (cons p load-path)))))))) diff --git a/texi/infohack.el b/texi/infohack.el index 89bad3f..ad4abd0 100644 --- a/texi/infohack.el +++ b/texi/infohack.el @@ -47,9 +47,7 @@ coding-system) (find-file file) (setq buffer-read-only nil) - (setq coding-system (if (boundp 'buffer-file-coding-system) - buffer-file-coding-system - file-coding-system)) + (setq coding-system buffer-file-coding-system) (infohack-remove-unsupported) (texinfo-every-node-update) (texinfo-format-buffer t) ;; Don't save any file. @@ -57,8 +55,7 @@ (setq buffer-file-name (expand-file-name (file-name-nondirectory buffer-file-name) default-directory)) - (setq buffer-file-coding-system coding-system - file-coding-system coding-system) + (setq buffer-file-coding-system coding-system) (if (> (buffer-size) 100000) (Info-split)) (save-buffer))) @@ -97,16 +94,13 @@ Both characters must have the same length of multi-byte form." (let ((auto-save-default nil) (find-file-run-dired nil) coding-system-for-write - output-coding-system (error 0)) (condition-case err (progn (find-file file) (setq buffer-read-only nil) (buffer-disable-undo (current-buffer)) - (if (boundp 'MULE) - (setq output-coding-system file-coding-system) - (setq coding-system-for-write buffer-file-coding-system)) + (setq coding-system-for-write buffer-file-coding-system) ;; process @include before updating node ;; This might produce some problem if we use @lowersection or ;; such. @@ -165,17 +159,11 @@ Both characters must have the same length of multi-byte form." (let ((si:message (symbol-function 'message))) (fset 'message (byte-compile - (if (boundp 'MULE) - `(lambda (fmt &rest args) - (funcall ,si:message "%s" - (code-convert-string - (apply 'format fmt args) - '*internal* '*junet*))) - `(lambda (fmt &rest args) - (funcall ,si:message "%s" - (encode-coding-string - (apply 'format fmt args) - 'iso-2022-7bit)))))) + `(lambda (fmt &rest args) + (funcall ,si:message "%s" + (encode-coding-string + (apply 'format fmt args) + 'iso-2022-7bit))))) (unwind-protect (texinfo-format-buffer nil) (fset 'message si:message))) diff --git a/texi/ptexinfmt.el b/texi/ptexinfmt.el index 66a507f..69bd366 100644 --- a/texi/ptexinfmt.el +++ b/texi/ptexinfmt.el @@ -100,12 +100,7 @@ DOCSTRING will be printed if ASSERTION is nil and ;; sort -fd (ptexinfmt-broken-facility texinfo-format-printindex "Can't sort on Mule for Windows." - (if (and (memq system-type '(windows-nt ms-dos)) -;;; I don't know version threshold. -;;; (string< texinfmt-version "2.37 of 24 May 1997") - (boundp 'MULE) (not (featurep 'meadow))) ; Mule for Windows - nil - t)) + t) ;; @var (ptexinfmt-broken-facility texinfo-format-var -- 1.7.10.4