aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorChong Yidong2012-09-18 13:14:42 +0800
committerChong Yidong2012-09-18 13:14:42 +0800
commited1f0bd388e83e5ee065f7dde0f52bbfe9031933 (patch)
tree7b0251ea23f7191194f5f0739ae43975e56c3db6 /lisp
parenta11035b8cd0ef80bc118cc97be53373b36475da0 (diff)
downloademacs-ed1f0bd388e83e5ee065f7dde0f52bbfe9031933.tar.gz
emacs-ed1f0bd388e83e5ee065f7dde0f52bbfe9031933.zip
Doc fixes for defface and friends.
* lisp/cus-edit.el (custom-unlispify-remove-prefixes): Add warning. * lisp/custom.el (defface): Doc fix. * doc/lispref/customize.texi (Customization): Define customization more carefully. (Common Keywords): Add xref to Constant Variables. * doc/lispref/display.texi (Faces): Discuss anonymous faces. (Face Attributes): Tweak intro. (Defining Faces): Move after the Face Attributes node. Copyedits. (Displaying Faces): Describe role of inheritance. * doc/lispref/variables.texi (Defining Variables): Link to defcustom's node instead of the higher-level Customization chapter. Fixes: debbugs:11440
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/cus-edit.el5
-rw-r--r--lisp/custom.el110
3 files changed, 62 insertions, 59 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index c1c9e5ee1c8..7ed5f6af14b 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12012-09-18 Chong Yidong <cyd@gnu.org>
2
3 * custom.el (defface): Doc fix.
4
5 * cus-edit.el (custom-unlispify-remove-prefixes): Add warning.
6
12012-09-18 Martin Blais <blais@furius.ca> (tiny change) 72012-09-18 Martin Blais <blais@furius.ca> (tiny change)
2 8
3 * progmodes/compile.el (compilation-start): Use compilation-always-kill 9 * progmodes/compile.el (compilation-start): Use compilation-always-kill
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index 86a19131569..2e6f2b14625 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -526,7 +526,10 @@ WIDGET is the widget to apply the filter entries of MENU on."
526 :type 'boolean) 526 :type 'boolean)
527 527
528(defcustom custom-unlispify-remove-prefixes nil 528(defcustom custom-unlispify-remove-prefixes nil
529 "Non-nil means remove group prefixes from option names in buffer." 529 "Non-nil means remove group prefixes from option names in buffer.
530Discarding prefixes often leads to confusing names for options
531and faces in Customize buffers, so do not set this to a non-nil
532value unless you are sure you know what it does."
530 :group 'custom-menu 533 :group 'custom-menu
531 :group 'custom-buffer 534 :group 'custom-buffer
532 :type 'boolean) 535 :type 'boolean)
diff --git a/lisp/custom.el b/lisp/custom.el
index 01b0e6d1650..dfc8e631152 100644
--- a/lisp/custom.el
+++ b/lisp/custom.el
@@ -350,68 +350,62 @@ FACE does not need to be quoted.
350 350
351Third argument DOC is the face documentation. 351Third argument DOC is the face documentation.
352 352
353If FACE has been set with `custom-set-faces', set the face attributes 353If FACE has been set with `custom-set-faces', set the face
354as specified by that function, otherwise set the face attributes 354attributes as specified by that function, otherwise set the face
355according to SPEC. 355attributes according to SPEC.
356
357The remaining arguments should have the form
358
359 [KEYWORD VALUE]...
360 356
357The remaining arguments should have the form [KEYWORD VALUE]...
361For a list of valid keywords, see the common keywords listed in 358For a list of valid keywords, see the common keywords listed in
362`defcustom'. 359`defcustom'.
363 360
364SPEC should be an alist of the form ((DISPLAY ATTS)...). 361SPEC should be an alist of the form
365 362
366In the first element, DISPLAY can be `default'. The ATTS in that 363 ((DISPLAY . ATTS)...)
367element then act as defaults for all the following elements. 364
368 365where DISPLAY is a form specifying conditions to match certain
369Aside from that, DISPLAY specifies conditions to match some or 366terminals and ATTS is a property list (ATTR VALUE ATTR VALUE...)
370all frames. For each frame, the first element of SPEC where the 367specifying face attributes and values for frames on those
371DISPLAY conditions are satisfied is the one that applies to that 368terminals. On each terminal, the first element with a matching
372frame. The ATTRs in this element take effect, and the following 369DISPLAY specification takes effect, and the remaining elements in
373elements are ignored, on that frame. 370SPEC are disregarded.
374 371
375In the last element, DISPLAY can be t. That element applies to a 372As a special exception, in the first element of SPEC, DISPLAY can
376frame if none of the previous elements (except the `default' if 373be the special value `default'. Then the ATTS in that element
377any) did. 374act as defaults for all the following elements.
378 375
379ATTS is a list of face attributes followed by their values: 376For backward compatibility, elements of SPEC can be written
380 (ATTR VALUE ATTR VALUE...) 377as (DISPLAY ATTS) instead of (DISPLAY . ATTS).
381 378
382The possible attributes are `:family', `:width', `:height', `:weight', 379Each DISPLAY can have the following values:
383`:slant', `:underline', `:overline', `:strike-through', `:box', 380 - `default' (only in the first element).
384`:foreground', `:background', `:stipple', `:inverse-video', and `:inherit'. 381 - The symbol t, which matches all terminals.
385 382 - An alist of conditions. Each alist element must have the form
386DISPLAY can be `default' (only in the first element), the symbol 383 (REQ ITEM...). A matching terminal must satisfy each
387t (only in the last element) to match all frames, or an alist of 384 specified condition by matching one of its ITEMs. Each REQ
388conditions of the form \(REQ ITEM...). For such an alist to 385 must be one of the following:
389match a frame, each of the conditions must be satisfied, meaning 386 - `type' (the terminal type).
390that the REQ property of the frame must match one of the 387 Each ITEM must be one of the values returned by
391corresponding ITEMs. These are the defined REQ values: 388 `window-system'. Under X, additional allowed values are
392 389 `motif', `lucid', `gtk' and `x-toolkit'.
393`type' (the value of `window-system') 390 - `class' (the terminal's color support).
394 Under X, in addition to the values `window-system' can take, 391 Each ITEM should be one of `color', `grayscale', or `mono'.
395 `motif', `lucid', `gtk' and `x-toolkit' are allowed, and match when 392 - `background' (what color is used for the background text)
396 the Motif toolkit, Lucid toolkit, GTK toolkit or any X toolkit is in use. 393 Each ITEM should be one of `light' or `dark'.
397 394 - `min-colors' (the minimum number of supported colors)
398`class' (the frame's color support) 395 Each ITEM should be an integer, which is compared with the
399 Should be one of `color', `grayscale', or `mono'. 396 result of `display-color-cells'.
400 397 - `supports' (match terminals supporting certain attributes).
401`background' (what color is used for the background text) 398 Each ITEM should be a list of face attributes. See
402 Should be one of `light' or `dark'. 399 `display-supports-face-attributes-p' for more information on
403 400 exactly how testing is done.
404`min-colors' (the minimum number of colors the frame should support) 401
405 Should be an integer, it is compared with the result of 402In the ATTS property list, possible attributes are `:family',
406 `display-color-cells'. 403`:width', `:height', `:weight', `:slant', `:underline',
407 404`:overline', `:strike-through', `:box', `:foreground',
408`supports' (only match frames that support the specified face attributes) 405`:background', `:stipple', `:inverse-video', and `:inherit'.
409 Should be a list of face attributes. See the documentation for 406
410 the function `display-supports-face-attributes-p' for more 407See Info node `(elisp) Faces' in the Emacs Lisp manual for more
411 information on exactly how testing is done. 408information."
412
413See Info node `(elisp) Customization' in the Emacs Lisp manual
414for more information."
415 (declare (doc-string 3)) 409 (declare (doc-string 3))
416 ;; It is better not to use backquote in this file, 410 ;; It is better not to use backquote in this file,
417 ;; because that makes a bootstrapping problem 411 ;; because that makes a bootstrapping problem