aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2004-11-01 07:35:47 +0000
committerRichard M. Stallman2004-11-01 07:35:47 +0000
commit3f3ed959289a3ea8a74c5f20c69cdbcfcd2eb5f4 (patch)
tree21bafab083d80e554faa1756ff304387b1cc4c6b
parent65970d645c7d3574a9b34533c9cb744ed3cfd6da (diff)
downloademacs-3f3ed959289a3ea8a74c5f20c69cdbcfcd2eb5f4.tar.gz
emacs-3f3ed959289a3ea8a74c5f20c69cdbcfcd2eb5f4.zip
(bibtex-make-field): Don't use interactive-p.
(bibtex-find-text): Likewise.
-rw-r--r--lisp/textmodes/bibtex.el17
1 files changed, 9 insertions, 8 deletions
diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el
index 3601fbd7d26..92614c02d27 100644
--- a/lisp/textmodes/bibtex.el
+++ b/lisp/textmodes/bibtex.el
@@ -3007,12 +3007,13 @@ Move point to the end of the last field."
3007 (message (nth 1 comment)) 3007 (message (nth 1 comment))
3008 (message "No comment available"))))) 3008 (message "No comment available")))))
3009 3009
3010(defun bibtex-make-field (field &optional called-by-yank) 3010(defun bibtex-make-field (field &optional called-by-yank interactive)
3011 "Make a field named FIELD in current BibTeX entry. 3011 "Make a field named FIELD in current BibTeX entry.
3012FIELD is either a string or a list of the form 3012FIELD is either a string or a list of the form
3013\(FIELD-NAME COMMENT-STRING INIT ALTERNATIVE-FLAG) as in 3013\(FIELD-NAME COMMENT-STRING INIT ALTERNATIVE-FLAG) as in
3014`bibtex-entry-field-alist'. 3014`bibtex-entry-field-alist'.
3015If CALLED-BY-YANK is non-nil, don't insert delimiters." 3015If CALLED-BY-YANK is non-nil, don't insert delimiters.
3016In that case, or when called interactively, also don't do (WHAT?)."
3016 (interactive 3017 (interactive
3017 (list (let ((completion-ignore-case t) 3018 (list (let ((completion-ignore-case t)
3018 (field-list (bibtex-field-list 3019 (field-list (bibtex-field-list
@@ -3021,10 +3022,11 @@ If CALLED-BY-YANK is non-nil, don't insert delimiters."
3021 (bibtex-type-in-head))))) 3022 (bibtex-type-in-head)))))
3022 (completing-read "BibTeX field name: " 3023 (completing-read "BibTeX field name: "
3023 (append (car field-list) (cdr field-list)) 3024 (append (car field-list) (cdr field-list))
3024 nil nil nil bibtex-field-history)))) 3025 nil nil nil bibtex-field-history))
3026 t))
3025 (unless (consp field) 3027 (unless (consp field)
3026 (setq field (list field))) 3028 (setq field (list field)))
3027 (if (or (interactive-p) called-by-yank) 3029 (if (or interactive called-by-yank)
3028 (let (bibtex-help-message) 3030 (let (bibtex-help-message)
3029 (bibtex-find-text nil t t) 3031 (bibtex-find-text nil t t)
3030 (if (looking-at "[}\"]") 3032 (if (looking-at "[}\"]")
@@ -3047,7 +3049,7 @@ If CALLED-BY-YANK is non-nil, don't insert delimiters."
3047 ((fboundp init) 3049 ((fboundp init)
3048 (insert (funcall init))))) 3050 (insert (funcall init)))))
3049 (unless called-by-yank (insert (bibtex-field-right-delimiter))) 3051 (unless called-by-yank (insert (bibtex-field-right-delimiter)))
3050 (when (interactive-p) 3052 (when interactivw
3051 (forward-char -1) 3053 (forward-char -1)
3052 (bibtex-print-help-message))) 3054 (bibtex-print-help-message)))
3053 3055
@@ -3610,10 +3612,9 @@ Return t if test was successful, nil otherwise."
3610 3612
3611(defun bibtex-find-text (arg &optional as-if-interactive no-error) 3613(defun bibtex-find-text (arg &optional as-if-interactive no-error)
3612 "Go to end of text of current field; with ARG, go to beginning." 3614 "Go to end of text of current field; with ARG, go to beginning."
3613 (interactive "P") 3615 (interactive "P\np")
3614 (bibtex-inside-field) 3616 (bibtex-inside-field)
3615 (let ((bounds (bibtex-enclosing-field (or (interactive-p) 3617 (let ((bounds (bibtex-enclosing-field as-if-interactive)))
3616 as-if-interactive))))
3617 (if bounds 3618 (if bounds
3618 (progn (if arg 3619 (progn (if arg
3619 (progn (goto-char (bibtex-start-of-text-in-field bounds)) 3620 (progn (goto-char (bibtex-start-of-text-in-field bounds))