auctex-diffs
[Top][All Lists]
Advanced

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

[AUCTeX-diffs] Changes to reftex/lisp/reftex-cite.el,v


From: Ralf Angeli
Subject: [AUCTeX-diffs] Changes to reftex/lisp/reftex-cite.el,v
Date: Sat, 07 Jun 2008 11:16:58 +0000

CVSROOT:        /sources/auctex
Module name:    reftex
Changes by:     Ralf Angeli <angeli>    08/06/07 11:16:58

Index: reftex-cite.el
===================================================================
RCS file: /sources/auctex/reftex/lisp/reftex-cite.el,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -b -r1.49 -r1.50
--- reftex-cite.el      7 Jun 2008 09:05:32 -0000       1.49
+++ reftex-cite.el      7 Jun 2008 11:16:57 -0000       1.50
@@ -1158,21 +1158,15 @@
     (reftex-kill-temporary-buffers)
     keys))
 
-(defun reftex-stringref-p (string)
-  "Return non-nil if STRING is not enclosed in double quotes 
-   or curly braces and is not a number."
-  (not 
-   (or
-    (string-match "^[\"{]" string)
-    (string-match "^[0-9]+$" string))))
-
 (defun reftex-get-string-refs (alist) 
-  "Return a list of BibTeX @string references that appear as values in alist."
-  (remove-if-not 'reftex-stringref-p
-                 ; get list of values, discard keys
+  "Return a list of BibTeX @string references that appear as values in ALIST."
+  (reftex-remove-if (lambda (x) (or (string-match "^[\"{]" x)
+                                   (string-match "^[0-9]+$" x)))
+                   ;; get list of values, discard keys
                  (mapcar 'cdr
-                         ; remove &key and &type entries
-                         (remove-if (lambda (pair) (string-match "^&" (car 
pair)))
+                           ;; remove &key and &type entries
+                           (reftex-remove-if (lambda (pair)
+                                               (string-match "^&" (car pair)))
                                     alist))))
 
 (defun reftex-create-bibtex-file (bibfile)
@@ -1181,7 +1175,8 @@
 that file.  Only entries referenced in the current document with
 any \\cite-like macros are used.
 The sequence in the new file is the same as it was in the old database.
-Entries referenced from other entries must appear after all referencing 
entries."
+Entries referenced from other entries must appear after all referencing
+entries."
   (interactive "FNew BibTeX file: ")
   (let ((keys (reftex-all-used-citation-keys))
         (files (reftex-get-bibfile-list))
@@ -1219,9 +1214,8 @@
                         (string-fields (reftex-get-string-refs raw-fields)))
                    (dolist (skey string-fields)
                      (unless (member skey string-keys)
-                       (push skey string-keys))))
-                 )))))))
-    ;;; second pass: grab @string references
+                       (push skey string-keys)))))))))))
+    ;; second pass: grab @string references
     (if string-keys
         (save-excursion
           (dolist (file files)




reply via email to

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