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/bibtex.el,v


From: Roland Winkler
Subject: [Emacs-diffs] Changes to emacs/lisp/textmodes/bibtex.el,v
Date: Sun, 15 Apr 2007 16:03:08 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Roland Winkler <winkler>        07/04/15 16:03:08

Index: bibtex.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/textmodes/bibtex.el,v
retrieving revision 1.125
retrieving revision 1.126
diff -u -b -r1.125 -r1.126
--- bibtex.el   14 Apr 2007 19:12:59 -0000      1.125
+++ bibtex.el   15 Apr 2007 16:03:07 -0000      1.126
@@ -2831,7 +2831,7 @@
         (push (list "key"
                     "Used for reference key creation if author and editor 
fields are missing"
                     (if (or (stringp bibtex-include-OPTkey)
-                            (fboundp bibtex-include-OPTkey))
+                            (functionp bibtex-include-OPTkey))
                         bibtex-include-OPTkey))
               optional))
     (if (member-ignore-case entry-type bibtex-include-OPTcrossref)
@@ -3029,7 +3029,7 @@
 the new field.  If INTERACTIVE is non-nil, move point to the end of
 the new field.  Otherwise move point past the new field.
 MOVE and INTERACTIVE are t when called interactively.
-INIT is surrounded by delimiters, unless NODELIM is non-nil."
+INIT is surrounded by field delimiters, unless NODELIM is non-nil."
   (interactive
    (list (let ((completion-ignore-case t)
                (field-list (bibtex-field-list
@@ -3059,14 +3059,12 @@
     (indent-to-column (+ bibtex-entry-offset
                          bibtex-text-indentation)))
   (let ((init (nth 2 field)))
-    (insert (if nodelim
-                ""
-              (bibtex-field-left-delimiter))
-            (cond ((stringp init) init)
-                  ((fboundp init) (funcall init))
-                  (t ""))
-            (if nodelim
-                ""
+    (if (not init) (setq init "")
+      (if (functionp init) (setq init (funcall init)))
+      (unless (stringp init) (error "`%s' is not a string" init)))
+    ;; NODELIM is required by `bibtex-insert-kill'
+    (if nodelim (insert init)
+      (insert (bibtex-field-left-delimiter) init
               (bibtex-field-right-delimiter))))
   (when interactive
     ;; (bibtex-find-text nil nil bibtex-help-message)




reply via email to

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