home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_xemacs.idb / usr / freeware / lib / xemacs-20.4 / lisp / custom / cus-start.el.z / cus-start.el
Encoding:
Text File  |  1998-05-21  |  7.1 KB  |  198 lines

  1. ;;; cus-start.el --- define customization properties of builtins.
  2. ;;
  3. ;; Copyright (C) 1997 Free Software Foundation, Inc.
  4. ;;
  5. ;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
  6. ;; Keywords: internal
  7.  
  8. ;; This file is part of XEmacs.
  9.  
  10. ;; XEmacs is free software; you can redistribute it and/or modify it
  11. ;; under the terms of the GNU General Public License as published by
  12. ;; the Free Software Foundation; either version 2, or (at your option)
  13. ;; any later version.
  14.  
  15. ;; XEmacs is distributed in the hope that it will be useful, but
  16. ;; WITHOUT ANY WARRANTY; without even the implied warranty of
  17. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  18. ;; General Public License for more details.
  19.  
  20. ;; You should have received a copy of the GNU General Public License
  21. ;; along with XEmacs; see the file COPYING.  If not, write to the Free
  22. ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  23. ;; 02111-1307, USA.
  24.  
  25. ;;; Synched up with: Not synched with FSF.
  26.  
  27. ;;; Commentary:
  28. ;;
  29. ;; The following code is used to define the customization properties
  30. ;; for builtin variables, and variables in the packages that are
  31. ;; preloaded /very/ early, before custom.el itself (replace.el is such
  32. ;; an example).  The way it handles custom stuff is dirty, and should
  33. ;; be regarded as a last resort.  DO NOT add variables here, unless
  34. ;; you know what you are doing.
  35.  
  36. ;; Must be run before the user has changed the value of any options!
  37.  
  38.  
  39. ;;; Code:
  40.  
  41. (require 'custom)
  42.  
  43. (let ((all '(;; boolean
  44.          (abbrev-all-caps abbrev boolean)
  45.          (allow-deletion-of-last-visible-frame frames boolean)
  46.          (debug-on-quit debug boolean)
  47.          (delete-auto-save-files auto-save boolean)
  48.          (delete-exited-processes processes-basics boolean)
  49.          (indent-tabs-mode editing-basics boolean)
  50.          (load-ignore-elc-files maint boolean)
  51.          (load-warn-when-source-newer maint boolean)
  52.          (load-warn-when-source-only maint boolean)
  53.          (modifier-keys-are-sticky keyboard boolean)
  54.          (no-redraw-on-reenter display boolean)
  55.          (scroll-on-clipped-lines display boolean)
  56.          (truncate-partial-width-windows display boolean)
  57.          (visible-bell sound boolean)
  58.          (x-allow-sendevents x boolean)
  59.          (zmacs-regions editing-basics boolean)
  60.          ;; integer
  61.          (auto-save-interval auto-save integer)
  62.          (bell-volume sound integer)
  63.          (echo-keystrokes keyboard integer)
  64.          (gc-cons-threshold alloc integer)
  65.          (next-screen-context-lines display integer)
  66.          (scroll-conservatively display integer)
  67.          (scroll-step windows integer)
  68.          (window-min-height windows integer)
  69.          (window-min-width windows integer)
  70.          ;; object
  71.          (auto-save-file-format auto-save
  72.                     (choice (const :tag "Normal" t)
  73.                         (repeat (symbol :tag "Format"))))
  74.          (completion-ignored-extensions minibuffer
  75.                         (repeat
  76.                          (string :format "%v")))
  77.          (debug-ignored-errors debug (repeat (choice :format "%v"
  78.                              (symbol :tag "Class")
  79.                              regexp)))
  80.          (debug-on-error debug  (choice (const :tag "off" nil)
  81.                         (const :tag "Always" t)
  82.                         (repeat :menu-tag "When"
  83.                             :value (nil)
  84.                             (symbol
  85.                              :tag "Condition"))))
  86.          (debug-on-signal debug (choice (const :tag "off" nil)
  87.                         (const :tag "Always" t)
  88.                         (repeat :menu-tag "When"
  89.                             :value (nil)
  90.                             (symbol
  91.                              :tag "Condition"))))
  92.          (exec-path processes-basics (repeat
  93.                       (choice :tag "Directory"
  94.                           (const :tag "Default" nil)
  95.                           (directory :format "%v"))))
  96.          (file-name-handler-alist data (repeat
  97.                         (cons regexp
  98.                           (function :tag "Handler"))))
  99.          (shell-file-name execute file)
  100.          (stack-trace-on-error debug (choice (const :tag "off" nil)
  101.                         (const :tag "Always" t)
  102.                         (repeat :menu-tag "When"
  103.                             :value (nil)
  104.                             (symbol
  105.                              :tag "Condition"))))
  106.          (stack-trace-on-signal debug (choice (const :tag "off" nil)
  107.                         (const :tag "Always" t)
  108.                         (repeat :menu-tag "When"
  109.                             :value (nil)
  110.                             (symbol
  111.                              :tag "Condition"))))
  112.          ;; buffer-local
  113.          (case-fold-search matching boolean)
  114.          (ctl-arrow display (choice (integer 160)
  115.                     (sexp :tag "160 (default)"
  116.                           :format "%t\n")))
  117.          (fill-column fill integer)
  118.          (left-margin fill integer)
  119.          (tab-width editing-basics integer)
  120.          (truncate-lines display boolean)
  121.          ;; not documented as user-options, but should still be
  122.          ;; customizable:
  123.          (bar-cursor display (choice (const :tag "Block Cursor" nil)
  124.                      (const :tag "Bar Cursor (1 pixel)" t)
  125.                      (sexp :tag "Bar Cursor (2 pixels)"
  126.                            :format "%t\n" 'other)))
  127.          (default-frame-plist frames (repeat
  128.                       (list :inline t
  129.                         :format "%v"
  130.                         (symbol :tag "Parameter")
  131.                         (sexp :tag "Value"))))
  132.          (disable-auto-save-when-buffer-shrinks auto-save boolean)
  133.          (find-file-use-truenames find-file boolean)
  134.          (find-file-compare-truenames find-file boolean)
  135.          (focus-follows-mouse x boolean)
  136.          (help-char keyboard (choice character
  137.                      (sexp :tag "Single key specifier")))
  138.          (max-lisp-eval-depth limits integer)
  139.          (max-specpdl-size limits integer)
  140.          (meta-prefix-char keyboard character)
  141.          (parse-sexp-ignore-comments editing-basics boolean)
  142.          (selective-display display 
  143.                 (choice (const :tag "off" nil)
  144.                     (integer :tag "space"
  145.                          :format "%v"
  146.                          1)
  147.                     (const :tag "on" t)))
  148.          (selective-display-ellipses display boolean)
  149.          (signal-error-on-buffer-boundary internal boolean)
  150.          (temp-buffer-show-function
  151.           windows (radio (function-item :tag "Temp Buffers Always in Same Frame"
  152.                         :format "%t\n"
  153.                         show-temp-buffer-in-current-frame)
  154.                  (const :tag "Temp Buffers Like Other Buffers" nil)
  155.                  (function :tag "Other")))
  156.          (undo-threshold undo integer)
  157.          (undo-high-threshold undo integer)
  158.          (words-include-escapes editing-basics boolean)
  159.          ;; These are from replace.el, which is loaded too early
  160.          ;; to be customizable.
  161.          (case-replace matching boolean)
  162.          (query-replace-highlight matching boolean)
  163.          (list-matching-lines-default-context-lines matching integer)))
  164.       this symbol group type
  165.       (quoter (lambda (sexp)
  166.         ;; A copy of `custom-quote'
  167.         (if (or (memq sexp '(t nil))
  168.             (keywordp sexp)
  169.             (eq (car-safe sexp) 'lambda)
  170.             (stringp sexp)
  171.             (numberp sexp)
  172.             (characterp sexp))
  173.             sexp
  174.           (list 'quote sexp)))))
  175.   (while all
  176.     (setq this (car all)
  177.       all (cdr all)
  178.       symbol (nth 0 this)
  179.       group (nth 1 this)
  180.       type (nth 2 this))
  181.     (if (not (boundp symbol))
  182.     ;; This is loaded so early, there is no message
  183.     (if (fboundp 'message)
  184.         ;; If variables are removed from C code, give an error here!
  185.         (message "Intrinsic `%S' not bound" symbol))
  186.       ;; This is called before any user can have changed the value.
  187.       (put symbol 'standard-value
  188.        (list (funcall quoter (default-value symbol))))
  189.       ;; Add it to the right group.
  190.       (custom-add-to-group group symbol 'custom-variable)
  191.       ;; Set the type.
  192.       (put symbol 'custom-type type))))
  193.  
  194. ;; This is to prevent it from being reloaded by `cus-load.el'.
  195. (provide 'cus-start)
  196.  
  197. ;;; cus-start.el ends here.
  198.