From b2d21363b4638ec03609c7749fdcb67de1038980 Mon Sep 17 00:00:00 2001 From: morioka Date: Tue, 19 May 1998 15:17:08 +0000 Subject: [PATCH] mu-cite-980221. --- latex-math-symbol.el | 2 +- mu-bbdb.el | 15 +++++++-------- mu-cite.el | 45 ++++++++++++++++++++++++++++++++++++++------- 3 files changed, 46 insertions(+), 16 deletions(-) diff --git a/latex-math-symbol.el b/latex-math-symbol.el index 31e37d0..9afd645 100644 --- a/latex-math-symbol.el +++ b/latex-math-symbol.el @@ -5,7 +5,7 @@ ;; Author: MORIOKA Tomohiko ;; Created: 1996/7/1 ;; Version: -;; $Id: latex-math-symbol.el,v 2.0 1997/01/17 05:11:03 morioka Exp $ +;; $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). diff --git a/mu-bbdb.el b/mu-bbdb.el index a3fa25e..d8c5844 100644 --- a/mu-bbdb.el +++ b/mu-bbdb.el @@ -1,11 +1,11 @@ ;;; mu-bbdb.el --- `attribution' function for mu-cite with BBDB. -;; Copyright (C) 1996 Shuhei KOBAYASHI +;; Copyright (C) 1996,1997 Shuhei KOBAYASHI ;; Author: Shuhei KOBAYASHI ;; Version: $Id: mu-bbdb.el,v 3.3 1996/12/10 11:57:23 shuhei-k Exp $ -;; This file is part of tl (Tiny Library). +;; 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 @@ -27,12 +27,11 @@ ;; - How to use ;; 1. bytecompile this file and copy it to the apropriate directory. ;; 2. put the following lines to your ~/.emacs: -;; (require 'tl-misc) -;; (call-after-loaded 'mu-cite -;; (function -;; (lambda () -;; (require 'mu-bbdb) -;; ))) +;; (add-hook 'mu-cite-load-hook +;; (function +;; (lambda () +;; (require 'mu-bbdb) +;; ))) ;;; Code: diff --git a/mu-cite.el b/mu-cite.el index eb99191..b58f22a 100644 --- a/mu-cite.el +++ b/mu-cite.el @@ -1,12 +1,12 @@ ;;; mu-cite.el --- yet another citation tool for GNU Emacs -;; Copyright (C) 1995,1996,1997 Free Software Foundation, Inc. +;; Copyright (C) 1995,1996,1997,1998 Free Software Foundation, Inc. ;; Author: MORIOKA Tomohiko ;; MINOURA Makoto ;; Shuhei KOBAYASHI ;; Maintainer: Shuhei KOBAYASHI -;; Version: $Revision: 7.49 $ +;; Version: $Revision: 7.51 $ ;; Keywords: mail, news, citation ;; This file is part of MU (Message Utilities). @@ -46,15 +46,22 @@ ;;; Code: (require 'std11) -(require 'tl-str) -(require 'tl-list) +;;(require 'tl-str) +;;(require 'tl-list) +(require 'alist) ;;; @ version ;;; +(defsubst get-version-string (id) + "Return a version-string from RCS ID." + (and (string-match ",v \\([0-9][0-9.][0-9.]+\\)" id) + (substring id (match-beginning 1)(match-end 1)) + )) + (defconst mu-cite/RCS-ID - "$Id: mu-cite.el,v 7.49 1997/03/18 15:07:56 morioka Exp $") + "$Id: mu-cite.el,v 7.51 1998/02/13 10:11:54 morioka Exp $") (defconst mu-cite/version (get-version-string mu-cite/RCS-ID)) @@ -126,7 +133,7 @@ Use this hook to add your own methods to `mu-cite/default-methods-alist'.") ;; get citation-name from the database (defun mu-cite/get-citation-name (from) - (assoc-value from mu-cite/citation-name-alist) + (cdr (assoc from mu-cite/citation-name-alist)) ) ;; register citation-name to the database @@ -337,7 +344,7 @@ Use this hook to add your own methods to `mu-cite/default-methods-alist'.") ) (defun mu-cite/get-value (item) - (let ((ret (assoc-value item mu-cite/methods-alist))) + (let ((ret (cdr (assoc item mu-cite/methods-alist)))) (if (functionp ret) (prog1 (setq ret (funcall ret)) @@ -525,6 +532,30 @@ function according to the agreed upon standard." (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 (sref str1 p) + c2 (sref str2 p)) + (eq c1 c2) + )) + (setq p (+ p (char-length c1))) + ) + (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 ;;; -- 1.7.10.4