diff options
Diffstat (limited to 'lisp/mail/supercite.el')
-rw-r--r-- | lisp/mail/supercite.el | 102 |
1 files changed, 52 insertions, 50 deletions
diff --git a/lisp/mail/supercite.el b/lisp/mail/supercite.el index 99ac41dd9ba..dc1c641052b 100644 --- a/lisp/mail/supercite.el +++ b/lisp/mail/supercite.el @@ -1,4 +1,4 @@ -;;; supercite.el --- minor mode for citing mail and news replies +;;; supercite.el --- minor mode for citing mail and news replies -*- lexical-binding: t; -*- ;; Copyright (C) 1993, 1997, 2001-2021 Free Software Foundation, Inc. @@ -527,71 +527,71 @@ string." (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) + (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) + (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) + (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) + (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) + (define-key map "\C-t" #'sc-toggle-fn) map) "Keymap for minibuffer confirmation of attribution strings.") @@ -1109,6 +1109,8 @@ Only used during confirmation." (setq sc-attrib-or-cite (not sc-attrib-or-cite)) (throw 'sc-reconfirm t)) +(defvar completer-disable) ;; From some `completer.el' package. + (defun sc-select-attribution () "Select an attribution from `sc-attributions'. @@ -1150,7 +1152,7 @@ to the auto-selected attribution string." (setq attribution attrib attriblist nil)) ((listp attrib) - (setq attribution (eval attrib)) + (setq attribution (eval attrib t)) (if (stringp attribution) (setq attriblist nil) (setq attribution nil @@ -1593,7 +1595,7 @@ error occurs." (let ((ref (nth sc-eref-style sc-rewrite-header-list))) (condition-case err (progn - (eval ref) + (eval ref t) (let ((lines (count-lines (point-min) (point-max)))) (or nomsg (message "Ref header %d [%d line%s]: %s" sc-eref-style lines @@ -1767,8 +1769,7 @@ 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." - (let* ((minibuffer-help-form '(funcall myhelp)) - (myhelp + (let* ((myhelp (lambda () (with-output-to-temp-buffer "*Help*" (prin1 var) @@ -1784,7 +1785,8 @@ help window." 1)) (with-current-buffer standard-output (help-mode)) - nil)))) + nil))) + (minibuffer-help-form `(funcall #',myhelp))) (set var (eval-minibuffer (format "Set %s to value: " var))))) (defmacro sc-toggle-symbol (rootname) |