changeset 20959:9b831f34ff7d

Customized.
author Stephen Eglen <stephen@gnu.org>
date Sun, 22 Feb 1998 17:34:42 +0000
parents 806727604be8
children 2f9b7d0689a9
files lisp/textmodes/bib-mode.el lisp/textmodes/picture.el lisp/textmodes/refbib.el lisp/textmodes/refer.el lisp/textmodes/scribe.el lisp/textmodes/spell.el
diffstat 6 files changed, 163 insertions(+), 71 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/textmodes/bib-mode.el	Sun Feb 22 01:06:06 1998 +0000
+++ b/lisp/textmodes/bib-mode.el	Sun Feb 22 17:34:42 1998 +0000
@@ -30,12 +30,20 @@
 ;;   and appropriate keys are presented for various kinds of entries.
 
 ;;; Code:
+(defgroup bib nil
+  "Major mode for editing bib files."
+  :prefix "bib-"
+  :group 'wp)
 
-(defvar bib-file "~/my-bibliography.bib" 
-   "Default name of file used by `addbib'.")
+(defcustom bib-file "~/my-bibliography.bib"
+  "Default name of file used by `addbib'."
+    :type 'file
+    :group 'bib)
 
-(defvar unread-bib-file "~/to-be-read.bib"
-   "Default name of file used by `unread-bib' in Bib mode.")
+(defcustom unread-bib-file "~/to-be-read.bib"
+   "Default name of file used by `unread-bib' in Bib mode."
+   :type 'file
+   :group 'bib)
 
 (defvar bib-mode-map (copy-keymap text-mode-map))
 (define-key bib-mode-map "\C-M" 'return-key-bib)
@@ -137,8 +145,10 @@
       ))
 
 
-(defvar bib-auto-capitalize t 
-"*True to automatically capitalize appropriate fields in Bib mode.")
+(defcustom bib-auto-capitalize t
+  "*True to automatically capitalize appropriate fields in Bib mode."
+  :type 'boolean
+  :group 'bib)
 
 (defconst bib-capitalized-fields "%[AETCBIJR]")
 
--- a/lisp/textmodes/picture.el	Sun Feb 22 01:06:06 1998 +0000
+++ b/lisp/textmodes/picture.el	Sun Feb 22 17:34:42 1998 +0000
@@ -31,18 +31,36 @@
 
 ;;; Code:
 
-(defvar picture-rectangle-ctl ?+
-  "*Character picture-draw-rectangle uses for top left corners.")
-(defvar picture-rectangle-ctr ?+
-  "*Character picture-draw-rectangle uses for top right corners.")
-(defvar picture-rectangle-cbr ?+
-  "*Character picture-draw-rectangle uses for bottom right corners.")
-(defvar picture-rectangle-cbl ?+
-  "*Character picture-draw-rectangle uses for bottom left corners.")
-(defvar picture-rectangle-v   ?|
-  "*Character picture-draw-rectangle uses for vertical lines.")
-(defvar picture-rectangle-h   ?-
-  "*Character picture-draw-rectangle uses for horizontal lines.")
+(defgroup picture nil
+  "Picture mode  --- editing using quarter-plane screen model."
+  :prefix "picture-"
+  :group 'editing)
+
+(defcustom picture-rectangle-ctl ?+
+  "*Character `picture-draw-rectangle' uses for top left corners."
+  :type 'character
+  :group 'picture)
+(defcustom picture-rectangle-ctr ?+
+  "*Character `picture-draw-rectangle' uses for top right corners."
+  :type 'character
+  :group 'picture)
+(defcustom picture-rectangle-cbr ?+
+  "*Character `picture-draw-rectangle' uses for bottom right corners."
+  :type 'character
+  :group 'picture)
+(defcustom picture-rectangle-cbl ?+
+  "*Character `picture-draw-rectangle' uses for bottom left corners."
+  :type 'character
+  :group 'picture)
+(defcustom picture-rectangle-v   ?|
+  "*Character `picture-draw-rectangle' uses for vertical lines."
+  :type 'character
+  :group 'picture)
+(defcustom picture-rectangle-h   ?-
+  "*Character `picture-draw-rectangle' uses for horizontal lines."
+  :type 'character
+  :group 'picture)
+
 
 ;; Picture Movement Commands
 
@@ -290,8 +308,8 @@
 
 ;; Picture Tabs
 
-(defvar picture-tab-chars "!-~"
-  "*A character set which controls behavior of commands
+(defcustom picture-tab-chars "!-~"
+  "*A character set which controls behavior of commands.
 \\[picture-set-tab-stops] and \\[picture-tab-search].  It is NOT a
 regular expression, any regexp special characters will be quoted.
 It defines a set of \"interesting characters\" to look for when setting
@@ -313,7 +331,9 @@
 character `\\' in the set it must be preceded by itself: \"\\\\\".
 
 The command \\[picture-tab-search] is defined to move beneath (or to) a
-character belonging to this set independent of the tab stops list.")
+character belonging to this set independent of the tab stops list."
+  :type 'string
+  :group 'picture)
 
 (defun picture-set-tab-stops (&optional arg)
   "Set value of `tab-stop-list' according to context of this line.
@@ -561,9 +581,11 @@
       (define-key picture-mode-map "\C-c/" 'picture-movement-sw)
       (define-key picture-mode-map "\C-c\\" 'picture-movement-se)))
 
-(defvar picture-mode-hook nil
+(defcustom picture-mode-hook nil
   "If non-nil, its value is called on entry to Picture mode.
-Picture mode is invoked by the command \\[picture-mode].")
+Picture mode is invoked by the command \\[picture-mode]."
+  :type 'hook
+  :group 'picture)
 
 (defvar picture-mode-old-local-map)
 (defvar picture-mode-old-mode-name)
--- a/lisp/textmodes/refbib.el	Sun Feb 22 01:06:06 1998 +0000
+++ b/lisp/textmodes/refbib.el	Sun Feb 22 17:34:42 1998 +0000
@@ -59,12 +59,20 @@
 ;**********************************************************
 ; User Parameters
 
-(defvar r2b-trace-on nil "*trace conversion")
+(defgroup refbib nil
+  "Convert refer-style references to ones usable by Latex bib."
+  :prefix "r2b-"
+  :group 'wp)
 
-(defvar r2b-journal-abbrevs
-   '(  
-       )
-   "  Abbreviation list for journal names.  
+(defcustom r2b-trace-on nil
+  "*Non-nil means trace conversion."
+  :type 'boolean
+  :group 'refbib)
+
+(defcustom r2b-journal-abbrevs
+  '(  
+    )
+  "Abbreviation list for journal names.  
 If the car of an element matches a journal name exactly, it is replaced by
 the cadr when output.  Braces must be included if replacement is a
 {string}, but not if replacement is a bibtex abbreviation.  The cadr
@@ -75,26 +83,31 @@
   For example, a value of '((\"Aij\" \"{Artificial Intelligence}\")
 \(\"Ijcai81\" \"ijcai7\")) would expand Aij to the text string
 \"Artificial Intelligence\", but would replace Ijcai81 with the 
-BibTeX macro \"ijcai7\".")
+BibTeX macro \"ijcai7\"."
+  :type '(repeat (list string string))
+  :group 'refbib)
 
-(defvar r2b-booktitle-abbrevs 
-   '(  
-       )
-   "  Abbreviation list for book and proceedings names.  If the car of
-an element matches a title or booktitle exactly, it is replaced by 
-the cadr when output.  Braces must be included if replacement is 
-a {string}, but not if replacement is a bibtex abbreviation.  The cadr 
-may be eliminated if is exactly the same as the car.  
+(defcustom r2b-booktitle-abbrevs 
+  '(  
+    )
+  "Abbreviation list for book and proceedings names.
+If the car of an element matches a title or booktitle exactly, it is
+replaced by the cadr when output.  Braces must be included if
+replacement is a {string}, but not if replacement is a bibtex
+abbreviation.  The cadr may be eliminated if is exactly the same as
+the car.
   Because titles are capitalized before matching, the abbreviated title
 should be listed as beginning with a capital letter, even if it doesn't.
   For example, a value of '((\"Aij\" \"{Artificial Intelligence}\")
 \(\"Ijcai81\" \"ijcai7\")) would expand Aij to the text string
 \"Artificial Intelligence\", but would replace Ijcai81 with the 
-BibTeX macro \"ijcai7\".")
+BibTeX macro \"ijcai7\"."
+  :type '(repeat (list string string))
+  :group 'refbib)
 
-(defvar r2b-proceedings-list
-   '()
-   "  Assoc list of books or journals which are really conference proceedings,
+(defcustom r2b-proceedings-list
+  '()
+  "Assoc list of books or journals which are really conference proceedings,
 but whose name and whose abbrev expansion (as defined in `r2b-journal-abbrevs'
 and `r2b-booktitle-abbrevs') does not contain the words \"conference\" or
 \"proceedings\".  (Those cases are handled automatically.)
@@ -106,16 +119,19 @@
 `r2b-proceedings-list' should be '((\"Ijcai81\") ...).  If instead its
 expansion were \"Proceedings of the Seventh International Conference
 on Artificial Intelligence\", then you would NOT need to include Ijcai81
-in `r2b-proceedings-list' (although it wouldn't cause an error).")
+in `r2b-proceedings-list' (although it wouldn't cause an error)."
+  :type '(repeat (list string string))
+  :group 'refbib)
 
 (defvar r2b-additional-stop-words
-	 "Some\\|What"
-   "Words not to be used to build the citation key.
+  "Some\\|What"
+  "Words not to be used to build the citation key.
 This is in addition to the `r2b-capitalize-title-stop-words'.")
 
-(defvar r2b-delimit-with-quote
-  t
-  "*If true, then use \" to delimit fields, otherwise use braces")
+(defcustom r2b-delimit-with-quote t
+  "*If true, then use \" to delimit fields, otherwise use braces."
+  :type 'boolean
+  :group 'refbib)
 
 ;**********************************************************
 ; Utility Functions
@@ -189,8 +205,16 @@
    "Returns string matched in current buffer."
    (buffer-substring (match-beginning exp) (match-end exp)))
 
-(defvar r2b-out-buf-name "*Out*" "*output from refer-to-bibtex" )
-(defvar r2b-log-name "*Log*" "*logs errors from refer-to-bibtex" )
+(defcustom r2b-out-buf-name "*Out*"
+  "*Name of buffer for output from refer-to-bibtex."
+  :type 'string
+  :group 'refbib)
+
+(defcustom r2b-log-name "*Log*"
+  "*Name of buffer for logs errors from refer-to-bibtex."
+  :type 'string
+  :group 'refbib)
+
 (defvar r2b-in-buf nil)
 (defvar r2b-out-buf nil)
 (defvar r2b-log nil)
@@ -663,7 +687,10 @@
       r2b-out-buf-name r2b-log-name)
    )
 
-(defvar r2b-load-quietly nil "*Don't print help message when loaded")
+(defcustom r2b-load-quietly nil
+  "*Non-nil means don't print help message when loaded."
+  :type 'boolean
+  :group 'refbib)
 
 (defvar r2b-help-message
 "                   Refer to Bibtex Bibliography Conversion
--- a/lisp/textmodes/refer.el	Sun Feb 22 01:06:06 1998 +0000
+++ b/lisp/textmodes/refer.el	Sun Feb 22 17:34:42 1998 +0000
@@ -72,7 +72,12 @@
 
 (provide 'refer)
 
-(defvar refer-bib-directory nil
+(defgroup refer nil
+  "Look up references in bibliography files."
+  :prefix "refer-"
+  :group 'wp)
+
+(defcustom refer-bib-directory nil
   "Directory, or list of directories, to search for \\.bib files. Can
 be set to 'bibinputs or 'texinputs, in which case the environment
 variable BIBINPUTS or TEXINPUTS, respectively, is used to obtain a
@@ -87,10 +92,12 @@
 the default search path. Since Refer does not know that default path,
 it cannot search it. Include that path explicitly in your BIBINPUTS
 environment if you really want it searched (which is not likely to
-happen anyway).")
+happen anyway)."
+  :type '(choice (repeat directory) (const bibinputs) (const texinputs))
+  :group 'refer)
 
-(defvar refer-bib-files 'dir
-   "*List of \\.bib files to search for references,
+(defcustom refer-bib-files 'dir
+  "*List of \\.bib files to search for references,
 or one of the following special values:
 nil  = prompt for \\.bib file (if visiting a \\.bib file, use it as default)
 auto = read \\.bib file names from appropriate command in buffer (see
@@ -104,16 +111,20 @@
 If refer-bib-files is nil, auto or dir, it is setq'd to the appropriate
 list of files when it is first used if refer-cache-bib-files is t.  If
 refer-cache-bib-files is nil, the list of \\.bib files to use is re-read
-each time it is needed.")
+each time it is needed."
+  :type '(choice (repeat file) (const nil) (const auto) (const dir))
+  :group 'refer)
 
-(defvar refer-cache-bib-files t
-   "*Variable determining whether the value of refer-bib-files should be cached.
+(defcustom refer-cache-bib-files t
+  "*Variable determining whether the value of refer-bib-files should be cached.
 If t, initialize the value of refer-bib-files the first time it is used.  If
 nil, re-read the list of \\.bib files depending on the value of refer-bib-files
-each time it is needed.")
+each time it is needed."
+  :type 'boolean
+  :group 'refer)
 
-(defvar refer-bib-files-regexp "\\\\bibliography"
-   "*Regexp matching a bibliography file declaration.
+(defcustom refer-bib-files-regexp "\\\\bibliography"
+  "*Regexp matching a bibliography file declaration.
 The current buffer is expected to contain a line such as
 \\bibliography{file1,file2,file3}
 which is read to set up refer-bib-files.  The regexp must specify the command
@@ -121,7 +132,9 @@
 command is expected to specify a file name, or a list of comma-separated file
 names, within curly braces.
 If a specified file doesn't exist and has no extension, a \\.bib extension
-is automatically tried.")
+is automatically tried."
+  :type 'regexp
+  :group 'refer)
 
 (make-variable-buffer-local 'refer-bib-files)
 (make-variable-buffer-local 'refer-cache-bib-files)
--- a/lisp/textmodes/scribe.el	Sun Feb 22 01:06:06 1998 +0000
+++ b/lisp/textmodes/scribe.el	Sun Feb 22 17:34:42 1998 +0000
@@ -30,21 +30,32 @@
 
 ;;; Code:
 
+(defgroup scribe nil
+  "Scribe mode."
+  :prefix "scribe-"
+  :group 'wp)
+
 (defvar scribe-mode-syntax-table nil
   "Syntax table used while in scribe mode.")
 
 (defvar scribe-mode-abbrev-table nil
   "Abbrev table used while in scribe mode.")
 
-(defvar scribe-fancy-paragraphs nil
-  "*Non-NIL makes Scribe mode use a different style of paragraph separation.")
+(defcustom scribe-fancy-paragraphs nil
+  "*Non-NIL makes Scribe mode use a different style of paragraph separation."
+  :type 'boolean
+  :group 'scribe)
 
-(defvar scribe-electric-quote nil
-  "*Non-NIL makes insert of double quote use `` or '' depending on context.")
+(defcustom scribe-electric-quote nil
+  "*Non-NIL makes insert of double quote use `` or '' depending on context."
+  :type 'boolean
+  :group 'scribe)
 
-(defvar scribe-electric-parenthesis nil
+(defcustom scribe-electric-parenthesis nil
   "*Non-NIL makes parenthesis char ( (]}> ) automatically insert its close
-if typed after an @Command form.")
+if typed after an @Command form."
+  :type 'boolean
+  :group 'scribe)
 
 (defconst scribe-open-parentheses "[({<"
   "Open parenthesis characters for Scribe.")
--- a/lisp/textmodes/spell.el	Sun Feb 22 01:06:06 1998 +0000
+++ b/lisp/textmodes/spell.el	Sun Feb 22 17:34:42 1998 +0000
@@ -31,13 +31,22 @@
 
 ;;; Code:
 
-(defvar spell-command "spell"
-  "*Command to run the spell program.")
+(defgroup spell nil
+  "Interface to the UNIX spell(1) program."
+  :prefix "spell-"
+  :group 'applications)
 
-(defvar spell-filter nil
+(defcustom spell-command "spell"
+  "*Command to run the spell program."
+  :type 'string
+  :group 'spell)
+
+(defcustom spell-filter nil
   "*Filter function to process text before passing it to spell program.
 This function might remove text-processor commands.
-nil means don't alter the text before checking it.")
+nil means don't alter the text before checking it."
+  :type 'function
+  :group 'spell)
 
 ;;;###autoload
 (put 'spell-filter 'risky-local-variable t)