1424 |
nil) |
nil) |
1425 |
|
|
1426 |
;; interactive functions |
;; interactive functions |
1427 |
(defun sc-cite-region (start end &optional confirm-p) |
(defun sc-cite-region (start end &optional confirm-p interactive) |
1428 |
"Cite a region delineated by START and END. |
"Cite a region delineated by START and END. |
1429 |
If optional CONFIRM-P is non-nil, the attribution is confirmed before |
If optional CONFIRM-P is non-nil, the attribution is confirmed before |
1430 |
its use in the citation string. This function first runs |
its use in the citation string. This function first runs |
1431 |
`sc-pre-cite-hook'." |
`sc-pre-cite-hook'. |
1432 |
(interactive "r\nP") |
|
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") |
1436 |
(undo-boundary) |
(undo-boundary) |
1437 |
(let ((frame (or (sc-scan-info-alist sc-cite-frame-alist) |
(let ((frame (or (sc-scan-info-alist sc-cite-frame-alist) |
1438 |
sc-default-cite-frame)) |
sc-default-cite-frame)) |
1439 |
(sc-confirm-always-p (if confirm-p t sc-confirm-always-p))) |
(sc-confirm-always-p (if confirm-p t sc-confirm-always-p))) |
1440 |
(run-hooks 'sc-pre-cite-hook) |
(run-hooks 'sc-pre-cite-hook) |
1441 |
(if (interactive-p) |
(if interactive |
1442 |
(sc-select-attribution)) |
(sc-select-attribution)) |
1443 |
(regi-interpret frame start end))) |
(regi-interpret frame start end))) |
1444 |
|
|
1981 |
(insert (sc-mail-field "sc-citation")) |
(insert (sc-mail-field "sc-citation")) |
1982 |
(error "Line is already cited")))) |
(error "Line is already cited")))) |
1983 |
|
|
1984 |
(defun sc-version (arg) |
(defun sc-version (message) |
1985 |
"Echo the current version of Supercite in the minibuffer. |
"Echo the current version of Supercite in the minibuffer. |
1986 |
With \\[universal-argument] (universal-argument), or if run non-interactively, |
If MESSAGE is non-nil (interactively, with no prefix argument), |
1987 |
inserts the version string in the current buffer instead." |
inserts the version string in the current buffer instead." |
1988 |
(interactive "P") |
(interactive (not current-prefix-arg)) |
1989 |
(let ((verstr (format "Using Supercite.el %s" sc-version))) |
(let ((verstr (format "Using Supercite.el %s" sc-version))) |
1990 |
(if (or (consp arg) |
(if message |
1991 |
(not (interactive-p))) |
(message verstr) |
1992 |
(insert "`sc-version' says: " verstr) |
(insert "`sc-version' says: " verstr)))) |
|
(message verstr)))) |
|
1993 |
|
|
1994 |
(defun sc-describe () |
(defun sc-describe () |
1995 |
" |
" |