From xemacs-m  Sat May  3 21:47:40 1997
Received: from jagor.srce.hr (hniksic@jagor.srce.hr [161.53.2.130])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id VAA13015
	for <xemacs-beta@xemacs.org>; Sat, 3 May 1997 21:47:38 -0500 (CDT)
Received: (from hniksic@localhost)
          by jagor.srce.hr (8.8.5/8.8.4)
	  id EAA10814; Sun, 4 May 1997 04:47:17 +0200 (MET DST)
To: XEmacs Developers <xemacs-beta@xemacs.org>, emacs-custom@sunsite.auc.dk
Subject: Customization of built-in variables
X-Save-Project-Gutenberg: <URL:http://www.promo.net/pg/nl/pgny_nov96.html>
X-Attribution: Hrv
X-Face: Mie8:rOV<\c/~z{s.X4A{!?vY7{drJ([U]0O=W/<W*SMo/Mv:58:*_y~ki>xDi&N7XG
        KV^$k0m3Oe/)'e%3=$PCR&3ITUXH,cK>]bci&<qQ>Ff%x_>1`T(+M2Gg/fgndU%k*ft
        [(7._6e0n-V%|%'[c|q:;}td$#INd+;?!-V=c8Pqf}3J
From: Hrvoje Niksic <hniksic@srce.hr>
Date: 04 May 1997 04:47:17 +0200
Message-ID: <kigrafoj6mi.fsf@jagor.srce.hr>
Lines: 87
X-Mailer: Gnus v5.4.50/XEmacs 19.15

I think I have devised a way to count all the user-settable builtin
variables, so that they can be customized.  Does this kludge work the
way I think it does?

;; Return a list of user-settable builtin variables of type TYPE
(defun builtins (type)
  (let ((l nil)
	doc)
    (mapatoms (lambda (sym)
		(when (eq (built-in-variable-type sym) type)
		  (setq
		   doc (documentation-property sym 'variable-documentation))
		  (and doc
		       (> (length doc) 0)
		       (eq (aref doc 0) ?*)
		       (push sym l)))))
    l))

;; "Pretty-print" all that might be interesting
(let ((x '(boolean integer object current-buffer default-buffer
	   selected-console default-console const-specifier)))
  (while x
    (insert (format "%s:\n%s\n\n"
		    (car x)
		    (builtins (car x))))
    (pop x)))

There aren't even that many of them -- 72, if I count correctly (in
19.15) A night's work. :-)

This is the result I got in 19.15 by running the code.

boolean:
(indent-tabs-mode vms-stmlf-recfm x-allow-sendevents
no-redraw-on-reenter visible-bell zmacs-regions debug-on-quit
scroll-on-clipped-lines delete-exited-processes
load-warn-when-source-newer load-warn-when-source-only abbrev-all-caps
modifier-keys-are-sticky truncate-partial-width-windows
load-ignore-elc-files)

integer:
(window-min-width bell-volume echo-keystrokes gc-cons-threshold
next-screen-context-lines auto-save-interval scroll-step
window-min-height)

object:
(forward-word-regexp exec-path debug-on-signal
completion-ignored-extensions shell-file-name stack-trace-on-error
debug-on-error delete-auto-save-files inhibit-read-only
auto-save-file-format menubar-pointer-glyph stack-trace-on-signal
allow-deletion-of-last-visible-frame scrollbar-pointer-glyph
file-name-handler-alist load-path backward-word-regexp)

current-buffer:
(truncate-lines tab-width case-fold-search ctl-arrow fill-column
left-margin)

default-buffer:
(default-major-mode)

selected-console:
nil

default-console:
nil

;; once cus-spec gets going...
const-specifier:
(minimum-line-ascent text-cursor-visible-p left-toolbar-visible-p
scrollbar-width bottom-toolbar-height default-toolbar-width
right-toolbar-width default-toolbar-height left-toolbar-width
current-display-table default-toolbar-visible-p use-right-overflow
toolbar-buttons-captioned-p minimum-line-descent right-margin-width
has-modeline-p top-toolbar-height bottom-toolbar-visible-p
left-margin-width menubar-visible-p use-left-overflow
right-toolbar-visible-p top-toolbar-visible-p
modeline-shadow-thickness scrollbar-height)


P.S.
The same list should probably be constructed for GNU Emacs, but I
don't know the equivalent of `built-in-variable-type'.

-- 
Hrvoje Niksic <hniksic@srce.hr> | Student at FER Zagreb, Croatia
--------------------------------+--------------------------------
I'm sure they'll listen to reason! -- Neal Stevenson, _Snow Crash_

