pax_global_header00006660000000000000000000000064134354341660014523gustar00rootroot0000000000000052 comment=146f893078d98b64db26836c5fb5d939e9616150 cvs-m17n-org-MU-CITE-146f893/000077500000000000000000000000001343543416600152125ustar00rootroot00000000000000cvs-m17n-org-MU-CITE-146f893/ChangeLog000066400000000000000000000665331343543416600170010ustar00rootroot000000000000002019-02-27 Katsumi Yamaoka * mu-cite.el (mu-cite-get-original-header): Use original timezone. 2018-08-23 Katsumi Yamaoka * mu-cite.el (mu-cite-get-original-header): Make the return value compatible with the M$ O*tlook style. 2018-08-01 Katsumi Yamaoka * mu-cite.el (mu-cite-default-methods-alist): Add a new method `top-posting'. See the doc-string of `mu-cite-get-original-header' for the usage. (mu-cite-get-original-header): New function. 2014-06-09 Katsumi Yamaoka * mu-register.el (mu-cite-get-no-prefix-register-verbose-method): New function. (mu-cite-get-prefix-register-verbose-method): Work for it. * mu-cite.el (mu-cite-default-methods-alist): Add a new method `no-prefix-register-verbose'. (mu-cite-original): Register a name before generating top cite form. (fill-column-for-fill-cited-region): Don't use default-fill-column. (string-compare-from-top): Replace sref with aref. 2012-02-27 Katsumi Yamaoka * mu-cite.el (mu-cite-remove-text-properties): Fix mismatched paren in XEmacs part. 2010-06-21 Katsumi Yamaoka * MU-CFG: Don't load poe twice; add emu subdirectory to load-path when LISPDIR is specified. 2009-05-15 Katsumi Yamaoka * README.en (Bug reports): Remove. 2007-09-03 Katsumi Yamaoka * mu-cite.el (mu-cite-remove-text-properties) (fill-column-for-fill-cited-region): Don't use old-style backquotes. 2007-03-07 Katsumi Yamaoka * mu-cite.el (mu-cite-char-category): Rename from char-category of which the name is too generic. 2006-12-20 Katsumi Yamaoka * README.en (What's MU): Update required version of APEL to 10.7 or later. * MU-CFG (PACKAGEDIR): Use install-get-default-package-directory. 2006-12-13 Katsumi Yamaoka * MU-CFG (PACKAGEDIR): Avoid an error with Emacs. 2006-12-12 Katsumi Yamaoka * MU-MK (compile-mu-package): Use batch-update-directory-autoloads if it is available instead of batch-update-directory. 2006-12-11 Katsumi Yamaoka * MU-CFG (PACKAGEDIR): Check for (early|late|last)-package-hierarchies and configure-package-path as well as (early|late|last)-packages. 2005-06-06 MORIOKA Tomohiko * mu-cite.el (mu-cite-original): Allow nil as a value of `mu-cite-cited-prefix-regexp'. 2002-02-25 Daiki Ueno * MU-MK (config-mu-package): Add auto-autoloads and custom-load only to `mu-modules-to-compile'. (compile-mu-package): Don't compile `mu-modules-not-to-compile'. 2001-12-21 Katsumi Yamaoka * mu-register.el (mu-cite-load-registration-file): Reverted. I've got XEmacs wrong that it does'nt support the coding system magic cookie. However it has been working since XEmacs 21.2.21. Users can avoid mis-decoding a file by setting the value of the option `mu-registration-file-coding-system-for-read' properly even if they are using one of old (X)Emacsen. (mu-registration-file-coding-system-for-read): Fix a doc-string. 2001-08-29 Katsumi Yamaoka * mu-register.el (mu-cite-load-registration-file): Retry to read a file when failed. 2001-08-03 Katsumi Yamaoka * mu-register.el (mu-cite-save-registration-file): Use `mu-registration-file-coding-system-for-write' for writing a file. (mu-registration-file-coding-system-for-read): Use `defvar' instead of `defcustom' to define it. (mu-registration-file-coding-system-for-write): New user option. 2001-05-23 Katsumi Yamaoka * mu-cite.el (fill-column-for-fill-cited-region): Add a supplementary explanation in doc-string. 2001-04-19 Katsumi Yamaoka * mu-cite.el (mu-cite-remove-text-properties): Make it to work with XEmacs. 2001-03-22 NISHIDA Masakazu * mu-register.el (mu-cite-get-prefix-register-verbose-method): Support X-Cite-Me as well as X-Attribution. (mu-cite-get-prefix-register-method): Ditto. * mu-bbdb.el (mu-bbdb-get-prefix-register-verbose-method): Ditto. (mu-bbdb-get-prefix-register-method): Ditto. * mu-cite.el (mu-cite-default-methods-alist): Ditto. 2001-03-09 Katsumi Yamaoka * mu-cite.el (fill-column-for-fill-cited-region): New user option. (fill-cited-region): Prefer `fill-column-for-fill-cited-region' if it is an integer rather than `fill-column'. 2001-02-23 Katsumi Yamaoka * mu-cite.el (char-category): Force redefine as a function because it may have been defined by emu.el; don't use `int-char' for XEmacs if the function `char-category-list' returns a list of characters; enclose the whole form with `eval-and-compile'. * MU-CFG: Define the function `add-to-list' for a makeshift. * MU-MK: Define byte-optimizer for replacing `sref' with `aref'; silence XEmacs not to say "bound but not referenced". (byte-compile-file-form-custom-declare-variable): Define it for old Emacsen. * mu-cite.el: Undo the last change. 2001-02-23 Katsumi Yamaoka * mu-cite.el: Require `emu' as well as `poem' because we have need to pickup the function `char-category' for XEmacs. 2001-02-02 Keiichi Suzuki * mu-cite.el (top level): Require `poem' instead of `poe' for `char-next-index'. 2000-09-04 Katsumi Yamaoka * mu-cite.el (mu-cite-default-methods-alist): Don't include `ml-count' in `id' if it is not available. 2000-05-25 Tanaka Akira * README.en: Update for CVS via SSH. 2000-01-05 Katsumi Yamaoka * Makefile: Update for the new CVS server. 1999-12-16 Katsumi Yamaoka * MU-CITE: Version 8.1 was released. 1999-12-16 Katsumi Yamaoka * mu-register.el: Ignore the obsolete variables. * mu-cite.el: Ignore the obsolete variables and functions. 1999-12-13 Katsumi Yamaoka * README.en: Update for the recent ML address. 1999-10-19 Katsumi Yamaoka * mu-cite.el (fill-cited-region): Bind `filladapt-mode' to nil. 1999-10-15 Katsumi Yamaoka * mu-cite.el (fill-cited-region): Increase `fill-column' if `fill-prefix' is too long to fill. (detect-paragraph-cited-prefix): Abolish a product of comparing each line if they are identical; don't include newlines in result. 1999-08-23 Katsumi Yamaoka * mu-cite.el (TopLevel): Don't require `widget'. 1999-08-05 Katsumi Yamaoka * MU-CITE: Version 8.0 was released. 1999-08-05 Katsumi Yamaoka * mu-cite.el (detect-paragraph-cited-prefix): Use `car' and `cdr' instead of `cadr'. * mu-register.el (mu-cite-save-registration-file): Remove text properties from the strings to be registered and quote them using `prin1-to-string'. * Makefile (PACKAGE): Rename from "mu" to "mu-cite". (invoice): New target. 1999-08-03 Katsumi Yamaoka * mu-register.el (mu-cite-get-prefix-register-verbose-method): Bind `minibuffer-allow-text-properties' to nil; use `mu-cite-remove-text-properties'; use `if' instead of `when'. (mu-cite-get-prefix-register-method): Ditto. (mu-cite-save-registration-file): Don't use `prin1-to-string' for avoiding text properties. * mu-bbdb.el (mu-bbdb-get-prefix-register-verbose-method): Bind `minibuffer-allow-text-properties' to nil; use `mu-cite-remove-text-properties'. (mu-bbdb-get-prefix-register-method): Ditto. * mu-cite.el (compress-cited-prefix): Use `if' instead of `when'. (mu-cite-remove-text-properties): New macro for removing text properties under FSF Emacs from 19.7 to under 20.1. It is suggested by Masahiro MURATA . * NEWS: Document that text properties in the registration file is not recommended. 1999-08-02 Katsumi Yamaoka * NEWS: New file. 1999-07-30 Katsumi Yamaoka * mu-cite.el (mu-cite-ml-count-field-list): Don't use `mu-cite-custom-set-variable'. (mu-cite-top-format): New implementation for customization. (mu-cite-prefix-format): Ditto. (mu-cite-custom-set-variable): Remove function. (mu-cite-choose-top-format): Remove widget. (mu-cite-choose-prefix-format): Remove widget. (TopLevel): Don't use `mapcar' for defining obsolete functions. (TopLevel): Undo the last change for defining obsolete variables under XEmacs. (mu-cite-obsolete-variable-alist): Redefine as a macro which will be bound at the compile time only. 1999-07-29 Katsumi Yamaoka * mu-cite.el (TopLevel): Use `mapcar' instead of `dolist' for defining obsolete variables and functions. 1999-07-28 Katsumi Yamaoka * README.en: (How to use): Remove the part. (load-path): Document that FLIM should be included in `load-path'. (Installation): Add expositions how to use make options LISPDIR and VERSION_SPECIFIC_LISPDIR; add the clause for installing as a XEmacs package. (What's MU): Remove the clause for std11; add description about mu-register.el; update required packages. (TopLevel):Remove RCS magic cookie. * mu-cite.el (mu-cite-ml-count-field-list): Modify tag string for `choice'; use `const' with the arg nil for the menu separator; delete element which value is nil when the symbol value is set. (mu-cite-top-format): New implementation for customization using `mu-cite-choose-top-format' and `mu-cite-custom-set-variable'. (mu-cite-prefix-format): New implementation for customization using `mu-cite-choose-prefix-format' and `mu-cite-custom-set-variable'. (mu-cite-custom-set-variable): New function. (mu-cite-choose-top-format): New widget. (mu-cite-choose-prefix-format): New widget. (widget-mu-cite-method-prompt-value): Abolish function. (mu-cite-method): Abolish widget. (widget-mu-cite-method-prompt-value-history): Abolish variable. (mu-cite-method-list): Abolish function. 1999-07-22 Katsumi Yamaoka * mu-register.el (mu-cite-load-registration-file): Check for the existence of `buffer-file-coding-system' or `file-coding-system'. * mu-cite.el (string-compare-from-top): Don't use `aref'. 1999-07-21 Katsumi Yamaoka * mu-register.el (mu-cite-load-registration-file): Use `file-coding-system' instead of `buffer-file-coding-system' for old Emacsen. * mu-cite.el (string-compare-from-top): Use `aref' instead of `sref'. (TopLevel): Require `widget' for old Emacsen. * mu-bbdb.el (TopLevel): Don't require `path-util'. 1999-07-21 MORIOKA Tomohiko * mu-cite.el (mu-cite-method-list): New function. (widget-mu-cite-method-prompt-value-history): New variable. (mu-cite-method): New widget. (widget-mu-cite-method-prompt-value): New function. (widget-mu-cite-method-action): New function. (mu-cite-prefix-format): Use `mu-cite-method'. (mu-cite-top-format): Likewise. 1999-07-21 MORIOKA Tomohiko * mu-register.el (mu-citation-name-alist): Deleted. (mu-cite-load-registration-file): Initialize value of `mu-registration-symbol' if it is not bound. (mu-cite-save-registration-file): Use `(symbol-value mu-registration-symbol)' instead of `mu-citation-name-alist'. (mu-register-get-citation-name): Likewise. (mu-register-add-citation-name): Use `(set-alist mu-registration-symbol ...)'. 1999-07-20 MORIOKA Tomohiko * mu-cite.el (mu-cite-obsolete-variable-alist): Revert to define; use it to define obsolete-variable-aliases in XEmacs. - Try to set value of obsolete variables to new variables after `mu-cite-load-hook' is run in non XEmacs emacsen. 1999-07-20 MORIOKA Tomohiko * mu-cite.el (mu-cite-load-hook): Deleted the definition as a user option. * mu-bbdb.el (mu-bbdb-load-hook): Deleted the definition as a variable. 1999-07-20 MORIOKA Tomohiko * mu-cite.el (string-compare-from-top): Revert to use `sref' instead of `aref'; use `char-next-index'. * mu-cite.el (detect-paragraph-cited-prefix): Use `line-beginning-position' and `line-end-position'. * mu-cite.el (detect-paragraph-cited-prefix): Revert not to use `incf'. * mu-cite.el (mu-cite-original): Revert to use `or' instead of 'unless'. * mu-cite.el (detect-paragraph-cited-prefix): Revert to use `if' instead of `when'. * mu-cite.el (mu-cite-original): Revert to use `if' instead of `when'. * mu-cite.el: - Don't require `cl' when compile time. - Don't require `emu'. - Require `pcustom' instead of `custom'. - Add autoload setting for `mu-bbdb-get-prefix-method', `mu-bbdb-get-prefix-register-method' and `mu-bbdb-get-prefix-register-verbose-method'. (mu-cite-default-methods-alist): Add setting for `mu-bbdb-get-prefix-method', `mu-bbdb-get-prefix-register-method' and `mu-bbdb-get-prefix-register-verbose-method'. (mu-cite-get-field-value): Add DOC-string; Revert to use `if' instead of `when'. (mu-cite-get-ml-count-method): Add DOC-string; revert to use `if' instead of `when'; use `match-string'. (mu-cite-get-value): Add DOC-string. (char-category): New function. (fill-cited-region): Add DOC-string; revert to use `if' instead of `when'. (compress-cited-prefix): Likewise. 1999-07-20 MORIOKA Tomohiko * mu-bbdb.el (mu-bbdb-get-prefix-method): Add DOC-string. (mu-bbdb-get-prefix-register-method): Likewise. (mu-bbdb-get-prefix-register-verbose-method): Likewise. - Delete setting for `mu-cite/default-methods-alist'. 1999-07-20 MORIOKA Tomohiko * mu-bbdb.el: Don't use `module-installed-p'. 1999-07-19 Katsumi Yamaoka * mu-cite.el (mu-cite-get-prefix-register-verbose-method): Move function to mu-register.el. (mu-cite-get-prefix-register-method): Likewise. (mu-cite-get-prefix-method): Likewise. (mu-cite-save-registration-file): Likewise. (mu-cite-load-registration-file): Likewise. (mu-cite-add-citation-name): Likewise. (mu-cite-get-citation-name): Likewise. (mu-cite-minibuffer-history): Move variable to mu-register.el. (mu-cite-citation-name-alist): Likewise. (mu-cite-registration-symbol): Likewise. (mu-cite-registration-file-modes): Likewise. (mu-cite-registration-file-coding-system-for-write): Likewise. (mu-cite-registration-file-coding-system-for-read): Likewise. (mu-cite-allow-null-string-registration): Likewise. (mu-cite-registration-file): Likewise. (mu-cite-registration-file): Move macro to mu-register.el. * MU-ELS: (mu-modules-to-compile): Add `mu-register'. 1999-07-19 MORIOKA Tomohiko * mu-cite.el (TopLevel): Add autoload setting for `mu-cite-get-prefix-method', `mu-cite-get-prefix-register-method' and `mu-cite-get-prefix-register-verbose-method'. * mu-bbdb.el (mu-bbdb-history): New variable. (mu-bbdb-get-prefix-register-method): Use it instead of `mu-cite/minibuffer-history'. (mu-bbdb-get-prefix-register-verbose-method): Likewise. * mu-register.el: New file. The name of variables and functions were changed from the past as follows: mu-registration-file <- mu-cite/registration-file mu-registration-symbol <- mu-cite/registration-symbol mu-register-get-citation-name <- mu-cite/get-citation-name mu-register-add-citation-name <- mu-cite/add-citation-name * MU-ELS: Remove RCS magic cookie. 1999-07-19 Katsumi Yamaoka * mu-cite.el (mu-cite-save-registration-file): Use `save-buffer' instead of `save-buffer-as-coding-system' if the value of `mu-cite-registration-file-coding-system-for-write' is nil. (mu-cite-load-registration-file): Use `insert-file-contents' instead of `insert-file-contents-as-coding-system' if the value of `mu-cite-registration-file-coding-system-for-read' is nil. (TopLevel): Don't warn for the obsolete variables if the value of `noninteractive' is non-nil. (mu-cite-registration-file): Likewise. * mu-bbdb.el (mu-bbdb-get-prefix-register-verbose-method): Use `mu-cite-get-value' instead of `mu-cite/get-value'. (mu-bbdb-get-prefix-register-method): Likewise. (mu-bbdb-get-prefix-method): Likewise. (mu-bbdb-set-attr): Renamed from `mu-cite/set-bbdb-attr'. (mu-bbdb-get-prefix-register-verbose-method): Renamed from `mu-cite/get-bbdb-prefix-register-verbose-method'. (mu-bbdb-get-prefix-register-method): Renamed from `mu-cite/get-bbdb-prefix-register-method'. (mu-bbdb-get-prefix-method): Renamed from `mu-cite/get-bbdb-prefix-method'. (mu-bbdb-get-attr): Renamed from `mu-cite/get-bbdb-attr'. (TopLevel): Require `path-util' for picking up `module-installed-p'. (TopLevel): Require `cl' at the compile time. (Keywords, Maintainer): Add comments. (Author): Change mail address. (Copyright): Belong to FSF. * ftp.in: New file. * Makefile (ARC_DIR): Default to "/pub/elisp/mu". 1999-07-17 Kenji Itoh * mu-cite.el (mu-cite-original): Add autoload cookie. * latex-math-symbol.el (latex-math-decode-region): Likewise. (latex-math-decode-buffer): Likewise. * Makefile (release): New target. (tar): New implementation. (clean): Use the variables `RM' and `GOMI'. (install-package): New target. (package): New target. (install): Accept the arguments `PREFIX', `LISPDIR' and `VERSION_SPECIFIC_LISPDIR'. (elc): Likewise. (ARC_DIR, VERSION, FILES, GOMI): New variables. (VERSION_SPECIFIC_LISPDIR, PACKAGEDIR, LISPDIR): New variables. (PREFIX): Default to "NONE". (XEMACS, CP, RM, TAR, RELEASE, API, PACKAGE): New variables. * MU-MK (install-mu-package): New function. (compile-mu-package): New function. (config-mu-package): New function. (config-mu): Extract the values of `LISPDIR' and `VERSION_SPECIFIC_LISPDIR' from the command line arguments. * MU-CFG (PACKAGEDIR): New variable. (VERSION_SPECIFIC_LISPDIR): New variable. (TopLevel): Delete code to detect APEL 7.3 or later. (load-path): Modernize the way of adding the paths of APEL, FLIM, LISPDIR, VERSION_SPECIFIC_LISPDIR, CUSTOM and `default-directory'. (default-load-path): New variable. 1999-07-16 Katsumi Yamaoka * mu-cite.el (mu-cite-version): Update to 8.0. (mu-cite-eval-format): Don't use `save-excursion'. (mu-cite-get-value): Save excursion while evaluating a function. (mu-cite-save-registration-file): New implementation. (mu-cite-load-registration-file): Likewise. (mu-cite-registration-file-modes): New user option. (mu-cite-registration-file-coding-system-for-write): Likewise. (mu-cite-registration-file-coding-system-for-read): Likewise. (TopLevel): Treat old variables and functions as obsolete. (TopLevel): Require `custom'. (TopLevel): Require `emu' for picking up `char-category' for XEmacs. (TopLevel): Require `poe' for picking up some macros, e.g. `with-temp-buffer', for old Emacsen. (TopLevel): Require `cl' at the compile time. (mu-cite-top-format, mu-cite-registration-file, mu-cite-prefix-format, mu-cite-pre-cite-hook, mu-cite-post-cite-hook, mu-cite-ml-count-field-list, mu-cite-load-hook, mu-cite-instantiation-hook, mu-cite-cited-prefix-regexp, mu-cite-allow-null-string-registration, citation-mark-chars, citation-disable-chars): Use `defcustom' instead of `defvar'. (mu-cite): New customization group. (mu-cite-original): Renamed from `mu-cite/cite-original'. (mu-cite-version, mu-cite-top-format, mu-cite-save-registration-file, mu-cite-registration-symbol, mu-cite-registration-file, mu-cite-prefix-format, mu-cite-pre-cite-hook, mu-cite-post-cite-hook, mu-cite-mu-cite.el, mu-cite-ml-count-field-list, mu-cite-minibuffer-history, mu-cite-methods-alist, mu-cite-make-methods, mu-cite-load-registration-file, mu-cite-instantiation-hook, mu-cite-get-value, mu-cite-get-prefix-register-verbose-method, mu-cite-get-prefix-register-method, mu-cite-get-prefix-method, mu-cite-get-ml-count-method, mu-cite-get-field-value-method-alist, mu-cite-get-field-value, mu-cite-get-citation-name, mu-cite-eval-format, mu-cite-default-methods-alist, mu-cite-cited-prefix-regexp, mu-cite-citation-name-alist, mu-cite-allow-null-string-registration, mu-cite-add-citation-name): Renamed from `mu-cite/*'. * MU-MK (compile-mu): Use `mu-modules-to-compile' instead of `mu-modules'. 1999-07-15 MORIOKA Tomohiko * mu-cite.el: Change Maintainer; change my address. 1999-07-15 MORIOKA Tomohiko * Makefile: Remove RCS magic cookie. * mu-cite.el: Likewise. * MU-MK: Likewise. * MU-CFG: Likewise. 1999-07-15 Masahiro Murata * mu-cite.el (mu-cite/eval-format): Add `save-excursion'. 1999-07-15 NAKAJI Hiroyuki * MU-CFG (load-path): Add "../apel" and "../flim". 1998-07-14 MORIOKA Tomohiko * mu-cite.el (detect-paragraph-cited-prefix): Use `cadr' instead of `second'. 1998-03-09 Shuhei KOBAYASHI * README.en (Bug reports): Modify description of tm mailing list. 1997-03-19 MORIOKA Tomohiko * MU: Version 0.40.2 was released. Tue Mar 18 15:07:56 1997 MORIOKA Tomohiko * mu-cite.el (mu-cite/get-field-value-method-alist): Setting for tm-mh-e was abolished. 1997-03-14 MORIOKA Tomohiko * MU: Version 0.40.1 was released. Fri Mar 14 07:29:06 1997 MORIOKA Tomohiko * Makefile, MU-MK, MU-CFG: New file. Mon Mar 10 06:13:17 1997 Shuhei KOBAYASHI * mu-cite.el (mu-cite/load-registration-file): New function. (mu-cite/save-registration-file): Renamed from `mu-cite/save-to-file'. 1997-03-03 MORIOKA Tomohiko * MU: Version 0.40 was released. 1997-03-03 Shuhei KOBAYASHI * std11.el (std11-addr-to-string): Enclose quoted-string with double-quote. 1997-02-03 MORIOKA Tomohiko * MU: Version 0.39.3 was released. Sat Feb 1 18:29:43 1997 MORIOKA Tomohiko * mu-cite.el (citation-disable-chars): New variable. (detect-paragraph-cited-prefix): Use variable `citation-disable-chars' for single line. * mu-cite.el (mu-cite/cited-prefix-regexp): Don't regard "<" as cited-prefix. 1997-01-31 MORIOKA Tomohiko * MU: Version 0.39.2 was released. Fri Jan 31 12:31:20 1997 MORIOKA Tomohiko * mu-cite.el (detect-paragraph-cited-prefix): check return value of `string-compare-from-top'. 1997-01-21 MORIOKA Tomohiko * MU: Version 0.39.1 was released. Fri Jan 17 05:11:03 1997 MORIOKA Tomohiko * latex-math-symbol.el (latex-math-decode-region): to avoid mismatching. Tue Jan 14 11:30:27 1997 MORIOKA Tomohiko * latex-math-symbol.el (latex-math-symbol-table-alist): Add more symbols. Thu Jan 9 18:01:23 1997 MORIOKA Tomohiko * mu-cite.el (detect-paragraph-cited-prefix): New function. (fill-cited-region): Use function `detect-paragraph-cited-prefix'. Variable `cited-prefix-regexp' was abolished. Tue Dec 17 13:07:54 1996 MORIOKA Tomohiko * MU: Version 0.39 was released. * MU-ELS (mu-modules-to-compile): Don't install tl-822.el. Tue Dec 17 12:06:15 1996 MORIOKA Tomohiko * std11.el (std11-full-name-string): Strip quoted-pair and return nil if phrase is null-string. Tue Dec 17 11:01:47 1996 MORIOKA Tomohiko * std11.el (std11-wrap-as-quoted-pairs): New function. (std11-wrap-as-quoted-string): Use function `std11-wrap-as-quoted-pairs'. Mon Dec 16 07:12:38 1996 MORIOKA Tomohiko * std11.el (std11-strip-quoted-pair): New implementation. Tue Dec 10 11:57:23 1996 Shuhei KOBAYASHI * MU: Version 0.36 was released. * mu-bbdb.el: Use `module-installed-p' instead of `eval-when'. Mon Dec 2 15:20:12 1996 Shuhei KOBAYASHI * std11.el (std11-unfold-string): Save LWSP-char. Thu Nov 28 19:38:27 1996 MORIOKA Tomohiko * std11-parse.el (std11-check-enclosure): Unused local variable `dest' was abolished. Fri Nov 22 08:44:27 1996 Shuhei KOBAYASHI * mu-bbdb.el: Byte-compile even if BBDB is not present. Tue Nov 19 07:08:47 1996 MORIOKA Tomohiko * std11.el (std11-strip-quoted-string): fixed. Wed Oct 16 00:14:50 1996 MORIOKA Tomohiko * MU: Version 0.34.1 was released. Thu Oct 3 05:02:32 1996 Katsumi Yamaoka * mu-cite.el (fill-cited-region): prefix should be checked by `cited-prefix-regexp'. (cf. [tm-ja:2106]) Tue Oct 1 13:33:32 1996 MORIOKA Tomohiko * MU: Version 0.34 was released. Tue Oct 1 13:30:22 1996 MORIOKA Tomohiko * std11-parse.el (std11-parse-ascii-token): Use function `find-non-ascii-charset-string' instead of `find-charset-string'. Sat Sep 28 10:34:12 1996 Shuhei KOBAYASHI * mu-cite.el (mu-cite/cited-prefix-regexp), (mu-cite/ml-count-field-list), (cited-prefix-regexp): Doc strings. (mu-cite-load-hook), (mu-cite/instantiation-hook): Explicitly defined. Thu Sep 26 04:51:47 1996 Shuhei KOBAYASHI * mu-cite.el (mu-cite/cite-original): regexp "^$\\|^-+$" was simplified to "^-*$". Tue Sep 17 07:03:39 1996 MORIOKA Tomohiko * mu-cite.el (fill-cited-region): fixed. Mon Sep 16 09:43:17 1996 MORIOKA Tomohiko * mu-cite.el (fill-cited-region): modified for mule merged EMACS. Sun Sep 15 09:27:25 1996 MORIOKA Tomohiko * MU: Version 0.33 was released. Sat Sep 14 08:44:17 1996 MORIOKA Tomohiko * tl-822.el (rfc822/strip-quoted-string): New alias; moved to std11.el. * std11.el (std11-strip-quoted-pair): New function; moved from tl-822.el. (std11-strip-quoted-string): New function; moved from tl-822.el. * tl-822.el: Constant `rfc822/linear-white-space-regexp' was abolished. Sun Sep 8 19:35:20 1996 MORIOKA Tomohiko * MU: Version 0.31 was released. * std11.el (std11-wrap-as-quoted-string): fixed typo. Sun Sep 8 18:09:42 1996 MORIOKA Tomohiko * tl-822.el (rfc822/wrap-as-quoted-string): New alias. Sun Sep 8 18:07:44 1996 MORIOKA Tomohiko * std11.el (std11-wrap-as-quoted-string): Renamed from `rfc822/wrap-as-quoted-string'. * tl-822.el (rfc822/qtext-regexp): Use variable `std11-non-qtext-char-list' instead of `rfc822/non-qtext-char-list'. * std11.el (std11-non-qtext-char-list): Renamed from `rfc822/non-qtext-char-list'. * std11.el (rfc822/non-qtext-char-list): New variable; moved from tl-822.el. (rfc822/wrap-as-quoted-string): New function; moved from tl-822.el. * tl-822.el: Function `rfc822/wrap-as-quoted-string' and variable `rfc822/non-qtext-char-list' were moved to std11.el. Tue Sep 3 09:49:49 1996 MORIOKA Tomohiko * MU: Version 0.27 was released. * std11-parse.el (std11-spaces-regexp): don't require top of line. (std11-analyze-spaces): check match-beginning is 0 or not. Tue Sep 3 09:22:23 1996 MORIOKA Tomohiko * std11.el (std11-extract-address-components): unfold. Mon Sep 2 16:03:43 1996 MORIOKA Tomohiko * MU-ELS: latex-math-symbol.el was moved from tl package. * MU-ELS: New file. Mon Sep 2 15:48:07 1996 MORIOKA Tomohiko * tl-822.el (rfc822/extract-address-components): New alias; moved to std11.el. * std11.el (std11-extract-address-components): New function; moved from tl-822.el. * std11.el, std11-parse.el, tl-822.el, mu-cite.el, mu-bbdb.el: moved from tl package. cvs-m17n-org-MU-CITE-146f893/MU-CFG000066400000000000000000000044671343543416600160660ustar00rootroot00000000000000;;; -*-Emacs-Lisp-*- ;; MU-CFG: installation setting about mu-cite. ;;; Code: (defvar default-load-path load-path) (condition-case nil (require 'poe);; Attempt to pickup the function `add-to-list'. (error (if (fboundp 'add-to-list) nil ;; This function is limited to only manage the value of ;; `load-path'. It will be overridden by the proper one later. (defun add-to-list (list-var element) (let ((paths (mapcar 'intern (delq nil (symbol-value list-var)))) (elem (if (string-match "/$" element) (substring element 0 (1- (length element))) element))) (or (memq (intern elem) paths) (memq (intern (concat elem "/")) paths) (set list-var (cons element (symbol-value list-var)))))) (put 'add-to-list 'defun-maybe t)))) ;;; @ Please correct the directories where APEL or FLIM modules are ;;; installed. (add-to-list 'load-path (expand-file-name "../../site-lisp/apel" data-directory)) (add-to-list 'load-path (expand-file-name "../../site-lisp/flim" data-directory)) (if (boundp 'LISPDIR) (progn (add-to-list 'default-load-path LISPDIR) (add-to-list 'load-path LISPDIR) (add-to-list 'load-path (expand-file-name "emu" LISPDIR)) (add-to-list 'load-path (expand-file-name "apel" LISPDIR)) (add-to-list 'load-path (expand-file-name "flim" LISPDIR)) )) (if (boundp 'VERSION_SPECIFIC_LISPDIR) (add-to-list 'load-path VERSION_SPECIFIC_LISPDIR)) (require 'install) (add-latest-path "custom") (add-path default-directory) ;;; @ Please specify prefix of install directory. ;;; ;; Please specify install path prefix. ;; If it is omitted, shared directory (maybe /usr/local is used). (defvar PREFIX install-prefix) ;;(setq PREFIX "~/") ;; Please specify prefix for ``mu'' [optional] (setq MU_PREFIX "mu") ;;; @ optional settings ;;; ;; It is generated by automatically. Please set variable `PREFIX'. ;; If you don't like default directory tree, please set it. (defvar LISPDIR (install-detect-elisp-directory PREFIX)) ;; (setq install-default-elisp-directory "~/lib/emacs/lisp") (defvar VERSION_SPECIFIC_LISPDIR (install-detect-elisp-directory PREFIX nil 'version-specific)) (setq MU_DIR (expand-file-name MU_PREFIX LISPDIR)) (defvar PACKAGEDIR (install-get-default-package-directory)) ;;; MU-CFG ends here cvs-m17n-org-MU-CITE-146f893/MU-ELS000066400000000000000000000011011343543416600160700ustar00rootroot00000000000000;;; -*-Emacs-Lisp-*- ;; MU-ELS: list of mu-cite modules to install ;;; Code: (setq mu-modules-to-compile '(mu-cite mu-register)) (if (featurep 'mule) (setq mu-modules-to-compile (cons 'latex-math-symbol mu-modules-to-compile)) ) (setq mu-modules-not-to-compile nil) (if (file-installed-p "bbdb.el") (setq mu-modules-to-compile (nconc mu-modules-to-compile '(mu-bbdb))) (setq mu-modules-not-to-compile (nconc mu-modules-not-to-compile '(mu-bbdb))) ) (setq mu-modules (append mu-modules-to-compile mu-modules-not-to-compile)) ;;; MU-ELS ends here cvs-m17n-org-MU-CITE-146f893/MU-MK000066400000000000000000000064351343543416600157730ustar00rootroot00000000000000;;; -*-Emacs-Lisp-*- ;; MU-MK: installer for mu-cite. ;;; Code: (defun config-mu () (let (prefix lisp-dir version-specific-lisp-dir) (and (setq prefix (car command-line-args-left)) (or (string-equal "NONE" prefix) (defvar PREFIX prefix))) (setq command-line-args-left (cdr command-line-args-left)) (and (setq lisp-dir (car command-line-args-left)) (or (string-equal "NONE" lisp-dir) (defvar LISPDIR lisp-dir))) (setq command-line-args-left (cdr command-line-args-left)) (and (setq version-specific-lisp-dir (car command-line-args-left)) (or (string-equal "NONE" version-specific-lisp-dir) (progn (defvar VERSION_SPECIFIC_LISPDIR version-specific-lisp-dir) (princ (format "VERSION_SPECIFIC_LISPDIR=%s\n" VERSION_SPECIFIC_LISPDIR))))) (setq command-line-args-left (cdr command-line-args-left)) (load-file "MU-CFG") (load-file "MU-ELS") (princ (format "PREFIX=%s LISPDIR=%s\n" PREFIX LISPDIR)))) (defun compile-mu () (config-mu) (compile-elisp-modules mu-modules-to-compile ".")) (defun install-mu () (config-mu) (install-elisp-modules mu-modules "./" MU_DIR)) (defun config-mu-package () (let (package-dir) (and (setq package-dir (car command-line-args-left)) (or (string= "NONE" package-dir) (defvar PACKAGEDIR package-dir))) (setq command-line-args-left (cdr command-line-args-left)) (load-file "MU-CFG") (load-file "MU-ELS") (setq mu-modules-to-compile (append mu-modules-to-compile '(auto-autoloads custom-load))) (setq mu-modules (append mu-modules-to-compile mu-modules-not-to-compile)) (princ (format "PACKAGEDIR=%s\n" PACKAGEDIR)))) (defun compile-mu-package () (config-mu-package) (if (fboundp 'batch-update-directory-autoloads) ;; XEmacs 21.5.19 and newer. (progn (add-to-list 'command-line-args-left ".") (add-to-list 'command-line-args-left "mu") (batch-update-directory-autoloads)) (setq autoload-package-name "mu") (add-to-list 'command-line-args-left ".") (batch-update-directory)) (add-to-list 'command-line-args-left ".") (Custom-make-dependencies) (compile-elisp-modules mu-modules-to-compile ".")) (defun install-mu-package () (config-mu-package) (install-elisp-modules mu-modules "./" (expand-file-name MU_PREFIX (expand-file-name "lisp" PACKAGEDIR)))) (load "bytecomp" nil t) (if (fboundp 'byte-compile-file-form-custom-declare-variable) nil ;; Bind defcustom'ed variables when byte-compiling. (put 'custom-declare-variable 'byte-hunk-handler 'byte-compile-file-form-custom-declare-variable) (defun byte-compile-file-form-custom-declare-variable (form) (if (memq 'free-vars byte-compile-warnings) (setq byte-compile-bound-variables (cons (nth 1 (nth 1 form)) byte-compile-bound-variables))) form)) (cond ((featurep 'xemacs) ;; Shut up! (setq byte-compile-warnings (delq 'unused-vars (copy-sequence byte-compile-default-warnings)))) ((and (boundp 'emacs-major-version) (or (> emacs-major-version 20) (and (eq emacs-major-version 20) (>= emacs-minor-version 3)))) ;; Compiler macro for replacing `sref' with `aref'. (put 'sref 'byte-optimizer (lambda (form) (cons 'aref (cdr form)))))) ;;; MU-MK ends here cvs-m17n-org-MU-CITE-146f893/Makefile000066400000000000000000000030641343543416600166550ustar00rootroot00000000000000# # Makefile for mu-cite. # PACKAGE = mu-cite API = 8 RELEASE = 1 TAR = tar RM = /bin/rm -f CP = /bin/cp -p EMACS = emacs XEMACS = xemacs FLAGS = -batch -q -no-site-file -l MU-MK PREFIX = NONE LISPDIR = NONE PACKAGEDIR = NONE VERSION_SPECIFIC_LISPDIR = NONE GOMI = *.elc auto-autoloads.el custom-load.el \ *.cp *.cps *.ky *.kys *.fn *.fns *.vr *.vrs \ *.pg *.pgs *.tp *.tps *.toc *.aux *.log FILES = README.?? Makefile MU-MK MU-CFG MU-ELS *.el ChangeLog VERSION = $(API).$(RELEASE) ARC_DIR = /pub/elisp/mu elc: $(EMACS) $(FLAGS) -f compile-mu $(PREFIX) $(LISPDIR) \ $(VERSION_SPECIFIC_LISPDIR) install: elc $(EMACS) $(FLAGS) -f install-mu $(PREFIX) $(LISPDIR) \ $(VERSION_SPECIFIC_LISPDIR) package: $(XEMACS) $(FLAGS) -f compile-mu-package $(PACKAGEDIR) install-package: package $(XEMACS) $(FLAGS) -f install-mu-package $(PACKAGEDIR) clean: -$(RM) $(GOMI) tar: cvs commit sh -c 'cvs tag -RF $(PACKAGE)-`echo $(VERSION) | tr . _`; \ cd /tmp; \ cvs -d :pserver:anonymous@cvs.m17n.org:/cvs/root \ export -d $(PACKAGE)-$(VERSION) \ -r $(PACKAGE)-`echo $(VERSION) | tr . _` \ mu' cd /tmp; $(RM) $(PACKAGE)-$(VERSION)/ftp.in ; \ $(TAR) cvzf $(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)-$(VERSION) cd /tmp; $(RM) -r $(PACKAGE)-$(VERSION) sed "s/VERSION/$(VERSION)/" < ftp.in | sed "s/API/$(API)/" \ | sed "s/PACKAGE/$(PACKAGE)/" > ftp invoice: sed "s/VERSION/$(VERSION)/" < ftp.in | sed "s/API/$(API)/" \ | sed "s/PACKAGE/$(PACKAGE)/" > ftp release: -$(RM) $(ARC_DIR)/$(PACKAGE)-$(VERSION).tar.gz mv /tmp/$(PACKAGE)-$(VERSION).tar.gz $(ARC_DIR) cvs-m17n-org-MU-CITE-146f893/NEWS000066400000000000000000000071731343543416600157210ustar00rootroot00000000000000MU-CITE NEWS -- history of major-changes. Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. * Changes in MU-CITE 8.2 ======================== ** New user option `mu-registration-file-coding-system-for-write' which is used when writing a registration file. The default value is `iso-2022-7bit'. Note that you should never set the value of the variable `mu-registration-file-coding-system-for-read' (which was formerly customizable) if you have no particular reason. ** MU-CITE now supports X-Cite-Me header as well as X-Attribution. ** New user option `fill-column-for-fill-cited-region' specifies an integer value to override `fill-column' while `fill-cited-region' is being executed. * Changes in MU-CITE 8.1 ======================== ** The obsolete variables and functions are ignored Don't use the following variables and functions: mu-cite/cited-prefix-regexp mu-cite/default-methods-alist mu-cite/get-field-value-method-alist mu-cite/instantiation-hook mu-cite/ml-count-field-list mu-cite/post-cite-hook mu-cite/pre-cite-hook mu-cite/prefix-format mu-cite/top-format mu-cite/registration-file mu-cite/allow-null-string-registration mu-cite/registration-symbol mu-cite/cite-original mu-cite/get-field-value mu-cite/get-value * Changes in MU-CITE 8.0 ======================== ** Requires APEL 9.20 or later ** Requires FLIM 1.12.2 or later ** Text properties in the registration file is not recommended If you are using Emacs v19, e.g. Mule 2.3, and if you find text properties as below in your registration file (~/.mu-cite.el in default): ("foo@bar.com" . #("Foo" 0 3 (face bold))) please copy the following program in *scratch* buffer and type C-j key after the end of parenthesis for cleaning up the sort of things. (progn (require 'mu-register) (mu-cite-load-registration-file) (mu-cite-save-registration-file) ) ** New user option `mu-registration-file-modes' Mode bits of `mu-registration-file', as an integer. ** New user option `mu-registration-file-coding-system-for-read' Coding system used when reading a registration file. ** Name of functions and variables have been changed The main changes are as follows: User options: mu-cite-cited-prefix-regexp <- mu-cite/cited-prefix-regexp mu-cite-prefix-format <- mu-cite/prefix-format mu-cite-top-format <- mu-cite/top-format mu-cite-instantiation-hook <- mu-cite/instantiation-hook mu-cite-pre-cite-hook <- mu-cite/pre-cite-hook mu-cite-post-cite-hook <- mu-cite/post-cite-hook mu-cite-ml-count-field-list <- mu-cite/ml-count-field-list mu-cite-default-methods-alist <- mu-cite/default-methods-alist mu-registration-file <- mu-cite/registration-file mu-cite-allow-null-string-registration <- mu-cite/allow-null-string-registration Functions: mu-cite-original <- mu-cite/cite-original mu-cite-get-field-value <- mu-cite/get-field-value mu-cite-get-value <- mu-cite/get-value mu-cite-load-registration-file<- mu-cite/load-registration-file mu-cite-save-registration-file<- mu-cite/save-registration-file mu-cite-get-prefix-method <- mu-cite/get-prefix-method mu-cite-get-prefix-register-method <- mu-cite/get-prefix-register-method mu-cite-get-prefix-register-verbose-method <- mu-cite/get-prefix-register-verbose-method mu-bbdb-get-prefix-method <- mu-cite/get-bbdb-prefix-method mu-bbdb-get-prefix-register-method <- mu-cite/get-bbdb-prefix-register-method mu-bbdb-get-prefix-register-verbose-method <- mu-cite/get-bbdb-prefix-register-verbose-method ** New file mu-register.el which is re-separated from mu-cite.el Local variables: mode: outline paragraph-separate: "[ ]*$" end: cvs-m17n-org-MU-CITE-146f893/README.en000066400000000000000000000067361343543416600165070ustar00rootroot00000000000000[README for MU (English Version)] by MORIOKA Tomohiko What's MU ========= MU stands for "Message Utilities". It consists of following modules: mu-cite: a citation utility mu-cite.el --- main module of mu-cite mu-bbdb.el --- mu-cite submodule for BBDB mu-register.el --- mu-cite submodule for registration latex-math-symbol.el --- translate mathematical symbols of LaTeX into MULE characters It requires two packages APEL 10.7 or later and FLIM 1.12.2 or later. Please install them. Installation ============ (a) run in expanded place If you don't want to install other directories, please do only following: % make You can specify the emacs command name, for example % make install EMACS=xemacs If `EMACS=...' is omitted, EMACS=emacs is used. (b) make install If you want to install other directories, please do following: % make install You can specify the emacs command name, for example % make install EMACS=xemacs If `EMACS=...' is omitted, EMACS=emacs is used. You can specify the prefix of the directory tree for Emacs Lisp programs and shell scripts, for example: % make install PREFIX=~/ If `PREFIX=...' is omitted, the prefix of the directory tree of the specified emacs command is used (perhaps /usr/local). For example, if PREFIX=/usr/local and EMACS 19.34 is specified, it will create the following directory tree: /usr/local/share/emacs/site-lisp/mu/ --- MU You can specify site-lisp directory, for example: % make install LISPDIR=~/share/emacs/lisp If `LISPDIR=...' is omitted, site-lisp directory of the specified emacs command is used (perhaps /usr/local/share/emacs/site-lisp or /usr/local/lib/xemacs/site-lisp). If the emu modules (included in APEL package) have been installed in the non-standard directory, you should specify where they will be found, for example: % make install VERSION_SPECIFIC_LISPDIR=~/elisp You can specify other optional settings by editing the file MU-CFG. Please read comments in it. (c) install as a XEmacs package If you want to install to XEmacs package directory, please do following: % make install-package You can specify the XEmacs command name, for example % make install-package XEMACS=xemacs-21 If `XEMACS=...' is omitted, XEMACS=xemacs is used. You can specify the package directory, for example: % make install PACKAGEDIR=~/.xemacs If `PACKAGEDIR=...' is omitted, the first existing package directory is used. Notice that XEmacs package system requires XEmacs 21.0 or later. load-path (for Emacs or MULE) ============================= If you are using Emacs or Mule, please add directory of mu to load-path. If you install by default setting, you can write subdirs.el for example: -------------------------------------------------------------------- (normal-top-level-add-to-load-path '("apel" "flim" "mu")) -------------------------------------------------------------------- If you are using XEmacs, there are no need of setting about load-path. CVS based development ===================== If you would like to join CVS based development, please send mail to cvs@cvs.m17n.org with your account name and your public key for ssh. cvsroot is :ext:cvs@cvs.m17n.org:/cvs/root. If you cannot use ssh, please send UNIX /etc/passwd style crypted password. you can commit with the cvsroot :pserver:@cvs.m17n.org:/cvs/root. We hope you will join the open development. cvs-m17n-org-MU-CITE-146f893/ftp.in000066400000000000000000000005331343543416600163340ustar00rootroot00000000000000--<>-{ It is available from ftp://ftp.jpl.org/pub/elisp/mu --[[message/external-body; access-type=anon-ftp; site="ftp.jpl.org"; directory="/pub/elisp/mu"; name="PACKAGE-VERSION.tar.gz"; mode=image]] Content-Type: application/octet-stream; name="PACKAGE-VERSION.tar.gz"; type=tar; conversions=gzip --}-<> cvs-m17n-org-MU-CITE-146f893/latex-math-symbol.el000066400000000000000000000137741343543416600211170ustar00rootroot00000000000000;;; latex-math-symbol.el --- LaTeX math symbol decoder ;; Copyright (C) 1996,1997 MORIOKA Tomohiko ;; Author: MORIOKA Tomohiko ;; Created: 1996/7/1 ;; Version: ;; $Id: latex-math-symbol.el,v 1.3 1997/01/14 11:30:27 morioka Exp morioka $ ;; Keywords: LaTeX, math, mule ;; This file is part of MU (Message Utilities). ;; This program is free software; you can redistribute it and/or ;; modify it under the terms of the GNU General Public License as ;; published by the Free Software Foundation; either version 2, or (at ;; your option) any later version. ;; This program is distributed in the hope that it will be useful, but ;; WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ;; General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs; see the file COPYING. If not, write to the ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;; - How to install ;; bytecompile this file and copy it to the apropriate directory. ;; - How to use ;; If you use tm, please put following to your ~/.emacs: ;; (autoload 'latex-math-decode-buffer "latex-math-symbol" nil t) ;; (add-hook 'mime-viewer/plain-text-preview-hook ;; 'latex-math-decode-buffer) ;; Of course, it may be available for other hooks to filter messages. ;;; Code: (defvar latex-math-symbol-table-alist '(("\\alpha" . ",Fa(B") ("\\beta" . ",Fb(B") ("\\gamma" . ",Fc(B")("\\Gamma" . "$B&#(B") ("\\delta" . ",Fd(B")("\\Delta" . "$B&$(B") ("\\epsilon" . ",Fe(B")("\\varepsilon" . "$B&E(B") ("\\zeta" . ",Ff(B") ("\\eta" . ",Fg(B") ("\\theta" . ",Fh(B")("\\Theta" . "$B&((B") ("\\iota" . ",Fi(B") ("\\kappa" . ",Fj(B") ("\\lambda" . ",Fk(B")("\\Lambda" . "$B&+(B") ("\\mu" . ",Fl(B") ("\\nu" . ",Fm(B") ("\\xi" . ",Fn(B")("\\Xi" . "$B&.(B") ("\\pi" . ",Fp(B")("\\Pi" . "$B&0(B") ("\\rho" . ",Fq(B") ("\\sigma" . ",Fs(B")("\\Sigma" . "$B&2(B") ("\\varsigma" . ",Fr(B") ("\\tau" . ",Ft(B") ("\\upsilon" . ",Fu(B")("\\Upsilon" . "$B&4(B") ("\\phi" . "$B&U(B")("\\Phi" . "$B&5(B") ("\\varphi" . ",Fv(B") ("\\chi" . ",Fw(B") ("\\psi" . ",Fx(B")("\\Psi" . "$B&7(B") ("\\omega" . ",Fy(B")("\\Omega" . "$B&8(B") ("\\{" . "$B!P(B")("\\}" . "$B!Q(B") ("\\langle\\!\\langle" . "$B!T(B")("\\rangle\\!\\rangle" . "$B!U(B") ("\\langle" . "$B!R(B")("\\rangle" . "$B!S(B") ("\\cdots" . "$B!D(B") ("\\ln" . "$(G"L(B") ("\\log" . "$(G"K(B") ("\\pm" . "$B!^(B") ("\\cdot" . "$B!&(B") ("\\times" . "$B!_(B")("\\ast" . "$B!v(B") ("\\star" . "$B!z(B") ("\\bullet" . "$B!&(B") ("\\div" . "$B!`(B") ("\\cap" . "$B"A(B")("\\cup" . "$B"@(B") ("\\lhd" . "$(C"7(B")("\\rhd" . "$(C"9(B") ("\\bigcirc" . "$B"~(B") ("\\vee" . "$B"K(B")("\\lor" . "$B"K(B") ("\\wedge" . "$B"J(B")("\\land" . "$B"J(B") ("\\oplus" . "$(G"S(B") ("\\odot" . "$(G"T(B") ("\\dagger" . "$B"w(B")("\\ddagger" . "$B"x(B") ("\\leq" . "$(C!B(B")("\\geq" . "$(C!C(B") ("\\le" . "$(C!B(B")("\\ge" . "$(C!C(B") ("\\ll" . "$B"c(B")("\\gg" . "$B"d(B") ("\\subseteq" . "$B"<(B")("\\supseteq" . "$B"=(B") ("\\subset" . "$B">(B")("\\supset" . "$B"?(B") ("\\in" . "$B":(B") ("\\ni" . "$B";(B")("\\owns" . "$B";(B") ("\\frown" . "$B"^(B") ("\\mid" . "$B!C(B")("\\parallel" . "$B!B(B") ("\\sim" . "$B!A(B") ("\\equiv" . "$B"a(B") ("\\approx" . "$A!V(B") ("\\not=" . "$B!b(B") ("\\neq" . "$B!b(B")("\\ne" . "$B!b(B") ("\\perp" . "$B"](B") ("\\triangleup" . "$B"$(B") ("\\forall" . "$B"O(B") ("\\hbar" . ",C1(B")("\\imath" . ",C9(B") ("\\ell" . "$(C'$(B") ("\\partial" . "$B"_(B") ("\\infty" . "$B!g(B") ("\\smallint" . "$B"i(B") ("\\P" . "$B"y(B") ("\\prime" . "$B!l(B") ("\\nabla" . "$B"`(B") ("\\top" . "$(D0#(B")("\\bot" . "$(D0"(B") ("\\vert" . "$B!C(B")("\\Vert" . "$B!B(B") ("\\angle" . "$B"\(B") ("\\triangle" . "$B"$(B") ("\\backslash" . "$B!@(B") ("\\S" . "$B!x(B") ("\\forall" . "$B"O(B") ("\\exists" . "$B"P(B") ("\\neg" . "$B"L(B")("\\lnot" . "$B"L(B") ("\\flat" . "$B"u(B")("\\sharp" . "$B"t(B") ("\\clubsuit" . "$(C"@(B") ("\\diamondsuit" . "$B!~(B") ("\\heartsuit" . "$(C"=(B") ("\\spadesuit" . "$(C"<(B") ("\\leftarrow" . "$B"+(B")("\\rightarrow" . "$B"*(B") ("\\gets" . "$B"+(B")("\\to" . "$B"*(B") ("^1" . ",A9(B")("^{1}" . ",A9(B") ("^2" . ",A2(B")("^{2}" . ",A2(B") ("^3" . ",A3(B")("^{3}" . ",A3(B") ("^4" . "$(C)y(B")("^{4}" . "$(C)y(B") ("^n" . "$(C)z(B")("^{n}" . "$(C)z(B") ("_1" . "$(C){(B")("_{1}" . "$(C){(B") ("_2" . "$(C)|(B")("_{2}" . "$(C)|(B") ("_3" . "$(C)}(B")("_{3}" . "$(C)}(B") ("_4" . "$(C)~(B")("_{4}" . "$(C)~(B") )) ;;;###autoload (defun latex-math-decode-region (beg end) (interactive "r") (save-restriction (narrow-to-region beg end) (let ((rest latex-math-symbol-table-alist) (case-fold-search nil) cell) (while rest (setq cell (car rest)) (goto-char beg) (while (re-search-forward (concat "\\(" (regexp-quote (car cell)) "\\)\\([^a-zA-Z]\\|$\\)") nil t) (delete-region (match-beginning 1)(match-end 1)) (goto-char (match-beginning 0)) (insert (cdr cell)) ) (setq rest (cdr rest)) )))) ;;;###autoload (defun latex-math-decode-buffer () (interactive) (latex-math-decode-region (point-min)(point-max)) ) ;;; @ end ;;; (provide 'latex-math-symbol) ;;; latex-math-symbol.el ends here cvs-m17n-org-MU-CITE-146f893/mu-bbdb.el000066400000000000000000000100061343543416600170410ustar00rootroot00000000000000;;; mu-bbdb.el --- registration feature of mu-cite using BBDB ;; Copyright (C) 1995,1996,1997,1998,1999 Free Software Foundation, Inc. ;; Author: Shuhei KOBAYASHI ;; Maintainer: Katsumi Yamaoka ;; Keywords: BBDB, citation, mail, news ;; This file is part of MU (Message Utilities). ;; 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., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Code: (require 'mu-cite) (require 'bbdb) (defvar mu-bbdb-history nil) ;;; @ BBDB interface ;;; (defun mu-bbdb-get-attr (addr) "Extract attribute information from BBDB." (let ((record (bbdb-search-simple nil addr))) (if record (bbdb-record-getprop record 'attribution)))) (defun mu-bbdb-set-attr (attr addr) "Add attribute information to BBDB." (let* ((bbdb-notice-hook nil) (record (bbdb-annotate-message-sender addr t (bbdb-invoke-hook-for-value bbdb/mail-auto-create-p) t))) (if record (progn (bbdb-record-putprop record 'attribution attr) (bbdb-change-record record nil))))) ;;; @ methods ;;; ;;;###autoload (defun mu-bbdb-get-prefix-method () "A mu-cite method to return a prefix from BBDB or \">\". If an `attribution' value is found in BBDB, the value is returned. Otherwise \">\" is returned. Notice that please use (mu-cite-get-value 'bbdb-prefix) instead of call the function directly." (or (mu-bbdb-get-attr (mu-cite-get-value 'address)) ">")) ;;;###autoload (defun mu-bbdb-get-prefix-register-method () "A mu-cite method to return a prefix from BBDB or register it. If an `attribution' value is found in BBDB, the value is returned. Otherwise the function requests a prefix from a user. The prefix will be registered to BBDB if the user wants it. Notice that please use (mu-cite-get-value 'bbdb-prefix-register) instead of call the function directly." (let ((addr (mu-cite-get-value 'address))) (or (mu-bbdb-get-attr addr) (let* ((minibuffer-allow-text-properties nil) (return (mu-cite-remove-text-properties (read-string "Citation name? " (or (mu-cite-get-value 'x-attribution) (mu-cite-get-value 'x-cite-me) (mu-cite-get-value 'full-name)) 'mu-bbdb-history)))) (if (and (not (string-equal return "")) (y-or-n-p (format "Register \"%s\"? " return))) (mu-bbdb-set-attr return addr)) return)))) ;;;###autoload (defun mu-bbdb-get-prefix-register-verbose-method () "A mu-cite method to return a prefix using BBDB. In this method, a user must specify a prefix unconditionally. If an `attribution' value is found in BBDB, the value is used as a initial value to input the prefix. The prefix will be registered to BBDB if the user wants it. Notice that please use (mu-cite-get-value 'bbdb-prefix-register-verbose) instead of call the function directly." (let* ((addr (mu-cite-get-value 'address)) (attr (mu-bbdb-get-attr addr)) (minibuffer-allow-text-properties nil) (return (mu-cite-remove-text-properties (read-string "Citation name? " (or attr (mu-cite-get-value 'x-attribution) (mu-cite-get-value 'x-cite-me) (mu-cite-get-value 'full-name)) 'mu-bbdb-history)))) (if (and (not (string-equal return "")) (not (string-equal return attr)) (y-or-n-p (format "Register \"%s\"? " return))) (mu-bbdb-set-attr return addr)) return)) ;;; @ end ;;; (provide 'mu-bbdb) (run-hooks 'mu-bbdb-load-hook) ;;; mu-bbdb.el ends here cvs-m17n-org-MU-CITE-146f893/mu-cite.el000066400000000000000000000474471343543416600171170ustar00rootroot00000000000000;;; mu-cite.el --- yet another citation tool for GNU Emacs ;; Copyright (C) 1995-2001, 2005, 2007, 2012, 2014, 2018, 2019 ;; Free Software Foundation, Inc. ;; Author: MORIOKA Tomohiko ;; Shuhei KOBAYASHI ;; Maintainer: Katsumi Yamaoka ;; Keywords: mail, news, citation ;; This file is part of MU (Message Utilities). ;; This program is free software; you can redistribute it and/or ;; modify it under the terms of the GNU General Public License as ;; published by the Free Software Foundation; either version 2, or (at ;; your option) any later version. ;; This program is distributed in the hope that it will be useful, but ;; WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ;; General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs; see the file COPYING. If not, write to the ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;; - How to use ;; 1. Bytecompile this file and copy it to the apropriate directory. ;; 2. Put the following lines in your ~/.emacs file: ;; For EMACS 19 or later and XEmacs ;; (autoload 'mu-cite-original "mu-cite" nil t) ;; ;; for all but message-mode ;; (add-hook 'mail-citation-hook (function mu-cite-original)) ;; ;; for message-mode only ;; (setq message-cite-function (function mu-cite-original)) ;; For EMACS 18 ;; ;; for all but mh-e ;; (add-hook 'mail-yank-hooks (function mu-cite-original)) ;; ;; for mh-e only ;; (add-hook 'mh-yank-hooks (function mu-cite-original)) ;;; Code: ;; For picking up the macros `char-next-index', `with-temp-buffer', etc. (require 'poem) (require 'pcustom) (require 'std11) (require 'alist) (autoload 'mu-cite-get-prefix-method "mu-register") (autoload 'mu-cite-get-prefix-register-method "mu-register") (autoload 'mu-cite-get-prefix-register-verbose-method "mu-register") (autoload 'mu-cite-get-no-prefix-register-verbose-method "mu-register") (autoload 'mu-bbdb-get-prefix-method "mu-bbdb") (autoload 'mu-bbdb-get-prefix-register-method "mu-bbdb") (autoload 'mu-bbdb-get-prefix-register-verbose-method "mu-bbdb") ;;; @ version ;;; (defconst mu-cite-version "8.1") ;;; @ macro ;;; (defmacro mu-cite-remove-text-properties (string) "Remove text properties from STRING which is read from minibuffer." (cond ((featurep 'xemacs) `(let ((string (copy-sequence ,string))) (map-extents (function (lambda (extent maparg) (delete-extent extent))) string 0 (length string)) string)) ((or (boundp 'minibuffer-allow-text-properties);; Emacs 20.1 or later. (not (fboundp 'set-text-properties)));; under Emacs 19.7. string) (t `(let ((string (copy-sequence ,string))) (set-text-properties 0 (length string) nil string) string)))) ;;; @ set up ;;; (defgroup mu-cite nil "Yet another citation tool for GNU Emacs." :prefix "mu-cite-" :group 'mail :group 'news) (defvar mu-cite-default-methods-alist (list (cons 'from (function (lambda () (mu-cite-get-field-value "From")))) (cons 'date (function (lambda () (mu-cite-get-field-value "Date")))) (cons 'message-id (function (lambda () (mu-cite-get-field-value "Message-Id")))) (cons 'subject (function (lambda () (mu-cite-get-field-value "Subject")))) (cons 'ml-name (function (lambda () (mu-cite-get-field-value "X-Ml-Name")))) (cons 'ml-count (function mu-cite-get-ml-count-method)) (cons 'address-structure (function (lambda () (car (std11-parse-address-string (mu-cite-get-value 'from)))))) (cons 'full-name (function (lambda () (std11-full-name-string (mu-cite-get-value 'address-structure))))) (cons 'address (function (lambda () (std11-address-string (mu-cite-get-value 'address-structure))))) (cons 'id (function (lambda () (let ((ml-name (mu-cite-get-value 'ml-name)) (ml-count (mu-cite-get-value 'ml-count))) (if ml-name (concat "[" ml-name (if ml-count (concat " : No." ml-count)) "]") (mu-cite-get-value 'message-id)))))) (cons 'in-id (function (lambda () (let ((id (mu-cite-get-value 'id))) (if id (format ">>>>> In %s \n" id) ""))))) (cons 'x-attribution (function (lambda () (mu-cite-get-field-value "X-Attribution")))) (cons 'x-cite-me (function (lambda () (mu-cite-get-field-value "X-Cite-Me")))) (cons 'top-posting (function mu-cite-get-original-header)) ;; mu-register (cons 'prefix (function mu-cite-get-prefix-method)) (cons 'prefix-register (function mu-cite-get-prefix-register-method)) (cons 'prefix-register-verbose (function mu-cite-get-prefix-register-verbose-method)) (cons 'no-prefix-register-verbose (function mu-cite-get-no-prefix-register-verbose-method)) ;; mu-bbdb (cons 'bbdb-prefix (function mu-bbdb-get-prefix-method)) (cons 'bbdb-prefix-register (function mu-bbdb-get-prefix-register-method)) (cons 'bbdb-prefix-register-verbose (function mu-bbdb-get-prefix-register-verbose-method)) )) ;;; @ formats ;;; (defcustom mu-cite-cited-prefix-regexp "\\(^[^ \t\n<>]+>+[ \t]*\\|^[ \t]*$\\)" "Regexp to match the citation prefix. If match, mu-cite doesn't insert citation prefix." :type 'regexp :group 'mu-cite) (defcustom mu-cite-prefix-format '(prefix-register-verbose "> ") "List to represent citation prefix. Each elements must be a string or a method name." :type (list 'repeat (list 'group :convert-widget (function (lambda (widget) (list 'choice :tag "Method or String" :args (nconc (mapcar (function (lambda (elem) (list 'choice-item (car elem)))) mu-cite-default-methods-alist) '((symbol :tag "Method") (const :tag "-" nil) (choice-item :tag "String: \"> \"" "> ") (string)))))))) :set (function (lambda (symbol value) (set-default symbol (delq nil value)))) :group 'mu-cite) (defcustom mu-cite-top-format '(in-id ">>>>>\t" from " wrote:\n") "List to represent top string of citation. Each elements must be a string or a method name." :type (list 'repeat (list 'group :convert-widget (function (lambda (widget) (list 'choice :tag "Method or String" :args (nconc (mapcar (function (lambda (elem) (list 'choice-item (car elem)))) mu-cite-default-methods-alist) '((symbol :tag "Method") (const :tag "-" nil) (choice-item :tag "String: \">>>>>\\t\"" ">>>>>\t") (choice-item :tag "String: \" wrote:\\n\"" " wrote:\n") (string :tag "String")))))))) :set (function (lambda (symbol value) (set-default symbol (delq nil value)))) :group 'mu-cite) ;;; @ hooks ;;; (defcustom mu-cite-instantiation-hook nil "List of functions called just before narrowing to the message." :type 'hook :group 'mu-cite) (defcustom mu-cite-pre-cite-hook nil "List of functions called before citing a region of text." :type 'hook :group 'mu-cite) (defcustom mu-cite-post-cite-hook nil "List of functions called after citing a region of text." :type 'hook :group 'mu-cite) ;;; @ field ;;; (defvar mu-cite-get-field-value-method-alist nil "Alist major-mode vs. function to get field-body of header.") (defun mu-cite-get-field-value (name) "Return the value of the header field NAME. If the field is not found in the header, a method function which is registered in variable `mu-cite-get-field-value-method-alist' is called." (or (std11-field-body name) (let ((method (assq major-mode mu-cite-get-field-value-method-alist))) (if method (funcall (cdr method) name))))) ;;; @ top-posting ;;; (defun mu-cite-get-original-header () "Return an original header used with the M$ O*tlook-style top-posting. You can use the top-posting style with this most simple way: (setq mu-cite-prefix-format nil) (setq mu-cite-top-format '(top-posting)) But it might not necessarily be convenient as the case may be. If you want to use it for only replying to [1]certain recipients, or [2]those who use the top-posting style, try this: \(add-hook 'mu-cite-pre-cite-hook (lambda () (let ((last-point (point)) (case-fold-search nil)) (goto-char (point-min)) (if (or ;; [1]certain recipients (an address contains \"co.jp\") (save-excursion (save-restriction (std11-narrow-to-header) (string-match \"\\\\Wco\\\\.jp\\\\(\\\\W\\\\|\\\\'\\\\)\" (or (std11-fetch-field \"from\") \"\")))) ;; [2]those who use the top-posting style (re-search-forward \"\\n-----Original Message-----\\nFrom:\" nil t) ;; [3]the last resort (y-or-n-p \"Use top-posting? \")) (progn (set (make-local-variable 'mu-cite-prefix-format) nil) (set (make-local-variable 'mu-cite-top-format) '(top-posting)))) (goto-char last-point)))) This is just an example; modify it to make it suitable to your taste." (save-excursion (let ((case-fold-search t) cont rest) (save-restriction (std11-narrow-to-header) (dolist (field '("from" "date" "to" "cc" "subject")) (goto-char (point-min)) (if (re-search-forward (concat "^" field ":") nil t) (progn (setq cont (replace-regexp-in-string "\"\"+" "\"" (subst-char-in-string ?' ?\" (replace-regexp-in-string " \\'" "" (replace-regexp-in-string "[\t\n\r ]+" " " (buffer-substring-no-properties (match-beginning 0) (std11-field-end))))))) ;; Make it compatible with M$ O*tlook. (cond ((string-equal field "date") (let* ((date (substring cont 5 (length cont))) (tz (aref (timezone-parse-date date) 4))) (if tz (setq tz (string-to-number tz) tz (+ (* (/ tz 100) 3600) (* (if (>= tz 0) 60 -60) (% (abs tz) 100)))) (setq tz (car (current-time-zone)))) (setq cont (concat "Sent:" (condition-case nil (format-time-string " %a, %d %b %Y %T %z" (date-to-time date) tz) (error date)))))) ((member field '("to" "cc")) (setq cont (concat (capitalize field) ": " (mapconcat (lambda (addr) (if (car addr) (concat (car addr) " <" (nth 1 addr) ">") (nth 1 addr))) (mail-extract-address-components (substring cont 3 (length cont)) t) "; "))))) (setq rest (cons cont rest))))) (goto-char (point-max))) (if (looking-at "\n\n+") (delete-region (1+ (match-beginning 0)) (match-end 0))) (concat "\n-----Original Message-----\n" (mapconcat #'identity (nreverse rest) "\n") "\n\n")))) ;;; @ item methods ;;; ;;; @@ ML count ;;; (defcustom mu-cite-ml-count-field-list '("X-Ml-Count" "X-Mail-Count" "X-Seqno" "X-Sequence" "Mailinglist-Id") "List of header fields which contains a sequence number of the mailing list." :type '(repeat (choice :tag "Field Name" (choice-item "X-Ml-Count") (choice-item "X-Mail-Count") (choice-item "X-Seqno") (choice-item "X-Sequence") (choice-item "Mailinglist-Id") (const :tag "-" nil) (string :tag "Other"))) :set (function (lambda (symbol value) (set-default symbol (delq nil value)))) :group 'mu-cite) (defun mu-cite-get-ml-count-method () "A mu-cite method to return a ML-count. This function searches a field about ML-count, which is specified by the variable `mu-cite-ml-count-field-list', in a header. If the field is found, the function returns a number part of the field. Notice that please use (mu-cite-get-value 'ml-count) instead of to call the function directly." (let ((field-list mu-cite-ml-count-field-list)) (catch 'tag (while field-list (let* ((field (car field-list)) (ml-count (mu-cite-get-field-value field))) (if (and ml-count (string-match "[0-9]+" ml-count)) (throw 'tag (match-string 0 ml-count))) (setq field-list (cdr field-list))))))) ;;; @ fundamentals ;;; (defvar mu-cite-methods-alist nil) (defun mu-cite-make-methods () (setq mu-cite-methods-alist (copy-alist mu-cite-default-methods-alist)) (run-hooks 'mu-cite-instantiation-hook)) (defun mu-cite-get-value (item) "Return a current value of ITEM." (let ((ret (cdr (assoc item mu-cite-methods-alist)))) (if (functionp ret) (prog1 (setq ret (save-excursion (funcall ret))) (set-alist 'mu-cite-methods-alist item ret)) ret))) (defun mu-cite-eval-format (list) (mapconcat (function (lambda (elt) (cond ((stringp elt) elt) ((symbolp elt) (mu-cite-get-value elt))))) list "")) ;;; @ main function ;;; ;;;###autoload (defun mu-cite-original () "Citing filter function. This is callable from the various mail and news readers' reply function according to the agreed upon standard." (interactive) (mu-cite-make-methods) (save-restriction (if (< (mark t) (point)) (exchange-point-and-mark)) (narrow-to-region (point)(point-max)) (run-hooks 'mu-cite-pre-cite-hook) (let ((last-point (point)) ;; Register a name before generating the top cite form. (prefix (mu-cite-eval-format mu-cite-prefix-format)) (top (mu-cite-eval-format mu-cite-top-format))) (if (re-search-forward "^-*$" nil nil) (forward-line 1)) (widen) (delete-region last-point (point)) (insert top) (setq last-point (point)) (while (< (point)(mark t)) (or (and mu-cite-cited-prefix-regexp (looking-at mu-cite-cited-prefix-regexp)) (insert prefix)) (forward-line 1)) (goto-char last-point)) (run-hooks 'mu-cite-post-cite-hook))) ;;; @ message editing utilities ;;; (defcustom citation-mark-chars ">}|" "String of characters for citation delimiter." :type 'string :group 'mu-cite) (defcustom citation-disable-chars "<{" "String of characters not allowed as citation-prefix." :type 'string :group 'mu-cite) (eval-and-compile ;; Don't use the function `char-category' which may have been ;; defined by emu.el. Anyway, the best way is not to use emu.el. (if (and (fboundp 'char-category) (subrp (symbol-function 'char-category))) (defalias 'mu-cite-char-category 'char-category) (defun-maybe-cond mu-cite-char-category (character &optional table) "Return a string of category mnemonics for CHARACTER in TABLE. CHARACTER can be any multilingual characters, TABLE defaults to the current buffer's category table (it is currently ignored)." ((and (subr-fboundp 'char-category-set) (subr-fboundp 'category-set-mnemonics)) (category-set-mnemonics (char-category-set character))) ((and (fboundp 'char-category-list) ;; `char-category-list' returns a list of characters ;; in XEmacs 21.2.25 and later, otherwise integers. (characterp (car-safe (char-category-list ?a)))) (concat (char-category-list character))) ((fboundp 'char-category-list) (mapconcat (lambda (chr) (char-to-string (int-char chr))) (char-category-list character) "")) ((boundp 'NEMACS) (if (< (char-int character) 128) "al" "j")) (t (if (< (char-int character) 128) "al" "l"))))) (defun detect-paragraph-cited-prefix () (save-excursion (goto-char (point-min)) (let ((i 0) (prefix (buffer-substring (line-beginning-position) (line-end-position)))) (let ((init prefix) str ret) (while (and (= (forward-line) 0) (setq str (buffer-substring (progn (beginning-of-line)(point)) (progn (end-of-line)(point)))) (setq ret (string-compare-from-top prefix str))) (setq prefix (if (stringp ret) ret (car (cdr ret)))) (or (string-equal init prefix) (setq i (1+ i))))) (cond ((> i 1) prefix) ((> i 0) (goto-char (point-min)) (save-restriction (narrow-to-region (point) (+ (point)(length prefix))) (goto-char (point-max)) (if (re-search-backward (concat "[" citation-mark-chars "]") nil t) (progn (goto-char (match-end 0)) (if (looking-at "[ \t]+") (goto-char (match-end 0))) (buffer-substring (point-min)(point))) prefix))) ((progn (goto-char (point-max)) (re-search-backward (concat "[" citation-disable-chars "]") nil t) (re-search-backward (concat "[" citation-mark-chars "]") nil t)) (goto-char (match-end 0)) (if (looking-at "[ \t]+") (goto-char (match-end 0))) (buffer-substring (line-beginning-position)(point))) (t ""))))) (defcustom fill-column-for-fill-cited-region nil "Integer to override `fill-column' while `fill-cited-region' is being executed. If you wish people call you ****-san, you may set the value of `fill-column' to 60 in the buffer for message sending and set this to 70. :-)" :type `(choice (const :tag "Off" nil) (integer ,(default-value 'fill-column))) :group 'mu-cite) ;;;###autoload (defun fill-cited-region (beg end) "Fill each of the paragraphs in the region as a cited text." (interactive "*r") (save-excursion (save-restriction (goto-char end) (and (search-backward "\n" nil t) (setq end (match-end 0))) (narrow-to-region beg end) (let* ((fill-prefix (detect-paragraph-cited-prefix)) (fill-column (max (+ 1 (current-left-margin) (string-width fill-prefix)) (or fill-column-for-fill-cited-region (current-fill-column)))) (pat (concat fill-prefix "\n")) filladapt-mode) (goto-char (point-min)) (while (search-forward pat nil t) (let ((b (match-beginning 0)) (e (match-end 0))) (delete-region b e) (if (and (> b (point-min)) (let ((cat (mu-cite-char-category (char-before b)))) (or (string-match "a" cat) (string-match "l" cat)))) (insert " ")))) (goto-char (point-min)) (fill-region (point-min) (point-max)))))) ;;;###autoload (defun compress-cited-prefix () "Compress nested cited prefixes." (interactive) (save-excursion (goto-char (point-min)) (re-search-forward (concat "^" (regexp-quote mail-header-separator) "$") nil t) (while (re-search-forward (concat "^\\([ \t]*[^ \t\n" citation-mark-chars "]*[" citation-mark-chars "]\\)+") nil t) (let* ((b (match-beginning 0)) (e (match-end 0)) (prefix (buffer-substring b e)) ps pe (s 0) (nest (let ((i 0)) (if (string-match "<[^<>]+>" prefix) (setq prefix (substring prefix 0 (match-beginning 0)))) (while (string-match (concat "\\([" citation-mark-chars "]+\\)[ \t]*") prefix s) (setq i (+ i (- (match-end 1)(match-beginning 1))) ps s pe (match-beginning 1) s (match-end 0))) i))) (if (and ps (< ps pe)) (progn (delete-region b e) (insert (concat (substring prefix ps pe) (make-string nest ?>))))) )))) (defun replace-top-string (old new) (interactive "*sOld string: \nsNew string: ") (while (re-search-forward (concat "^" (regexp-quote old)) nil t) (replace-match new))) (defun string-compare-from-top (str1 str2) (let* ((len1 (length str1)) (len2 (length str2)) (len (min len1 len2)) (p 0) c1 c2) (while (and (< p len) (progn (setq c1 (aref str1 p) c2 (aref str2 p)) (eq c1 c2))) (setq p (char-next-index c1 p))) (and (> p 0) (let ((matched (substring str1 0 p)) (r1 (and (< p len1)(substring str1 p))) (r2 (and (< p len2)(substring str2 p)))) (if (eq r1 r2) matched (list 'seq matched (list 'or r1 r2))))))) ;;; @ end ;;; (provide 'mu-cite) (run-hooks 'mu-cite-load-hook) ;;; mu-cite.el ends here cvs-m17n-org-MU-CITE-146f893/mu-register.el000066400000000000000000000155771343543416600200160ustar00rootroot00000000000000;;; mu-register.el --- registration feature of mu-cite ;; Copyright (C) 1995-2001, 2014 ;; Free Software Foundation, Inc. ;; Author: MINOURA Makoto ;; MORIOKA Tomohiko ;;; Created: 1995-12-27 by MINOURA Makoto ;; Maintainer: Katsumi Yamaoka ;; Keywords: registration, citation, mail, news ;; This file is part of MU (Message Utilities). ;; This program is free software; you can redistribute it and/or ;; modify it under the terms of the GNU General Public License as ;; published by the Free Software Foundation; either version 2, or (at ;; your option) any later version. ;; This program is distributed in the hope that it will be useful, but ;; WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ;; General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs; see the file COPYING. If not, write to the ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Code: (require 'mu-cite) (eval-when-compile (require 'static)) ;;; @ variables ;;; (defcustom mu-registration-file (expand-file-name "~/.mu-cite.el") "The name of the user environment file for mu-cite." :type 'file :group 'mu-cite) (defcustom mu-registration-file-modes 384 "Mode bits of `mu-registration-file', as an integer." :type 'integer :group 'mu-cite) (defcustom mu-registration-file-coding-system-for-write (static-if (boundp 'MULE) '*iso-2022-jp* 'iso-2022-7bit) "Coding-system used when writing a registration file. If you set this to nil, the value of `mu-registration-file-coding-system' will be used for writing a file." :group 'mu-cite) (defcustom mu-cite-allow-null-string-registration nil "If non-nil, null-string citation-name can be registered." :type 'boolean :group 'mu-cite) (defvar mu-registration-symbol 'mu-citation-name-alist "*Name of the variable to register citation prefix strings.") (defvar mu-registration-file-coding-system-for-read nil "*Coding-system used when reading a registration file. Normally, you have no need to set this option. If you have many friends in various countries and the file contains their names in various languages, you may avoid mis-decoding them by setting this option to `iso-2022-7bit' or the other universal coding-system. Note that when you change this value, you should save the file manually using the same coding-system in advance.") (defvar mu-registration-file-coding-system nil "Internal variable used to keep a default coding-system for writing a current registration file. The value will be renewed whenever a registration file is read.") (defvar mu-register-history nil) ;;; @ load / save registration file ;;; (defun mu-cite-load-registration-file () (if (file-readable-p mu-registration-file) (with-temp-buffer (set-buffer-multibyte t) (if mu-registration-file-coding-system-for-read (insert-file-contents-as-coding-system mu-registration-file-coding-system-for-read mu-registration-file) (insert-file-contents mu-registration-file)) (setq mu-registration-file-coding-system (static-cond ((boundp 'buffer-file-coding-system) (symbol-value 'buffer-file-coding-system)) ((boundp 'file-coding-system) (symbol-value 'file-coding-system)) (t nil))) (let ((exp (read (current-buffer)))) (or (eq (car (cdr exp)) mu-registration-symbol) (setcar (cdr exp) mu-registration-symbol)) (eval exp)))) (or (boundp mu-registration-symbol) (set mu-registration-symbol nil))) (defun mu-cite-save-registration-file () (with-temp-buffer (set-buffer-multibyte t) (let ((name (file-name-nondirectory mu-registration-file)) (coding-system (or mu-registration-file-coding-system-for-write mu-registration-file-coding-system))) (insert (format "\ ;;; %s -*- mode: emacs-lisp; coding: %s -*- ;; This file is generated automatically by MU-CITE v%s. " name coding-system mu-cite-version)) (insert "(setq " (symbol-name mu-registration-symbol) "\n '(") (insert (mapconcat (function (lambda (elem) (format "(%s . %s)" (prin1-to-string (mu-cite-remove-text-properties (car elem))) (prin1-to-string (mu-cite-remove-text-properties (cdr elem)))))) (symbol-value mu-registration-symbol) "\n\t")) (insert "))\n\n") (insert ";;; " name " ends here\n") (write-region-as-coding-system coding-system (point-min) (point-max) mu-registration-file nil 'nomsg) (condition-case nil (set-file-modes mu-registration-file mu-registration-file-modes) (error nil))))) ;;; @ database accessors ;;; ;; get citation-name from the database (defun mu-register-get-citation-name (from) (cdr (assoc from (symbol-value mu-registration-symbol)))) ;; register citation-name to the database (defun mu-register-add-citation-name (name from) (set-alist mu-registration-symbol from name) (mu-cite-save-registration-file)) ;;; @ methods ;;; ;;;###autoload (defun mu-cite-get-prefix-method () (or (mu-register-get-citation-name (mu-cite-get-value 'address)) ">")) ;;;###autoload (defun mu-cite-get-prefix-register-method () (let ((addr (mu-cite-get-value 'address))) (or (mu-register-get-citation-name addr) (let* ((minibuffer-allow-text-properties nil) (return (mu-cite-remove-text-properties (read-string "Citation name? " (or (mu-cite-get-value 'x-attribution) (mu-cite-get-value 'x-cite-me) (mu-cite-get-value 'full-name)) 'mu-register-history)))) (if (and (or mu-cite-allow-null-string-registration (not (string-equal return ""))) (y-or-n-p (format "Register \"%s\"? " return))) (mu-register-add-citation-name return addr)) return)))) ;;;###autoload (defun mu-cite-get-prefix-register-verbose-method (&optional no-return) (let* ((addr (mu-cite-get-value 'address)) (return1 (mu-register-get-citation-name addr)) (minibuffer-allow-text-properties nil) (return (mu-cite-remove-text-properties (read-string "Citation name? " (or return1 (mu-cite-get-value 'x-attribution) (mu-cite-get-value 'x-cite-me) (mu-cite-get-value 'full-name)) 'mu-register-history)))) (if (and (or mu-cite-allow-null-string-registration (not (string-equal return ""))) (not (string-equal return return1)) (y-or-n-p (format "Register \"%s\"? " return))) (mu-register-add-citation-name return addr)) (if no-return "" return))) ;;;###autoload (defun mu-cite-get-no-prefix-register-verbose-method () ;; Allow registration of a name but don't use it as a citation prefix. (mu-cite-get-prefix-register-verbose-method t)) ;;; @ end ;;; (provide 'mu-register) (mu-cite-load-registration-file) ;;; mu-register.el ends here