]> code.delx.au - gnu-emacs/blobdiff - lisp/docref.el
Comment fix.
[gnu-emacs] / lisp / docref.el
index a10d7e486aa1cfaac3e26976f0c78afcc6522f2b..9aa6a604b225830a897ec5c2946b6f6e0658563f 100644 (file)
@@ -1,4 +1,5 @@
-;;; docref.el -- Simple cross references for Elisp documentation strings
+;;; docref.el --- Simple cross references for Elisp documentation strings
+
 ;; Copyright (C) 1994 Free Software Foundation, Inc.
 
 ;; Author: Vadim Geshel <vadik@unas.cs.kiev.ua>
 ;; GNU General Public License for more details.
 
 ;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING.  If not, write to
-;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+;; along with GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
 
 ;;; Commentary:
-;;
+
 ;; This package allows you to use a simple form of cross references in
 ;; your Emacs Lisp documentation strings. Cross-references look like
 ;; \\(type@[label@]data), where type defines a method for retrieving
-;; reference informatin, data is used by a method routine as an argument,
+;; reference information, data is used by a method routine as an argument,
 ;; and label "represents" the reference in text. If label is absent, data
 ;; is used instead.
 ;; 
 ;;; Code:
 
 ;; User customizable variables
+(defgroup docref nil
+  "Simple cross references for Elisp documentation strings."
+  :prefix "docref-"
+  :group 'help
+  :group 'lisp
+  :group 'docs)
 
-(defvar docref-highlight-p t
+(defcustom docref-highlight-p t
   "*If non-nil, \\(f@docref-subst) highlights cross-references.
 Under window system it highlights them with face defined by
 \\(v@docref-highlight-face), on character terminal highlighted references
-look like cross-references in info mode.")
+look like cross-references in info mode."
+  :type 'boolean
+  :group 'docref)
 
-(defvar docref-highlight-face 'highlight
-  "*Face used to highlight cross-references (used by \\(f@docref-subst))")
+(defcustom docref-highlight-face 'highlight
+  "*Face used to highlight cross-references (used by \\(f@docref-subst))"
+  :type 'face
+  :group 'docref)
 
-(defvar docref-methods-alist
+(defcustom docref-methods-alist
   '(("f" . docref-describe-function)   ; reference to a function documentation
     ("v" . docref-describe-variable)   ; reference to a variable documentation
     ("F" . docref-read-file)           ; reference to a file contents
@@ -79,16 +91,22 @@ look like cross-references in info mode.")
 
 The car of each element is a string that serves as `type' in cross-references.
 \(See \\(f@docref-subst)).  The cdr is a function of one argument,
-to be called to find this reference.")
+to be called to find this reference."
+  :type '(repeat (cons string function))
+  :group 'docref)
 
-(defvar docref-back-label "\nback"
-  "Label to use by \\(f@docref-subst) for the go-back reference.")
+(defcustom docref-back-label "\nback"
+  "Label to use by \\(f@docref-subst) for the go-back reference."
+  :type 'string
+  :group 'docref)
 
 (defvar docref-back-reference nil
   "If non-nil, this is a go-back reference to add to the current buffer.
 The value specifies how to go back.  It should be suitable for use
 as the second argument to \\(f@docref-insert-label).
 \\(f@docref-subst) uses this to set up the go-back reference.")
+
+(defvar docref-last-active-buffer)
 \f
 ;;;###autoload
 (defun docref-setup ()
@@ -125,7 +143,7 @@ Find cross-reference information in a buffer and
 highlight them with face defined by \\(v@docref-highlight-face).
 
 Cross-reference has the following format: \\ (TYPE[@LABEL]@DATA), where
-TYPE defines method used to retrive xref data (like reading from file or
+TYPE defines method used to retrieve xref data (like reading from file or
 calling \\(f@describe-function)), DATA is an argument to this method
 \(like file name or function name), and LABEL is displayed in text using
 \\(v@docref-highlight-face).