diff options
| author | Glenn Morris | 2016-02-01 20:59:32 -0500 |
|---|---|---|
| committer | Glenn Morris | 2016-02-01 20:59:32 -0500 |
| commit | 93f21530ad0a17310f97f1a25dfbc67b249bf2e7 (patch) | |
| tree | fd53bd8927276313438bf6f967241e7a7ba0e8bf | |
| parent | 9f60d7e9a27b107d5bd35bf9d7621a300e17dbfb (diff) | |
| download | emacs-93f21530ad0a17310f97f1a25dfbc67b249bf2e7.tar.gz emacs-93f21530ad0a17310f97f1a25dfbc67b249bf2e7.zip | |
Improve the custom type of some user options.
* lisp/autoinsert.el (auto-insert-alist):
* lisp/replace.el (query-replace-from-to-separator):
* lisp/gnus/gnus-art.el (gnus-hidden-properties):
* lisp/gnus/gnus-gravatar.el (gnus-gravatar-properties):
* lisp/gnus/gnus-picon.el (gnus-picon-properties):
* lisp/progmodes/prolog.el (prolog-keywords, prolog-types)
(prolog-mode-specificators, prolog-determinism-specificators)
(prolog-directives, prolog-program-name, prolog-program-switches)
(prolog-consult-string, prolog-compile-string, prolog-eof-string)
(prolog-prompt-regexp): Improve custom type.
| -rw-r--r-- | lisp/autoinsert.el | 12 | ||||
| -rw-r--r-- | lisp/gnus/gnus-art.el | 2 | ||||
| -rw-r--r-- | lisp/gnus/gnus-gravatar.el | 2 | ||||
| -rw-r--r-- | lisp/gnus/gnus-picon.el | 2 | ||||
| -rw-r--r-- | lisp/progmodes/prolog.el | 44 | ||||
| -rw-r--r-- | lisp/replace.el | 2 |
6 files changed, 42 insertions, 22 deletions
diff --git a/lisp/autoinsert.el b/lisp/autoinsert.el index e5dd62ff4d8..43fa31288e6 100644 --- a/lisp/autoinsert.el +++ b/lisp/autoinsert.el | |||
| @@ -305,7 +305,17 @@ ACTION may be a skeleton to insert (see `skeleton-insert'), an absolute | |||
| 305 | file-name or one relative to `auto-insert-directory' or a function to call. | 305 | file-name or one relative to `auto-insert-directory' or a function to call. |
| 306 | ACTION may also be a vector containing several successive single actions as | 306 | ACTION may also be a vector containing several successive single actions as |
| 307 | described above, e.g. [\"header.insert\" date-and-author-update]." | 307 | described above, e.g. [\"header.insert\" date-and-author-update]." |
| 308 | :type 'sexp | 308 | :type '(alist :key-type |
| 309 | (choice (regexp :tag "Regexp matching file name") | ||
| 310 | (symbol :tag "Major mode") | ||
| 311 | (cons :tag "Condition and description" | ||
| 312 | (choice :tag "Condition" | ||
| 313 | (regexp :tag "Regexp matching file name") | ||
| 314 | (symbol :tag "Major mode")) | ||
| 315 | (string :tag "Description"))) | ||
| 316 | ;; There's no custom equivalent of "repeat" for vectors. | ||
| 317 | :value-type (choice file function | ||
| 318 | (sexp :tag "Skeleton or vector"))) | ||
| 309 | :version "25.1" | 319 | :version "25.1" |
| 310 | :group 'auto-insert) | 320 | :group 'auto-insert) |
| 311 | 321 | ||
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 54bbfd857f1..366d14aca1d 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el | |||
| @@ -260,7 +260,7 @@ This can also be a list of the above values." | |||
| 260 | ;; needed there. And XEmacs doesn't handle `intangible' anyway. | 260 | ;; needed there. And XEmacs doesn't handle `intangible' anyway. |
| 261 | '(invisible t) | 261 | '(invisible t) |
| 262 | "Property list to use for hiding text." | 262 | "Property list to use for hiding text." |
| 263 | :type 'sexp | 263 | :type 'plist |
| 264 | :group 'gnus-article-hiding) | 264 | :group 'gnus-article-hiding) |
| 265 | 265 | ||
| 266 | ;; Fixme: This isn't the right thing for mixed graphical and non-graphical | 266 | ;; Fixme: This isn't the right thing for mixed graphical and non-graphical |
diff --git a/lisp/gnus/gnus-gravatar.el b/lisp/gnus/gnus-gravatar.el index deb6e4bc4c9..de7203d9d10 100644 --- a/lisp/gnus/gnus-gravatar.el +++ b/lisp/gnus/gnus-gravatar.el | |||
| @@ -41,7 +41,7 @@ If nil, default to `gravatar-size'." | |||
| 41 | 41 | ||
| 42 | (defcustom gnus-gravatar-properties '(:ascent center :relief 1) | 42 | (defcustom gnus-gravatar-properties '(:ascent center :relief 1) |
| 43 | "List of image properties applied to Gravatar images." | 43 | "List of image properties applied to Gravatar images." |
| 44 | :type 'sexp | 44 | :type 'plist |
| 45 | :version "24.1" | 45 | :version "24.1" |
| 46 | :group 'gnus-gravatar) | 46 | :group 'gnus-gravatar) |
| 47 | 47 | ||
diff --git a/lisp/gnus/gnus-picon.el b/lisp/gnus/gnus-picon.el index 6365e8e2ff7..bbbe0eded4e 100644 --- a/lisp/gnus/gnus-picon.el +++ b/lisp/gnus/gnus-picon.el | |||
| @@ -73,7 +73,7 @@ Some people may want to add \"unknown\" to this list." | |||
| 73 | 73 | ||
| 74 | (defcustom gnus-picon-properties '(:color-symbols (("None" . "white"))) | 74 | (defcustom gnus-picon-properties '(:color-symbols (("None" . "white"))) |
| 75 | "List of image properties applied to picons." | 75 | "List of image properties applied to picons." |
| 76 | :type 'sexp | 76 | :type 'plist |
| 77 | :version "24.3" | 77 | :version "24.3" |
| 78 | :group 'gnus-picon) | 78 | :group 'gnus-picon) |
| 79 | 79 | ||
diff --git a/lisp/progmodes/prolog.el b/lisp/progmodes/prolog.el index 4f23f87dd59..9c15f3b6a0e 100644 --- a/lisp/progmodes/prolog.el +++ b/lisp/progmodes/prolog.el | |||
| @@ -272,9 +272,6 @@ | |||
| 272 | ;; Version 0.1.35: | 272 | ;; Version 0.1.35: |
| 273 | ;; o Minor font-lock bug fixes. | 273 | ;; o Minor font-lock bug fixes. |
| 274 | 274 | ||
| 275 | ;;; TODO: | ||
| 276 | |||
| 277 | ;; Replace ":type 'sexp" with more precise Custom types. | ||
| 278 | 275 | ||
| 279 | ;;; Code: | 276 | ;;; Code: |
| 280 | 277 | ||
| @@ -441,7 +438,12 @@ Legal values: | |||
| 441 | "Alist of Prolog keywords which is used for font locking of directives." | 438 | "Alist of Prolog keywords which is used for font locking of directives." |
| 442 | :version "24.1" | 439 | :version "24.1" |
| 443 | :group 'prolog-font-lock | 440 | :group 'prolog-font-lock |
| 444 | :type 'sexp | 441 | ;; Note that "(repeat string)" also allows "nil" (repeat-count 0). |
| 442 | ;; This gets processed by prolog-find-value-by-system, which | ||
| 443 | ;; allows both the car and the cdr to be a list to eval. | ||
| 444 | ;; Though the latter must have the form '(eval ...)'. | ||
| 445 | ;; Of course, none of this is documented... | ||
| 446 | :type '(repeat (list (choice symbol sexp) (choice (repeat string) sexp))) | ||
| 445 | :risky t) | 447 | :risky t) |
| 446 | 448 | ||
| 447 | (defcustom prolog-types | 449 | (defcustom prolog-types |
| @@ -451,7 +453,7 @@ Legal values: | |||
| 451 | "Alist of Prolog types used by font locking." | 453 | "Alist of Prolog types used by font locking." |
| 452 | :version "24.1" | 454 | :version "24.1" |
| 453 | :group 'prolog-font-lock | 455 | :group 'prolog-font-lock |
| 454 | :type 'sexp | 456 | :type '(repeat (list (choice symbol sexp) (choice (repeat string) sexp))) |
| 455 | :risky t) | 457 | :risky t) |
| 456 | 458 | ||
| 457 | (defcustom prolog-mode-specificators | 459 | (defcustom prolog-mode-specificators |
| @@ -461,7 +463,7 @@ Legal values: | |||
| 461 | "Alist of Prolog mode specificators used by font locking." | 463 | "Alist of Prolog mode specificators used by font locking." |
| 462 | :version "24.1" | 464 | :version "24.1" |
| 463 | :group 'prolog-font-lock | 465 | :group 'prolog-font-lock |
| 464 | :type 'sexp | 466 | :type '(repeat (list (choice symbol sexp) (choice (repeat string) sexp))) |
| 465 | :risky t) | 467 | :risky t) |
| 466 | 468 | ||
| 467 | (defcustom prolog-determinism-specificators | 469 | (defcustom prolog-determinism-specificators |
| @@ -472,7 +474,7 @@ Legal values: | |||
| 472 | "Alist of Prolog determinism specificators used by font locking." | 474 | "Alist of Prolog determinism specificators used by font locking." |
| 473 | :version "24.1" | 475 | :version "24.1" |
| 474 | :group 'prolog-font-lock | 476 | :group 'prolog-font-lock |
| 475 | :type 'sexp | 477 | :type '(repeat (list (choice symbol sexp) (choice (repeat string) sexp))) |
| 476 | :risky t) | 478 | :risky t) |
| 477 | 479 | ||
| 478 | (defcustom prolog-directives | 480 | (defcustom prolog-directives |
| @@ -482,7 +484,7 @@ Legal values: | |||
| 482 | "Alist of Prolog source code directives used by font locking." | 484 | "Alist of Prolog source code directives used by font locking." |
| 483 | :version "24.1" | 485 | :version "24.1" |
| 484 | :group 'prolog-font-lock | 486 | :group 'prolog-font-lock |
| 485 | :type 'sexp | 487 | :type '(repeat (list (choice symbol sexp) (choice (repeat string) sexp))) |
| 486 | :risky t) | 488 | :risky t) |
| 487 | 489 | ||
| 488 | 490 | ||
| @@ -569,7 +571,8 @@ the first column (i.e., DCG heads) inserts ` -->' and newline." | |||
| 569 | (or (car names) "prolog")))) | 571 | (or (car names) "prolog")))) |
| 570 | "Alist of program names for invoking an inferior Prolog with `run-prolog'." | 572 | "Alist of program names for invoking an inferior Prolog with `run-prolog'." |
| 571 | :group 'prolog-inferior | 573 | :group 'prolog-inferior |
| 572 | :type 'sexp | 574 | :type '(alist :key-type (choice symbol sexp) |
| 575 | :value-type (group (choice string (const nil) sexp))) | ||
| 573 | :risky t) | 576 | :risky t) |
| 574 | (defun prolog-program-name () | 577 | (defun prolog-program-name () |
| 575 | (prolog-find-value-by-system prolog-program-name)) | 578 | (prolog-find-value-by-system prolog-program-name)) |
| @@ -580,7 +583,7 @@ the first column (i.e., DCG heads) inserts ` -->' and newline." | |||
| 580 | "Alist of switches given to inferior Prolog run with `run-prolog'." | 583 | "Alist of switches given to inferior Prolog run with `run-prolog'." |
| 581 | :version "24.1" | 584 | :version "24.1" |
| 582 | :group 'prolog-inferior | 585 | :group 'prolog-inferior |
| 583 | :type 'sexp | 586 | :type '(repeat (list (choice symbol sexp) (choice (repeat string) sexp))) |
| 584 | :risky t) | 587 | :risky t) |
| 585 | (defun prolog-program-switches () | 588 | (defun prolog-program-switches () |
| 586 | (prolog-find-value-by-system prolog-program-switches)) | 589 | (prolog-find-value-by-system prolog-program-switches)) |
| @@ -604,7 +607,8 @@ Some parts of the string are replaced: | |||
| 604 | region of a buffer, in which case it is the number of lines before | 607 | region of a buffer, in which case it is the number of lines before |
| 605 | the region." | 608 | the region." |
| 606 | :group 'prolog-inferior | 609 | :group 'prolog-inferior |
| 607 | :type 'sexp | 610 | :type '(alist :key-type (choice symbol sexp) |
| 611 | :value-type (group (choice string (const nil) sexp))) | ||
| 608 | :risky t) | 612 | :risky t) |
| 609 | 613 | ||
| 610 | (defun prolog-consult-string () | 614 | (defun prolog-consult-string () |
| @@ -631,17 +635,21 @@ Some parts of the string are replaced: | |||
| 631 | If `prolog-program-name' is non-nil, it is a string sent to a Prolog process. | 635 | If `prolog-program-name' is non-nil, it is a string sent to a Prolog process. |
| 632 | If `prolog-program-name' is nil, it is an argument to the `compile' function." | 636 | If `prolog-program-name' is nil, it is an argument to the `compile' function." |
| 633 | :group 'prolog-inferior | 637 | :group 'prolog-inferior |
| 634 | :type 'sexp | 638 | :type '(alist :key-type (choice symbol sexp) |
| 639 | :value-type (group (choice string (const nil) sexp))) | ||
| 635 | :risky t) | 640 | :risky t) |
| 636 | 641 | ||
| 637 | (defun prolog-compile-string () | 642 | (defun prolog-compile-string () |
| 638 | (prolog-find-value-by-system prolog-compile-string)) | 643 | (prolog-find-value-by-system prolog-compile-string)) |
| 639 | 644 | ||
| 640 | (defcustom prolog-eof-string "end_of_file.\n" | 645 | (defcustom prolog-eof-string "end_of_file.\n" |
| 641 | "Alist of strings that represent end of file for prolog. | 646 | "String or alist of strings that represent end of file for prolog. |
| 642 | nil means send actual operating system end of file." | 647 | If nil, send actual operating system end of file." |
| 643 | :group 'prolog-inferior | 648 | :group 'prolog-inferior |
| 644 | :type 'sexp | 649 | :type '(choice string |
| 650 | (const nil) | ||
| 651 | (alist :key-type (choice symbol sexp) | ||
| 652 | :value-type (group (choice string (const nil) sexp)))) | ||
| 645 | :risky t) | 653 | :risky t) |
| 646 | 654 | ||
| 647 | (defcustom prolog-prompt-regexp | 655 | (defcustom prolog-prompt-regexp |
| @@ -653,7 +661,8 @@ nil means send actual operating system end of file." | |||
| 653 | "Alist of prompts of the prolog system command line." | 661 | "Alist of prompts of the prolog system command line." |
| 654 | :version "24.1" | 662 | :version "24.1" |
| 655 | :group 'prolog-inferior | 663 | :group 'prolog-inferior |
| 656 | :type 'sexp | 664 | :type '(alist :key-type (choice symbol sexp) |
| 665 | :value-type (group (choice string (const nil) sexp))) | ||
| 657 | :risky t) | 666 | :risky t) |
| 658 | 667 | ||
| 659 | (defun prolog-prompt-regexp () | 668 | (defun prolog-prompt-regexp () |
| @@ -664,7 +673,8 @@ nil means send actual operating system end of file." | |||
| 664 | ;; (t "^|: +")) | 673 | ;; (t "^|: +")) |
| 665 | ;; "Alist of regexps matching the prompt when consulting `user'." | 674 | ;; "Alist of regexps matching the prompt when consulting `user'." |
| 666 | ;; :group 'prolog-inferior | 675 | ;; :group 'prolog-inferior |
| 667 | ;; :type 'sexp | 676 | ;; :type '(alist :key-type (choice symbol sexp) |
| 677 | ;; :value-type (group (choice string (const nil) sexp))) | ||
| 668 | ;; :risky t) | 678 | ;; :risky t) |
| 669 | 679 | ||
| 670 | (defcustom prolog-debug-on-string "debug.\n" | 680 | (defcustom prolog-debug-on-string "debug.\n" |
diff --git a/lisp/replace.el b/lisp/replace.el index f5c8d33b5f5..dfe8cd739a2 100644 --- a/lisp/replace.el +++ b/lisp/replace.el | |||
| @@ -85,7 +85,7 @@ from Isearch by using a key sequence like `C-s C-s M-%'." "24.3") | |||
| 85 | ;; while preparing to dump, also stops customize-rogue listing this. | 85 | ;; while preparing to dump, also stops customize-rogue listing this. |
| 86 | :initialize 'custom-initialize-delay | 86 | :initialize 'custom-initialize-delay |
| 87 | :group 'matching | 87 | :group 'matching |
| 88 | :type 'sexp | 88 | :type '(choice string (sexp :tag "Display specification")) |
| 89 | :version "25.1") | 89 | :version "25.1") |
| 90 | 90 | ||
| 91 | (defcustom query-replace-from-history-variable 'query-replace-history | 91 | (defcustom query-replace-from-history-variable 'query-replace-history |