cus-start.el 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686
  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. ;; doc.c
  211. (text-quoting-style
  212. help
  213. (choice
  214. (const :tag "Quote with curved single quotes \\=‘like this\\=’" curve)
  215. (const :tag "Quote with straight apostrophes \\='like this\\='" straight)
  216. (const :tag "Quote with grave accent and apostrophe \\=`like this\\='" grave)
  217. (const :tag "Use curved quotes if displayable, grave accent and apostrophe otherwise" nil))
  218. "25.1")
  219. ;; dosfns.c
  220. (dos-display-scancodes display boolean)
  221. (dos-hyper-key keyboard integer)
  222. (dos-super-key keyboard integer)
  223. (dos-keypad-mode keyboard integer)
  224. ;; editfns.c
  225. (user-full-name mail string)
  226. ;; emacs.c
  227. (report-emacs-bug-address emacsbug string)
  228. ;; eval.c
  229. (max-specpdl-size limits integer)
  230. (max-lisp-eval-depth limits integer)
  231. (max-mini-window-height limits
  232. (choice (const :tag "quarter screen" nil)
  233. number) "23.1")
  234. (debug-on-error debug
  235. (choice (const :tag "off")
  236. (repeat :menu-tag "When"
  237. :value (nil)
  238. (symbol :format "%v"))
  239. (const :tag "always" t)))
  240. (debug-ignored-errors debug (repeat (choice symbol regexp)))
  241. (debug-on-quit debug boolean)
  242. (debug-on-signal debug boolean)
  243. ;; fileio.c
  244. (delete-by-moving-to-trash auto-save boolean "23.1")
  245. (auto-save-visited-file-name auto-save boolean)
  246. ;; filelock.c
  247. (create-lockfiles files boolean "24.3")
  248. (temporary-file-directory
  249. ;; Darwin section added 24.1, does not seem worth :version bump.
  250. files directory nil
  251. :standard
  252. (file-name-as-directory
  253. ;; FIXME ? Should there be Ftemporary_file_directory to do this
  254. ;; more robustly (cf set_local_socket in emacsclient.c).
  255. ;; It could be used elsewhere, eg Fcall_process_region,
  256. ;; server-socket-dir. See bug#7135.
  257. (cond ((memq system-type '(ms-dos windows-nt))
  258. (or (getenv "TEMP") (getenv "TMPDIR") (getenv "TMP")
  259. "c:/temp"))
  260. ((eq system-type 'darwin)
  261. (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP")
  262. ;; See bug#7135.
  263. (let ((tmp (ignore-errors
  264. (shell-command-to-string
  265. "getconf DARWIN_USER_TEMP_DIR"))))
  266. (and (stringp tmp)
  267. (setq tmp (replace-regexp-in-string
  268. "\n\\'" "" tmp))
  269. ;; Handles "getconf: Unrecognized variable..."
  270. (file-directory-p tmp)
  271. tmp))
  272. "/tmp"))
  273. (t
  274. (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP")
  275. "/tmp"))))
  276. :initialize custom-initialize-delay)
  277. ;; fns.c
  278. (use-dialog-box menu boolean "21.1")
  279. (use-file-dialog menu boolean "22.1")
  280. (focus-follows-mouse frames boolean "20.3")
  281. ;; fontset.c
  282. ;; FIXME nil is the initial value, fontset.el setqs it.
  283. (vertical-centering-font-regexp display
  284. (choice (const nil) regexp))
  285. ;; frame.c
  286. (default-frame-alist frames
  287. (repeat (cons :format "%v"
  288. (symbol :tag "Parameter")
  289. (sexp :tag "Value"))))
  290. (mouse-highlight mouse (choice (const :tag "disabled" nil)
  291. (const :tag "always shown" t)
  292. (other :tag "hidden by keypress" 1))
  293. "22.1")
  294. (make-pointer-invisible mouse boolean "23.2")
  295. (menu-bar-mode frames boolean nil
  296. ;; FIXME?
  297. ;; :initialize custom-initialize-default
  298. :set custom-set-minor-mode)
  299. (tool-bar-mode (frames mouse) boolean nil
  300. ;; :initialize custom-initialize-default
  301. :set custom-set-minor-mode)
  302. (frame-resize-pixelwise frames boolean "24.4")
  303. (frame-inhibit-implied-resize frames
  304. (choice
  305. (const :tag "Never" nil)
  306. (const :tag "Always" t)
  307. (repeat (symbol :tag "Parameter")))
  308. "25.1")
  309. ;; fringe.c
  310. (overflow-newline-into-fringe fringe boolean)
  311. ;; image.c
  312. (imagemagick-render-type image integer "24.1")
  313. ;; indent.c
  314. (indent-tabs-mode indent boolean)
  315. ;; keyboard.c
  316. (meta-prefix-char keyboard character)
  317. (auto-save-interval auto-save integer)
  318. (auto-save-timeout auto-save (choice (const :tag "off" nil)
  319. (integer :format "%v")))
  320. (echo-keystrokes minibuffer number)
  321. (polling-period keyboard integer)
  322. (double-click-time mouse (restricted-sexp
  323. :match-alternatives (integerp 'nil 't)))
  324. (double-click-fuzz mouse integer "22.1")
  325. (help-char keyboard character)
  326. (help-event-list keyboard (repeat (sexp :format "%v")))
  327. (menu-prompting menu boolean)
  328. (select-active-regions killing
  329. (choice (const :tag "always" t)
  330. (const :tag "only shift-selection or mouse-drag" only)
  331. (const :tag "off" nil))
  332. "24.1")
  333. (debug-on-event debug
  334. (choice (const :tag "None" nil)
  335. (const :tag "When sent SIGUSR1" sigusr1)
  336. (const :tag "When sent SIGUSR2" sigusr2))
  337. "24.1")
  338. ;; This is not good news because it will use the wrong
  339. ;; version-specific directories when you upgrade. We need
  340. ;; customization of the front of the list, maintaining the
  341. ;; standard value intact at the back.
  342. ;;(load-path environment
  343. ;; (repeat (choice :tag "[Current dir?]"
  344. ;; :format "%[Current dir?%] %v"
  345. ;; (const :tag " current dir" nil)
  346. ;; (directory :format "%v"))))
  347. (load-prefer-newer lisp boolean "24.4")
  348. ;; minibuf.c
  349. (enable-recursive-minibuffers minibuffer boolean)
  350. (history-length minibuffer
  351. (choice (const :tag "Infinite" t) integer)
  352. "24.5") ; 30 -> 100
  353. (history-delete-duplicates minibuffer boolean "22.1")
  354. (read-buffer-completion-ignore-case minibuffer boolean "23.1")
  355. (minibuffer-prompt-properties
  356. minibuffer
  357. (list
  358. (checklist :inline t
  359. (const :tag "Read-Only"
  360. :doc "Prevent prompt from being modified"
  361. :format "%t%n%h"
  362. :inline t
  363. (read-only t))
  364. (const :tag "Don't Enter"
  365. :doc "Prevent point from ever entering prompt"
  366. :format "%t%n%h"
  367. :inline t
  368. (cursor-intangible t)))
  369. (repeat :inline t
  370. :tag "Other Properties"
  371. (list :inline t
  372. :format "%v"
  373. (symbol :tag "Property")
  374. (sexp :tag "Value"))))
  375. "21.1"
  376. :set minibuffer-prompt-properties--setter)
  377. (minibuffer-auto-raise minibuffer boolean)
  378. ;; options property set at end
  379. (read-buffer-function minibuffer
  380. (choice (const nil)
  381. function))
  382. ;; msdos.c
  383. (dos-unsupported-char-glyph display integer)
  384. ;; nsterm.m
  385. (ns-control-modifier
  386. ns
  387. (choice (const :tag "No modifier" nil)
  388. (const control) (const meta)
  389. (const alt) (const hyper)
  390. (const super)) "23.1")
  391. (ns-right-control-modifier
  392. ns
  393. (choice (const :tag "No modifier (work as control)" none)
  394. (const :tag "Use the value of ns-control-modifier"
  395. left)
  396. (const control) (const meta)
  397. (const alt) (const hyper)
  398. (const super)) "24.1")
  399. (ns-command-modifier
  400. ns
  401. (choice (const :tag "No modifier" nil)
  402. (const control) (const meta)
  403. (const alt) (const hyper)
  404. (const super)) "23.1")
  405. (ns-right-command-modifier
  406. ns
  407. (choice (const :tag "No modifier (work as command)" none)
  408. (const :tag "Use the value of ns-command-modifier"
  409. left)
  410. (const control) (const meta)
  411. (const alt) (const hyper)
  412. (const super)) "24.1")
  413. (ns-alternate-modifier
  414. ns
  415. (choice (const :tag "No modifier (work as alternate/option)" none)
  416. (const control) (const meta)
  417. (const alt) (const hyper)
  418. (const super)) "23.1")
  419. (ns-right-alternate-modifier
  420. ns
  421. (choice (const :tag "No modifier (work as alternate/option)" none)
  422. (const :tag "Use the value of ns-alternate-modifier"
  423. left)
  424. (const control) (const meta)
  425. (const alt) (const hyper)
  426. (const super)) "23.3")
  427. (ns-function-modifier
  428. ns
  429. (choice (const :tag "No modifier (work as function)" none)
  430. (const control) (const meta)
  431. (const alt) (const hyper)
  432. (const super)) "23.1")
  433. (ns-antialias-text ns boolean "23.1")
  434. (ns-auto-hide-menu-bar ns boolean "24.1")
  435. (ns-confirm-quit ns boolean "25.1")
  436. (ns-use-native-fullscreen ns boolean "24.4")
  437. (ns-use-fullscreen-animation ns boolean "25.1")
  438. (ns-use-srgb-colorspace ns boolean "24.4")
  439. ;; process.c
  440. (delete-exited-processes processes-basics boolean)
  441. ;; syntax.c
  442. (parse-sexp-ignore-comments editing-basics boolean)
  443. (words-include-escapes editing-basics boolean)
  444. (open-paren-in-column-0-is-defun-start editing-basics boolean
  445. "21.1")
  446. ;; term.c
  447. (visible-cursor cursor boolean "22.1")
  448. ;; terminal.c
  449. (ring-bell-function display
  450. (choice
  451. (const :tag "Default" nil)
  452. (const :tag "Silent" ignore)
  453. function))
  454. ;; undo.c
  455. (undo-limit undo integer)
  456. (undo-strong-limit undo integer)
  457. (undo-outer-limit undo
  458. (choice integer
  459. (const :tag "No limit"
  460. :format "%t\n%d"
  461. :doc
  462. "With this choice, \
  463. the undo info for the current command never gets discarded.
  464. This should only be chosen under exceptional circumstances,
  465. since it could result in memory overflow and make Emacs crash."
  466. nil))
  467. "22.1")
  468. ;; window.c
  469. (temp-buffer-show-function windows (choice (const nil) function))
  470. (next-screen-context-lines windows integer)
  471. (scroll-preserve-screen-position
  472. windows (choice
  473. (const :tag "Off (nil)" :value nil)
  474. (const :tag "Full screen (t)" :value t)
  475. (other :tag "Always" 1)) "22.1")
  476. (recenter-redisplay
  477. windows (choice
  478. (const :tag "Never (nil)" :value nil)
  479. (const :tag "Only on ttys" :value tty)
  480. (other :tag "Always" t)) "23.1")
  481. (window-combination-resize windows boolean "24.1")
  482. (window-combination-limit
  483. windows (choice
  484. (const :tag "Never (nil)" :value nil)
  485. (const :tag "For Temp Buffer Resize mode (temp-buffer-resize)"
  486. :value temp-buffer-resize)
  487. (const :tag "For temporary buffers (temp-buffer)"
  488. :value temp-buffer)
  489. (const :tag "For buffer display (display-buffer)"
  490. :value display-buffer)
  491. (other :tag "Always (t)" :value t))
  492. "24.3")
  493. (fast-but-imprecise-scrolling scrolling boolean "25.1")
  494. (window-resize-pixelwise windows boolean "24.4")
  495. ;; xdisp.c
  496. ;; The whitespace group is for whitespace.el.
  497. (show-trailing-whitespace editing-basics boolean nil
  498. :safe booleanp)
  499. (scroll-step windows integer)
  500. (scroll-conservatively windows integer)
  501. (scroll-margin windows integer)
  502. (hscroll-margin windows integer "22.1")
  503. (hscroll-step windows number "22.1")
  504. (truncate-partial-width-windows
  505. display
  506. (choice (integer :tag "Truncate if narrower than")
  507. (const :tag "Respect `truncate-lines'" nil)
  508. (other :tag "Truncate if not full-width" t))
  509. "23.1")
  510. (make-cursor-line-fully-visible windows boolean)
  511. (mode-line-in-non-selected-windows mode-line boolean "22.1")
  512. (line-number-display-limit display
  513. (choice integer
  514. (const :tag "No limit" nil)))
  515. (line-number-display-limit-width display integer "22.1")
  516. (highlight-nonselected-windows display boolean)
  517. (message-log-max debug (choice (const :tag "Disable" nil)
  518. (integer :menu-tag "lines"
  519. :format "%v")
  520. (other :tag "Unlimited" t))
  521. "24.3")
  522. (unibyte-display-via-language-environment mule boolean)
  523. (blink-cursor-alist cursor alist "22.1")
  524. (overline-margin display integer "22.1")
  525. (underline-minimum-offset display integer "23.1")
  526. (mouse-autoselect-window
  527. display (choice
  528. (const :tag "Off (nil)" :value nil)
  529. (const :tag "Immediate" :value t)
  530. (number :tag "Delay by secs" :value 0.5)) "22.1")
  531. (tool-bar-style
  532. frames (choice
  533. (const :tag "Images" :value image)
  534. (const :tag "Text" :value text)
  535. (const :tag "Both" :value both)
  536. (const :tag "Both-horiz" :value both-horiz)
  537. (const :tag "Text-image-horiz" :value text-image-horiz)
  538. (const :tag "System default" :value nil)) "24.1")
  539. (tool-bar-max-label-size frames integer "24.1")
  540. (auto-hscroll-mode scrolling boolean "21.1")
  541. (void-text-area-pointer cursor
  542. (choice
  543. (const :tag "Standard (text pointer)" :value nil)
  544. (const :tag "Arrow" :value arrow)
  545. (const :tag "Text pointer" :value text)
  546. (const :tag "Hand" :value hand)
  547. (const :tag "Vertical dragger" :value vdrag)
  548. (const :tag "Horizontal dragger" :value hdrag)
  549. (const :tag "Same as mode line" :value modeline)
  550. (const :tag "Hourglass" :value hourglass)))
  551. (display-hourglass cursor boolean)
  552. (hourglass-delay cursor number)
  553. (resize-mini-windows
  554. windows (choice
  555. (const :tag "Off (nil)" :value nil)
  556. (const :tag "Fit (t)" :value t)
  557. (const :tag "Grow only" :value grow-only))
  558. "25.1")
  559. ;; xfaces.c
  560. (scalable-fonts-allowed display boolean "22.1")
  561. ;; xfns.c
  562. (x-bitmap-file-path installation
  563. (repeat (directory :format "%v")))
  564. (x-gtk-use-old-file-dialog menu boolean "22.1")
  565. (x-gtk-show-hidden-files menu boolean "22.1")
  566. (x-gtk-file-dialog-help-text menu boolean "22.1")
  567. (x-gtk-use-system-tooltips tooltip boolean "23.3")
  568. ;; xterm.c
  569. (x-use-underline-position-properties display boolean "22.1")
  570. (x-underline-at-descent-line display boolean "22.1")
  571. (x-stretch-cursor display boolean "21.1")
  572. (scroll-bar-adjust-thumb-portion windows boolean "24.4")
  573. ;; xselect.c
  574. (x-select-enable-clipboard-manager killing boolean "24.1")
  575. ;; xsettings.c
  576. (font-use-system-font font-selection boolean "23.2")))
  577. (setq ;; If we did not specify any standard value expression above,
  578. ;; use the current value as the standard value.
  579. standard (if (setq prop (memq :standard rest))
  580. (cadr prop)
  581. (if (default-boundp symbol)
  582. (funcall quoter (default-value symbol))))
  583. ;; Don't complain about missing variables which are
  584. ;; irrelevant to this platform.
  585. native-p (save-match-data
  586. (cond
  587. ((string-match "\\`dos-" (symbol-name symbol))
  588. (eq system-type 'ms-dos))
  589. ((string-match "\\`w32-" (symbol-name symbol))
  590. (eq system-type 'windows-nt))
  591. ((string-match "\\`ns-" (symbol-name symbol))
  592. (featurep 'ns))
  593. ((string-match "\\`x-.*gtk" (symbol-name symbol))
  594. (featurep 'gtk))
  595. ((string-match "clipboard-manager" (symbol-name symbol))
  596. (boundp 'x-select-enable-clipboard-manager))
  597. ((string-match "\\`x-" (symbol-name symbol))
  598. (fboundp 'x-create-frame))
  599. ((string-match "selection" (symbol-name symbol))
  600. (fboundp 'x-selection-exists-p))
  601. ((string-match "fringe" (symbol-name symbol))
  602. (fboundp 'define-fringe-bitmap))
  603. ((string-match "\\`imagemagick" (symbol-name symbol))
  604. (fboundp 'imagemagick-types))
  605. ((equal "font-use-system-font" (symbol-name symbol))
  606. (featurep 'system-font-setting))
  607. ;; Conditioned on x-create-frame, because that's
  608. ;; the condition for loadup.el to preload tool-bar.el.
  609. ((string-match "tool-bar-" (symbol-name symbol))
  610. (fboundp 'x-create-frame))
  611. ((equal "vertical-centering-font-regexp"
  612. (symbol-name symbol))
  613. ;; Any function from fontset.c will do.
  614. (fboundp 'new-fontset))
  615. ((equal "scroll-bar-adjust-thumb-portion"
  616. (symbol-name symbol))
  617. (featurep 'x))
  618. (t t))))
  619. (if (not (boundp symbol))
  620. ;; If variables are removed from C code, give an error here!
  621. (and native-p
  622. (message "Note, built-in variable ‘%S’ not bound" symbol))
  623. ;; Save the standard value, unless we already did.
  624. (or (get symbol 'standard-value)
  625. (put symbol 'standard-value (list standard)))
  626. ;; We need these properties independent of whether cus-start is loaded.
  627. (if (setq prop (memq :safe rest))
  628. (put symbol 'safe-local-variable (cadr prop)))
  629. (if (setq prop (memq :risky rest))
  630. (put symbol 'risky-local-variable (cadr prop)))
  631. (if (setq prop (memq :set rest))
  632. (put symbol 'custom-set (cadr prop)))
  633. ;; Note this is the _only_ initialize property we handle.
  634. (if (eq (cadr (memq :initialize rest)) 'custom-initialize-delay)
  635. ;; These vars are defined early and should hence be initialized
  636. ;; early, even if this file happens to be loaded late. so add them
  637. ;; to the end of custom-delayed-init-variables. Otherwise,
  638. ;; auto-save-file-name-transforms will appear in M-x customize-rogue.
  639. (add-to-list 'custom-delayed-init-variables symbol 'append))
  640. ;; If this is NOT while dumping Emacs, set up the rest of the
  641. ;; customization info. This is the stuff that is not needed
  642. ;; until someone does M-x customize etc.
  643. (unless purify-flag
  644. ;; Add it to the right group(s).
  645. (if (listp group)
  646. (dolist (g group)
  647. (custom-add-to-group g symbol 'custom-variable))
  648. (custom-add-to-group group symbol 'custom-variable))
  649. ;; Set the type.
  650. (put symbol 'custom-type type)
  651. (if version (put symbol 'custom-version version))
  652. (while rest
  653. (setq prop (car rest)
  654. propval (cadr rest)
  655. rest (nthcdr 2 rest))
  656. (cond ((memq prop '(:standard :risky :safe :set))) ; handled above
  657. ((eq prop :tag)
  658. (put symbol 'custom-tag propval))))))))
  659. (custom-add-to-group 'font-lock 'open-paren-in-column-0-is-defun-start
  660. 'custom-variable)
  661. ;; Record cus-start as loaded if we have set up all the info that we can.
  662. ;; Don't record it as loaded if we have only set up the standard values
  663. ;; and safe/risky properties.
  664. (unless purify-flag
  665. (provide 'cus-start))
  666. ;;; cus-start.el ends here