changeset 17665:b11021ca3525

Use defcustom.
author Richard M. Stallman <rms@gnu.org>
date Mon, 05 May 1997 15:06:25 +0000
parents d8cb277f0ce8
children ca11152dcad5
files lisp/emacs-lisp/lisp.el lisp/frame.el lisp/menu-bar.el lisp/window.el
diffstat 4 files changed, 33 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emacs-lisp/lisp.el	Mon May 05 15:00:53 1997 +0000
+++ b/lisp/emacs-lisp/lisp.el	Mon May 05 15:06:25 1997 +0000
@@ -29,14 +29,18 @@
 ;;; Code:
 
 ;; Note that this variable is used by non-lisp modes too.
-(defvar defun-prompt-regexp nil
+(defcustom defun-prompt-regexp nil
   "*Non-nil => regexp to ignore, before the character that starts a defun.
 This is only necessary if the opening paren or brace is not in column 0.
-See `beginning-of-defun'.")
+See `beginning-of-defun'."
+  :type 'boolean
+  :group 'lisp)
 (make-variable-buffer-local 'defun-prompt-regexp)
 
-(defvar parens-require-spaces t
-  "Non-nil => `insert-parentheses' should insert whitespace as needed.")
+(defcustom parens-require-spaces t
+  "Non-nil => `insert-parentheses' should insert whitespace as needed."
+  :type 'boolean
+  :group 'lisp)
 
 (defun forward-sexp (&optional arg)
   "Move forward across one balanced expression (sexp).
--- a/lisp/frame.el	Mon May 05 15:00:53 1997 +0000
+++ b/lisp/frame.el	Mon May 05 15:06:25 1997 +0000
@@ -1,6 +1,6 @@
 ;;; frame.el --- multi-frame management independent of window systems.
 
-;; Copyright (C) 1993, 1994 Free Software Foundation, Inc.
+;; Copyright (C) 1993, 1994, 1996, 1997 Free Software Foundation, Inc.
 
 ;; Maintainer: FSF
 ;; Keywords: internal
@@ -72,7 +72,7 @@
       (function (lambda ()
 		  (make-frame pop-up-frame-alist))))
 
-(defvar special-display-frame-alist
+(defcustom special-display-frame-alist
   '((height . 14) (width . 80) (unsplittable . t))
   "*Alist of frame parameters used when creating special frames.
 Special frames are used for buffers whose names are in
@@ -80,7 +80,11 @@
 one of the regular expressions in `special-display-regexps'.
 This variable can be set in your init file, like this:
   (setq special-display-frame-alist '((width . 80) (height . 20)))
-These supersede the values given in `default-frame-alist'.")
+These supersede the values given in `default-frame-alist'."
+  :type '(repeat (cons :format "%v"
+			 (symbol :tag "Parameter")
+			 (sexp :tag "Value")))
+  :group 'frames)
 
 ;; Display BUFFER in its own frame, reusing an existing window if any.
 ;; Return the window chosen.
@@ -675,8 +679,11 @@
   (modify-frame-parameters (selected-frame)
 			   (list (cons 'auto-lower (> arg 0)))))
 
-(defvar scroll-bar-side 'left
-  "*Specify which side scroll bars should be on.  Value is `left' or `right'.")
+(defcustom scroll-bar-side 'left
+  "*Specify which side scroll bars should be on.  Value is `left' or `right'."
+  :type '(choice (const left)
+		 (const right))
+  :group 'frames)
 
 (defun toggle-scroll-bar (arg)
   "Toggle whether or not the selected frame has vertical scroll bars.
--- a/lisp/menu-bar.el	Mon May 05 15:00:53 1997 +0000
+++ b/lisp/menu-bar.el	Mon May 05 15:06:25 1997 +0000
@@ -28,11 +28,14 @@
 
 ;;; User options:
 
-(defvar buffers-menu-max-size 10
+(defcustom buffers-menu-max-size 10
   "*Maximum number of entries which may appear on the Buffers menu.
 If this is 10, then only the ten most-recently-selected buffers are shown.
 If this is nil, then all buffers are shown.
-A large number or nil slows down menu responsiveness.")
+A large number or nil slows down menu responsiveness."
+  :type '(choice integer
+		 (const :tag "All" nil))
+  :group 'mouse)
 
 ;; Don't clobber an existing menu-bar keymap, to preserve any menu-bar key
 ;; definitions made in loaddefs.el.
@@ -422,8 +425,10 @@
 		    pending-undo-list)
 	     buffer-undo-list)))
 
-(defvar yank-menu-length 20
-  "*Maximum length to display in the yank-menu.")
+(defcustom yank-menu-length 20
+  "*Maximum length to display in the yank-menu."
+  :type 'integer
+  :group 'mouse)
 
 (defun menu-bar-update-yank-menu (string old)
   (let ((front (car (cdr yank-menu)))
--- a/lisp/window.el	Mon May 05 15:00:53 1997 +0000
+++ b/lisp/window.el	Mon May 05 15:06:25 1997 +0000
@@ -142,11 +142,13 @@
 		  'nomini)))
 
 ;;; I think this should be the default; I think people will prefer it--rms.
-(defvar split-window-keep-point t
+(defcustom split-window-keep-point t
   "*If non-nil, split windows keeps the original point in both children.
 This is often more convenient for editing.
 If nil, adjust point in each of the two windows to minimize redisplay.
-This is convenient on slow terminals, but point can move strangely.")
+This is convenient on slow terminals, but point can move strangely."
+  :type 'boolean
+  :group 'windows)
 
 (defun split-window-vertically (&optional arg)
   "Split current window into two windows, one above the other.