]> code.delx.au - gnu-emacs/blobdiff - lisp/abbrev.el
(ps-mule-begin-job): Redo this change "if
[gnu-emacs] / lisp / abbrev.el
index ff6ae3ac672495173cbf117c43c2b671b4cb68ed..c6133be034f1c62705d0762db1fc039964e4515f 100644 (file)
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 1985, 1986, 1987, 1992 Free Software Foundation, Inc.
 
-;; Keywords: abbrev
+;; Keywords: abbrev convenience
 
 ;; This file is part of GNU Emacs.
 
 
 ;;; Code:
 
-(defvar only-global-abbrevs nil "\
-*t means user plans to use global abbrevs only.
-Makes the commands to define mode-specific abbrevs define global ones instead.")
+(defcustom only-global-abbrevs nil 
+  "*t means user plans to use global abbrevs only.
+This makes the commands that normally define mode-specific abbrevs
+define global abbrevs instead."
+  :type 'boolean
+  :group 'abbrev-mode
+  :group 'convenience)
 
 (defun abbrev-mode (arg)
   "Toggle abbrev mode.
@@ -41,6 +45,18 @@ and be replaced by its expansion."
        (if (null arg) (not abbrev-mode)
          (> (prefix-numeric-value arg) 0)))
   (force-mode-line-update))
+
+(defcustom abbrev-mode nil
+  "Toggle abbrev mode.
+Non-nil means automatically expand abbrevs as they are inserted.
+
+This variable automatically becomes buffer-local when set in any fashion.
+Changing it with \\[customize] sets the default value.
+Use the command `abbrev-mode' to enable or disable Abbrev mode in the current
+buffer."
+  :type 'boolean
+  :group 'abbrev-mode)
+
 \f
 (defvar edit-abbrevs-map nil
   "Keymap used in edit-abbrevs.")
@@ -254,7 +270,7 @@ Expands the abbreviation after defining it."
                                               (setq nameloc (point))))))
     (set-text-properties 0 (length name) nil name)
     (setq exp (read-string (format "%s expansion for \"%s\": "
-                                  type name)))
+                                  type name) nil nil nil t))
     (if (or (not (abbrev-expansion name table))
            (y-or-n-p (format "%s expands to \"%s\"; redefine? "
                              name (abbrev-expansion name table))))