emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/textmodes/refbib.el


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/textmodes/refbib.el
Date: Fri, 04 Apr 2003 01:23:07 -0500

Index: emacs/lisp/textmodes/refbib.el
diff -c emacs/lisp/textmodes/refbib.el:1.16 emacs/lisp/textmodes/refbib.el:1.17
*** emacs/lisp/textmodes/refbib.el:1.16 Fri Jun  4 14:39:01 1999
--- emacs/lisp/textmodes/refbib.el      Tue Feb  4 08:30:45 2003
***************
*** 35,41 ****
  ;; 9/88, created H.Kautz
  ;; modified 1/19/89, allow books with editor but no author;
  ;;                   added %O ordering field;
! ;;                   appended illegal multiple fields, instead of 
  ;;                     discarding;
  ;;                   added rule, a tech report whose %R number
  ;;                     contains "ISBN" is really a book
--- 35,41 ----
  ;; 9/88, created H.Kautz
  ;; modified 1/19/89, allow books with editor but no author;
  ;;                   added %O ordering field;
! ;;                   appended illegal multiple fields, instead of
  ;;                     discarding;
  ;;                   added rule, a tech report whose %R number
  ;;                     contains "ISBN" is really a book
***************
*** 70,94 ****
    :group 'refbib)
  
  (defcustom r2b-journal-abbrevs
!   '(  
      )
!   "Abbreviation list for journal names.  
  If the car of an element matches a journal name exactly, it is replaced by
  the cadr when output.  Braces must be included if replacement is a
  {string}, but not if replacement is a bibtex abbreviation.  The cadr
! may be eliminated if is exactly the same as the car.  
    Because titles are capitalized before matching, the abbreviation
! for the journal name should be listed as beginning with a capital 
  letter, even if it really doesn't.
    For example, a value of '((\"Aij\" \"{Artificial Intelligence}\")
  \(\"Ijcai81\" \"ijcai7\")) would expand Aij to the text string
! \"Artificial Intelligence\", but would replace Ijcai81 with the 
  BibTeX macro \"ijcai7\"."
    :type '(repeat (list string string))
    :group 'refbib)
  
! (defcustom r2b-booktitle-abbrevs 
!   '(  
      )
    "Abbreviation list for book and proceedings names.
  If the car of an element matches a title or booktitle exactly, it is
--- 70,94 ----
    :group 'refbib)
  
  (defcustom r2b-journal-abbrevs
!   '(
      )
!   "Abbreviation list for journal names.
  If the car of an element matches a journal name exactly, it is replaced by
  the cadr when output.  Braces must be included if replacement is a
  {string}, but not if replacement is a bibtex abbreviation.  The cadr
! may be eliminated if is exactly the same as the car.
    Because titles are capitalized before matching, the abbreviation
! for the journal name should be listed as beginning with a capital
  letter, even if it really doesn't.
    For example, a value of '((\"Aij\" \"{Artificial Intelligence}\")
  \(\"Ijcai81\" \"ijcai7\")) would expand Aij to the text string
! \"Artificial Intelligence\", but would replace Ijcai81 with the
  BibTeX macro \"ijcai7\"."
    :type '(repeat (list string string))
    :group 'refbib)
  
! (defcustom r2b-booktitle-abbrevs
!   '(
      )
    "Abbreviation list for book and proceedings names.
  If the car of an element matches a title or booktitle exactly, it is
***************
*** 100,106 ****
  should be listed as beginning with a capital letter, even if it doesn't.
    For example, a value of '((\"Aij\" \"{Artificial Intelligence}\")
  \(\"Ijcai81\" \"ijcai7\")) would expand Aij to the text string
! \"Artificial Intelligence\", but would replace Ijcai81 with the 
  BibTeX macro \"ijcai7\"."
    :type '(repeat (list string string))
    :group 'refbib)
--- 100,106 ----
  should be listed as beginning with a capital letter, even if it doesn't.
    For example, a value of '((\"Aij\" \"{Artificial Intelligence}\")
  \(\"Ijcai81\" \"ijcai7\")) would expand Aij to the text string
! \"Artificial Intelligence\", but would replace Ijcai81 with the
  BibTeX macro \"ijcai7\"."
    :type '(repeat (list string string))
    :group 'refbib)
***************
*** 112,118 ****
  and `r2b-booktitle-abbrevs') does not contain the words \"conference\" or
  \"proceedings\".  (Those cases are handled automatically.)
  The entry must match the given data exactly.
!   Because titles are capitalized before matching, the items in this list 
  should begin with a capital letter.
    For example, suppose the title \"Ijcai81\" is used for the proceedings of
  a conference, and its expansion is the BibTeX macro \"ijcai7\".  Then
--- 112,118 ----
  and `r2b-booktitle-abbrevs') does not contain the words \"conference\" or
  \"proceedings\".  (Those cases are handled automatically.)
  The entry must match the given data exactly.
!   Because titles are capitalized before matching, the items in this list
  should begin with a capital letter.
    For example, suppose the title \"Ijcai81\" is used for the proceedings of
  a conference, and its expansion is the BibTeX macro \"ijcai7\".  Then
***************
*** 190,196 ****
     (makunbound 'r2b-stop-regexp))
  
  (defvar r2b-stop-regexp
!    (concat "\\`\\(\\(" 
        r2b-additional-stop-words "\\|" r2b-capitalize-title-stop-words
        "\\)\\('\\w*\\)?\\W+\\)*\\([A-Z0-9]+\\)"))
  
--- 190,196 ----
     (makunbound 'r2b-stop-regexp))
  
  (defvar r2b-stop-regexp
!    (concat "\\`\\(\\("
        r2b-additional-stop-words "\\|" r2b-capitalize-title-stop-words
        "\\)\\('\\w*\\)?\\W+\\)*\\([A-Z0-9]+\\)"))
  
***************
*** 280,286 ****
        (r2b-trace "snarfing %s" field)
        (goto-char (point-min))
        (while (and not-past-end
!               (re-search-forward 
                   (concat "^" field "\\b[ \t]*\\(.*[^ \t\n]\\)[ \t]*") nil t))
         (setq item (r2b-match 1))
         (while (and (setq not-past-end (zerop (forward-line 1)))
--- 280,286 ----
        (r2b-trace "snarfing %s" field)
        (goto-char (point-min))
        (while (and not-past-end
!               (re-search-forward
                   (concat "^" field "\\b[ \t]*\\(.*[^ \t\n]\\)[ \t]*") nil t))
         (setq item (r2b-match 1))
         (while (and (setq not-past-end (zerop (forward-line 1)))
***************
*** 325,331 ****
        (let ((months r2b-month-abbrevs))
         (if (string-match "[^0-9]" r2bv-month)
            (progn
!              (while (and months (not (string-match (car (car months)) 
                                          r2bv-month)))
                  (setq months (cdr months)))
               (if months
--- 325,331 ----
        (let ((months r2b-month-abbrevs))
         (if (string-match "[^0-9]" r2bv-month)
            (progn
!              (while (and months (not (string-match (car (car months))
                                          r2bv-month)))
                  (setq months (cdr months)))
               (if months
***************
*** 387,393 ****
        (r2b-set-match 'r2bv-title-first-word 4
         r2b-stop-regexp
         r2bv-title)
!       
        (r2b-get-field 'r2bv-annote "%X" t )
        (r2b-get-field 'r2bv-tr "%R" t)
        (r2b-get-field 'r2bv-address "%C" t)
--- 387,393 ----
        (r2b-set-match 'r2bv-title-first-word 4
         r2b-stop-regexp
         r2bv-title)
! 
        (r2b-get-field 'r2bv-annote "%X" t )
        (r2b-get-field 'r2bv-tr "%R" t)
        (r2b-get-field 'r2bv-address "%C" t)
***************
*** 445,451 ****
        (princ ", \n  ")
        (princ field)
        (princ " =\t")
!       (if (not nodelim) 
        (if r2b-delimit-with-quote
          (princ "\"")
          (princ "{")))
--- 445,451 ----
        (princ ", \n  ")
        (princ field)
        (princ " =\t")
!       (if (not nodelim)
        (if r2b-delimit-with-quote
          (princ "\"")
          (princ "{")))
***************
*** 453,459 ****
        (if (> (match-end 0) 59)
        (princ "\n"))
        (princ data)
!       (if (not nodelim) 
        (if r2b-delimit-with-quote
          (princ "\"")
          (princ "}")))
--- 453,459 ----
        (if (> (match-end 0) 59)
        (princ "\n"))
        (princ data)
!       (if (not nodelim)
        (if r2b-delimit-with-quote
          (princ "\"")
          (princ "}")))
***************
*** 463,469 ****
  
  (defun r2b-require (vars)
     "If any of VARS is null, set to empty string and log error."
!    (cond 
        ((null vars))
        ((listp vars) (r2b-require (car vars)) (r2b-require (cdr vars)))
        (t
--- 463,469 ----
  
  (defun r2b-require (vars)
     "If any of VARS is null, set to empty string and log error."
!    (cond
        ((null vars))
        ((listp vars) (r2b-require (car vars)) (r2b-require (cdr vars)))
        (t
***************
*** 495,501 ****
  (defun r2b-isa-university (name)
     "Return t if NAME is a university or similar organization,
  but not a publisher."
!    (and 
        name
        (string-match "university" name)
        (not (string-match "press" name))
--- 495,501 ----
  (defun r2b-isa-university (name)
     "Return t if NAME is a university or similar organization,
  but not a publisher."
!    (and
        name
        (string-match "university" name)
        (not (string-match "press" name))
***************
*** 512,520 ****
  
        (setq r2bv-kn (concat r2bv-primary-author r2bv-decade
                        r2bv-title-first-word))
!       
        (setq r2bv-entry-kind
!        (cond 
            ((r2b-isa-proceedings r2bv-journal)
               (r2b-moveq r2bv-booktitle r2bv-journal)
               (if (r2b-isa-university r2bv-institution)
--- 512,520 ----
  
        (setq r2bv-kn (concat r2bv-primary-author r2bv-decade
                        r2bv-title-first-word))
! 
        (setq r2bv-entry-kind
!        (cond
            ((r2b-isa-proceedings r2bv-journal)
               (r2b-moveq r2bv-booktitle r2bv-journal)
               (if (r2b-isa-university r2bv-institution)
***************
*** 565,571 ****
               'proceedings)
            ((or r2bv-editor
                (and r2bv-author
!                  (or 
                      (null r2bv-tr)
                      (string-match "\\bisbn\\b" r2bv-tr))))
               (r2b-moveq r2bv-publisher r2bv-institution)
--- 565,571 ----
               'proceedings)
            ((or r2bv-editor
                (and r2bv-author
!                  (or
                      (null r2bv-tr)
                      (string-match "\\bisbn\\b" r2bv-tr))))
               (r2b-moveq r2bv-publisher r2bv-institution)
***************
*** 576,587 ****
               'book)
            (r2bv-tr
               (r2b-require 'r2bv-institution)
!              (if (string-match 
!                     "\\`\\(\\(.\\|\n\\)+\\)[ \t\n]+\\([^ \t\n]\\)+\\'" 
                      r2bv-tr)
                  (progn
                     (setq r2bv-type (substring r2bv-tr 0 (match-end 1)))
!                    (setq r2bv-number (substring r2bv-tr 
                                          (match-beginning 3)))
                     (setq r2bv-tr nil))
                  (r2b-moveq r2bv-number r2bv-tr))
--- 576,587 ----
               'book)
            (r2bv-tr
               (r2b-require 'r2bv-institution)
!              (if (string-match
!                     "\\`\\(\\(.\\|\n\\)+\\)[ \t\n]+\\([^ \t\n]\\)+\\'"
                      r2bv-tr)
                  (progn
                     (setq r2bv-type (substring r2bv-tr 0 (match-end 1)))
!                    (setq r2bv-number (substring r2bv-tr
                                          (match-beginning 3)))
                     (setq r2bv-tr nil))
                  (r2b-moveq r2bv-number r2bv-tr))
***************
*** 635,641 ****
  (defun r2b-convert-record (output-name)
     "Transform current bib entry and append to buffer OUTPUT;
  do \"M-x r2b-help\" for more info."
!    (interactive 
        (list (read-string "Output to buffer: " r2b-out-buf-name)))
     (let (rec-end rec-begin not-done)
        (setq r2b-out-buf-name output-name)
--- 635,641 ----
  (defun r2b-convert-record (output-name)
     "Transform current bib entry and append to buffer OUTPUT;
  do \"M-x r2b-help\" for more info."
!    (interactive
        (list (read-string "Output to buffer: " r2b-out-buf-name)))
     (let (rec-end rec-begin not-done)
        (setq r2b-out-buf-name output-name)
***************
*** 667,678 ****
         nil
         )
        ))
!       
!       
  (defun r2b-convert-buffer (output-name)
     "Transform current buffer and append to buffer OUTPUT.
  Do `M-x r2b-help' for more info."
!    (interactive 
        (list (read-string "Output to buffer: " r2b-out-buf-name)))
     (save-excursion
        (setq r2b-log (get-buffer-create r2b-log-name))
--- 667,678 ----
         nil
         )
        ))
! 
! 
  (defun r2b-convert-buffer (output-name)
     "Transform current buffer and append to buffer OUTPUT.
  Do `M-x r2b-help' for more info."
!    (interactive
        (list (read-string "Output to buffer: " r2b-out-buf-name)))
     (save-excursion
        (setq r2b-log (get-buffer-create r2b-log-name))
***************
*** 683,689 ****
     (message "Working, please be patient...")
     (sit-for 0)
     (while (r2b-convert-record output-name) t)
!    (message "Done, results in %s, errors in %s" 
        r2b-out-buf-name r2b-log-name)
     )
  
--- 683,689 ----
     (message "Working, please be patient...")
     (sit-for 0)
     (while (r2b-convert-record output-name) t)
!    (message "Done, results in %s, errors in %s"
        r2b-out-buf-name r2b-log-name)
     )
  




reply via email to

[Prev in Thread] Current Thread [Next in Thread]