diff options
| author | Juanma Barranquero | 2013-06-20 13:29:30 +0200 |
|---|---|---|
| committer | Juanma Barranquero | 2013-06-20 13:29:30 +0200 |
| commit | d5b27848d6272a979ba59455ef9ccc8feb54e1e8 (patch) | |
| tree | eb3285fae91b70e58991d7dc5352ccd2f995bd28 | |
| parent | 01a439012b9393e1325ab983dfcebad0307f0a03 (diff) | |
| download | emacs-d5b27848d6272a979ba59455ef9ccc8feb54e1e8.tar.gz emacs-d5b27848d6272a979ba59455ef9ccc8feb54e1e8.zip | |
lisp/(cus-edit,custom).el: Fix typos; use setq-local, string-match-p, looking-at-p.
* lisp/cus-edit.el:
(custom-commands): Fix typos.
(custom-display): Fix tooltip text.
(custom-magic-alist, custom-filter-face-spec, custom-group-members):
Fix typos in docstrings.
(custom--initialize-widget-variables, Custom-mode): Use `setq-local'.
(custom-unlispify-menu-entry, custom-magic-value-create)
(custom-add-see-also, custom-group-value-create): Use ?\s.
(custom-guess-type, customize-apropos, editable-field)
(custom-face-value-create): Use `string-match-p'.
(custom-save-variables, custom-save-faces): Use `looking-at-p'.
* lisp/custom.el (custom-load-symbol): Use `string-match-p'.
| -rw-r--r-- | lisp/ChangeLog | 13 | ||||
| -rw-r--r-- | lisp/cus-edit.el | 90 | ||||
| -rw-r--r-- | lisp/custom.el | 12 |
3 files changed, 64 insertions, 51 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 773f8913533..4633e83292f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,18 @@ | |||
| 1 | 2013-06-20 Juanma Barranquero <lekktu@gmail.com> | 1 | 2013-06-20 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 2 | ||
| 3 | * cus-edit.el (custom-commands): Fix typos. | ||
| 4 | (custom-display): Fix tooltip text. | ||
| 5 | (custom-magic-alist, custom-filter-face-spec, custom-group-members): | ||
| 6 | Fix typos in docstrings. | ||
| 7 | (custom--initialize-widget-variables, Custom-mode): Use `setq-local'. | ||
| 8 | (custom-unlispify-menu-entry, custom-magic-value-create) | ||
| 9 | (custom-add-see-also, custom-group-value-create): Use ?\s. | ||
| 10 | (custom-guess-type, customize-apropos, editable-field) | ||
| 11 | (custom-face-value-create): Use `string-match-p'. | ||
| 12 | (custom-save-variables, custom-save-faces): Use `looking-at-p'. | ||
| 13 | |||
| 14 | * custom.el (custom-load-symbol): Use `string-match-p'. | ||
| 15 | |||
| 3 | * ansi-color.el: Convert to lexical binding. | 16 | * ansi-color.el: Convert to lexical binding. |
| 4 | (ansi-colors): Fix URL. | 17 | (ansi-colors): Fix URL. |
| 5 | (ansi-color-context, ansi-color-context-region): Use defvar-local. | 18 | (ansi-color-context, ansi-color-context-region): Use defvar-local. |
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index d4966078e1d..b50c1a5155b 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el | |||
| @@ -558,7 +558,7 @@ value unless you are sure you know what it does." | |||
| 558 | (setq prefixes nil) | 558 | (setq prefixes nil) |
| 559 | (delete-region (point-min) (point))) | 559 | (delete-region (point-min) (point))) |
| 560 | (setq prefixes (cdr prefixes)))))) | 560 | (setq prefixes (cdr prefixes)))))) |
| 561 | (subst-char-in-region (point-min) (point-max) ?- ?\ t) | 561 | (subst-char-in-region (point-min) (point-max) ?- ?\s t) |
| 562 | (capitalize-region (point-min) (point-max)) | 562 | (capitalize-region (point-min) (point-max)) |
| 563 | (unless no-suffix | 563 | (unless no-suffix |
| 564 | (goto-char (point-max)) | 564 | (goto-char (point-max)) |
| @@ -629,7 +629,7 @@ if that fails, the doc string with `custom-guess-doc-alist'." | |||
| 629 | (while names | 629 | (while names |
| 630 | (setq current (car names) | 630 | (setq current (car names) |
| 631 | names (cdr names)) | 631 | names (cdr names)) |
| 632 | (when (string-match (nth 0 current) name) | 632 | (when (string-match-p (nth 0 current) name) |
| 633 | (setq found (nth 1 current) | 633 | (setq found (nth 1 current) |
| 634 | names nil))) | 634 | names nil))) |
| 635 | (unless found | 635 | (unless found |
| @@ -639,7 +639,7 @@ if that fails, the doc string with `custom-guess-doc-alist'." | |||
| 639 | (while docs | 639 | (while docs |
| 640 | (setq current (car docs) | 640 | (setq current (car docs) |
| 641 | docs (cdr docs)) | 641 | docs (cdr docs)) |
| 642 | (when (string-match (nth 0 current) doc) | 642 | (when (string-match-p (nth 0 current) doc) |
| 643 | (setq found (nth 1 current) | 643 | (setq found (nth 1 current) |
| 644 | docs nil)))))) | 644 | docs nil)))))) |
| 645 | found)) | 645 | found)) |
| @@ -731,7 +731,7 @@ groups after non-groups, if nil do not order groups at all." | |||
| 731 | 731 | ||
| 732 | (defvar custom-commands | 732 | (defvar custom-commands |
| 733 | '((" Apply " Custom-set t | 733 | '((" Apply " Custom-set t |
| 734 | "Apply settings (for the current session only)" | 734 | "Apply settings (for the current session only)." |
| 735 | "index" | 735 | "index" |
| 736 | "Apply") | 736 | "Apply") |
| 737 | (" Apply and Save " Custom-save | 737 | (" Apply and Save " Custom-save |
| @@ -1421,8 +1421,8 @@ suggest to customize that face, if it's customizable." | |||
| 1421 | "Customize loaded options, faces and groups matching PATTERN. | 1421 | "Customize loaded options, faces and groups matching PATTERN. |
| 1422 | PATTERN can be a word, a list of words (separated by spaces), | 1422 | PATTERN can be a word, a list of words (separated by spaces), |
| 1423 | or a regexp (using some regexp special characters). If it is a word, | 1423 | or a regexp (using some regexp special characters). If it is a word, |
| 1424 | search for matches for that word as a substring. If it is a list of words, | 1424 | search for matches for that word as a substring. If it is a list of |
| 1425 | search for matches for any two (or more) of those words. | 1425 | words, search for matches for any two (or more) of those words. |
| 1426 | 1426 | ||
| 1427 | If TYPE is `options', include only options. | 1427 | If TYPE is `options', include only options. |
| 1428 | If TYPE is `faces', include only faces. | 1428 | If TYPE is `faces', include only faces. |
| @@ -1435,7 +1435,7 @@ If TYPE is `groups', include only groups." | |||
| 1435 | (let (found) | 1435 | (let (found) |
| 1436 | (mapatoms | 1436 | (mapatoms |
| 1437 | `(lambda (symbol) | 1437 | `(lambda (symbol) |
| 1438 | (when (string-match apropos-regexp (symbol-name symbol)) | 1438 | (when (string-match-p apropos-regexp (symbol-name symbol)) |
| 1439 | ,(if (memq type '(nil groups)) | 1439 | ,(if (memq type '(nil groups)) |
| 1440 | '(if (get symbol 'custom-group) | 1440 | '(if (get symbol 'custom-group) |
| 1441 | (push (list symbol 'custom-group) found))) | 1441 | (push (list symbol 'custom-group) found))) |
| @@ -1832,7 +1832,7 @@ item in another window.\n\n")) | |||
| 1832 | (widget-put (get 'editable-field 'widget-type) | 1832 | (widget-put (get 'editable-field 'widget-type) |
| 1833 | :custom-show (lambda (_widget value) | 1833 | :custom-show (lambda (_widget value) |
| 1834 | (let ((pp (pp-to-string value))) | 1834 | (let ((pp (pp-to-string value))) |
| 1835 | (cond ((string-match "\n" pp) | 1835 | (cond ((string-match-p "\n" pp) |
| 1836 | nil) | 1836 | nil) |
| 1837 | ((> (length pp) 40) | 1837 | ((> (length pp) 40) |
| 1838 | nil) | 1838 | nil) |
| @@ -1973,7 +1973,7 @@ GROUP-DESC is a string describing the state for groups. If this is | |||
| 1973 | left out, ITEM-DESC will be used. | 1973 | left out, ITEM-DESC will be used. |
| 1974 | 1974 | ||
| 1975 | The string %c in either description will be replaced with the | 1975 | The string %c in either description will be replaced with the |
| 1976 | category of the item. These are `group'. `option', and `face'. | 1976 | category of the item. These are `group', `option', and `face'. |
| 1977 | 1977 | ||
| 1978 | The list should be sorted most significant first.") | 1978 | The list should be sorted most significant first.") |
| 1979 | 1979 | ||
| @@ -2039,7 +2039,7 @@ and `face'." | |||
| 2039 | (when (and (eq category 'group) | 2039 | (when (and (eq category 'group) |
| 2040 | (not (and (eq custom-buffer-style 'links) | 2040 | (not (and (eq custom-buffer-style 'links) |
| 2041 | (> (widget-get parent :custom-level) 1)))) | 2041 | (> (widget-get parent :custom-level) 1)))) |
| 2042 | (insert-char ?\ (* custom-buffer-indent | 2042 | (insert-char ?\s (* custom-buffer-indent |
| 2043 | (widget-get parent :custom-level)))) | 2043 | (widget-get parent :custom-level)))) |
| 2044 | (push (widget-create-child-and-convert | 2044 | (push (widget-create-child-and-convert |
| 2045 | widget 'choice-item | 2045 | widget 'choice-item |
| @@ -2064,7 +2064,7 @@ and `face'." | |||
| 2064 | (when (and (eq category 'group) | 2064 | (when (and (eq category 'group) |
| 2065 | (not (and (eq custom-buffer-style 'links) | 2065 | (not (and (eq custom-buffer-style 'links) |
| 2066 | (> (widget-get parent :custom-level) 1)))) | 2066 | (> (widget-get parent :custom-level) 1)))) |
| 2067 | (insert-char ?\ (* custom-buffer-indent | 2067 | (insert-char ?\s (* custom-buffer-indent |
| 2068 | (widget-get parent :custom-level)))) | 2068 | (widget-get parent :custom-level)))) |
| 2069 | (when custom-magic-show-button | 2069 | (when custom-magic-show-button |
| 2070 | (when custom-magic-show | 2070 | (when custom-magic-show |
| @@ -2293,7 +2293,7 @@ Insert PREFIX first if non-nil." | |||
| 2293 | (indent (widget-get widget :indent))) | 2293 | (indent (widget-get widget :indent))) |
| 2294 | (when links | 2294 | (when links |
| 2295 | (when indent | 2295 | (when indent |
| 2296 | (insert-char ?\ indent)) | 2296 | (insert-char ?\s indent)) |
| 2297 | (when prefix | 2297 | (when prefix |
| 2298 | (insert prefix)) | 2298 | (insert prefix)) |
| 2299 | (insert "See also ") | 2299 | (insert "See also ") |
| @@ -3227,7 +3227,7 @@ OS/2 Presentation Manager.") | |||
| 3227 | pm) | 3227 | pm) |
| 3228 | (const :format "W32 " | 3228 | (const :format "W32 " |
| 3229 | :sibling-args (:help-echo "\ | 3229 | :sibling-args (:help-echo "\ |
| 3230 | Windows NT/9X.") | 3230 | MS Windows.") |
| 3231 | w32) | 3231 | w32) |
| 3232 | (const :format "NS " | 3232 | (const :format "NS " |
| 3233 | :sibling-args (:help-echo "\ | 3233 | :sibling-args (:help-echo "\ |
| @@ -3348,7 +3348,7 @@ The following properties have special meanings for this widget: | |||
| 3348 | "Converted version of the `custom-face-all' widget.") | 3348 | "Converted version of the `custom-face-all' widget.") |
| 3349 | 3349 | ||
| 3350 | (defun custom-filter-face-spec (spec filter-index &optional default-filter) | 3350 | (defun custom-filter-face-spec (spec filter-index &optional default-filter) |
| 3351 | "Return a canonicalized version of SPEC using. | 3351 | "Return a canonicalized version of SPEC. |
| 3352 | FILTER-INDEX is the index in the entry for each attribute in | 3352 | FILTER-INDEX is the index in the entry for each attribute in |
| 3353 | `custom-face-attributes' at which the appropriate filter function can be | 3353 | `custom-face-attributes' at which the appropriate filter function can be |
| 3354 | found, and DEFAULT-FILTER is the filter to apply for attributes that | 3354 | found, and DEFAULT-FILTER is the filter to apply for attributes that |
| @@ -3473,7 +3473,7 @@ the present value is saved to its :shown-value property instead." | |||
| 3473 | (widget-specify-sample widget opoint (point))) | 3473 | (widget-specify-sample widget opoint (point))) |
| 3474 | (insert | 3474 | (insert |
| 3475 | (cond ((eq custom-buffer-style 'face) " ") | 3475 | (cond ((eq custom-buffer-style 'face) " ") |
| 3476 | ((string-match "face\\'" tag) ":") | 3476 | ((string-match-p "face\\'" tag) ":") |
| 3477 | (t " face: "))) | 3477 | (t " face: "))) |
| 3478 | 3478 | ||
| 3479 | ;; Face sample. | 3479 | ;; Face sample. |
| @@ -3947,7 +3947,7 @@ and so forth. The remaining group tags are shown with `custom-group-tag'." | |||
| 3947 | 3947 | ||
| 3948 | (defun custom-group-members (symbol groups-only) | 3948 | (defun custom-group-members (symbol groups-only) |
| 3949 | "Return SYMBOL's custom group members. | 3949 | "Return SYMBOL's custom group members. |
| 3950 | If GROUPS-ONLY non-nil, return only those members that are groups." | 3950 | If GROUPS-ONLY is non-nil, return only those members that are groups." |
| 3951 | (if (not groups-only) | 3951 | (if (not groups-only) |
| 3952 | (get symbol 'custom-group) | 3952 | (get symbol 'custom-group) |
| 3953 | (let (members) | 3953 | (let (members) |
| @@ -4058,7 +4058,7 @@ If GROUPS-ONLY non-nil, return only those members that are groups." | |||
| 4058 | :tag tag | 4058 | :tag tag |
| 4059 | symbol) | 4059 | symbol) |
| 4060 | buttons) | 4060 | buttons) |
| 4061 | (insert-char ?\ (* custom-buffer-indent (1- level))) | 4061 | (insert-char ?\s (* custom-buffer-indent (1- level))) |
| 4062 | (insert "-- ") | 4062 | (insert "-- ") |
| 4063 | (push (widget-create-child-and-convert | 4063 | (push (widget-create-child-and-convert |
| 4064 | widget 'custom-group-visibility | 4064 | widget 'custom-group-visibility |
| @@ -4098,7 +4098,7 @@ If GROUPS-ONLY non-nil, return only those members that are groups." | |||
| 4098 | (when (eq level 1) | 4098 | (when (eq level 1) |
| 4099 | (if (custom-add-parent-links widget "Parent groups:") | 4099 | (if (custom-add-parent-links widget "Parent groups:") |
| 4100 | (insert "\n"))) | 4100 | (insert "\n"))) |
| 4101 | (insert-char ?\ (* custom-buffer-indent (1- level))) | 4101 | (insert-char ?\s (* custom-buffer-indent (1- level))) |
| 4102 | ;; Create tag. | 4102 | ;; Create tag. |
| 4103 | (let ((start (point))) | 4103 | (let ((start (point))) |
| 4104 | (insert tag " group: ") | 4104 | (insert tag " group: ") |
| @@ -4137,11 +4137,11 @@ If GROUPS-ONLY non-nil, return only those members that are groups." | |||
| 4137 | (if nil ;;; This should test that the buffer | 4137 | (if nil ;;; This should test that the buffer |
| 4138 | ;;; was not made to display a group. | 4138 | ;;; was not made to display a group. |
| 4139 | (when (eq level 1) | 4139 | (when (eq level 1) |
| 4140 | (insert-char ?\ custom-buffer-indent) | 4140 | (insert-char ?\s custom-buffer-indent) |
| 4141 | (custom-add-parent-links widget))) | 4141 | (custom-add-parent-links widget))) |
| 4142 | (custom-add-see-also widget | 4142 | (custom-add-see-also widget |
| 4143 | (make-string (* custom-buffer-indent level) | 4143 | (make-string (* custom-buffer-indent level) |
| 4144 | ?\ )) | 4144 | ?\s)) |
| 4145 | ;; Members. | 4145 | ;; Members. |
| 4146 | (message "Creating group...") | 4146 | (message "Creating group...") |
| 4147 | (let* ((members (custom-sort-items | 4147 | (let* ((members (custom-sort-items |
| @@ -4326,7 +4326,7 @@ Note that both lines are necessary: the first line tells Custom to | |||
| 4326 | save all customizations in this file, but does not load it. | 4326 | save all customizations in this file, but does not load it. |
| 4327 | 4327 | ||
| 4328 | When you change this variable outside Custom, look in the | 4328 | When you change this variable outside Custom, look in the |
| 4329 | previous custom file \(usually your init file) for the | 4329 | previous custom file (usually your init file) for the |
| 4330 | forms `(custom-set-variables ...)' and `(custom-set-faces ...)', | 4330 | forms `(custom-set-variables ...)' and `(custom-set-faces ...)', |
| 4331 | and copy them (whichever ones you find) to the new custom file. | 4331 | and copy them (whichever ones you find) to the new custom file. |
| 4332 | This will preserve your existing customizations. | 4332 | This will preserve your existing customizations. |
| @@ -4337,7 +4337,7 @@ option itself, into the file you specify, overwriting any | |||
| 4337 | `custom-set-variables' and `custom-set-faces' forms already | 4337 | `custom-set-variables' and `custom-set-faces' forms already |
| 4338 | present in that file. It will not delete any customizations from | 4338 | present in that file. It will not delete any customizations from |
| 4339 | the old custom file. You should do that manually if that is what you | 4339 | the old custom file. You should do that manually if that is what you |
| 4340 | want. You also have to put something like `\(load \"CUSTOM-FILE\") | 4340 | want. You also have to put something like `(load \"CUSTOM-FILE\") |
| 4341 | in your init file, where CUSTOM-FILE is the actual name of the | 4341 | in your init file, where CUSTOM-FILE is the actual name of the |
| 4342 | file. Otherwise, Emacs will not load the file when it starts up, | 4342 | file. Otherwise, Emacs will not load the file when it starts up, |
| 4343 | and hence will not set `custom-file' to that file either." | 4343 | and hence will not set `custom-file' to that file either." |
| @@ -4346,7 +4346,7 @@ and hence will not set `custom-file' to that file either." | |||
| 4346 | :doc | 4346 | :doc |
| 4347 | "Please read entire docstring below before setting \ | 4347 | "Please read entire docstring below before setting \ |
| 4348 | this through Custom. | 4348 | this through Custom. |
| 4349 | Click on \"More\" \(or position point there and press RETURN) | 4349 | Click on \"More\" (or position point there and press RETURN) |
| 4350 | if only the first line of the docstring is shown.")) | 4350 | if only the first line of the docstring is shown.")) |
| 4351 | :group 'customize) | 4351 | :group 'customize) |
| 4352 | 4352 | ||
| @@ -4553,7 +4553,7 @@ This function does not save the buffer." | |||
| 4553 | (if (bolp) | 4553 | (if (bolp) |
| 4554 | (princ " ")) | 4554 | (princ " ")) |
| 4555 | (princ ")") | 4555 | (princ ")") |
| 4556 | (unless (looking-at "\n") | 4556 | (unless (looking-at-p "\n") |
| 4557 | (princ "\n"))))) | 4557 | (princ "\n"))))) |
| 4558 | 4558 | ||
| 4559 | (defun custom-save-faces () | 4559 | (defun custom-save-faces () |
| @@ -4608,7 +4608,7 @@ This function does not save the buffer." | |||
| 4608 | (if (bolp) | 4608 | (if (bolp) |
| 4609 | (princ " ")) | 4609 | (princ " ")) |
| 4610 | (princ ")") | 4610 | (princ ")") |
| 4611 | (unless (looking-at "\n") | 4611 | (unless (looking-at-p "\n") |
| 4612 | (princ "\n"))))) | 4612 | (princ "\n"))))) |
| 4613 | 4613 | ||
| 4614 | ;;; The Customize Menu. | 4614 | ;;; The Customize Menu. |
| @@ -4759,22 +4759,22 @@ If several parents are listed, go to the first of them." | |||
| 4759 | (message "To install your edits, invoke [State] and choose the Set operation"))) | 4759 | (message "To install your edits, invoke [State] and choose the Set operation"))) |
| 4760 | 4760 | ||
| 4761 | (defun custom--initialize-widget-variables () | 4761 | (defun custom--initialize-widget-variables () |
| 4762 | (set (make-local-variable 'widget-documentation-face) 'custom-documentation) | 4762 | (setq-local widget-documentation-face 'custom-documentation) |
| 4763 | (set (make-local-variable 'widget-button-face) custom-button) | 4763 | (setq-local widget-button-face custom-button) |
| 4764 | (set (make-local-variable 'widget-button-pressed-face) custom-button-pressed) | 4764 | (setq-local widget-button-pressed-face custom-button-pressed) |
| 4765 | (set (make-local-variable 'widget-mouse-face) custom-button-mouse) | 4765 | (setq-local widget-mouse-face custom-button-mouse) |
| 4766 | ;; We need this because of the "More" button on docstrings. | 4766 | ;; We need this because of the "More" button on docstrings. |
| 4767 | ;; Otherwise clicking on "More" can push point offscreen, which | 4767 | ;; Otherwise clicking on "More" can push point offscreen, which |
| 4768 | ;; causes the window to recenter on point, which pushes the | 4768 | ;; causes the window to recenter on point, which pushes the |
| 4769 | ;; newly-revealed docstring offscreen; which is annoying. -- cyd. | 4769 | ;; newly-revealed docstring offscreen; which is annoying. -- cyd. |
| 4770 | (set (make-local-variable 'widget-button-click-moves-point) t) | 4770 | (setq-local widget-button-click-moves-point t) |
| 4771 | ;; When possible, use relief for buttons, not bracketing. This test | 4771 | ;; When possible, use relief for buttons, not bracketing. This test |
| 4772 | ;; may not be optimal. | 4772 | ;; may not be optimal. |
| 4773 | (when custom-raised-buttons | 4773 | (when custom-raised-buttons |
| 4774 | (set (make-local-variable 'widget-push-button-prefix) "") | 4774 | (setq-local widget-push-button-prefix "") |
| 4775 | (set (make-local-variable 'widget-push-button-suffix) "") | 4775 | (setq-local widget-push-button-suffix "") |
| 4776 | (set (make-local-variable 'widget-link-prefix) "") | 4776 | (setq-local widget-link-prefix "") |
| 4777 | (set (make-local-variable 'widget-link-suffix) "")) | 4777 | (setq-local widget-link-suffix "")) |
| 4778 | (setq show-trailing-whitespace nil)) | 4778 | (setq show-trailing-whitespace nil)) |
| 4779 | 4779 | ||
| 4780 | (define-obsolete-variable-alias 'custom-mode-hook 'Custom-mode-hook "23.1") | 4780 | (define-obsolete-variable-alias 'custom-mode-hook 'Custom-mode-hook "23.1") |
| @@ -4802,17 +4802,17 @@ Entry to this mode calls the value of `Custom-mode-hook' | |||
| 4802 | if that value is non-nil." | 4802 | if that value is non-nil." |
| 4803 | (use-local-map custom-mode-map) | 4803 | (use-local-map custom-mode-map) |
| 4804 | (easy-menu-add Custom-mode-menu) | 4804 | (easy-menu-add Custom-mode-menu) |
| 4805 | (set (make-local-variable 'tool-bar-map) | 4805 | (setq-local tool-bar-map |
| 4806 | (or custom-tool-bar-map | 4806 | (or custom-tool-bar-map |
| 4807 | ;; Set up `custom-tool-bar-map'. | 4807 | ;; Set up `custom-tool-bar-map'. |
| 4808 | (let ((map (make-sparse-keymap))) | 4808 | (let ((map (make-sparse-keymap))) |
| 4809 | (mapc | 4809 | (mapc |
| 4810 | (lambda (arg) | 4810 | (lambda (arg) |
| 4811 | (tool-bar-local-item-from-menu | 4811 | (tool-bar-local-item-from-menu |
| 4812 | (nth 1 arg) (nth 4 arg) map custom-mode-map | 4812 | (nth 1 arg) (nth 4 arg) map custom-mode-map |
| 4813 | :label (nth 5 arg))) | 4813 | :label (nth 5 arg))) |
| 4814 | custom-commands) | 4814 | custom-commands) |
| 4815 | (setq custom-tool-bar-map map)))) | 4815 | (setq custom-tool-bar-map map)))) |
| 4816 | (make-local-variable 'custom-options) | 4816 | (make-local-variable 'custom-options) |
| 4817 | (make-local-variable 'custom-local-buffer) | 4817 | (make-local-variable 'custom-local-buffer) |
| 4818 | (custom--initialize-widget-variables) | 4818 | (custom--initialize-widget-variables) |
diff --git a/lisp/custom.el b/lisp/custom.el index 4cf9609123a..f2d58084e9e 100644 --- a/lisp/custom.el +++ b/lisp/custom.el | |||
| @@ -77,7 +77,7 @@ if any, or VALUE." | |||
| 77 | "Initialize SYMBOL based on VALUE. | 77 | "Initialize SYMBOL based on VALUE. |
| 78 | Set the symbol, using its `:set' function (or `set-default' if it has none). | 78 | Set the symbol, using its `:set' function (or `set-default' if it has none). |
| 79 | The value is either the symbol's current value | 79 | The value is either the symbol's current value |
| 80 | \(as obtained using the `:get' function), if any, | 80 | (as obtained using the `:get' function), if any, |
| 81 | or the value in the symbol's `saved-value' property if any, | 81 | or the value in the symbol's `saved-value' property if any, |
| 82 | or (last of all) VALUE." | 82 | or (last of all) VALUE." |
| 83 | (funcall (or (get symbol 'custom-set) 'set-default) | 83 | (funcall (or (get symbol 'custom-set) 'set-default) |
| @@ -319,7 +319,7 @@ If SYMBOL has a local binding, then this form affects the local | |||
| 319 | binding. This is normally not what you want. Thus, if you need | 319 | binding. This is normally not what you want. Thus, if you need |
| 320 | to load a file defining variables with this form, or with | 320 | to load a file defining variables with this form, or with |
| 321 | `defvar' or `defconst', you should always load that file | 321 | `defvar' or `defconst', you should always load that file |
| 322 | _outside_ any bindings for these variables. \(`defvar' and | 322 | _outside_ any bindings for these variables. (`defvar' and |
| 323 | `defconst' behave similarly in this respect.) | 323 | `defconst' behave similarly in this respect.) |
| 324 | 324 | ||
| 325 | See Info node `(elisp) Customization' in the Emacs Lisp manual | 325 | See Info node `(elisp) Customization' in the Emacs Lisp manual |
| @@ -541,8 +541,8 @@ Fourth argument TYPE is the custom option type." | |||
| 541 | (defun custom-add-dependencies (symbol value) | 541 | (defun custom-add-dependencies (symbol value) |
| 542 | "To the custom option SYMBOL, add dependencies specified by VALUE. | 542 | "To the custom option SYMBOL, add dependencies specified by VALUE. |
| 543 | VALUE should be a list of symbols. For each symbol in that list, | 543 | VALUE should be a list of symbols. For each symbol in that list, |
| 544 | this specifies that SYMBOL should be set after the specified symbol, if | 544 | this specifies that SYMBOL should be set after the specified symbol, |
| 545 | both appear in constructs like `custom-set-variables'." | 545 | if both appear in constructs like `custom-set-variables'." |
| 546 | (unless (listp value) | 546 | (unless (listp value) |
| 547 | (error "Invalid custom dependency `%s'" value)) | 547 | (error "Invalid custom dependency `%s'" value)) |
| 548 | (let* ((deps (get symbol 'custom-dependencies)) | 548 | (let* ((deps (get symbol 'custom-dependencies)) |
| @@ -647,7 +647,7 @@ The result is that the change is treated as having been made through Custom." | |||
| 647 | (found nil)) | 647 | (found nil)) |
| 648 | (dolist (loaded load-history) | 648 | (dolist (loaded load-history) |
| 649 | (and (stringp (car loaded)) | 649 | (and (stringp (car loaded)) |
| 650 | (string-match regexp (car loaded)) | 650 | (string-match-p regexp (car loaded)) |
| 651 | (setq found t))) | 651 | (setq found t))) |
| 652 | found)) | 652 | found)) |
| 653 | ;; Without this, we would load cus-edit recursively. | 653 | ;; Without this, we would load cus-edit recursively. |
| @@ -937,7 +937,7 @@ SYMBOL is the variable name, and EXP is an expression which | |||
| 937 | evaluates to the customized value. EXP will also be stored, | 937 | evaluates to the customized value. EXP will also be stored, |
| 938 | without evaluating it, in SYMBOL's `saved-value' property, so | 938 | without evaluating it, in SYMBOL's `saved-value' property, so |
| 939 | that it can be restored via the Customize interface. It is also | 939 | that it can be restored via the Customize interface. It is also |
| 940 | added to the alist in SYMBOL's `theme-value' property \(by | 940 | added to the alist in SYMBOL's `theme-value' property (by |
| 941 | calling `custom-push-theme'). | 941 | calling `custom-push-theme'). |
| 942 | 942 | ||
| 943 | NOW, if present and non-nil, means to install the variable's | 943 | NOW, if present and non-nil, means to install the variable's |