summaryrefslogtreecommitdiff
path: root/lisp/wid-edit.el
Commit message (Collapse)AuthorAge
* Fix `pr-interface'Robert Pluim2023-01-06
| | | | | | | | | | | `pr-interface' specifies `inline' for its menu items, which is not necessary, but it causes `widget-choice-value-create' to bug out. (Bug#60501) * lisp/wid-edit.el (widget-choice-value-create): Allow the value to be a non-list. * test/lisp/wid-edit-tests.el (widget-test-handle-spurious-inline): Add test to ensure that unnecessary :inline is allowed.
* ; Add 2023 to copyright years.Eli Zaretskii2023-01-01
|
* ; Fix some typosMichael Heerdegen2022-11-26
| | | | | * doc/emacs/programs.texi (Programming Language Doc): * lisp/wid-edit.el (lazy): Fix typos.
* Prefer defvar-keymap in several casesStefan Kangas2022-09-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/calc/calc-embed.el (calc-override-minor-modes-map): * lisp/calc/calc-yank.el (calc-edit-mode-map): * lisp/calc/calc.el (calc-trail-mode-map): * lisp/cedet/semantic/mru-bookmark.el (semantic-mru-bookmark-mode-map): * lisp/cedet/semantic/util-modes.el (semantic-highlight-edits-mode-map) (semantic-show-unmatched-syntax-mode-map) (semantic-show-parser-state-mode-map) (semantic-stickyfunc-mode-map, semantic-highlight-func-mode-map): * lisp/cedet/srecode/srt-mode.el (srecode-template-mode-map): * lisp/gnus/gnus-art.el (gnus-prev-page-map, gnus-next-page-map): * lisp/gnus/gnus-search.el (gnus-search-minibuffer-map): * lisp/gnus/score-mode.el (gnus-score-mode-map): * lisp/gnus/smime.el (smime-mode-map): * lisp/indent.el (edit-tab-stops-map): * lisp/isearch.el (minibuffer-local-isearch-map): * lisp/printing.el (pr-interface-map): * lisp/progmodes/prog-mode.el (prog-mode-map): * lisp/progmodes/subword.el (subword-mode-map): * lisp/reveal.el (reveal-mode-map): * lisp/strokes.el (strokes-mode-map): * lisp/textmodes/flyspell.el (flyspell-mouse-map): * lisp/textmodes/less-css-mode.el (less-css-mode-map): * lisp/textmodes/remember.el (remember-mode-map) (remember-notes-mode-map): * lisp/wid-browse.el (widget-browse-mode-map): * lisp/wid-edit.el (widget-key-sequence-map): Prefer defvar-keymap in some easy-to-convert cases.
* Add a basic widget type for buffer predicatesLars Ingebrigtsen2022-09-04
| | | | | | * lisp/paren.el (show-paren-predicate): * lisp/outline.el (outline-minor-mode-use-buttons): Use it. * lisp/wid-edit.el (buffer-predicate): New widget type.
* Make alias widget-visibility-value-create obsoleteStefan Kangas2022-08-06
| | | | | * lisp/wid-edit.el (widget-visibility-value-create): Make compat alias obsolete.
* Give a warning if setopt has been used with an invalid valueLars Ingebrigtsen2022-07-05
| | | | | | | | | * lisp/cus-edit.el (setopt--set): Mark the variable for checking. * lisp/custom.el (custom-initialize-reset): Give a warning if the type is wrong (bug#56400). * lisp/wid-edit.el (widget-convert): Autoload.
* Fix :match function for the key widgetMauro Aranda2022-02-19
| | | | | | * lisp/wid-edit.el (key): Calling key-valid-p directly doesn't work, because the :match function is called with the widget and the value as arguments (bug#54049).
* New :type key for defcustomStefan Kangas2022-01-02
| | | | | | | | | | | As compared to the old type key-sequence that deals with raw key sequences, this :type conforms to the format used by the new keymap-* functions. * lisp/wid-edit.el (key): New widget type. (Bug#52523) (widget-key-prompt-value-history): New variable. (widget-key-validate): New function. (key-sequence): Doc fix. * doc/lispref/customize.texi (Simple Types): Document above new type.
* Merge from origin/emacs-28Eli Zaretskii2022-01-01
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 836be7a112 ; * etc/refcards/ru-refcard.tex: Update Copyright year. 86cbc6ee4a * lisp/net/tramp-sh.el: Adapt copyright year ebe8772f65 ; Minor fixes related to copyright years 23c1ee6989 ; * test/manual/etags/ETAGS.good_N: Adjust to copyright ye... 8d3fc7ec89 * src/xfaces.c (face_for_font): Make 'hash' be uintptr_t. 19dcb237b5 ; Add 2022 to copyright years. # Conflicts: # etc/NEWS # etc/refcards/ru-refcard.tex # lib/cdefs.h # lisp/erc/erc-dcc.el # lisp/erc/erc-imenu.el # lisp/erc/erc-replace.el # lisp/image-dired.el # lisp/progmodes/xref.el # m4/alloca.m4 # m4/byteswap.m4 # m4/errno_h.m4 # m4/getopt.m4 # m4/gnulib-common.m4 # m4/inttypes.m4 # m4/stddef_h.m4 # m4/stdint.m4 # m4/sys_socket_h.m4
| * ; Add 2022 to copyright years.Eli Zaretskii2022-01-01
| |
| * Revert "* lisp/wid-edit.el (widget-field): Add subtle border to face."Stefan Kangas2021-11-05
| | | | | | | | | | | | | | This reverts commit 8b024a6ff10f7907445ea60c4db8355638616ed1. This lead to some alignment issues. (Bug#51550) Don't merge to master, where we will continue investigating.
* | Make sure widget buttons always have a left box linePo Lu2021-12-30
| | | | | | | | | | * lisp/wid-edit.el (widget-specify-button): Add an invisible before-string to the button overlay. (bug#51550)
* | Make `group' widgets prettier in CustomizeBrahimi Saifullah2021-11-29
| | | | | | | | | | | | | | * lisp/wid-edit.el (group): Make the ":" invisible so that the buffer looks prettier (bug#52143). Copyright-paperwork-exempt: yes
* | Use format-prompt for many more promptsStefan Kangas2021-10-05
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/bookmark.el (bookmark-completing-read): * lisp/calc/calc-prog.el (calc-user-define-formula): * lisp/calc/calc-store.el (calc-permanent-variable): * lisp/calc/calc-units.el (calc-convert-units) (calc-convert-exact-units, calc-convert-temperature): * lisp/cedet/semantic/complete.el (semantic-complete-read-tag-engine): * lisp/cus-edit.el (customize-read-group): * lisp/dired-aux.el (dired-do-chxxx): * lisp/dired-x.el (dired-mark-unmarked-files): * lisp/emacs-lisp/debug.el (cancel-debug-on-entry) (cancel-debug-on-variable-change): * lisp/emacs-lisp/edebug.el (edebug-cancel-on-entry) (edebug-remove-instrumentation): * lisp/epa.el (epa-read-file-name, epa-export-keys): * lisp/faces.el (read-face-name): * lisp/format.el (format-decode-buffer, format-decode-region): * lisp/gnus/gnus-art.el (gnus-read-save-file-name): * lisp/gnus/gnus-util.el (gnus-completing-read): * lisp/gnus/message.el (message-check-news-header-syntax): * lisp/info.el (Info-follow-reference): * lisp/international/mule-diag.el (describe-font) (describe-fontset): * lisp/international/quail.el (quail-show-keyboard-layout): * lisp/language/cyril-util.el (standard-display-cyrillic-translit): * lisp/mail/rmailkwd.el (rmail-read-label): * lisp/mail/rmailmm.el (rmail-mime-save): * lisp/mail/rmailout.el (rmail-output-read-file-name): * lisp/man.el (Man-goto-section, Man-follow-manual-reference): * lisp/menu-bar.el (emacs-index--prompt): * lisp/net/ange-ftp.el (ange-ftp-get-passwd): * lisp/proced.el (proced-send-signal): * lisp/progmodes/cpp.el (cpp-choose-face): * lisp/progmodes/ebrowse.el (ebrowse-set-tree-indentation): * lisp/progmodes/etags.el (visit-tags-table) (visit-tags-table-buffer): * lisp/progmodes/grep.el (grep-read-files): * lisp/progmodes/hideif.el (hide-ifdef-define): * lisp/progmodes/pascal.el (pascal-goto-defun): * lisp/progmodes/prolog.el (prolog-read-predicate): * lisp/progmodes/sql.el (sql-get-login-ext): * lisp/ses.el (ses-define-local-printer): * lisp/textmodes/artist.el (artist-figlet-choose-font): * lisp/textmodes/tex-mode.el (tex-compile): * lisp/vc/diff.el (diff): * lisp/vc/ediff-ptch.el (ediff-prompt-for-patch-file): * lisp/vc/ediff-util.el (ediff-read-file-name): * lisp/vc/pcvs.el (cvs-mode-mark-on-state): * lisp/vc/vc.el (vc-diff-build-argument-list-internal) (vc-revision-other-window, vc-retrieve-tag): * lisp/wid-edit.el: Prefer format-prompt unconditionally. * lisp/org/org-capture.el (org-capture-fill-template): * lisp/org/org-refile.el (org-refile-get-location): * lisp/progmodes/python.el (python-eldoc-at-point): * lisp/progmodes/verilog-mode.el (verilog-surelint-off) (verilog-goto-defun): * lisp/progmodes/xref.el (xref--read-identifier): Prefer format-prompt when it is fboundp.
* ; * lisp/wid-edit.el (natnum): rectify tag stringMattias EngdegÄrd2021-09-25
|
* New :type natnum for defcustomStefan Kangas2021-09-25
| | | | | * lisp/wid-edit.el (natnum): New widget type. (Bug#15809) * doc/lispref/customize.texi (Simple Types): Document it.
* ; More minor stylistic fixes found by checkdocStefan Kangas2021-09-22
|
* Clarify boolean widget promptLars Ingebrigtsen2021-06-06
| | | | | * lisp/wid-edit.el (widget-boolean-prompt-value): Clarify prompt (bug#43593).
* Add SVG icons for customize buffersStefan Kangas2021-04-03
| | | | | | | | | | | | | | | | | | | * etc/images/checkbox-mixed.svg: * etc/images/checked.svg: * etc/images/down.svg: * etc/images/left.svg: * etc/images/radio-checked.svg: * etc/images/radio-mixed.svg: * etc/images/radio.svg: * etc/images/right.svg: * etc/images/unchecked.svg: * etc/images/up.svg: New files from the Adwaita Icon Theme (made by the GNOME project). The background color was changed from gray to none to use the same colors as the current face instead. (Bug#47074) * etc/images/README: Add license information for the above new files. * lisp/wid-edit.el (widget-image-conversion): Prefer SVG if it exists. (radio-button): Rename radio buttons to "radio-checked" and "radio". These files did not exist before.
* Replace two functions with seq-subseqStefan Kangas2021-04-03
| | | | | | | | * lisp/emacs-lisp/seq.el (seq-subseq): Add autoload cookie. * lisp/eshell/esh-util.el (eshell-sublist): Redefine using seq-subseq and make obsolete. Update callers. * lisp/wid-edit.el (widget-sublist): Redefine as obsolete function alias for seq-subseq. Update callers.
* Don't pre-load facemenuLars Ingebrigtsen2021-03-18
| | | | | | | | | | | | | | | | | | * lisp/facemenu.el (facemenu-add-face-function): Move to avoid a compilation warning. (facemenu-color-alist): Made obsolete. * lisp/faces.el (read-color): Don't use it. * lisp/loadup.el ("emacs-lisp/syntax"): Don't load facemenu. * lisp/wid-edit.el (color): Don't use facemenu-color-alist. (widget-color--choose-action): Require facemenu. (widget-color-action): Ditto. * lisp/progmodes/cperl-mode.el (facemenu): Require. * lisp/textmodes/sgml-mode.el (facemenu): Require.
* * lisp/wid-edit.el (widget-field): Add subtle border to face.Stefan Kangas2021-03-15
|
* Prefer defvar-local in remaining librariesStefan Kangas2021-02-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/align.el (align-mode-rules-list) (align-mode-exclude-rules-list): * lisp/bookmark.el (bookmark-current-bookmark) (bookmark-annotation-name) (bookmark--annotation-from-bookmark-list): * lisp/calc/calc-embed.el (calc-embedded-all-active) (calc-embedded-some-active): * lisp/comint.el (comint-password-function): * lisp/completion.el (completion-syntax-table): * lisp/dframe.el (dframe-track-mouse-function) (dframe-help-echo-function, dframe-mouse-click-function) (dframe-mouse-position-function, dframe-timer) (dframe-attached-frame, dframe-controlled): * lisp/ehelp.el (electric-help-orig-major-mode): * lisp/eshell/esh-util.el (eshell-path-env): * lisp/expand.el (expand-pos, expand-index, expand-point): * lisp/face-remap.el (text-scale-mode-remapping) (text-scale-mode-lighter, text-scale-mode-amount) (text-scale-remap-header-line, buffer-face-mode-remapping): * lisp/ffap.el (ffap-menu-alist): * lisp/files-x.el (connection-local-variables-alist): * lisp/foldout.el (foldout-fold-list, foldout-mode-line-string): * lisp/follow.el (follow-start-end-invalid): * lisp/forms.el (forms--mode-setup): * lisp/gnus/message.el (message-cross-post-old-target) (message-options): * lisp/help-mode.el (help-xref-stack, help-xref-forward-stack) (help-xref-stack-item, help-xref-stack-forward-item): * lisp/hexl.el (hexl-mode--old-var-vals, hexl-ascii-overlay): * lisp/hilit-chg.el (hilit-chg-string): * lisp/ido.el (ido-eoinput): * lisp/imenu.el (imenu-generic-expression) (imenu-create-index-function, imenu-default-goto-function) (imenu-prev-index-position-function) (imenu-extract-index-name-function, imenu-name-lookup-function) (imenu-syntax-alist, imenu-case-fold-search): * lisp/jka-compr.el (jka-compr-really-do-compress): * lisp/language/ethio-util.el (ethio-prefer-ascii-space): * lisp/leim/quail/hangul.el (hangul-input-method-help-text): * lisp/leim/quail/japanese.el (quail-japanese-package-saved): * lisp/linum.el (linum-overlays, linum-available): * lisp/man.el (Man-original-frame, Man-arguments, Man--sections) (Man--refpages, Man-page-list, Man-current-page) (Man-page-mode-string): * lisp/pcomplete.el (pcomplete-current-completions) (pcomplete-last-completion-length) (pcomplete-last-completion-stub, pcomplete-last-completion-raw) (pcomplete-last-window-config, pcomplete-window-restore-timer): * lisp/reveal.el (reveal-open-spots, reveal-last-tick): * lisp/ruler-mode.el (ruler-mode): * lisp/scroll-lock.el (scroll-lock-preserve-screen-pos-save): * lisp/server.el (server-buffer-clients, server-existing-buffer): * lisp/tab-line.el (tab-line-exclude): * lisp/tar-mode.el (tar-data-buffer, tar-data-swapped): * lisp/thumbs.el (thumbs-current-tmp-filename) (thumbs-current-image-filename, thumbs-extra-images) (thumbs-image-num, thumbs-buffer, thumbs-marked-list): * lisp/tutorial.el (tutorial--point-before-chkeys) (tutorial--point-after-chkeys, tutorial--lang): * lisp/url/url-vars.el (url-current-object) (url-current-mime-headers, url-current-lastloc): * lisp/view.el (view-mode, view-old-buffer-read-only) (view-old-Helper-return-blurb, view-page-size) (view-half-page-size, view-last-regexp, view-return-to-alist) (view-exit-action, view-overlay): * lisp/wid-edit.el (widget-global-map, widget-field-new) (widget-field-list, widget-field-last, widget-field-was): * lisp/woman.el (woman-imenu-done): Prefer defvar-local.
* Tweaks to the color widget (Bug#45829)Drew Adams2021-01-19
| | | | | | | * lisp/wid-edit.el (widget-color-match, widget-color-validate): New functions. (color): Use the new functions. Base size on longest defined color name, defaulting to the longest RGB hex string.
* Make libraries works with xterm-mouse-mode.Jared Finder2021-01-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change calls from 'read-event' to 'read-key' in libraries expecting mouse events. Do this only when 'xterm-mouse-mode' is enabled. That way those libraries read decoded mouse events instead of the underlying escape sequence. Add a parameter to 'read-key' that avoids running any of the unbound fallbacks in 'read-key-sequence' so the libraries can read mouse button-down events. For backward compatibility purposes, the above logic is contained in a new internal-only function: 'read--potential-mouse-event'. * doc/lispref/commands.texi (Reading One Event): Document new parameter to 'read-key'. Mention that non-character events on terminals need 'read-key'. * lisp/subr.el (read-key-full-map): Add new keymap used by 'read-key'. (read-key): Add new parameter 'fallbacks-disabled' to prevent running any of the unbound fallbacks normally run by 'read-key-sequence'. (read--potential-mouse-event): Add new function that calls 'read-key' or 'read-event' depending on if 'xterm-mouse-mode' is set. * lisp/foldout.el (foldout-mouse-swallow-events): * lisp/isearch.el (isearch-pre-command-hook): * lisp/mouse-drag.el (mouse-drag-throw, mouse-drag-drag): * lisp/mouse.el (mouse-drag-secondary): * lisp/ruler-mode.el (ruler-mode-mouse-grab-any-column) (ruler-mode-mouse-drag-any-column-iteration): * lisp/strokes.el (strokes-read-stroke, strokes-read-complex-stroke): * lisp/textmodes/artist.el (artist-mouse-draw-continously) (artist-mouse-draw-poly, artist-mouse-draw-2points): * lisp/vc/ediff-wind.el (ediff-get-window-by-clicking): * lisp/wid-edit.el (widget-button--check-and-call-button) (widget-button-click): Call 'read--potential-mouse-event' instead of 'read-event'. * lisp/wid-edit.el (widget-key-sequence-read-event): Call 'read-key' with 'fallbacks-disabled' set instead of 'read-event'. Unlike above changes, this is unconditionally applied so it works for function keys too. Apply 'local-function-key-map' instead of 'function-key-map' as that contains the full terminal translations. * lisp/vc/ediff.el (ediff-windows): Use 'display-mouse-p' to check if a mouse is available. * src/lread.c (Fread_event): Recommend 'read-key' in docstring for 'read-event' for non-character events.
* Don't skip widgets when moving backwardMauro Aranda2021-01-04
| | | | | | | | * lisp/wid-edit.el (widget-move): Remove code that caused widget-backward to skip an immediate previous widget when moving backward from the start of a widget. (Bug#45623) * test/lisp/wid-edit-tests.el (widget-test-widget-backward): New test.
* Update copyright year to 2021Paul Eggert2021-01-01
| | | | Run "TZ=UTC0 admin/update-copyright".
* Add variables read-char-choice-use-read-key and y-or-n-p-use-read-keyJuri Linkov2020-12-30
| | | | | | | | | | | | | | | | | | * lisp/subr.el (read-char-choice-use-read-key): New variable. (read-char-choice): Use read-char-from-minibuffer when read-char-choice-use-read-key is nil. (y-or-n-p-use-read-key): New variable. (y-or-n-p): Restore old code that calls read-key to use it when y-or-n-p-use-read-key is non-nil. * lisp/dired-aux.el (dired--no-subst-ask, dired-query): * lisp/files.el (files--ask-user-about-large-file) (hack-local-variables-confirm): * lisp/userlock.el (ask-user-about-supersession-threat): * lisp/wid-edit.el (widget-choose): Revert to use read-char-choice instead of read-char-from-minibuffer. https://lists.gnu.org/archive/html/emacs-devel/2020-12/msg01919.html
* Fix matching of inline choices for the choice widgetMauro Aranda2020-11-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A choice widget should be able to match either no inline values or inline values, upon request. (Bug#44579) * lisp/wid-edit.el (choice): New property, :inline-bubbles-p. A predicate that returns non-nil if the choice widget can act as an inline widget. Document it. (widget-choice-inline-bubbles-p): New function, for the :inline-bubbles-p property of the choice widget. (widget-inline-p): New function. Use the :inline-bubbles-p property of the widget, if any. (widget-match-inline): Use the above to see if the widget can act like an inline widget. Document it. (widget-choice-value-create): Account for the case of a choice widget that has inline members. (widget-checklist-add-item, widget-editable-list-value-create) (widget-group-value-create): Use widget-inline-p rather than just checking for a non-nil :inline property, allowing these functions to pass the complete information to widgets like the choice widget to create their values. * test/lisp/wid-edit-tests.el (widget-test-choice-match-no-inline) (widget-test-choice-match-all-inline) widget-test-choice-match-some-inline): New tests, to check that choice widgets can match its choices, inline or not. (widget-test-inline-p): New test, for the new function widget-inline-p. (widget-test-repeat-can-handle-choice) (widget-test-repeat-can-handle-inlinable-choice) (widget-test-list-can-handle-choice) (widget-test-list-can-handle-inlinable-choice) (widget-test-option-can-handle-choice) (widget-test-option-can-handle-inlinable-choice): New tests. This grouping widgets need to be able to create a choice widget regardless if it has inline choices or not.
* Warn about a bad default value in restricted-sexp widgetMauro Aranda2020-10-24
| | | | | | | * lisp/wid-edit.el (restricted-sexp widget): New :value-to-external function. If value is not in the internal format, then we might be dealing with a bad default value for the widget, so display a warning about that (bug#25152).
* Pretty print restricted sexp values tooMauro Aranda2020-10-22
| | | | | | * lisp/wid-edit.el (restricted-sexp widget): Use widget-sexp-value-to-internal to pretty print the widget's value, when it is a valid one (bug#7524).
* Allow moving members of editable-list widget, via delete+insertMauro Aranda2020-10-22
| | | | | | | | | | | | | | | | | * etc/NEWS (Widget): Announce the feature (bug#6419). * lisp/wid-edit.el (widget-editable-list-delete-at): Save into a new widget property, :last-deleted, the WIDGET to be deleted. Add docstring. (widget-editable-list-insert-before): If there is a recently deleted child for the editable list, insert that one, instead of a new default widget. Add docstring. (insert-button widget): Make :help-echo a function to avoid the help-echo string become too long. (delete-button widget): Tweak the :help-echo string, to document this behavior. * test/lisp/wid-edit-tests.el (widget-test-moving-editable-list-item): Test the feature.
* Support extended menus in widget-chooseMauro Aranda2020-10-03
| | | | | | | | | | | | * doc/misc/widget.texi (Utilities): Document widget-choose. * etc/NEWS: Document the feature (bug#4787). * lisp/wid-edit.el (widget--simplify-menu): New function, to convert extended menus into simplified menus when using the menu to prompt through the minibuffer. (widget-choose): Accept a keymap menu. When not using x-popup-menu, simplify the menu with widget--simplify-menu. Document the changes in the docstring.
* Display some character widget values in a more user-friendly wayMauro Aranda2020-09-26
| | | | | | | | | | | | | * lisp/wid-edit.el (widget-character--escape-sequences-alist): New variable. (widget-character--change-character-display): New function. Use the new variable. (widget-character-notify): New function, to keep track of the changes in the character widget, and display characters like tab, newline and spaces better. (character widget): Use widget-character-notify as the notify function. Use widget-character--change-character-display for the internal representation of value (bug#15925).
* Fix mouse highlighting in Customize buffersLars Ingebrigtsen2020-09-26
| | | | | | * lisp/wid-edit.el (widget-button-click): Remove a newly-introduced check that made mouse highlights no longer work (bug#43612). It's unclear what the check was trying to fix.
* Allow the newline character in the character widget (Bug#15925)Mauro Aranda2020-09-23
| | | | | | | | | | * lisp/wid-edit.el (widget-specify-field): Extend check for adding the boundary overlay. Plus, a minor comment indentation fix. (character widget): Tweak the valid-regexp to allow the newline character. * test/lisp/wid-edit-tests.el (widget-test-character-widget-value) (widget-test-editable-field-widget-value): New tests (bug#15925).
* Use a widget for the face link in Customize buffersLars Ingebrigtsen2020-09-18
| | | | | | | | | | * doc/lispref/customize.texi (Common Keywords): Document it. * lisp/cus-edit.el (custom-face-value-create): Use a widget instead of a button so that TAB works (bug#20664). * lisp/wid-edit.el (face-link): New widget. (widget-face-link-action): New action.
* Fix recent change in wid-editMauro Aranda2020-09-17
| | | | | | * lisp/wid-edit.el (widget-button--check-and-call-button): Record the ending position of event, because we might need it when the :mouse-down-action function returns non-nil (bug#20664).
* Refactor a very long wid-edit function and add additional checkingLars Ingebrigtsen2020-09-17
| | | | | | * lisp/wid-edit.el (widget-button--check-and-call-button): Factor out a too-long condition/call... (widget-button-click): From here.
* Fix :match function for the file widgetMauro Aranda2020-09-10
| | | | | * lisp/wid-edit.el (file widget): Return nil if value is not a string (bug#25678).
* Use `format-prompt' when prompting with default valuesLars Ingebrigtsen2020-09-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/woman.el (woman-file-name): * lisp/wid-edit.el (widget-file-prompt-value) (widget-coding-system-prompt-value): * lisp/w32-fns.el (w32-set-system-coding-system): * lisp/vc/vc.el (vc-print-root-log): * lisp/vc/vc-annotate.el (vc-annotate): * lisp/vc/emerge.el (emerge-read-file-name): * lisp/vc/ediff.el (ediff-directories) (ediff-directory-revisions, ediff-directories3) (ediff-merge-directories, ) (ediff-merge-directories-with-ancestor) (ediff-merge-directory-revisions) (ediff-merge-directory-revisions-with-ancestor) (ediff-merge-revisions, ediff-merge-revisions-with-ancestor) (ediff-revision): * lisp/vc/ediff-util.el (ediff-toggle-regexp-match): * lisp/vc/ediff-mult.el (ediff-filegroup-action): * lisp/vc/add-log.el (prompt-for-change-log-name): * lisp/textmodes/table.el (table-insert-row-column) (table-span-cell, table-split-cell-horizontally) (table-split-cell, table-justify, table-generate-source) (table-insert-sequence, table-capture) (table--read-from-minibuffer, table--query-justification): * lisp/textmodes/sgml-mode.el (sgml-tag, sgml-tag-help): * lisp/textmodes/reftex-ref.el (reftex-goto-label): * lisp/textmodes/refer.el (refer-get-bib-files): * lisp/textmodes/css-mode.el (css-lookup-symbol): * lisp/term.el (serial-read-name, serial-read-speed): * lisp/speedbar.el (speedbar-change-initial-expansion-list): * lisp/simple.el (previous-matching-history-element) (set-variable): * lisp/ses.el (ses-read-cell, ses-set-column-width): * lisp/replace.el (query-replace-read-from) (occur-read-primary-args): * lisp/rect.el (string-rectangle, string-insert-rectangle): * lisp/progmodes/tcl.el (tcl-help-on-word): * lisp/progmodes/sh-script.el (sh-set-shell): * lisp/progmodes/python.el (python-eldoc-at-point): * lisp/progmodes/octave.el (octave-completing-read) (octave-update-function-file-comment, octave-insert-defun): * lisp/progmodes/inf-lisp.el (lisp-symprompt): * lisp/progmodes/cperl-mode.el (cperl-info-on-command) (cperl-perldoc): * lisp/progmodes/compile.el (compilation-find-file): * lisp/net/rcirc.el (rcirc-prompt-for-encryption): * lisp/net/eww.el (eww): * lisp/net/browse-url.el (browse-url-with-browser-kind): * lisp/man.el (man): * lisp/mail/sendmail.el (sendmail-query-user-about-smtp): * lisp/mail/mailalias.el (build-mail-aliases): * lisp/mail/mailabbrev.el (merge-mail-abbrevs) (rebuild-mail-abbrevs): * lisp/locate.el (locate-prompt-for-search-string): * lisp/isearch.el (isearch-occur): * lisp/international/ogonek.el (ogonek-read-encoding) (ogonek-read-prefix): * lisp/international/mule.el (read-buffer-file-coding-system) (set-terminal-coding-system, set-keyboard-coding-system) (set-next-selection-coding-system, recode-region): * lisp/international/mule-cmds.el () (universal-coding-system-argument, search-unencodable-char) (select-safe-coding-system-interactively): * lisp/info.el (Info-search, Info-search-backward, Info-menu): * lisp/info-look.el (info-lookup-interactive-arguments): * lisp/imenu.el (imenu--completion-buffer): * lisp/ibuf-ext.el (mode, used-mode, ibuffer-mark-by-mode): * lisp/hi-lock.el (hi-lock-unface-buffer) (hi-lock-read-face-name): * lisp/help.el (view-emacs-news, where-is): * lisp/help-fns.el (describe-variable, describe-symbol) (describe-keymap): * lisp/gnus/mm-decode.el (mm-save-part): * lisp/gnus/gnus-sum.el (gnus-summary-browse-url): * lisp/gnus/gnus-group.el (gnus-group--read-bug-ids) (gnus-group-set-current-level): * lisp/frame.el (make-frame-on-monitor) (close-display-connection, select-frame-by-name): * lisp/format.el (format-encode-buffer, format-encode-region): * lisp/files.el (recode-file-name): * lisp/files-x.el (read-file-local-variable) (read-file-local-variable-value, ) (read-file-local-variable-mode): * lisp/ffap.el (ffap-menu-ask): * lisp/faces.el (face-read-string): * lisp/facemenu.el (facemenu-set-charset): * lisp/erc/erc-dcc.el (erc-dcc-do-GET-command): * lisp/emulation/edt-mapper.el (edt-mapper): * lisp/emacs-lisp/trace.el (trace--read-args) (trace-function-foreground, trace-function-background): * lisp/emacs-lisp/smie.el (smie-config-set-indent): * lisp/emacs-lisp/re-builder.el (reb-change-syntax): * lisp/emacs-lisp/package.el (describe-package): * lisp/emacs-lisp/find-func.el (read-library-name) (find-function-read): * lisp/emacs-lisp/ert.el (ert-read-test-name) (ert-run-tests-interactively): * lisp/emacs-lisp/disass.el (disassemble): * lisp/emacs-lisp/debug.el (debug-on-entry) (debug-on-variable-change): * lisp/emacs-lisp/advice.el (ad-read-advised-function) (ad-read-advice-class, ad-read-advice-name, ad-read-regexp): * lisp/dired-x.el (dired--mark-suffix-interactive-spec): * lisp/dired-aux.el (dired-diff): * lisp/cus-edit.el (custom-variable-prompt, customize-mode) (customize-changed-options): * lisp/completion.el (interactive-completion-string-reader): * lisp/calendar/timeclock.el (timeclock-ask-for-project): * lisp/calc/calcalg3.el (calc-get-fit-variables): * lisp/calc/calc-store.el (calc-edit-variable): * lisp/calc/calc-bin.el (calc-word-size): * lisp/bookmark.el (bookmark-set-internal): * lisp/abbrev.el (read-abbrev-file): Use `format-prompt' for prompting (bug#12443).
* Respect :must-match for file types in customization buffersMauro Aranda2020-08-30
| | | | | | * lisp/wid-edit.el (file widget): Add a :match and a :validate function to the 'file widget, to be able to check if the widget value is an existent file, when required (bug#25678).
* Add new commands to describe buttons and widgetsMauro Aranda2020-08-07
| | | | | | | | | | | | * lisp/help-fns.el (describe-widget-functions): New variable, used by describe-widget. (describe-widget): New command, to display information about a widget. * lisp/button.el (button-describe): New command, for describing a button. (button--describe): Helper function for button-describe. * lisp/wid-edit.el (widget-describe): New command, for describing a widget. (widget--resolve-parent-action): Helper function, to allow widget-describe to display more useful information (bug#139).
* * lisp/wid-edit.el (widget-choose): Use read-char-from-minibuffer (bug#17272)Juri Linkov2020-02-06
|
* Update copyright year to 2020Paul Eggert2020-01-01
| | | | Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
* * lisp/wid-edit.el (widget-field): Add ':extend t' to defface (bug#37774)Juri Linkov2019-12-13
|
* Fix some quoting glitches in doc stringsPaul Eggert2019-11-11
|
* * lisp/wid-edit.el (widget-default-active): Normalize boolean result.Juanma Barranquero2019-10-16
|
* Only complete words inside of the string widgetMauro Aranda2019-10-07
| | | | | | * lisp/wid-edit.el ('string widget): Peek the word that ispell-complete-word will try to complete, and only offer completions when the word is inside of the field (bug#11046).