Commit graph

9088 commits

Author SHA1 Message Date
Arni Magnusson
61f5ca3b27 Add setx highlighting to bat-mode
* lisp/progmodes/bat-mode.el (bat-font-lock-keywords):
(bat-font-lock-keywords): Highlight setx (bug#53568).
2022-01-27 17:12:11 +01:00
Lars Ingebrigtsen
edeb220d31 Don't loop so much in gud-query-cmdline on remote systems
* lisp/progmodes/gud.el (gud-query-cmdline): Avoid looping over
large numbers of files on remote systems (bug#21528).
2022-01-24 14:57:17 +01:00
Lars Ingebrigtsen
bcf844b5fc Add "then" to sh--completion-keywords
* lisp/progmodes/sh-script.el (sh--completion-keywords): Allow
completing over "then" (bug#53490).
2022-01-24 11:16:30 +01:00
Alex Kost
0e833a1d5f Improve scheme-imenu-generic-expression
* lisp/progmodes/scheme.el (scheme-imenu-generic-expression):
Improve so that we match `define-public' etc (bug#33117).
2022-01-23 14:12:34 +01:00
Dmitry Gutov
9a0842dffe ruby-toggle-block-space-before-parameters: New user option
* lisp/progmodes/ruby-mode.el (ruby-toggle-block-space-before-parameters):
New user option (bug#53321).
(ruby-do-end-to-brace): Handle it.

* test/lisp/progmodes/ruby-mode-tests.el
(ruby-toggle-block-to-brace-no-space): New test.
2022-01-21 04:59:39 +02:00
Tom Tromey
ad3971f885 Use "server complete" instead of "complete" in gud-gdb-completions
* lisp/progmodes/gud.el (gud-gdb-completions): gud-gdb sends a
"complete" command to gdb to implement command line completion.  It
would be better to send "server complete".  This is what Emacs does
for other behind-the-scenes commands it sends (bug#52922).
2022-01-15 10:30:24 +01:00
Stefan Kangas
8df828e405 Merge from origin/emacs-28
5990148860 * lisp/simple.el (undo-no-redo): Fix customization group
ac2cdb8a46 * lisp/progmodes/xref.el (xref-file-name-display): Fix doc...
c05864dd25 Avoid another segfault in 'face_at_buffer_position'
2022-01-15 06:47:59 +01:00
Philipp Stephani
ac2cdb8a46 * lisp/progmodes/xref.el (xref-file-name-display): Fix docstring. 2022-01-14 22:01:06 +01:00
Juri Linkov
102dd6e59b * lisp/progmodes/xref.el (xref-query-replace-in-results): Fix prefix-arg.
Use current-prefix-arg.
2022-01-14 10:18:43 +02:00
Miha Rihtaršič
07335abeb4 Fix python-eldoc affecting unrelated comint processes
* lisp/progmodes/python.el (python-shell-send-string-no-output): Don't
let-bind comint-preoutput-filter-functions globally for all comint
processes.  Modify the behaviour of only the current python
process (bug#53219).
2022-01-14 08:34:27 +01:00
Dmitry Gutov
c7bf60465a xref-find-references-and-replace: New command
* lisp/progmodes/xref.el (xref-find-references-and-replace):
New command.
2022-01-14 04:38:39 +02:00
Dmitry Gutov
b2cc03d572 Steamline xref-query-replace-in-results
* lisp/progmodes/xref.el (xref-query-replace-in-results):
Steamline the most common scenario
(https://lists.gnu.org/archive/html/emacs-devel/2022-01/msg00864.html).
2022-01-14 04:30:25 +02:00
Stefan Kangas
53dba32022 Prefer defvar-keymap to easy-mmode-defmap
* lisp/progmodes/gud.el (gud-minibuffer-local-map):
* lisp/vc/pcvs-info.el (cvs-status-map): Use defvar-keymap.

* lisp/emacs-lisp/easy-mmode.el (easy-mmode-defmap): Document as
deprecated.
2022-01-13 23:24:25 +01:00
Juri Linkov
4765487d5d More fixes for display-comint-buffer-action
* lisp/window.el (display-comint-buffer-action):
Use display-buffer--same-window-action as the default value.

* lisp/progmodes/sh-script.el (sh-show-shell):
* lisp/shell.el (shell): Add display-comint-buffer-action to pop-to-buffer.

* lisp/progmodes/project.el (project-shell, project-eshell): Use
`bound-and-true-p display-comint-buffer-action' for backward-compatibility.

https://lists.gnu.org/archive/html/emacs-devel/2021-12/msg02964.html
2022-01-11 19:19:37 +02:00
Stefan Kangas
d763c12796 Merge from origin/emacs-28
e7aa3ece52 Fix vc-git with old Git over Tramp and cygwin-mount.el
c0cfbca311 * lisp/emacs-lisp/checkdoc.el (bytecomp): Add missing require

# Conflicts:
#	etc/NEWS
2022-01-05 06:30:39 +01:00
Dmitry Gutov
e7aa3ece52 Fix vc-git with old Git over Tramp and cygwin-mount.el
* lisp/vc/vc-git.el (vc-git-use-literal-pathspecs): New variable.
(vc-git-command, vc-git--call): Use it to determine whether to set
GIT_LITERAL_PATHSPECS=1 (bug#51497).
(vc-git--literal-pathspec, vc-git--literal-pathspecs): Remove.
Update all callers.  This reverts the previous solution for bug#39452.

* lisp/progmodes/project.el (project--vc-list-files):
Use the new variable.
2022-01-05 04:08:10 +02:00
Eli Zaretskii
823b6b8d26 ; Add 2022 to copyright years. 2022-01-01 07:07:15 -05:00
Eli Zaretskii
dcd76bd48d Merge from origin/emacs-28
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
2022-01-01 07:03:03 -05:00
Eli Zaretskii
19dcb237b5 ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
Alan Mackenzie
cc9ac56081 CC Mode: Prevent rapid alternation of fontification of "found types"
This fixes bug #52863.

* lisp/progmodes/cc-engine.el (c-forward-decl-or-cast-1): When a new type is
found, postpone entering it into c-found-types (and thus triggering the
fontification of that type throughout the buffer) until the end of the
function, when we're sure that the "type" found actually is a type.
2021-12-30 11:35:24 +00:00
Stefan Kangas
a3129af331 Merge from origin/emacs-28
06545bc0cc CC Mode: c-update-brace-stack: After struct foo *, do not ...
f11779f01b Improve documentation of 'M-X' and related features

# Conflicts:
#	etc/NEWS
2021-12-30 06:30:43 +01:00
Alan Mackenzie
06545bc0cc CC Mode: c-update-brace-stack: After struct foo *, do not expect a brace.
This fixes bug #52796.

* lisp/progmodes/cc-engine.el (c-update-brace-stack): Handle a "*" like a
semicolon, cancelling the expectation of a brace.

* lisp/progmodes/cc-langs.el (c-brace-stack-thing-key): Add a "*" into the
sets of significant characters.
2021-12-29 19:05:11 +00:00
Sam Steingold
18b680cfd1 Fix bug#52467 by adding a new custom variable 'display-comint-buffer-action'
* lisp/window.el (display-comint-buffer-action): New `defcustom`,
defaults to 'display-buffer-same-window' for backward compatibility.
* lisp/cmuscheme.el (run-scheme, switch-to-scheme): Pass
'display-comint-buffer-action' to 'pop-to-buffer' instead
of using 'pop-to-buffer-same-window'.
* lisp/eshell/eshell.el (eshell): Likewise.
* lisp/shell.el (shell): Likewise.
* lisp/org/ol-eshell.el (org-eshell-open): Likewise.
* lisp/progmodes/inf-lisp.el (inferior-lisp): Likewise.
* lisp/progmodes/project.el (project-shell, project-eshell): Likewise.
* lisp/textmodes/tex-mode.el (tex-display-shell, tex-compile-default)
(tex-recenter-output-buffer): Pass 'display-comint-buffer-action'
to 'pop-to-buffer'.
2021-12-28 17:28:49 -05:00
Stefan Kangas
f522a064cf perl-mode: Recognize "when"/"given" keywords
* lisp/progmodes/perl-mode.el (perl-font-lock-keywords-2): Add
keywords "when", "given" and "default".  (Bug#10560)
(perl--syntax-exp-intro-keywords): Add "printf".

* test/manual/indent/perl.perl: Add test for "when"/"given".
2021-12-27 03:19:25 +01:00
Stefan Kangas
a1b72008a7 Merge from origin/emacs-28
c09ad0cabd Fix the bug with duplicate entries in xref output
2021-12-25 06:32:13 +01:00
Dmitry Gutov
c09ad0cabd Fix the bug with duplicate entries in xref output
* lisp/progmodes/etags.el (xref-backend-definitions): Make sure to
save the changed intermediate value of the list (bug#52734).
2021-12-24 15:27:00 +02:00
Stefan Kangas
6a17bb4879 Merge from origin/emacs-28
04be23f19f Improve Xref documentation
edb1d491d9 * lisp/net/shr.el (shr-expand-url): Also strip trailing wh...
2021-12-24 06:30:41 +01:00
Dmitry Gutov
04be23f19f Improve Xref documentation
* lisp/progmodes/xref.el (xref-item): Add docstring for 'summary'.
Fix typo in the header Commentary.
2021-12-24 03:25:22 +02:00
Lars Ingebrigtsen
c963672736 Allow @ characters in heredoc in shell-script-mode
* lisp/progmodes/sh-script.el (defconst): Also allow @ in heredoc
(bug#52496).
2021-12-21 05:23:11 +01:00
Stefan Kangas
c167009400 Make some variable aliases obsolete
* lisp/progmodes/make-mode.el (makefile-query-one-target-method):
* lisp/skeleton.el (skeleton-transformation, skeleton-filter):
* lisp/textmodes/artist.el (artist-text-renderer):
* lisp/textmodes/bibtex.el (bibtex-autokey-name-case-convert):
(bibtex-autokey-titleword-case-convert):
* lisp/textmodes/ispell.el (ispell-format-word):
* lisp/textmodes/sgml-mode.el (sgml-transformation):
* lisp/vc/add-log.el (change-log-time-zone-rule): Make variable
aliases obsolete.
2021-12-20 22:16:24 +01:00
Stefan Kangas
1ffb75780b * lisp/progmodes/sh-script.el (sh-mode-map): Use defvar-keymap. 2021-12-19 21:29:35 +01:00
Stefan Kangas
4c479a1041 ; * lisp/progmodes/sh-script.el (sh-mode-menu): Fix typos. 2021-12-19 21:29:31 +01:00
Alan Mackenzie
22b8d68132 CC Mode: Remove annoying background fontification. Should fix bug #52298
Partially revert the commits from 2021-10-24 - 2021-10-26, "CC Mode: Fontify
"found types" which are recognized after being first scanned".

This removes the background fontification which ran off of a 0.1s timer, but
leaves the facility of normal fontification causing the fontification
throughout the buffer of newly found types.

* lisp/progmodes/cc-fonts.el (c-find-types-background)
(c-type-finder-timer-func): Remove.

* lisp/progmodes/cc-mode.el (c-type-finder-timer, c-inhibit-type-finder)
(c-type-finder-pos, c-post-gc-hook): Remove.
(c-leave-cc-mode-mode): Remove the manipulations of c-type-finder-timer and
c-post-gc-hook.
(c-basic-common-init): Remove the manipulations of c-type-finder-pos,
c-type-finder-timer, and c-post-gc-hook.

* lisp/progmodes/cc-vars.el (c-type-finder-time-slot)
(c-type-finder-repeat-time, c-type-finder-chunk-size): Remove.

* doc/misc/cc-mode.texi (Found Types): Remove.  Amend some menu entries.
2021-12-19 14:29:30 +00:00
Lars Ingebrigtsen
ae289486d0 Fix prompt in `sql-sqlite'
* lisp/progmodes/sql.el (sql-get-login): Fix the Database: prompt
(bug#52546).
2021-12-19 13:02:53 +01:00
Dmitry Gutov
32d12840e6 Kill eshell-mode project buffers too
* lisp/progmodes/project.el (project-kill-buffer-conditions):
Add 'eshell-mode' too (bug#49465).
2021-12-17 04:20:50 +03:00
Stefan Kangas
2893cb6a21 Use defvar-keymap in hideif.el
* lisp/progmodes/hideif.el (hide-ifdef-mode-submap): Use
defvar-keymap.  Use command remapping instead of
substitute-key-definition.
2021-12-15 21:38:55 +01:00
Dmitry Gutov
ad768d767b project-kill-buffers-display-buffer-list: Fix :package-version value
* lisp/progmodes/project.el (project-kill-buffers-display-buffer-list):
Fix :package-version value.
2021-12-15 02:58:45 +03:00
Dmitry Gutov
38977b6134 Add 'comint-mode' and 'change-log-mode' to project-kill-buffer-conditions
* lisp/progmodes/project.el (project-kill-buffer-conditions):
Add 'comint-mode' and 'change-log-mode' to the list (bug#52465).
2021-12-15 02:57:20 +03:00
Stefan Kangas
1d67bbf6c9 Use defvar-keymap in elisp-mode.el
* lisp/progmodes/elisp-mode.el (emacs-lisp-mode-map)
(elisp--dynlex-modeline-map, lisp-interaction-mode-map): Use
defvar-keymap.
2021-12-14 12:27:57 +01:00
Stefan Kangas
b86ab35972 Prefer command remapping in cperl-mode.el
* lisp/progmodes/cperl-mode.el (cperl-mode-map): Use command remapping
instead of substitute-key-definition.
2021-12-14 12:27:54 +01:00
Stefan Kangas
c1476afb99 Make alias obsolete in xscheme.el
* lisp/progmodes/xscheme.el (xscheme-yank-previous-send): Make
obsolete.
2021-12-13 15:58:49 +01:00
Stefan Kangas
5640b055d6 Merge from origin/emacs-28
9bd3f78645 Make `M-x run-python' select the window again
62139aeb42 * lisp/tab-bar.el (tab-bar-switch-to-last-tab): Add 'abs' ...
ea8422204f * make-dist (manifest): Filter out msdos/autogen/* files.
b5354e989d Rewrite the "Quitting Windows" section of Emacs Lisp Refer...
64ea1a178c Fix eshell for systems that do not have subprocesses
2021-12-13 06:30:58 +01:00
Kévin Le Gouguec
9bd3f78645 Make `M-x run-python' select the window again
Interactively, we want M-x run-python to focus the interpreter buffer.
The previous code failed in two ways:

- the call to 'display-buffer' was not reached if an interpreter
  was already running,

- set-buffer is ineffectual if the interpreter's window is not
  selected: once Emacs returns to the command loop, the current buffer
  will revert back to what the selected window contains.

* lisp/progmodes/python.el (python-shell-make-comint): Handle the SHOW
argument regardless of whether an interpreter buffer exists, and use
pop-to-buffer to select the window.
(run-python): Delegate buffer management to
'python-shell-make-comint'.

* test/lisp/progmodes/python-tests.el
(python-tests--run-python-selects-window): Rename from
'python-tests--bug31398', and adjust assertions (bug#52380).
2021-12-13 05:17:00 +01:00
Lars Ingebrigtsen
5708da48d1 Revert "Make `M-x run-python' select the window again"
This reverts commit aa2872a127.

This led to a test failure.
2021-12-10 13:07:24 +01:00
Kévin Le Gouguec
aa2872a127 Make `M-x run-python' select the window again
* lisp/progmodes/python.el (python-shell-make-comint): Make `M-x
run-python' select the window again like in 27.2 (bug#52380).
2021-12-10 13:05:49 +01:00
Stefan Kangas
d601fd4692 Merge from origin/emacs-28
7a25ba0fde ; * lisp/image-dired.el: Fix typo.
dda6337066 emacsclient takes more care about XDG_RUNTIME_DIR
26fb4168b8 ; Prefer HTTPS in more URLs
6b89578524 ; * lisp/progmodes/flymake.el: Update the minimum Emacs ve...
2021-12-10 06:30:33 +01:00
Eli Zaretskii
6b89578524 ; * lisp/progmodes/flymake.el: Update the minimum Emacs version. 2021-12-09 17:01:57 +02:00
Stefan Kangas
6ecb24f877 Merge from origin/emacs-28
1821844357 Add missing K key documentation for Cangjie input methods
be860c1385 Fix manual entry of 'quit-restore-window' (Bug#52328)
35a96139df Clarify a comment in xdisp.c
6ba2f028cf Revert "Grep alias `all' shall not match parent directory"
eb9e33e238 ; * etc/NEWS: Non-nil repeat-keep-prefix is not the defaul...
538fc1d0e0 Fix mode-line display in Calendar mode

# Conflicts:
#	etc/NEWS
#	lisp/help.el
2021-12-09 14:53:51 +01:00
Óscar Fuentes
6ba2f028cf Revert "Grep alias `all' shall not match parent directory"
This reverts commit 856cd948d1.

Emacs got better at quoting shell arguments and the original value
works correctly for vc-git-grep. At the same time, the value
introduced on that commit caused a regression on lgrep.

* lisp/progmodes/grep.el (grep-files-aliases): Use previous value for
`all'. Fixes bug#52367
2021-12-08 23:52:39 +01:00
Stefan Kangas
6cf358d7a2 Define some more keymaps in one step
* lisp/calc/calc-store.el (calc-var-name-map):
* lisp/mail/rmailsum.el (rmail-summary-edit-map):
* lisp/speedbar.el (speedbar-buffers-key-map): Define in one step.
* lisp/progmodes/ebrowse.el (ebrowse-global-submap-4)
(ebrowse-global-submap-5): Define in one step and use defvar-keymap.
2021-12-08 17:48:25 +01:00