]> code.delx.au - gnu-emacs/blobdiff - lisp/mail/supercite.el
Derive secrets-mode from special-mode
[gnu-emacs] / lisp / mail / supercite.el
index 084b623080adda7e92430794c3a8903681cf205a..3d4ccf90e1bb47516b127fa932655a0028bb9b6a 100644 (file)
@@ -1,10 +1,10 @@
 ;;; supercite.el --- minor mode for citing mail and news replies
 
-;; Copyright (C) 1993, 1997, 2001-201 Free Software Foundation, Inc.
+;; Copyright (C) 1993, 1997, 2001-2016 Free Software Foundation, Inc.
 
 ;; Author: 1993 Barry A. Warsaw <bwarsaw@python.org>
-;; Maintainer:    Glenn Morris <rgm@gnu.org>
-;; Created:       February 1993
+;; Maintainer: emacs-devel@gnu.org
+;; Created: February 1993
 ;; Keywords: mail, news
 
 ;; This file is part of GNU Emacs.
@@ -184,7 +184,9 @@ See the variable `sc-cite-frame-alist' for details."
     ;; paragraph, unless sc-cite-blank-lines-p is non-nil, in which
     ;; case we treat blank lines just like any other line.
     ("^[ \t]*$"                 (if sc-cite-blank-lines-p
-                                   (sc-cite-line)
+                                   (if sc-nested-citation-p
+                                       (sc-add-citation-level)
+                                     (sc-cite-line))
                                  (sc-fill-if-different "")))
     ;; do nothing if looking at a reference tag. make sure that the
     ;; tag string isn't the empty string since this will match every
@@ -504,8 +506,6 @@ string."
 ;; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 ;; end user configuration variables
 \f
-(define-obsolete-variable-alias 'sc-version 'emacs-version "23.1")
-
 (defvar sc-mail-info nil
   "Alist of mail header information gleaned from reply buffer.")
 (defvar sc-attributions nil
@@ -557,10 +557,8 @@ string."
     (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 "v"    'sc-version)
     (define-key map "w"    'sc-insert-reference)
     (define-key map "\C-t"  sc-T-keymap)
-    (define-key map "\C-b" 'sc-submit-bug-report)
     (define-key map "?"    'sc-describe)
     map)
   "Keymap for Supercite quasi-mode.")
@@ -888,10 +886,10 @@ Action can be one of: View, Modify, Add, or Delete."
 
 (defun sc-attribs-%@-addresses (from &optional delim)
   "Extract the author's email terminus from email address FROM.
-Match addresses of the style ``name%[stuff].'' when called with DELIM
-of \"%\" and addresses of the style ``[stuff]name@[stuff]'' when
+Match addresses of the style \"name%[stuff].\" when called with DELIM
+of \"%\" and addresses of the style \"[stuff]name@[stuff]\" when
 called with DELIM \"@\".  If DELIM is nil or not provided, matches
-addresses of the style ``name''."
+addresses of the style \"name\"."
   (and (string-match (concat "[-[:alnum:]_.]+" delim) from 0)
        (substring from
                  (match-beginning 0)
@@ -899,7 +897,7 @@ addresses of the style ``name''."
 
 (defun sc-attribs-!-addresses (from)
   "Extract the author's email terminus from email address FROM.
-Match addresses of the style ``[stuff]![stuff]...!name[stuff].''"
+Match addresses of the style \"[stuff]![stuff]...!name[stuff].\""
   (let ((eos (length from))
        (mstart (string-match "![-[:alnum:]_.]+\\([^-![:alnum:]_.]\\|$\\)"
                              from 0))
@@ -909,7 +907,7 @@ Match addresses of the style ``[stuff]![stuff]...!name[stuff].''"
 
 (defun sc-attribs-<>-addresses (from)
   "Extract the author's email terminus from email address FROM.
-Match addresses of the style ``<name[stuff]>.''"
+Match addresses of the style \"<name[stuff]>.\""
   (and (string-match "<\\(.*\\)>" from)
        (match-string 1 from)))
 
@@ -1845,8 +1843,7 @@ Note on function names in this list: all functions of the form
 ;; ======================================================================
 ;; published interface to mail and news readers
 
-(define-minor-mode sc-minor-mode
-  "Supercite minor mode."
+(define-minor-mode sc-minor-mode nil
   :group 'supercite
   :lighter (" SC" (sc-auto-fill-region-p
                   (":f" (sc-fixup-whitespace-p "w"))
@@ -1968,29 +1965,11 @@ cited."
        (insert (sc-mail-field "sc-citation"))
       (error "Line is already cited"))))
 
-;; The argument logic here is crazy.
-(defun sc-version (message)
-  "Return the current Supercite version.
-If MESSAGE is non-nil (interactively, with no prefix argument),
-echoes the version in the minibuffer.  Otherwise, inserts the
-version at point."
-  (interactive (list (not current-prefix-arg)))
-  (let ((verstr (format "Using Supercite.el %s" emacs-version)))
-    (if message
-       (message verstr)
-      (insert "`sc-version' says: " verstr))))
-
-(make-obsolete 'sc-version 'emacs-version "23.1")
-
 (defun sc-describe ()
   "Read the Supercite info node."
   (interactive)
   (info "(SC)top"))
 
-(make-obsolete 'sc-describe "read the SC manual using `info'." "23.1")
-
-(define-obsolete-function-alias 'sc-submit-bug-report 'report-emacs-bug "23.1")
-
 \f
 ;; useful stuff
 (provide 'supercite)