comparison lisp/mail/supercite.el @ 90044:cb7f41387eb3

Revision: miles@gnu.org--gnu-2004/emacs--unicode--0--patch-70 Merge from emacs--cvs-trunk--0 Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-669 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-678 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-679 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-680 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-688 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-690 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-691 Update from CVS * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-69 Merge from emacs--cvs-trunk--0 * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-70 - miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-71 Update from CVS
author Miles Bader <miles@gnu.org>
date Fri, 12 Nov 2004 02:53:04 +0000
parents 0796fc36c2bd 59c9a776a021
children f2ebccfa87d4
comparison
equal deleted inserted replaced
90043:e24e2e78deda 90044:cb7f41387eb3
1422 (insert (or prefix sc-default-attribution)) 1422 (insert (or prefix sc-default-attribution))
1423 (sc-fill-if-different prefix)) 1423 (sc-fill-if-different prefix))
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
1442 (defun sc-uncite-region (start end) 1445 (defun sc-uncite-region (start end)
1443 "Uncite a region delineated by START and END. 1446 "Uncite a region delineated by START and END.
1976 (looking-at "^[ \t]*$") 1979 (looking-at "^[ \t]*$")
1977 (consp arg)) 1980 (consp arg))
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 "
1994 Supercite is a package which provides a flexible mechanism for citing 1996 Supercite is a package which provides a flexible mechanism for citing
1995 email and news replies. Please see the associated texinfo file for 1997 email and news replies. Please see the associated texinfo file for