summaryrefslogtreecommitdiff
path: root/lisp
Commit message (Collapse)AuthorAgeFilesLines
* Do `interactive' mode tagging in the remaining lisp/gnus filesLars Ingebrigtsen2021-02-1510-102/+109
|
* Add a new variable `global-minor-modes'Lars Ingebrigtsen2021-02-152-8/+18
| | | | | | | | | * doc/lispref/modes.texi (Minor Modes): Document it. * lisp/simple.el (global-minor-modes): New variable. (completion-in-mode-p): Use it. (completion-with-modes-p): Use it. * lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Support it.
* Rename minor-modes to local-minor-modesLars Ingebrigtsen2021-02-152-6/+7
| | | | | | | | | | | | | | | * doc/lispref/modes.texi (Minor Modes): Update documentation. * lisp/simple.el (completion-with-modes-p): Change usage. * lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Change usage. * src/buffer.c: Rename from minor_modes to local_minor_modes throughout. (syms_of_buffer): Rename minor-modes to local-minor-modes. * src/buffer.h (struct buffer): Rename minor_modes_. * src/pdumper.c (dump_buffer): Update hash and usage.
* * lisp/emacs-lisp/edebug.el (edebug-&optional, edebug-&rest): Remove varsStefan Monnier2021-02-141-35/+24
| | | | | | | | According to my tests, `edebug-&optional` never has any effect. And `edebug-&rest` can be replaced with a closure. (edebug-&rest-wrapper): Remove function. (edebug--match-&-spec-op): Use a closure to remember the `specs`.
* * lisp/emacs-lisp/byte-run.el (compiler-macro): Make it EdebuggableStefan Monnier2021-02-142-1/+6
| | | | | * lisp/emacs-lisp/gv.el (gc-expander, gv-setter): Reuse the spec of `compiler-macro`.
* Make the button completion predicate be more usefulLars Ingebrigtsen2021-02-152-5/+5
| | | | | | | | * lisp/simple.el (completion-button-p): Rework from `completion-at-point-p'. * lisp/net/shr.el (shr-show-alt-text): It should be possible to complete to commands that aren't bound to a key.
* Speed up completion-in-mode-p in the common caseLars Ingebrigtsen2021-02-151-9/+14
| | | | | * lisp/simple.el (completion-in-mode-p): Make predicate more efficient in the common one-mode case.
* * Edebug: Generalize `&lookup`, use it for `cl-macrolet` and `cl-generic`Stefan Monnier2021-02-145-181/+184
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows the use of (declare (debug ...)) in the lexical macros defined with `cl-macrolet`. It also fixes the names used by Edebug for the methods of `cl-generic` so it doesn't need to use gensym and so they don't include the formal arg names any more. * lisp/emacs-lisp/edebug.el (edebug--match-&-spec-op): Rename from `edebug--handle-&-spec-op`. (edebug--match-&-spec-op <&interpose>): Rename from `&lookup` and generalize so it can let-bind dynamic variables around the rest of the parse. (edebug-lexical-macro-ctx): Rename from `edebug--cl-macrolet-defs` and make it into an alist. (edebug-list-form-args): Use the specs from `edebug-lexical-macro-ctx` when available. (edebug--current-cl-macrolet-defs): Delete var. (edebug-match-cl-macrolet-expr, edebug-match-cl-macrolet-name) (edebug-match-cl-macrolet-body): Delete functions. (def-declarations): Use new `&interpose`. (edebug--match-declare-arg): Rename from `edebug--get-declare-spec` and adjust to new calling convention. * lisp/subr.el (def-edebug-elem-spec): Fix docstring. (eval-after-load): Use `declare`. * lisp/emacs-lisp/cl-generic.el: Fix Edebug names so we don't need gensym any more and we only include the specializers but not the formal arg names. (cl--generic-edebug-name): New var. (cl--generic-edebug-remember-name, cl--generic-edebug-make-name): New funs. (cl-defgeneric, cl-defmethod): Use them. * lisp/emacs-lisp/cl-macs.el: Add support for `debug` declarations in `cl-macrolet`. (cl-declarations-or-string): Fix use of `lambda-doc` and allow use of `declare`. (edebug-lexical-macro-ctx): Declare var. (cl--edebug-macrolet-interposer): New function. (cl-macrolet): Use it to pass the right `lexical-macro-ctx` to the body. * lisp/emacs-lisp/pcase.el (pcase-PAT): Use new `&interpose`. (pcase--edebug-match-pat-args): Rename from `pcase--get-edebug-spec` and adjust to new calling convention. * test/lisp/emacs-lisp/cl-generic-tests.el (cl-defgeneric/edebug/method): Adjust to the new names. * test/lisp/emacs-lisp/edebug-tests.el (edebug-cl-defmethod-qualifier) (edebug-tests-cl-flet): Adjust to the new names. * doc/lispref/edebug.texi (Specification List): Document &interpose.
* Avoid asking repeatedly about reloading bookmarks fileStefan Kangas2021-02-151-7/+17
| | | | | | | | | * lisp/bookmark.el (bookmark-maybe-load-default-file): Reload watched bookmarks file only if its mtime has changed since the last query. This avoids asking repeatedly about reloading the bookmarks file if the user has already said "no" to a previous query. (bookmark--watch-file-already-queried-p): New function. (bookmark--watch-already-asked-mtime): New variable.
* Mark up bookmark.el for correct modesStefan Kangas2021-02-141-28/+28
| | | | * lisp/bookmark.el: Mark up all commands with applicable modes.
* Add a comment to `read-extended-command'Lars Ingebrigtsen2021-02-141-0/+3
| | | | * lisp/simple.el (read-extended-command): Add a comment.
* Add a possible completion predicate for buttonsLars Ingebrigtsen2021-02-142-0/+7
| | | | | | * lisp/simple.el (completion-at-point-p): New predicate. * lisp/net/shr.el (shr-show-alt-text): Mark up as a button.
* Make completion-with-modes-p work with minor modes, tooLars Ingebrigtsen2021-02-141-4/+11
| | | | | * lisp/simple.el (completion-with-modes-p): Work with minor modes, too.
* Fix showing and hiding of tab-bar on new frames (bug#46299)Bastian Beranek2021-02-141-43/+52
| | | | | | | | | | | * lisp/tab-bar.el (tab-bar--update-tab-bar-lines) (tab-bar--tab-bar-lines-for-frame): New functions to update value of tab-bar-lines in frames. (tab-bar-mode, tab-bar-new-tab-to, tab-bar-close-tab) (tab-bar-close-other-tab, tab-bar-show :set): Use new function. (tab-bar-select-tab-modifiers :set): Work around visual glitch.
* Do command markup in blackbox.elLars Ingebrigtsen2021-02-141-8/+8
|
* Fix byte-run--set-modes call signatureLars Ingebrigtsen2021-02-141-2/+2
| | | | | * lisp/emacs-lisp/byte-run.el (byte-run--set-modes): We take a list of modes, not a single one (and fix the quoting).
* Also mention `M-o M-o' removalLars Ingebrigtsen2021-02-141-1/+2
| | | | * lisp/loadup.el (facemenu-keymap-restore): Also restore `M-o M-o'.
* Don't update `minor-modes' in global modesLars Ingebrigtsen2021-02-141-4/+5
| | | | | * lisp/emacs-lisp/easy-mmode.el (define-minor-mode): There's no point in setting the buffer-local `minor-modes' in global modes.
* Mark up 5x5 for interactive modeLars Ingebrigtsen2021-02-141-15/+16
|
* Fix problem with the newly introduces `minor-modes' variableLars Ingebrigtsen2021-02-141-7/+7
| | | | | * lisp/help-fns.el (describe-mode): Apparently buffer-local variables take precedence over lexically bound variables?
* Do `interactive' mode markup in all Gnus filesLars Ingebrigtsen2021-02-1430-828/+932
|
* Really fix the syntax problem in define-minor-modeLars Ingebrigtsen2021-02-141-2/+2
| | | | | * lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Fix interactive extension in previous change.
* Fix previous define-minor-mode changeLars Ingebrigtsen2021-02-141-4/+5
| | | | | * lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Fix interactive extension in previous change.
* Mark up eww.el for correct modesLars Ingebrigtsen2021-02-141-35/+43
| | | | * lisp/net/eww.el: Mark up all commands with applicable modes.
* Make `C-h m' list unbound commands applicable for the modeLars Ingebrigtsen2021-02-141-1/+22
| | | | | * lisp/help-fns.el (help-fns--list-local-commands): New function. (describe-mode): Use it.
* Allow define-minor-mode to take an :interactive keywordLars Ingebrigtsen2021-02-141-5/+17
| | | | | * lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Allow specifying the :interactive state and the modes.
* Add 'read-extended-command-predicate'Lars Ingebrigtsen2021-02-142-48/+84
| | | | | | | | | * doc/emacs/m-x.texi (M-x): Document it. * doc/lispref/commands.texi (Interactive Call): Document it further. * lisp/simple.el (read-extended-command-predicate): New user option. (read-extended-command-predicate): Use it. (completion-in-mode-p): New function (the default predicate).
* Mark easy-menu-do-define menus as "not interesting"Lars Ingebrigtsen2021-02-141-1/+4
| | | | | * lisp/emacs-lisp/easymenu.el (easy-menu-do-define): Mark menu keymaps as "not interesting" when doing completion.
* Add new 'declare' forms for command completion predicatesLars Ingebrigtsen2021-02-142-1/+19
| | | | | | | | | | | * doc/lispref/functions.texi (Declare Form): Document the new `completion' and `modes' declarations. * lisp/simple.el (completion-with-modes-p): New helper functions. * lisp/emacs-lisp/byte-run.el (byte-run--set-completion) (byte-run--set-modes): (defun-declarations-alist): New declarations for `completion' and `modes'.
* Extend the syntax of `interactive' to list applicable modesLars Ingebrigtsen2021-02-142-19/+36
| | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/commands.texi (Using Interactive): Document the extended `interactive' form. * doc/lispref/loading.texi (Autoload): Document list-of-modes form. * lisp/emacs-lisp/autoload.el (make-autoload): Pick the list of modes from `interactive' out of the functions. * lisp/emacs-lisp/bytecomp.el (byte-compile-lambda): Allow for the extended `interactive' form. * src/callint.c (Finteractive): Document the extended form. * src/data.c (Finteractive_form): Return the interactive form in the old format (even when there's an extended `interactive') to avoid having other parts of Emacs be aware of this. (Fcommand_modes): New defun. * src/emacs-module.c (GCALIGNED_STRUCT): Allow for modules to return command modes. * src/lisp.h: New function module_function_command_modes.
* Fix how `shell-mode' avoids being called interactivelyLars Ingebrigtsen2021-02-141-2/+1
| | | | | * lisp/shell.el (shell-mode): Make noninteractive instead of erroring out after being called.
* Introduce an :interactive keyword for `defined-derived-mode'Lars Ingebrigtsen2021-02-141-1/+6
| | | | | | * doc/lispref/modes.texi (Derived Modes): Document it. * lisp/emacs-lisp/derived.el (define-derived-mode): Introduce a new :interactive keyword.
* Remove redundant :group args from textmodes/*.elStefan Kangas2021-02-1411-196/+88
| | | | | | | | | | | | | | * lisp/textmodes/enriched.el: * lisp/textmodes/ispell.el: * lisp/textmodes/makeinfo.el: * lisp/textmodes/paragraphs.el: * lisp/textmodes/picture.el: * lisp/textmodes/refbib.el: * lisp/textmodes/refer.el: * lisp/textmodes/remember.el: * lisp/textmodes/texinfo.el: * lisp/textmodes/tildify.el: * lisp/textmodes/two-column.el: Remove redundant :group args.
* Add a new buffer-local variable `minor-modes'Lars Ingebrigtsen2021-02-141-0/+4
| | | | | | | | | | | * lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Keep `minor-modes' updated. * src/buffer.c (bset_minor_modes, Fmake_indirect_buffer) (reset_buffer, init_buffer_once): Initialise `minor-modes'. (syms_of_buffer): Add `minor-modes' as a new permanently-local variable. * src/buffer.h (struct buffer): Add minor_modes_.
* * lisp/emacs-lisp/edebug.el (edebug-make-enter-wrapper): Reinstate.Stefan Monnier2021-02-131-0/+27
| | | | Removed by accident.
* * lisp/emacs-lisp/edebug.el: Fix `called-interactively-p`Stefan Monnier2021-02-131-58/+12
| | | | | | | | | | | | And get rid of the old special-case handling of `interactive-p`, which is now redundant. (edebug--called-interactively-skip): Fix lexical-binding case, and adjust to some formerly missed call patterns. (edebug-def-interactive, edebug-interactive-p): Remove vars. (edebug-interactive-p-name, edebug-wrap-def-body) (edebug-make-enter-wrapper): Remove functions. (edebug-list-form): Don't special-case `interactive-p`.
* * lisp/emacs-lisp/edebug.el (edebug-match-lambda-expr): Delete functionStefan Monnier2021-02-131-28/+8
| | | | | | | | (lambda-expr): Define with `def-edebug-elem-spec` instead. (edebug--handle-&-spec-op): Remove left over code. (interactive): Re-add mistakenly removed spec elem. * doc/lispref/edebug.texi (Specification List): Remove `function-form`.
* * lisp/emacs-lisp/edebug.el (edebug--handle-&-spec-op <&name>): New methodStefan Monnier2021-02-137-64/+94
| | | | | | | | | | | | | | | | | | (edebug--concat-name): New function. (edebug-match-name, edebug-match-cl-generic-method-qualifier) (edebug-match-cl-generic-method-args): Delete functions. * doc/lispref/edebug.texi (Specification List): Document it. * lisp/emacs-lisp/cl-generic.el (cl-defgeneric): Use `&name`. (cl-generic--method-qualifier-p): New predicate. (cl-defmethod): Use it and `&name`. * lisp/emacs-lisp/cl-macs.el (cl-defun, cl-iter-defun, cl-flet): * lisp/emacs-lisp/eieio-compat.el (defmethod): * lisp/emacs-lisp/gv.el (gv-define-setter): * lisp/emacs-lisp/ert.el (ert-deftest): Use `&name`. * lisp/erc/erc-backend.el (define-erc-response-handler): Use `declare` and `&name`.
* Small correction to `isearch-lazy-highlight-buffer-update'Augusto Stoffel2021-02-131-2/+2
| | | | | | | | The value of point is now read after a potential change of buffer. * lisp/isearch.el (isearch-lazy-highlight-buffer-update): Move call to `point' after `select-window'. Copyright-paperwork-exempt: yes
* (backtrace-goto-source-functions): Make it a normal abnormal hookStefan Monnier2021-02-132-6/+5
| | | | | | | | | * lisp/emacs-lisp/backtrace.el (backtrace-goto-source-functions): Don't mark it as buffer-local any more. (backtrace-goto-source): Use `run-hook-with-args-until-success`. * lisp/emacs-lisp/edebug.el (edebug-pop-to-backtrace): Clarify that the hook is only intended to be modified buffer-locally.
* Remove stale comments from gnus-msg.elBasil L. Contovounesios2021-02-131-8/+0
| | | | | | | * lisp/gnus/gnus-msg.el (gnus-group-mail, gnus-group-news) (gnus-summary-mail-other-window, gnus-summary-news-other-window): Remove stale comments about let-binding gnus-newsgroup-name, as they should have been addressed (bug#37871#38).
* add-minor-mode doc string clarificationLars Ingebrigtsen2021-02-131-1/+2
| | | | | * lisp/subr.el (add-minor-mode): Clarify that this function isn't only about XEmacs compat stuff.
* Delete 20 year old comment in executable.elStefan Kangas2021-02-131-7/+1
| | | | | * lisp/progmodes/executable.el (executable-insert): Delete 20 year old comment.
* Remove redundant :group args in progmodes/*.elStefan Kangas2021-02-1321-320/+148
| | | | | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/bug-reference.el: * lisp/progmodes/cfengine.el: * lisp/progmodes/cmacexp.el: * lisp/progmodes/cpp.el: * lisp/progmodes/cwarn.el: * lisp/progmodes/dcl-mode.el: * lisp/progmodes/executable.el: * lisp/progmodes/flymake.el: * lisp/progmodes/gud.el: * lisp/progmodes/hideshow.el: * lisp/progmodes/icon.el: * lisp/progmodes/inf-lisp.el: * lisp/progmodes/js.el: * lisp/progmodes/ld-script.el: * lisp/progmodes/make-mode.el: * lisp/progmodes/modula2.el: * lisp/progmodes/pascal.el: * lisp/progmodes/perl-mode.el: * lisp/progmodes/prog-mode.el: * lisp/progmodes/simula.el: * lisp/progmodes/xscheme.el: Remove redundant :group args.
* Edebug: Make it possible to debug `gv-expander`s in `declare`Stefan Monnier2021-02-122-4/+13
| | | | | | | | | | | | | | | | | Arrange for declarations to be able to specify their own specs via the `edebug-declaration-spec` property. * lisp/emacs-lisp/edebug.el: (edebug--get-declare-spec): New function. (def-declarations): New spec element. (defun, defmacro): Use it in their spec. * lisp/emacs-lisp/gv.el (gv-expander, gv-setter): Set `edebug-declaration-spec`. * test/lisp/emacs-lisp/edebug-tests.el (edebug-tests-gv-expander): New test. * test/lisp/emacs-lisp/edebug-resources/edebug-test-code.el (edebug-test-code-use-gv-expander): New test case.
* Comment out mysterious code from cperl-mode.elStefan Kangas2021-02-131-3/+6
| | | | | | | * lisp/progmodes/cperl-mode.el: Comment out mysterious code referring to some unknown variable 'edit-var-mode-alist'. No one seems to know what it is used for, so comment it out and see if anyone complains before Emacs 28.1 or 28.2.
* Remove outdated documentation from cperl-mode.elStefan Kangas2021-02-131-57/+12
| | | | | | | | * lisp/progmodes/cperl-mode.el (cperl-tips, cperl-problems) (cperl-praise, cperl-speed, cperl-mode): Doc fixes; remove references to very old versions of Emacs and other "Emaxen". (cperl-problems-old-emaxen): Make obsolete and remove information on Emacs 20.3 and older.
* Edebug: Overload `edebug-form-spec` even lessStefan Monnier2021-02-125-219/+227
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `edebug-form-spec` symbol property was used both to map forms's head symbol to the corresponding spec, and to map spec element names to their expansion. This lead to name conflicts which break instrumentation of examples such as (cl-flet ((gate (x) x)) (gate 4)) because of the Edebug spec element `gate`. So introduce a new symbol property `edebug-elem-spec`. * lisp/subr.el (def-edebug-elem-spec): New function. * lisp/emacs-lisp/edebug.el (edebug--get-elem-spec): New function. (edebug-match-symbol): Use it. (Core Edebug elems): Put them on `edebug-elem-spec` instead of `edebug-form-spec`. (ELisp special forms): Set their `edebug-form-spec` via dolist. (Other non-core Edebug elems): Use `def-edebug-elem-spec`. (edebug-\`): Use `declare`. * lisp/emacs-lisp/pcase.el (pcase-PAT, pcase-FUN, pcase-QPAT): * lisp/skeleton.el (skeleton-edebug-spec): * lisp/emacs-lisp/cl-macs.el: Use `def-edebug-elem-spec`. * test/lisp/emacs-lisp/edebug-tests.el (edebug-tests--conflicting-internal-names): New test. * test/lisp/emacs-lisp/edebug-resources/edebug-test-code.el (edebug-test-code-cl-flet1): New test case. * doc/lispref/edebug.texi (Specification List): Add `def-edebug-elem-spec`. (Specification Examples): Use it. * doc/lispref/loading.texi (Hooks for Loading): Avoid the use of `def-edebug-spec` in example (better use `debug` declaration).
* Remove XEmacs and Emacs 21 compat code from cperl-modeStefan Kangas2021-02-131-19/+20
| | | | | | | * lisp/progmodes/cperl-mode.el (cperl-mode): Remove XEmacs and Emacs 21 compat code. (cperl-compilation-error-regexp-list): New variable. (cperl-compilation-error-regexp-alist): Make obsolete.
* Fix ElDoc setup for eval-expressionBasil L. Contovounesios2021-02-121-1/+2
| | | | | * lisp/emacs-lisp/eldoc.el (eldoc--eval-expression-setup): Don't set global value of eldoc-documentation-strategy (bug#44886).