cus-start.el 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677
  1. ;;; cus-start.el --- define customization properties of builtins -*- lexical-binding:t -*-
  2. ;; Copyright (C) 1997, 1999-2015 Free Software Foundation, Inc.
  3. ;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
  4. ;; Keywords: internal
  5. ;; Package: emacs
  6. ;; This file is part of GNU Emacs.
  7. ;; GNU Emacs is free software: you can redistribute it and/or modify
  8. ;; it under the terms of the GNU General Public License as published by
  9. ;; the Free Software Foundation, either version 3 of the License, or
  10. ;; (at your option) any later version.
  11. ;; GNU Emacs is distributed in the hope that it will be useful,
  12. ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. ;; GNU General Public License for more details.
  15. ;; You should have received a copy of the GNU General Public License
  16. ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
  17. ;;; Commentary:
  18. ;; This file adds customize support for built-in variables.
  19. ;; While dumping Emacs, this file is loaded, but it only records
  20. ;; the standard values; it does not do the rest of the job.
  21. ;; Later on, if the user makes a customization buffer,
  22. ;; this file is loaded again with (require 'cus-start);
  23. ;; then it does the whole job.
  24. ;;; Code:
  25. (defun minibuffer-prompt-properties--setter (symbol value)
  26. (set-default symbol value)
  27. (if (memq 'cursor-intangible value)
  28. (add-hook 'minibuffer-setup-hook 'cursor-intangible-mode)
  29. ;; Removing it is a bit trickier since it could have been added by someone
  30. ;; else as well, so let's just not bother.
  31. ))
  32. ;; Elements of this list have the form:
  33. ;; SYMBOL GROUP TYPE VERSION REST...
  34. ;; SYMBOL is the name of the variable.
  35. ;; GROUP is the custom group to which it belongs (may also be a list
  36. ;; of groups)
  37. ;; TYPE is the defcustom :type.
  38. ;; VERSION is the defcustom :version (or nil).
  39. ;; REST is a set of :KEYWORD VALUE pairs. Accepted :KEYWORDs are:
  40. ;; :standard - standard value for SYMBOL (else use current value)
  41. ;; :set - custom-set property
  42. ;; :risky - risky-local-variable property
  43. ;; :safe - safe-local-variable property
  44. ;; :tag - custom-tag property
  45. (let (standard native-p prop propval
  46. ;; This function turns a value
  47. ;; into an expression which produces that value.
  48. (quoter (lambda (sexp)
  49. ;; FIXME: We'd like to use macroexp-quote here, but cus-start
  50. ;; is loaded too early in loadup.el for that.
  51. (if (or (memq sexp '(t nil))
  52. (keywordp sexp)
  53. (and (listp sexp)
  54. (memq (car sexp) '(lambda)))
  55. (stringp sexp)
  56. (numberp sexp))
  57. sexp
  58. (list 'quote sexp)))))
  59. (pcase-dolist
  60. (`(,symbol ,group ,type ,version . ,rest)
  61. '(;; alloc.c
  62. (gc-cons-threshold alloc integer)
  63. (gc-cons-percentage alloc float)
  64. (garbage-collection-messages alloc boolean)
  65. ;; buffer.c
  66. (cursor-type
  67. display
  68. (choice
  69. (const :tag "Frame default" t)
  70. (const :tag "Filled box" box)
  71. (const :tag "Hollow cursor" hollow)
  72. (const :tag "Vertical bar" bar)
  73. (cons :tag "Vertical bar with specified width"
  74. (const bar) integer)
  75. (const :tag "Horizontal bar" hbar)
  76. (cons :tag "Horizontal bar with specified width"
  77. (const hbar) integer)
  78. (const :tag "None "nil)))
  79. (mode-line-format mode-line sexp) ;Hard to do right.
  80. (major-mode internal function)
  81. (case-fold-search matching boolean)
  82. (fill-column fill integer)
  83. (left-margin fill integer)
  84. (tab-width editing-basics integer)
  85. (ctl-arrow display boolean)
  86. (truncate-lines display boolean)
  87. (word-wrap display boolean)
  88. (selective-display-ellipses display boolean)
  89. (indicate-empty-lines fringe boolean)
  90. (indicate-buffer-boundaries
  91. fringe
  92. (choice
  93. (const :tag "No indicators" nil)
  94. (const :tag "On left, with arrows" left)
  95. (const :tag "On right, with arrows" right)
  96. (set :tag "Pick your own design"
  97. :value ((t . nil))
  98. :format "%{%t%}:\n%v\n%d"
  99. :doc "You can specify a default and then override it \
  100. for individual indicators.
  101. Leaving \"Default\" unchecked is equivalent with specifying a default of
  102. \"Do not show\"."
  103. (choice :tag "Default"
  104. :value (t . nil)
  105. (const :tag "Do not show" (t . nil))
  106. (const :tag "On the left" (t . left))
  107. (const :tag "On the right" (t . right)))
  108. (choice :tag "Top"
  109. :value (top . left)
  110. (const :tag "Do not show" (top . nil))
  111. (const :tag "On the left" (top . left))
  112. (const :tag "On the right" (top . right)))
  113. (choice :tag "Bottom"
  114. :value (bottom . left)
  115. (const :tag "Do not show" (bottom . nil))
  116. (const :tag "On the left" (bottom . left))
  117. (const :tag "On the right" (bottom . right)))
  118. (choice :tag "Up arrow"
  119. :value (up . left)
  120. (const :tag "Do not show" (up . nil))
  121. (const :tag "On the left" (up . left))
  122. (const :tag "On the right" (up . right)))
  123. (choice :tag "Down arrow"
  124. :value (down . left)
  125. (const :tag "Do not show" (down . nil))
  126. (const :tag "On the left" (down . left))
  127. (const :tag "On the right" (down . right))))
  128. (other :tag "On left, no arrows" t)))
  129. (scroll-up-aggressively windows
  130. (choice (const :tag "off" nil) float)
  131. "21.1")
  132. (scroll-down-aggressively windows
  133. (choice (const :tag "off" nil) float)
  134. "21.1")
  135. (line-spacing display (choice (const :tag "none" nil) number)
  136. "22.1")
  137. (cursor-in-non-selected-windows
  138. cursor boolean nil
  139. :tag "Cursor In Non-selected Windows"
  140. :set (lambda (symbol value)
  141. (set-default symbol value)
  142. (force-mode-line-update t)))
  143. (transient-mark-mode editing-basics boolean nil
  144. :standard (not noninteractive)
  145. :initialize custom-initialize-delay
  146. :set custom-set-minor-mode)
  147. (bidi-paragraph-direction
  148. paragraphs
  149. (choice
  150. (const :tag "Left to Right" left-to-right)
  151. (const :tag "Right to Left" right-to-left)
  152. (const :tag "Dynamic, according to paragraph text" nil))
  153. "24.1")
  154. ;; callint.c
  155. (mark-even-if-inactive editing-basics boolean)
  156. ;; callproc.c
  157. (shell-file-name execute file)
  158. (exec-path execute
  159. (repeat (choice (const :tag "default directory" nil)
  160. (directory :format "%v")))
  161. nil
  162. :standard
  163. (mapcar 'directory-file-name
  164. (append (parse-colon-path (getenv "PATH"))
  165. (list exec-directory))))
  166. (exec-suffixes execute (repeat string))
  167. ;; charset.c
  168. (charset-map-path installation
  169. (repeat (directory :format "%v")))
  170. ;; coding.c
  171. (inhibit-eol-conversion mule boolean)
  172. (enable-character-translation mule boolean)
  173. (eol-mnemonic-undecided mule string)
  174. ;; startup.el fiddles with the values. IMO, would be
  175. ;; simpler to just use #ifdefs in coding.c.
  176. (eol-mnemonic-unix mule string nil
  177. :standard
  178. (if (memq system-type '(ms-dos windows-nt))
  179. "(Unix)" ":"))
  180. (eol-mnemonic-dos mule string nil
  181. :standard
  182. (if (memq system-type '(ms-dos windows-nt))
  183. "\\" "(DOS)"))
  184. (eol-mnemonic-mac mule string nil
  185. :standard "(Mac)")
  186. (file-coding-system-alist
  187. mule
  188. (alist
  189. :key-type (regexp :tag "File regexp")
  190. :value-type (choice
  191. :value (undecided . undecided)
  192. (cons :tag "Encoding/decoding pair"
  193. :value (undecided . undecided)
  194. (coding-system :tag "Decoding")
  195. (coding-system :tag "Encoding"))
  196. (coding-system
  197. :tag "Single coding system"
  198. :value undecided
  199. :match (lambda (widget value)
  200. (and value (not (functionp value)))))
  201. (function :value ignore))))
  202. ;; dired.c
  203. (completion-ignored-extensions dired
  204. (repeat (string :format "%v")))
  205. ;; dispnew.c
  206. (baud-rate display integer)
  207. (inverse-video display boolean)
  208. (visible-bell display boolean)
  209. (no-redraw-on-reenter display boolean)
  210. ;; dosfns.c
  211. (dos-display-scancodes display boolean)
  212. (dos-hyper-key keyboard integer)
  213. (dos-super-key keyboard integer)
  214. (dos-keypad-mode keyboard integer)
  215. ;; editfns.c
  216. (user-full-name mail string)
  217. ;; emacs.c
  218. (report-emacs-bug-address emacsbug string)
  219. ;; eval.c
  220. (max-specpdl-size limits integer)
  221. (max-lisp-eval-depth limits integer)
  222. (max-mini-window-height limits
  223. (choice (const :tag "quarter screen" nil)
  224. number) "23.1")
  225. (debug-on-error debug
  226. (choice (const :tag "off")
  227. (repeat :menu-tag "When"
  228. :value (nil)
  229. (symbol :format "%v"))
  230. (const :tag "always" t)))
  231. (debug-ignored-errors debug (repeat (choice symbol regexp)))
  232. (debug-on-quit debug boolean)
  233. (debug-on-signal debug boolean)
  234. ;; fileio.c
  235. (delete-by-moving-to-trash auto-save boolean "23.1")
  236. (auto-save-visited-file-name auto-save boolean)
  237. ;; filelock.c
  238. (create-lockfiles files boolean "24.3")
  239. (temporary-file-directory
  240. ;; Darwin section added 24.1, does not seem worth :version bump.
  241. files directory nil
  242. :standard
  243. (file-name-as-directory
  244. ;; FIXME ? Should there be Ftemporary_file_directory to do this
  245. ;; more robustly (cf set_local_socket in emacsclient.c).
  246. ;; It could be used elsewhere, eg Fcall_process_region,
  247. ;; server-socket-dir. See bug#7135.
  248. (cond ((memq system-type '(ms-dos windows-nt))
  249. (or (getenv "TEMP") (getenv "TMPDIR") (getenv "TMP")
  250. "c:/temp"))
  251. ((eq system-type 'darwin)
  252. (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP")
  253. ;; See bug#7135.
  254. (let ((tmp (ignore-errors
  255. (shell-command-to-string
  256. "getconf DARWIN_USER_TEMP_DIR"))))
  257. (and (stringp tmp)
  258. (setq tmp (replace-regexp-in-string
  259. "\n\\'" "" tmp))
  260. ;; Handles "getconf: Unrecognized variable..."
  261. (file-directory-p tmp)
  262. tmp))
  263. "/tmp"))
  264. (t
  265. (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP")
  266. "/tmp"))))
  267. :initialize custom-initialize-delay)
  268. ;; fns.c
  269. (use-dialog-box menu boolean "21.1")
  270. (use-file-dialog menu boolean "22.1")
  271. (focus-follows-mouse frames boolean "20.3")
  272. ;; fontset.c
  273. ;; FIXME nil is the initial value, fontset.el setqs it.
  274. (vertical-centering-font-regexp display
  275. (choice (const nil) regexp))
  276. ;; frame.c
  277. (default-frame-alist frames
  278. (repeat (cons :format "%v"
  279. (symbol :tag "Parameter")
  280. (sexp :tag "Value"))))
  281. (mouse-highlight mouse (choice (const :tag "disabled" nil)
  282. (const :tag "always shown" t)
  283. (other :tag "hidden by keypress" 1))
  284. "22.1")
  285. (make-pointer-invisible mouse boolean "23.2")
  286. (menu-bar-mode frames boolean nil
  287. ;; FIXME?
  288. ;; :initialize custom-initialize-default
  289. :set custom-set-minor-mode)
  290. (tool-bar-mode (frames mouse) boolean nil
  291. ;; :initialize custom-initialize-default
  292. :set custom-set-minor-mode)
  293. (frame-resize-pixelwise frames boolean "24.4")
  294. (frame-inhibit-implied-resize frames
  295. (choice
  296. (const :tag "Never" nil)
  297. (const :tag "Always" t)
  298. (repeat (symbol :tag "Parameter")))
  299. "25.1")
  300. ;; fringe.c
  301. (overflow-newline-into-fringe fringe boolean)
  302. ;; image.c
  303. (imagemagick-render-type image integer "24.1")
  304. ;; indent.c
  305. (indent-tabs-mode indent boolean)
  306. ;; keyboard.c
  307. (meta-prefix-char keyboard character)
  308. (auto-save-interval auto-save integer)
  309. (auto-save-timeout auto-save (choice (const :tag "off" nil)
  310. (integer :format "%v")))
  311. (echo-keystrokes minibuffer number)
  312. (polling-period keyboard integer)
  313. (double-click-time mouse (restricted-sexp
  314. :match-alternatives (integerp 'nil 't)))
  315. (double-click-fuzz mouse integer "22.1")
  316. (help-char keyboard character)
  317. (help-event-list keyboard (repeat (sexp :format "%v")))
  318. (menu-prompting menu boolean)
  319. (select-active-regions killing
  320. (choice (const :tag "always" t)
  321. (const :tag "only shift-selection or mouse-drag" only)
  322. (const :tag "off" nil))
  323. "24.1")
  324. (debug-on-event debug
  325. (choice (const :tag "None" nil)
  326. (const :tag "When sent SIGUSR1" sigusr1)
  327. (const :tag "When sent SIGUSR2" sigusr2))
  328. "24.1")
  329. ;; This is not good news because it will use the wrong
  330. ;; version-specific directories when you upgrade. We need
  331. ;; customization of the front of the list, maintaining the
  332. ;; standard value intact at the back.
  333. ;;(load-path environment
  334. ;; (repeat (choice :tag "[Current dir?]"
  335. ;; :format "%[Current dir?%] %v"
  336. ;; (const :tag " current dir" nil)
  337. ;; (directory :format "%v"))))
  338. (load-prefer-newer lisp boolean "24.4")
  339. ;; minibuf.c
  340. (enable-recursive-minibuffers minibuffer boolean)
  341. (history-length minibuffer
  342. (choice (const :tag "Infinite" t) integer)
  343. "24.5") ; 30 -> 100
  344. (history-delete-duplicates minibuffer boolean "22.1")
  345. (read-buffer-completion-ignore-case minibuffer boolean "23.1")
  346. (minibuffer-prompt-properties
  347. minibuffer
  348. (list
  349. (checklist :inline t
  350. (const :tag "Read-Only"
  351. :doc "Prevent prompt from being modified"
  352. :format "%t%n%h"
  353. :inline t
  354. (read-only t))
  355. (const :tag "Don't Enter"
  356. :doc "Prevent point from ever entering prompt"
  357. :format "%t%n%h"
  358. :inline t
  359. (cursor-intangible t)))
  360. (repeat :inline t
  361. :tag "Other Properties"
  362. (list :inline t
  363. :format "%v"
  364. (symbol :tag "Property")
  365. (sexp :tag "Value"))))
  366. "21.1"
  367. :set minibuffer-prompt-properties--setter)
  368. (minibuffer-auto-raise minibuffer boolean)
  369. ;; options property set at end
  370. (read-buffer-function minibuffer
  371. (choice (const nil)
  372. function))
  373. ;; msdos.c
  374. (dos-unsupported-char-glyph display integer)
  375. ;; nsterm.m
  376. (ns-control-modifier
  377. ns
  378. (choice (const :tag "No modifier" nil)
  379. (const control) (const meta)
  380. (const alt) (const hyper)
  381. (const super)) "23.1")
  382. (ns-right-control-modifier
  383. ns
  384. (choice (const :tag "No modifier (work as control)" none)
  385. (const :tag "Use the value of ns-control-modifier"
  386. left)
  387. (const control) (const meta)
  388. (const alt) (const hyper)
  389. (const super)) "24.1")
  390. (ns-command-modifier
  391. ns
  392. (choice (const :tag "No modifier" nil)
  393. (const control) (const meta)
  394. (const alt) (const hyper)
  395. (const super)) "23.1")
  396. (ns-right-command-modifier
  397. ns
  398. (choice (const :tag "No modifier (work as command)" none)
  399. (const :tag "Use the value of ns-command-modifier"
  400. left)
  401. (const control) (const meta)
  402. (const alt) (const hyper)
  403. (const super)) "24.1")
  404. (ns-alternate-modifier
  405. ns
  406. (choice (const :tag "No modifier (work as alternate/option)" none)
  407. (const control) (const meta)
  408. (const alt) (const hyper)
  409. (const super)) "23.1")
  410. (ns-right-alternate-modifier
  411. ns
  412. (choice (const :tag "No modifier (work as alternate/option)" none)
  413. (const :tag "Use the value of ns-alternate-modifier"
  414. left)
  415. (const control) (const meta)
  416. (const alt) (const hyper)
  417. (const super)) "23.3")
  418. (ns-function-modifier
  419. ns
  420. (choice (const :tag "No modifier (work as function)" none)
  421. (const control) (const meta)
  422. (const alt) (const hyper)
  423. (const super)) "23.1")
  424. (ns-antialias-text ns boolean "23.1")
  425. (ns-auto-hide-menu-bar ns boolean "24.1")
  426. (ns-confirm-quit ns boolean "25.1")
  427. (ns-use-native-fullscreen ns boolean "24.4")
  428. (ns-use-fullscreen-animation ns boolean "25.1")
  429. (ns-use-srgb-colorspace ns boolean "24.4")
  430. ;; process.c
  431. (delete-exited-processes processes-basics boolean)
  432. ;; syntax.c
  433. (parse-sexp-ignore-comments editing-basics boolean)
  434. (words-include-escapes editing-basics boolean)
  435. (open-paren-in-column-0-is-defun-start editing-basics boolean
  436. "21.1")
  437. ;; term.c
  438. (visible-cursor cursor boolean "22.1")
  439. ;; terminal.c
  440. (ring-bell-function display
  441. (choice
  442. (const :tag "Default" nil)
  443. (const :tag "Silent" ignore)
  444. function))
  445. ;; undo.c
  446. (undo-limit undo integer)
  447. (undo-strong-limit undo integer)
  448. (undo-outer-limit undo
  449. (choice integer
  450. (const :tag "No limit"
  451. :format "%t\n%d"
  452. :doc
  453. "With this choice, \
  454. the undo info for the current command never gets discarded.
  455. This should only be chosen under exceptional circumstances,
  456. since it could result in memory overflow and make Emacs crash."
  457. nil))
  458. "22.1")
  459. ;; window.c
  460. (temp-buffer-show-function windows (choice (const nil) function))
  461. (next-screen-context-lines windows integer)
  462. (scroll-preserve-screen-position
  463. windows (choice
  464. (const :tag "Off (nil)" :value nil)
  465. (const :tag "Full screen (t)" :value t)
  466. (other :tag "Always" 1)) "22.1")
  467. (recenter-redisplay
  468. windows (choice
  469. (const :tag "Never (nil)" :value nil)
  470. (const :tag "Only on ttys" :value tty)
  471. (other :tag "Always" t)) "23.1")
  472. (window-combination-resize windows boolean "24.1")
  473. (window-combination-limit
  474. windows (choice
  475. (const :tag "Never (nil)" :value nil)
  476. (const :tag "For Temp Buffer Resize mode (temp-buffer-resize)"
  477. :value temp-buffer-resize)
  478. (const :tag "For temporary buffers (temp-buffer)"
  479. :value temp-buffer)
  480. (const :tag "For buffer display (display-buffer)"
  481. :value display-buffer)
  482. (other :tag "Always (t)" :value t))
  483. "24.3")
  484. (fast-but-imprecise-scrolling scrolling boolean "25.1")
  485. (window-resize-pixelwise windows boolean "24.4")
  486. ;; xdisp.c
  487. ;; The whitespace group is for whitespace.el.
  488. (show-trailing-whitespace editing-basics boolean nil
  489. :safe booleanp)
  490. (scroll-step windows integer)
  491. (scroll-conservatively windows integer)
  492. (scroll-margin windows integer)
  493. (hscroll-margin windows integer "22.1")
  494. (hscroll-step windows number "22.1")
  495. (truncate-partial-width-windows
  496. display
  497. (choice (integer :tag "Truncate if narrower than")
  498. (const :tag "Respect `truncate-lines'" nil)
  499. (other :tag "Truncate if not full-width" t))
  500. "23.1")
  501. (make-cursor-line-fully-visible windows boolean)
  502. (mode-line-in-non-selected-windows mode-line boolean "22.1")
  503. (line-number-display-limit display
  504. (choice integer
  505. (const :tag "No limit" nil)))
  506. (line-number-display-limit-width display integer "22.1")
  507. (highlight-nonselected-windows display boolean)
  508. (message-log-max debug (choice (const :tag "Disable" nil)
  509. (integer :menu-tag "lines"
  510. :format "%v")
  511. (other :tag "Unlimited" t))
  512. "24.3")
  513. (unibyte-display-via-language-environment mule boolean)
  514. (blink-cursor-alist cursor alist "22.1")
  515. (overline-margin display integer "22.1")
  516. (underline-minimum-offset display integer "23.1")
  517. (mouse-autoselect-window
  518. display (choice
  519. (const :tag "Off (nil)" :value nil)
  520. (const :tag "Immediate" :value t)
  521. (number :tag "Delay by secs" :value 0.5)) "22.1")
  522. (tool-bar-style
  523. frames (choice
  524. (const :tag "Images" :value image)
  525. (const :tag "Text" :value text)
  526. (const :tag "Both" :value both)
  527. (const :tag "Both-horiz" :value both-horiz)
  528. (const :tag "Text-image-horiz" :value text-image-horiz)
  529. (const :tag "System default" :value nil)) "24.1")
  530. (tool-bar-max-label-size frames integer "24.1")
  531. (auto-hscroll-mode scrolling boolean "21.1")
  532. (void-text-area-pointer cursor
  533. (choice
  534. (const :tag "Standard (text pointer)" :value nil)
  535. (const :tag "Arrow" :value arrow)
  536. (const :tag "Text pointer" :value text)
  537. (const :tag "Hand" :value hand)
  538. (const :tag "Vertical dragger" :value vdrag)
  539. (const :tag "Horizontal dragger" :value hdrag)
  540. (const :tag "Same as mode line" :value modeline)
  541. (const :tag "Hourglass" :value hourglass)))
  542. (display-hourglass cursor boolean)
  543. (hourglass-delay cursor number)
  544. (resize-mini-windows
  545. windows (choice
  546. (const :tag "Off (nil)" :value nil)
  547. (const :tag "Fit (t)" :value t)
  548. (const :tag "Grow only" :value grow-only))
  549. "25.1")
  550. ;; xfaces.c
  551. (scalable-fonts-allowed display boolean "22.1")
  552. ;; xfns.c
  553. (x-bitmap-file-path installation
  554. (repeat (directory :format "%v")))
  555. (x-gtk-use-old-file-dialog menu boolean "22.1")
  556. (x-gtk-show-hidden-files menu boolean "22.1")
  557. (x-gtk-file-dialog-help-text menu boolean "22.1")
  558. (x-gtk-use-system-tooltips tooltip boolean "23.3")
  559. ;; xterm.c
  560. (x-use-underline-position-properties display boolean "22.1")
  561. (x-underline-at-descent-line display boolean "22.1")
  562. (x-stretch-cursor display boolean "21.1")
  563. (scroll-bar-adjust-thumb-portion windows boolean "24.4")
  564. ;; xselect.c
  565. (x-select-enable-clipboard-manager killing boolean "24.1")
  566. ;; xsettings.c
  567. (font-use-system-font font-selection boolean "23.2")))
  568. (setq ;; If we did not specify any standard value expression above,
  569. ;; use the current value as the standard value.
  570. standard (if (setq prop (memq :standard rest))
  571. (cadr prop)
  572. (if (default-boundp symbol)
  573. (funcall quoter (default-value symbol))))
  574. ;; Don't complain about missing variables which are
  575. ;; irrelevant to this platform.
  576. native-p (save-match-data
  577. (cond
  578. ((string-match "\\`dos-" (symbol-name symbol))
  579. (eq system-type 'ms-dos))
  580. ((string-match "\\`w32-" (symbol-name symbol))
  581. (eq system-type 'windows-nt))
  582. ((string-match "\\`ns-" (symbol-name symbol))
  583. (featurep 'ns))
  584. ((string-match "\\`x-.*gtk" (symbol-name symbol))
  585. (featurep 'gtk))
  586. ((string-match "clipboard-manager" (symbol-name symbol))
  587. (boundp 'x-select-enable-clipboard-manager))
  588. ((string-match "\\`x-" (symbol-name symbol))
  589. (fboundp 'x-create-frame))
  590. ((string-match "selection" (symbol-name symbol))
  591. (fboundp 'x-selection-exists-p))
  592. ((string-match "fringe" (symbol-name symbol))
  593. (fboundp 'define-fringe-bitmap))
  594. ((string-match "\\`imagemagick" (symbol-name symbol))
  595. (fboundp 'imagemagick-types))
  596. ((equal "font-use-system-font" (symbol-name symbol))
  597. (featurep 'system-font-setting))
  598. ;; Conditioned on x-create-frame, because that's
  599. ;; the condition for loadup.el to preload tool-bar.el.
  600. ((string-match "tool-bar-" (symbol-name symbol))
  601. (fboundp 'x-create-frame))
  602. ((equal "vertical-centering-font-regexp"
  603. (symbol-name symbol))
  604. ;; Any function from fontset.c will do.
  605. (fboundp 'new-fontset))
  606. ((equal "scroll-bar-adjust-thumb-portion"
  607. (symbol-name symbol))
  608. (featurep 'x))
  609. (t t))))
  610. (if (not (boundp symbol))
  611. ;; If variables are removed from C code, give an error here!
  612. (and native-p
  613. (message "Note, built-in variable `%S' not bound" symbol))
  614. ;; Save the standard value, unless we already did.
  615. (or (get symbol 'standard-value)
  616. (put symbol 'standard-value (list standard)))
  617. ;; We need these properties independent of whether cus-start is loaded.
  618. (if (setq prop (memq :safe rest))
  619. (put symbol 'safe-local-variable (cadr prop)))
  620. (if (setq prop (memq :risky rest))
  621. (put symbol 'risky-local-variable (cadr prop)))
  622. (if (setq prop (memq :set rest))
  623. (put symbol 'custom-set (cadr prop)))
  624. ;; Note this is the _only_ initialize property we handle.
  625. (if (eq (cadr (memq :initialize rest)) 'custom-initialize-delay)
  626. ;; These vars are defined early and should hence be initialized
  627. ;; early, even if this file happens to be loaded late. so add them
  628. ;; to the end of custom-delayed-init-variables. Otherwise,
  629. ;; auto-save-file-name-transforms will appear in M-x customize-rogue.
  630. (add-to-list 'custom-delayed-init-variables symbol 'append))
  631. ;; If this is NOT while dumping Emacs, set up the rest of the
  632. ;; customization info. This is the stuff that is not needed
  633. ;; until someone does M-x customize etc.
  634. (unless purify-flag
  635. ;; Add it to the right group(s).
  636. (if (listp group)
  637. (dolist (g group)
  638. (custom-add-to-group g symbol 'custom-variable))
  639. (custom-add-to-group group symbol 'custom-variable))
  640. ;; Set the type.
  641. (put symbol 'custom-type type)
  642. (if version (put symbol 'custom-version version))
  643. (while rest
  644. (setq prop (car rest)
  645. propval (cadr rest)
  646. rest (nthcdr 2 rest))
  647. (cond ((memq prop '(:standard :risky :safe :set))) ; handled above
  648. ((eq prop :tag)
  649. (put symbol 'custom-tag propval))))))))
  650. (custom-add-to-group 'font-lock 'open-paren-in-column-0-is-defun-start
  651. 'custom-variable)
  652. ;; Record cus-start as loaded if we have set up all the info that we can.
  653. ;; Don't record it as loaded if we have only set up the standard values
  654. ;; and safe/risky properties.
  655. (unless purify-flag
  656. (provide 'cus-start))
  657. ;;; cus-start.el ends here