aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoland Winkler2007-04-15 16:05:19 +0000
committerRoland Winkler2007-04-15 16:05:19 +0000
commitcbc0b7831fd377db765c01e32c93e68b0a823b94 (patch)
tree03d2106b2ed20cc3fb0ff76e3a5f4960f9aba3a5
parenta762d463bc6c80562ab81ef624a336684908ccd8 (diff)
downloademacs-cbc0b7831fd377db765c01e32c93e68b0a823b94.tar.gz
emacs-cbc0b7831fd377db765c01e32c93e68b0a823b94.zip
(bibtex-field-list): Use functionp.
(bibtex-make-field): Check that INIT is a string. Use functionp.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/textmodes/bibtex.el18
2 files changed, 13 insertions, 10 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index af1b86a2890..2f0006b5e57 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12007-04-15 Roland Winkler <Roland.Winkler@physik.uni-erlangen.de>
2
3 * textmodes/bibtex.el (bibtex-field-list): Use functionp.
4 (bibtex-make-field): Check that INIT is a string. Use functionp.
5
12007-04-14 Glenn Morris <rgm@gnu.org> 62007-04-14 Glenn Morris <rgm@gnu.org>
2 7
3 * complete.el (PC-goto-end): New buffer-local variable. 8 * complete.el (PC-goto-end): New buffer-local variable.
diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el
index e9c52ecb8d6..2c8406f8656 100644
--- a/lisp/textmodes/bibtex.el
+++ b/lisp/textmodes/bibtex.el
@@ -2831,7 +2831,7 @@ and `bibtex-user-optional-fields'."
2831 (push (list "key" 2831 (push (list "key"
2832 "Used for reference key creation if author and editor fields are missing" 2832 "Used for reference key creation if author and editor fields are missing"
2833 (if (or (stringp bibtex-include-OPTkey) 2833 (if (or (stringp bibtex-include-OPTkey)
2834 (fboundp bibtex-include-OPTkey)) 2834 (functionp bibtex-include-OPTkey))
2835 bibtex-include-OPTkey)) 2835 bibtex-include-OPTkey))
2836 optional)) 2836 optional))
2837 (if (member-ignore-case entry-type bibtex-include-OPTcrossref) 2837 (if (member-ignore-case entry-type bibtex-include-OPTcrossref)
@@ -3029,7 +3029,7 @@ If MOVE is non-nil, move point past the present field before making
3029the new field. If INTERACTIVE is non-nil, move point to the end of 3029the new field. If INTERACTIVE is non-nil, move point to the end of
3030the new field. Otherwise move point past the new field. 3030the new field. Otherwise move point past the new field.
3031MOVE and INTERACTIVE are t when called interactively. 3031MOVE and INTERACTIVE are t when called interactively.
3032INIT is surrounded by delimiters, unless NODELIM is non-nil." 3032INIT is surrounded by field delimiters, unless NODELIM is non-nil."
3033 (interactive 3033 (interactive
3034 (list (let ((completion-ignore-case t) 3034 (list (let ((completion-ignore-case t)
3035 (field-list (bibtex-field-list 3035 (field-list (bibtex-field-list
@@ -3059,14 +3059,12 @@ INIT is surrounded by delimiters, unless NODELIM is non-nil."
3059 (indent-to-column (+ bibtex-entry-offset 3059 (indent-to-column (+ bibtex-entry-offset
3060 bibtex-text-indentation))) 3060 bibtex-text-indentation)))
3061 (let ((init (nth 2 field))) 3061 (let ((init (nth 2 field)))
3062 (insert (if nodelim 3062 (if (not init) (setq init "")
3063 "" 3063 (if (functionp init) (setq init (funcall init)))
3064 (bibtex-field-left-delimiter)) 3064 (unless (stringp init) (error "`%s' is not a string" init)))
3065 (cond ((stringp init) init) 3065 ;; NODELIM is required by `bibtex-insert-kill'
3066 ((fboundp init) (funcall init)) 3066 (if nodelim (insert init)
3067 (t "")) 3067 (insert (bibtex-field-left-delimiter) init
3068 (if nodelim
3069 ""
3070 (bibtex-field-right-delimiter)))) 3068 (bibtex-field-right-delimiter))))
3071 (when interactive 3069 (when interactive
3072 ;; (bibtex-find-text nil nil bibtex-help-message) 3070 ;; (bibtex-find-text nil nil bibtex-help-message)