diff options
| author | Roland Winkler | 2007-04-15 16:05:19 +0000 |
|---|---|---|
| committer | Roland Winkler | 2007-04-15 16:05:19 +0000 |
| commit | cbc0b7831fd377db765c01e32c93e68b0a823b94 (patch) | |
| tree | 03d2106b2ed20cc3fb0ff76e3a5f4960f9aba3a5 | |
| parent | a762d463bc6c80562ab81ef624a336684908ccd8 (diff) | |
| download | emacs-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/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/textmodes/bibtex.el | 18 |
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 @@ | |||
| 1 | 2007-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 | |||
| 1 | 2007-04-14 Glenn Morris <rgm@gnu.org> | 6 | 2007-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 | |||
| 3029 | the new field. If INTERACTIVE is non-nil, move point to the end of | 3029 | the new field. If INTERACTIVE is non-nil, move point to the end of |
| 3030 | the new field. Otherwise move point past the new field. | 3030 | the new field. Otherwise move point past the new field. |
| 3031 | MOVE and INTERACTIVE are t when called interactively. | 3031 | MOVE and INTERACTIVE are t when called interactively. |
| 3032 | INIT is surrounded by delimiters, unless NODELIM is non-nil." | 3032 | INIT 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) |