summaryrefslogtreecommitdiff
path: root/lisp/mail/supercite.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/mail/supercite.el')
-rw-r--r--lisp/mail/supercite.el155
1 files changed, 71 insertions, 84 deletions
diff --git a/lisp/mail/supercite.el b/lisp/mail/supercite.el
index b56ceed2cc0..98f46a3af55 100644
--- a/lisp/mail/supercite.el
+++ b/lisp/mail/supercite.el
@@ -1,6 +1,6 @@
;;; supercite.el --- minor mode for citing mail and news replies -*- lexical-binding: t; -*-
-;; Copyright (C) 1993, 1997, 2001-2022 Free Software Foundation, Inc.
+;; Copyright (C) 1993-2022 Free Software Foundation, Inc.
;; Author: 1993 Barry A. Warsaw <bwarsaw@python.org>
;; Maintainer: emacs-devel@gnu.org
@@ -22,11 +22,6 @@
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
-;; LCD Archive Entry
-;; supercite|Barry A. Warsaw|supercite-help@python.org
-;; |Mail and news reply citation package
-;; |1993/09/22 18:58:46|3.1|
-
;;; Commentary:
;;; Code:
@@ -146,8 +141,8 @@ a variable whose value is a citation frame."
:type '(repeat (list symbol (repeat (cons regexp
(choice (repeat (repeat sexp))
symbol)))))
+ :risky t
:group 'supercite-frames)
-(put 'sc-cite-frame-alist 'risky-local-variable t)
(defcustom sc-uncite-frame-alist '()
"Alist for frame selection during unciting.
@@ -155,8 +150,8 @@ See the variable `sc-cite-frame-alist' for details."
:type '(repeat (list symbol (repeat (cons regexp
(choice (repeat (repeat sexp))
symbol)))))
+ :risky t
:group 'supercite-frames)
-(put 'sc-uncite-frame-alist 'risky-local-variable t)
(defcustom sc-recite-frame-alist '()
"Alist for frame selection during reciting.
@@ -164,8 +159,8 @@ See the variable `sc-cite-frame-alist' for details."
:type '(repeat (list symbol (repeat (cons regexp
(choice (repeat (repeat sexp))
symbol)))))
+ :risky t
:group 'supercite-frames)
-(put 'sc-recite-frame-alist 'risky-local-variable t)
(defcustom sc-default-cite-frame
'(;; initialize fill state and temporary variables when entering
@@ -211,8 +206,8 @@ See the variable `sc-cite-frame-alist' for details."
(end (sc-fill-if-different "")))
"Default REGI frame for citing a region."
:type '(repeat (repeat sexp))
+ :risky t
:group 'supercite-frames)
-(put 'sc-default-cite-frame 'risky-local-variable t)
(defcustom sc-default-uncite-frame
'(;; do nothing on a blank line
@@ -221,8 +216,8 @@ See the variable `sc-cite-frame-alist' for details."
((sc-cite-regexp) (sc-uncite-line)))
"Default REGI frame for unciting a region."
:type '(repeat (repeat sexp))
+ :risky t
:group 'supercite-frames)
-(put 'sc-default-uncite-frame 'risky-local-variable t)
(defcustom sc-default-recite-frame
'(;; initialize fill state when entering frame
@@ -237,8 +232,8 @@ See the variable `sc-cite-frame-alist' for details."
(end (sc-fill-if-different "")))
"Default REGI frame for reciting a region."
:type '(repeat (repeat sexp))
+ :risky t
:group 'supercite-frames)
-(put 'sc-default-recite-frame 'risky-local-variable t)
(defcustom sc-cite-region-limit t
"This variable controls automatic citation of yanked text.
@@ -428,8 +423,8 @@ to be consulted during attribution selection."
(repeat (cons regexp
(choice (sexp :tag "List to eval")
string)))))
+ :risky t
:group 'supercite-attr)
-(put 'sc-attrib-selection-list 'risky-local-variable t)
(defcustom sc-attribs-preselect-hook nil
"Hook to run before selecting an attribution."
@@ -483,8 +478,8 @@ The variable `sc-preferred-header-style' controls which function in
this list is chosen for automatic reference header insertions.
Electric reference mode will cycle through this list of functions."
:type '(repeat sexp)
+ :risky t
:group 'supercite)
-(put 'sc-rewrite-header-list 'risky-local-variable t)
(defcustom sc-titlecue-regexp "\\s +-+\\s +"
"Regular expression describing the separator between names and titles.
@@ -525,75 +520,67 @@ string."
;; ======================================================================
;; supercite keymaps
-(defvar sc-T-keymap
- (let ((map (make-sparse-keymap)))
- (define-key map "a" #'sc-S-preferred-attribution-list)
- (define-key map "b" #'sc-T-mail-nuke-blank-lines)
- (define-key map "c" #'sc-T-confirm-always)
- (define-key map "d" #'sc-T-downcase)
- (define-key map "e" #'sc-T-electric-references)
- (define-key map "f" #'sc-T-auto-fill-region)
- (define-key map "h" #'sc-T-describe)
- (define-key map "l" #'sc-S-cite-region-limit)
- (define-key map "n" #'sc-S-mail-nuke-mail-headers)
- (define-key map "N" #'sc-S-mail-header-nuke-list)
- (define-key map "o" #'sc-T-electric-circular)
- (define-key map "p" #'sc-S-preferred-header-style)
- (define-key map "s" #'sc-T-nested-citation)
- (define-key map "u" #'sc-T-use-only-preferences)
- (define-key map "w" #'sc-T-fixup-whitespace)
- (define-key map "?" #'sc-T-describe)
- map)
- "Keymap for sub-keymap of setting and toggling functions.")
-
-(defvar sc-mode-map
- (let ((map (make-sparse-keymap)))
- (define-key map "c" #'sc-cite-region)
- (define-key map "f" #'sc-mail-field-query)
- (define-key map "g" #'sc-mail-process-headers)
- (define-key map "h" #'sc-describe)
- (define-key map "i" #'sc-insert-citation)
- (define-key map "o" #'sc-open-line)
- (define-key map "r" #'sc-recite-region)
- (define-key map "\C-p" #'sc-raw-mode-toggle)
- (define-key map "u" #'sc-uncite-region)
- (define-key map "w" #'sc-insert-reference)
- (define-key map "\C-t" sc-T-keymap)
- (define-key map "?" #'sc-describe)
- map)
- "Keymap for Supercite quasi-mode.")
-
-(defvar sc-electric-mode-map
- (let ((map (make-sparse-keymap)))
- (define-key map "p" #'sc-eref-prev)
- (define-key map "n" #'sc-eref-next)
- (define-key map "s" #'sc-eref-setn)
- (define-key map "j" #'sc-eref-jump)
- (define-key map "x" #'sc-eref-abort)
- (define-key map "q" #'sc-eref-abort)
- (define-key map "\r" #'sc-eref-exit)
- (define-key map "\n" #'sc-eref-exit)
- (define-key map "g" #'sc-eref-goto)
- (define-key map "?" #'describe-mode)
- (define-key map "\C-h" #'describe-mode)
- (define-key map [f1] #'describe-mode)
- (define-key map [help] #'describe-mode)
- map)
- "Keymap for `sc-electric-mode' electric references mode.")
-
-
-(defvar sc-minibuffer-local-completion-map
- (let ((map (copy-keymap minibuffer-local-completion-map)))
- (define-key map "\C-t" #'sc-toggle-fn)
- (define-key map " " #'self-insert-command)
- map)
- "Keymap for minibuffer confirmation of attribution strings.")
-
-(defvar sc-minibuffer-local-map
- (let ((map (copy-keymap minibuffer-local-map)))
- (define-key map "\C-t" #'sc-toggle-fn)
- map)
- "Keymap for minibuffer confirmation of attribution strings.")
+(defvar-keymap sc-T-keymap
+ :doc "Keymap for sub-keymap of setting and toggling functions."
+ "a" #'sc-S-preferred-attribution-list
+ "b" #'sc-T-mail-nuke-blank-lines
+ "c" #'sc-T-confirm-always
+ "d" #'sc-T-downcase
+ "e" #'sc-T-electric-references
+ "f" #'sc-T-auto-fill-region
+ "h" #'sc-T-describe
+ "l" #'sc-S-cite-region-limit
+ "n" #'sc-S-mail-nuke-mail-headers
+ "N" #'sc-S-mail-header-nuke-list
+ "o" #'sc-T-electric-circular
+ "p" #'sc-S-preferred-header-style
+ "s" #'sc-T-nested-citation
+ "u" #'sc-T-use-only-preferences
+ "w" #'sc-T-fixup-whitespace
+ "?" #'sc-T-describe)
+
+(defvar-keymap sc-mode-map
+ :doc "Keymap for Supercite quasi-mode."
+ "c" #'sc-cite-region
+ "f" #'sc-mail-field-query
+ "g" #'sc-mail-process-headers
+ "h" #'sc-describe
+ "i" #'sc-insert-citation
+ "o" #'sc-open-line
+ "r" #'sc-recite-region
+ "C-p" #'sc-raw-mode-toggle
+ "u" #'sc-uncite-region
+ "w" #'sc-insert-reference
+ "C-t" sc-T-keymap
+ "?" #'sc-describe)
+
+(defvar-keymap sc-electric-mode-map
+ :doc "Keymap for `sc-electric-mode' electric references mode."
+ "p" #'sc-eref-prev
+ "n" #'sc-eref-next
+ "s" #'sc-eref-setn
+ "j" #'sc-eref-jump
+ "x" #'sc-eref-abort
+ "q" #'sc-eref-abort
+ "RET" #'sc-eref-exit
+ "C-j" #'sc-eref-exit
+ "g" #'sc-eref-goto
+ "?" #'describe-mode
+ "C-h" #'describe-mode
+ "<f1>" #'describe-mode
+ "<help>" #'describe-mode)
+
+
+(defvar-keymap sc-minibuffer-local-completion-map
+ :doc "Keymap for minibuffer confirmation of attribution strings."
+ :parent minibuffer-local-completion-map
+ "C-t" #'sc-toggle-fn
+ "SPC" #'self-insert-command)
+
+(defvar-keymap sc-minibuffer-local-map
+ :doc "Keymap for minibuffer confirmation of attribution strings."
+ :parent minibuffer-local-map
+ "C-t" #'sc-toggle-fn)
;; ======================================================================
@@ -1767,7 +1754,7 @@ is determined non-interactively. The value is queried for in the
minibuffer exactly the same way that `set-variable' does it.
You can see the current value of the variable when the minibuffer is
-querying you by typing `C-h'. Note that the format is changed
+querying you by typing \\`C-h'. Note that the format is changed
slightly from that used by `set-variable' -- the current value is
printed just after the variable's name instead of at the bottom of the
help window."