diff options
| author | Richard M. Stallman | 2004-11-04 10:14:47 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2004-11-04 10:14:47 +0000 |
| commit | 3fc1b2647547d95bbb2418f87fec6dd17f615bd4 (patch) | |
| tree | 7245629d102983ba7b62fc677a24d4d7aadb0ccf | |
| parent | e893eae2cb38b308ecf73e610f030ee0bfc7e32a (diff) | |
| download | emacs-3fc1b2647547d95bbb2418f87fec6dd17f615bd4.tar.gz emacs-3fc1b2647547d95bbb2418f87fec6dd17f615bd4.zip | |
(sc-cite-region): Don't use interactive-p. Add arg INTERACTIVE.
(sc-version): Don't use interactive-p. Rename arg to MESSAGE.
| -rw-r--r-- | lisp/mail/supercite.el | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/lisp/mail/supercite.el b/lisp/mail/supercite.el index af7f8b62e03..0f5925021e8 100644 --- a/lisp/mail/supercite.el +++ b/lisp/mail/supercite.el | |||
| @@ -1424,18 +1424,21 @@ Optional CITATION overrides any citation automatically selected." | |||
| 1424 | nil) | 1424 | nil) |
| 1425 | 1425 | ||
| 1426 | ;; interactive functions | 1426 | ;; interactive functions |
| 1427 | (defun sc-cite-region (start end &optional confirm-p) | 1427 | (defun sc-cite-region (start end &optional confirm-p interactive) |
| 1428 | "Cite a region delineated by START and END. | 1428 | "Cite a region delineated by START and END. |
| 1429 | If optional CONFIRM-P is non-nil, the attribution is confirmed before | 1429 | If optional CONFIRM-P is non-nil, the attribution is confirmed before |
| 1430 | its use in the citation string. This function first runs | 1430 | its use in the citation string. This function first runs |
| 1431 | `sc-pre-cite-hook'." | 1431 | `sc-pre-cite-hook'. |
| 1432 | (interactive "r\nP") | 1432 | |
| 1433 | When called interactively, the optional arg INTERACTIVE is non-nil, | ||
| 1434 | and that means call `sc-select-attribution' too." | ||
| 1435 | (interactive "r\nP\np") | ||
| 1433 | (undo-boundary) | 1436 | (undo-boundary) |
| 1434 | (let ((frame (or (sc-scan-info-alist sc-cite-frame-alist) | 1437 | (let ((frame (or (sc-scan-info-alist sc-cite-frame-alist) |
| 1435 | sc-default-cite-frame)) | 1438 | sc-default-cite-frame)) |
| 1436 | (sc-confirm-always-p (if confirm-p t sc-confirm-always-p))) | 1439 | (sc-confirm-always-p (if confirm-p t sc-confirm-always-p))) |
| 1437 | (run-hooks 'sc-pre-cite-hook) | 1440 | (run-hooks 'sc-pre-cite-hook) |
| 1438 | (if (interactive-p) | 1441 | (if interactive |
| 1439 | (sc-select-attribution)) | 1442 | (sc-select-attribution)) |
| 1440 | (regi-interpret frame start end))) | 1443 | (regi-interpret frame start end))) |
| 1441 | 1444 | ||
| @@ -1978,16 +1981,15 @@ cited." | |||
| 1978 | (insert (sc-mail-field "sc-citation")) | 1981 | (insert (sc-mail-field "sc-citation")) |
| 1979 | (error "Line is already cited")))) | 1982 | (error "Line is already cited")))) |
| 1980 | 1983 | ||
| 1981 | (defun sc-version (arg) | 1984 | (defun sc-version (message) |
| 1982 | "Echo the current version of Supercite in the minibuffer. | 1985 | "Echo the current version of Supercite in the minibuffer. |
| 1983 | With \\[universal-argument] (universal-argument), or if run non-interactively, | 1986 | If MESSAGE is non-nil (interactively, with no prefix argument), |
| 1984 | inserts the version string in the current buffer instead." | 1987 | inserts the version string in the current buffer instead." |
| 1985 | (interactive "P") | 1988 | (interactive (not current-prefix-arg)) |
| 1986 | (let ((verstr (format "Using Supercite.el %s" sc-version))) | 1989 | (let ((verstr (format "Using Supercite.el %s" sc-version))) |
| 1987 | (if (or (consp arg) | 1990 | (if message |
| 1988 | (not (interactive-p))) | 1991 | (message verstr) |
| 1989 | (insert "`sc-version' says: " verstr) | 1992 | (insert "`sc-version' says: " verstr)))) |
| 1990 | (message verstr)))) | ||
| 1991 | 1993 | ||
| 1992 | (defun sc-describe () | 1994 | (defun sc-describe () |
| 1993 | " | 1995 | " |