Augusto Stoffel [Sat, 17 Sep 2022 16:30:04 +0000 (18:30 +0200)]
New Flymake backend using the shellcheck program
See bug#57884.
* lisp/progmodes/sh-script.el: Require let-alist and subr-x when
compiling.
(sh--json-read): Helper function to deal with possible absence of
json-parse-buffer.
(sh-shellcheck-program, sh--shellcheck-process,
sh-shellcheck-flymake): Variables and function defining a Flymake
backend.
(sh-mode): Add it to 'flymake-diagnostic-functions'.
Sean Whitton [Fri, 23 Sep 2022 17:43:31 +0000 (10:43 -0700)]
vc-git--pushpull: Restore handling of vc-git-program
* lisp/vc/vc-git.el (vc-git--pushpull): Restore handling of
vc-git-program before recent change: respect a buffer-local value of
vc-git-program, and don't ignore user edits to the git program name
when PROMPT.
Stefan Kangas [Fri, 23 Sep 2022 21:12:10 +0000 (23:12 +0200)]
image-dired: Rewrite and extend slideshow feature
* lisp/image/image-dired.el
(image-dired--slideshow-start-timer)
(image-dired--slideshow-stop-timer)
(image-dired--slideshow-show-message): New functions.
(image-dired--slideshow-current-delay): New variable.
(image-dired--slideshow-initial): Delete variable.
(image-dired-slideshow-start): Simplify and ensure we display the
image at start.
* lisp/image/image-dired.el (image-dired--slideshow-stop): Add support
for pausing, and going backwards and forwards during slideshow.
Stefan Kangas [Fri, 23 Sep 2022 18:18:17 +0000 (20:18 +0200)]
image-dired: Mark two slideshow defuns as internal
* lisp/image/image-dired.el (image-dired--slideshow-step)
(image-dired--slideshow-stop): Rename from
'image-dired--slideshow-step' and 'image-dired--slideshow-stop'.
Update callers and make old names into obsolete aliases.
Stefan Monnier [Fri, 23 Sep 2022 20:36:16 +0000 (16:36 -0400)]
cconv.el: Fix interactive closure bug#51695
Make cconv.el detect when a closure's interactive form needs to
capture variables from the context and tweak the code accordingly
if so.
* lisp/emacs-lisp/cconv.el (cconv--interactive-form-funs): New var.
(cconv-convert): Handle the case where the interactive form captures
vars from the surrounding context. Remove left over handling of
`declare` which was already removed from the cconv-analyze` phase.
(cconv-analyze-form): Adjust analysis of interactive forms accordingly.
* lisp/emacs-lisp/oclosure.el (cconv--interactive-helper): New type and
function.
* lisp/simple.el (function-documentation, oclosure-interactive-form):
Add methods for it.
* test/lisp/emacs-lisp/cconv-tests.el
(cconv-tests-interactive-closure-bug51695): New test.
* lisp/image/image-crop.el (image-crop--crop-image-1): Darken the
selected region to make the bounding-box more noticable in images
which are mostly white (bug#58004).
Fix syntax check in python-info-looking-at-beginning-of-defun
* lisp/progmodes/python.el
(python-info-looking-at-beginning-of-defun): Check syntax after moving
to the beginning of line.
* test/lisp/progmodes/python-tests.el (python-nav-beginning-of-defun-6)
(python-end-of-defun-1, python-info-looking-at-beginning-of-defun-3):
New tests (bug#58023).
* test/src/eval-tests.el (eval-tests--exceed-specbind-limit)
(eval-exceed-specbind-with-signal-hook): Remove test that is
no longer useful, since there is no longer any specpdl limit
to overrun. (The test still passed but vacuously so, by
hitting the max-lisp-eval-depth limit instead.)
This silences an obsoletion warning.
Stefan Kangas [Fri, 23 Sep 2022 13:01:36 +0000 (15:01 +0200)]
Rename 'image-dired-db-file' to 'image-dired-tags-db-file'
* lisp/image/image-dired.el (image-dired-tags-db-file): Rename
from 'image-dired-db-file'. Update all uses and make old name
into an obsolete variable alias.
Po Lu [Fri, 23 Sep 2022 12:41:24 +0000 (20:41 +0800)]
Fix more toolkit scroll bar window protection issues
* src/xterm.c (handle_one_xevent): Ignore outdated scroll bar
events.
(x_free_frame_resources): Clear protected windows and invalidate
previous scroll bar events.
* src/xterm.h (struct x_display_info): New field
`first_valid_scroll_bar_req'.
Eli Zaretskii [Fri, 23 Sep 2022 06:36:24 +0000 (09:36 +0300)]
Support Noto Emoji font as fallback
The black-and-white emoji font is back under active development,
see https://github.com/googlefonts/noto-emoji. So this adds
that font as fallback for systems that don't have the capability
of using color fonts.
* lisp/international/fontset.el (setup-default-fontset): Support
black-and-white Noto Emoji font as fallback for Emoji display.
Stefan Kangas [Fri, 23 Sep 2022 01:24:13 +0000 (03:24 +0200)]
Support several new DEs in wallpaper.el
* lisp/image/wallpaper.el (wallpaper--default-commands)
(wallpaper--check-command, wallpaper-command): Add support for Unity,
Pantheon, Budgie, LXQt, and LXDE. Also add support for Lubuntu,
Xubuntu, and Pop!_OS.
* lisp/bookmark.el (bookmark-inhibit-context-functions): New defcustom.
(bookmark-make-record): Use it.
* lisp/auth-source-pass.el (auth-source-pass-file-name-p):
* lisp/auth-source.el (auth-source-file-name-p): New defuns. Add
them to `bookmark-inhibit-context-functions'.
* lisp/epa-hook.el (epa-file-name-p):
* lisp/net/tramp-crypt.el (tramp-crypt-file-name-p): Add them to
`bookmark-inhibit-context-functions'.
Sean Whitton [Sun, 18 Sep 2022 21:47:23 +0000 (14:47 -0700)]
Add support for user edits to VC command arguments
* lisp/vc/vc-dispatcher.el (vc-pre-command-functions): New hook.
(vc-want-edit-command-p): New variable.
(vc-do-command): If vc-want-edit-command-p is non-nil, prompt the user
to edit the VC command & arguments before execution. Run the new hook.
(vc-do-async-command): Use the new hook to insert into BUFFER the
command that's next to be run.
* lisp/vc/vc-git.el (vc-git--pushpull): Drop prompting code. Bind
vc-want-edit-command-p so that vc-do-command handles the prompting.
Use the new hook to update compile-command with the edited command.
* lisp/vc/vc.el (vc-print-branch-log): A non-nil prefix argument now
means vc-want-edit-command-p is bound to a non-nil value (bug#57807).
Stefan Kangas [Wed, 21 Sep 2022 12:22:26 +0000 (14:22 +0200)]
; Explicitly declare linum-mode obsolete
* lisp/obsolete/linum.el (linum-mode, global-linum-mode):
Explicitly declare obsolete to warn the user, and recommend using
'display-line-numbers-mode' instead.
Suggested by Philip Kaludercic <philipk@posteo.net>.
* lisp/image-file.el (image-file-name-regexp): Treat
`image-file-name-regexps' as a list of regexps (as documented) in
addition to a regexp string (bug#57971).
Po Lu [Wed, 21 Sep 2022 11:31:45 +0000 (19:31 +0800)]
Small adjustments to precision pixel scrolling
* lisp/pixel-scroll.el
(pixel-scroll-precision-interpolation-factor): Adjust for
increased accuracy.
(pixel-scroll-precision-interpolate): Slightly decrease accuracy
in exchange for consing less floats.
(pixel-scroll-interpolate-down, pixel-scroll-interpolate-up):
Fix usage of function.
Po Lu [Wed, 21 Sep 2022 11:24:06 +0000 (19:24 +0800)]
Improve scroll interpolation in pixel-s-precision-mode
* lisp/pixel-scroll.el (pixel-scroll-precision-interpolate): New
arg FACTOR. Use it to determine the interpolation factor if
non-nil. Also, clear scroll remainder if direction changes, and
determine deltas based on the absolute amount of time passed.
(bug#57967)
(pixel-scroll-interpolate-down, pixel-scroll-interpolate-up):
Pass factor of 0 to scroll exactly 1 page.
* lisp/mail/emacsbug.el (report-emacs-bug, submit-emacs-patch):
Adjust callers.
(emacs-build-description): Rename from
`emacs-bug--system-description' and make into a command.
Robert Pluim [Wed, 21 Sep 2022 07:12:53 +0000 (09:12 +0200)]
Fix substitute-command-keys for global binding lookup
The previous change forgot to account for the (rare) case of doing a
lookup for a global binding when a specific keymap is in force.
* lisp/help.el (substitute-command-keys): Redo lookup in global map if
lookup in specific map fails.
*
test/lisp/help-tests.el (help-tests-substitute-command-keys/keymap-change):
Add testcase for specific map overriding advertised-binding.
Juri Linkov [Wed, 21 Sep 2022 06:42:55 +0000 (09:42 +0300)]
* lisp/outline.el: More improvements for buttons/margins (bug#57813)
(outline-minor-mode-use-margins): Don't use for modes derived from help-mode
that are handled by 'outline-minor-mode-use-buttons'.
(outline-open, outline-close, outline-close-rtl): Use image height
proportional to font height of 0.8em.
(outline-minor-mode): Remove overlays 'outline-button' and 'outline-margin',
and move such overlay removal after the call of 'outline-show-all'
that might trigger overlay addition.
* doc/misc/rcirc.texi (Dealing with Bridge Bots): Document new feature.
* etc/NEWS: Mention the new feature.
* lisp/net/rcirc.el (rcirc-markup-text-functions): Add new markup function
(rcirc-pseudo-nicks): Add new local variable.
(rcirc-channel-nicks): Use 'rcirc-pseudo-nicks' for nick completion.
(rcirc-bridge-bot-alist): Add new user option.
(rcirc-bridged-nick): Add new face.
(rcirc-markup-bridge-bots): Add new function.
Michael Albinus [Tue, 20 Sep 2022 16:35:57 +0000 (18:35 +0200)]
; Minor Tramp cleanups
* lisp/net/tramp.el (tramp-build-remote-file-name-spec-regexp):
Handle the `simplified' syntax better.
(tramp-handle-file-name-case-insensitive-p): Do not unquote candidate.
Juri Linkov [Tue, 20 Sep 2022 16:11:58 +0000 (19:11 +0300)]
* lisp/outline.el: Bind margin mouse event to cycle outlines (bug#57813)
(outline-minor-mode): In mode keymap bind
'right/left-margin mouse-1' to outline-cycle, and
'right/left-margin S-mouse-1' to outline-cycle-buffer.
(outline-hide-subtree, outline-show-subtree): Add save-excursion
to keep point unmoved after mouse click.
(outline-cycle): Add optional arg 'event' like in
outline-hide-subtree and outline-show-subtree, and
add save-excursion to keep point unmoved after mouse click.
(outline--make-button-overlay, outline--make-margin-overlay):
Put overlay property 'evaporate' to t.
(outline--insert-open-button, outline--insert-close-button):
Remove temporary attempts to bind margin-local mouse events.
would use the global advertised-binding for `undo', even though
there's a binding in `undo-repeat-map', which is highly
counter-intuitive. Now the binding is looked up in the specified
keymap first.
* lisp/help.el (substitute-command-keys): Restrict the initial key
lookup to the specified keymap (if there is one). (Bug#51384)
As discussed in
https://lists.gnu.org/r/auctex/2022-08/msg00004.html
AUCTeX installs its own advice to redefine `tex-mode`, and that
advice used to take precedence before commit 6075a7c5ae3fa456cd.
Get fewer false positives for :keyword and &options
* lisp/emacs-lisp/lisp-mode.el (lisp-mode--search-key): New
function to check more carefully for start of :keywords and
&options (bug#51574).
(lisp-fdefs): Use it.
F. Jason Park [Wed, 7 Sep 2022 02:09:54 +0000 (19:09 -0700)]
Bury new ERC buffers by default
* lisp/erc/erc.el (erc-join-buffer): Change default value to `bury'.
(erc-setup-buffer): Make `window-noselect' behave more like its
description and abstain from ever replacing the current buffer.
* test/lisp/erc/erc-scenarios-base-reconnect.el
(erc-scenarios-common-base-reconnect-options): Update helper to handle
new default value for option `erc-join-buffer'.
(erc-scenarios-base-reconnect-options--buffer): Update and rename
function `erc-scenarios-base-reconnect-options--default'.
(erc-scenarios-base-reconnect-options--default): Update and rename
function `erc-scenarios-base-reconnect-options--bury'.
* etc/ERC-NEWS: Update existing display-buffers section for 5.5.
(Bug#51753)
F. Jason Park [Thu, 7 Jul 2022 02:57:11 +0000 (19:57 -0700)]
Offer to regexp-quote new items in erc-match commands
* lisp/erc/erc-match.el (erc-match-quote-when-adding) Add new option
to quote new items added to match lists.
(erc-add-entry-to-list): Add optional `alt' parameter indicating
whether to flip the behavior indicated by
`erc-match-quote-when-adding'.
(erc-add-pal, erc-add-fool, erc-add-keyword, erc-add-dangerous-host):
Pass universal arg to `erc-add-entry-to-list' as `alt' argument.
(erc-match-pal-p, erc-match-fool-p, erc-match-keyword-p,
erc-match-dangerous-host-p): Don't bother matching when list is nil.
* lisp/erc/erc.el (erc-list-match (lst str): Join input list as regexp
union instead of looping over items.
* etc/ERC-NEWS: Update misc-UX section for 5.5.
* test/lisp/erc/erc-match-tests.el: New file. (Bug#56450)
F. Jason Park [Wed, 17 Aug 2022 07:00:53 +0000 (00:00 -0700)]
Stabilize channels variant of erc-reuse-buffers test
* lisp/erc/erc-networks.el (erc-networks--id-sort-buffers): Use
`buffer-local-value' instead of `with-current-buffer'.
* test/lisp/erc/erc-scenarios-base-reuse-buffers.el
(erc-scenarios-common--base-reuse-buffers-channel-buffers): Wait for
buffers to be created by server-initiated JOINs.
(erc-scenarios-base-reuse-buffers-channel-buffers--disabled): Remove
`:unstable' tag.