1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-25 22:50:37 -08:00
Commit graph

151218 commits

Author SHA1 Message Date
Alan Mackenzie
09f3ac60cc Put missing c-keep-region-active's into the source code
* lisp/progmodes/cc-cmds.el (c-beginning-of-defun): Insert
c-keep-region-active when (< arg 0).
(c-forward-conditional): Insert c-keep-region-active.
2021-10-28 17:04:06 +00:00
Jim Porter
9c95a4fa55 Make comint-term-environment connection-aware (bug#51426)
* lisp/comint.el (comint-term-environment): Make it connection-aware.

* doc/emacs/misc.texi (Shell Options): Document the above change, and
explain how this interacts with 'system-uses-terminfo'.

* etc/NEWS: Announce the above change.
2021-10-28 18:44:39 +02:00
Eli Zaretskii
802e9b1b45 Ignore more events in input-pending-p
* src/keyboard.c (readable_events)
(kbd_buffer_store_buffered_event): Use 'is_ignored_event' to
decide whether the input event is to be ignored.
(is_ignored_event): New function.
(syms_of_keyboard) <input-pending-p-filter-events>: New variable.
Patch from Aaron Jensen <aaronjensen@gmail.com>.
2021-10-28 18:47:41 +03:00
Stefan Kangas
cb94996357 Do interactive mode tagging in image-dired.el
* lisp/image-dired.el (image-dired-restore-window-configuration)
(image-dired-next-line, image-dired-previous-line)
(image-dired-mark-thumb-original-file)
(image-dired-unmark-thumb-original-file)
(image-dired-flag-thumb-original-file)
(image-dired-toggle-mark-thumb-original-file)
(image-dired-jump-original-dired-buffer)
(image-dired-delete-char, image-dired-refresh-thumb)
(image-dired-display-next-thumbnail-original)
(image-dired-display-previous-thumbnail-original): Do interactive
tagging; these will only work in 'image-dired-thumbnail-mode'.
2021-10-28 02:10:09 +02:00
Stefan Kangas
bc4937539e image-dired: Make thumbnail rotation commands obsolete
* lisp/image-dired.el (image-dired-cmd-rotate-thumbnail-program)
(image-dired-cmd-rotate-thumbnail-options)
(image-dired-rotate-thumbnail)
(image-dired-rotate-thumbnail-left)
(image-dired-rotate-thumbnail-right): Make obsolete in favor of
'image-dired-refresh-thumb' and 'image-rotate'.  It makes no sense to
have destructive thumbnail rotation commands now that Emacs can rotate
thumbnails in memory, and it is very fast to just generate a new one
reflecting the rotation of the original.
(image-dired-thumbnail-mode-map): Remove menu entries and key bindings
for above obsolete commands.  The rotate right keybinding had already
been made ineffective by the local keymap added by 'insert-image'.
2021-10-28 02:03:05 +02:00
Stefan Kangas
722a9080db ; * lisp/image-dired.el: Be more consistent with spelling. 2021-10-27 22:10:04 +02:00
Stefan Kangas
75ebbc6a27 image-dired: Don't show thumbnails if there are no image files
* lisp/image-dired.el (image-dired-show-all-from-dir): Don't show
thumbnail buffer if there are no image files.
2021-10-27 21:05:16 +02:00
Stefan Kangas
c70fdcdd11 Increase image-dired-show-all-from-dir-max-files to 500
* lisp/image-dired.el (image-dired-show-all-from-dir-max-files):
Increase default to 500 to ask for confirmation much less frequently.
The old value was added before we had asynchronous generation of
thumbnails, when a large number of files would lock up Emacs.  Asking
for confirmation could probably be disabled completely these days, but
let's be conservative and set it to some large number of files for
which some users might want to see a prompt.  It can't hurt.
(image-dired-show-all-from-dir): Never warn if above variable is nil.
(image-dired-bookmark-jump): Let-bind above variable to nil instead of
'most-positive-fixnum'.
* doc/emacs/dired.texi (Image-Dired): Don't mention the above
variable, as it is no longer important enough to deserve the space.
* etc/NEWS: Announce the above change.
2021-10-27 20:39:10 +02:00
Stefan Monnier
c22b735f0c (string-pixel-width): Rewrite to avoid side effects
* src/xdisp.c (Fwindow_text_pixel_size): Allow `window` to be a buffer.
* lisp/emacs-lisp/subr-x.el (string-pixel-width): Simplify accordingly.
2021-10-27 14:03:43 -04:00
Lars Ingebrigtsen
9559cc85e8 Revert "Add tentative key bindings for the three emoji commands"
This reverts commit e678067cb5.

Applied to the wrong branch.
2021-10-27 17:49:30 +02:00
Lars Ingebrigtsen
e678067cb5 Add tentative key bindings for the three emoji commands 2021-10-27 17:48:33 +02:00
Glenn Morris
edcf9edc8c Merge from origin/emacs-28
2bdd5732aa (origin/emacs-28) ; * etc/NEWS: Fix last change.
492b927909 Fix help commands for menu-bar menus
9589be772d ; * etc/NEWS: Fix typos.
d353fc4a00 ; Explain why "kinds of atom" isn't a typo
47a3750162 ; * etc/NEWS: Improve wording of the Emoji entry.
b814712796 ; Checkdoc fixes in image-dired.el
e45b3fc521 Improve function documentation with text from XDG BDS spec
284c77eeb6 * lisp/transient.el: Update to package version 0.3.7.
40400e6977 ; Revert parts of "Use string-replace instead of replace-r...
214c2e268c ; Revert parts of "Use string-search instead of string-mat...

# Conflicts:
#	etc/NEWS
2021-10-27 07:59:28 -07:00
Lars Ingebrigtsen
7c6f7dc99b Simplify string-pixel-width
* lisp/emacs-lisp/subr-x.el (string-pixel-width): Simplify --
save-window-excursion saves dedication status (and the code was
buggy).
2021-10-27 16:50:40 +02:00
Eli Zaretskii
2bdd5732aa ; * etc/NEWS: Fix last change. 2021-10-27 17:13:59 +03:00
Lars Ingebrigtsen
713e19a60a Fix parsing of erts files
* lisp/emacs-lisp/ert.el (ert-test-erts-file): Fix progress
through a test file (bug#51409).
2021-10-27 16:13:30 +02:00
Lars Ingebrigtsen
5b61f2defe Harden ert-resource-directory against errors
* lisp/emacs-lisp/ert-x.el (ert-resource-directory): Be more
resilient -- don't bug out if called from a file that's not
visiting a directory.
2021-10-27 16:04:31 +02:00
Jim Porter
158932894b Be more efficient when checking for a matching client in server.el
lisp/server.el (server-handle-delete-frame): Use 'seq-some' to
determine if another frame for the current client exists.
(server-kill-emacs-query-function): Use 'seq-some' to determine if
another live client exists (bug#51420).
2021-10-27 15:54:42 +02:00
Lars Ingebrigtsen
03366de394 Add new function 'string-pixel-width'
* doc/lispref/display.texi (Size of Displayed Text): Mention it.
* lisp/emacs-lisp/shortdoc.el (string): Mention it.

* lisp/emacs-lisp/subr-x.el (string-pixel-width): New function.
2021-10-27 15:41:32 +02:00
Miha Rihtaršič
3fac3120f8 Allow matching non-.git gitlab and gitea URLs in bug-reference
* lisp/progmodes/bug-reference.el
(bug-reference--build-forge-setup-entry): Allow matching non-.git
gitlab and gitea URLs, with and without slashes (bug#51316).
2021-10-27 15:41:32 +02:00
Eli Zaretskii
65cd2d90b7 ; * src/atimer.c (init_atimer): Fix a typo in a comment. 2021-10-27 16:14:55 +03:00
Eli Zaretskii
492b927909 Fix help commands for menu-bar menus
* lisp/help.el (help--analyze-key): Fix "C-h c" and "C-h k" on
menu-bar menu items.  (Bug#51421)
2021-10-27 16:09:47 +03:00
Lars Ingebrigtsen
4107549a61 Always start the SIGALRM atimers
* src/atimer.c (init_atimer): Always start the SIGALRM alarms,
even if we're using timerfd (bug#19776).  See long, long
discussion in the bug report for why this is necessary.
2021-10-27 14:58:08 +02:00
Lars Ingebrigtsen
14d835a298 Redisplay after changing to the hourglass mouse pointer
* src/xterm.c (x_show_hourglass): Do a redisplay after changing to
the hourglass pointer -- otherwise it won't be displayed until a
keyboard/mouse event arrives (bug#19776).
2021-10-27 14:56:50 +02:00
Michael Albinus
9589be772d ; * etc/NEWS: Fix typos. 2021-10-27 14:11:09 +02:00
Eli Zaretskii
d353fc4a00 ; Explain why "kinds of atom" isn't a typo
* doc/lispintro/emacs-lisp-intro.texi (Lisp Atoms): Add a comment
explaining why "kinds of atom" isn't a typo.
2021-10-27 14:33:42 +03:00
Eli Zaretskii
47a3750162 ; * etc/NEWS: Improve wording of the Emoji entry. 2021-10-27 14:32:18 +03:00
Stefan Kangas
484468a1af image-dired: Set line-spacing to match horizontal space
* lisp/image-dired.el (image-dired-thumbnail-mode): Set value of
'line-spacing' to approximately match horizontal space.  This makes
the thumbnail view look better.
2021-10-27 07:53:03 +02:00
Stefan Kangas
4febba2c61 ; * test/lisp/files-tests.el: Fix last commit. 2021-10-27 07:05:33 +02:00
Stefan Kangas
e88be49b9d image-dired: Add support for bookmark.el
* lisp/image-dired.el (image-dired-thumbnail-mode): Add bookmark.el support.
(bookmark-make-record-default, bookmark-prop-get): Declare.
(image-dired-bookmark-name, image-dired-bookmark-make-record)
(image-dired-bookmark-jump): New defuns.
2021-10-27 06:12:25 +02:00
Stefan Kangas
e89b94f46d Add test for file-name-base
* test/lisp/files-tests.el (files-tests-file-name-base): New test.
2021-10-27 06:12:25 +02:00
Stefan Kangas
7f4afe1609 ; * lisp/image-dired.el: Move obsolete things to "Obsolete" section 2021-10-27 06:12:25 +02:00
Stefan Kangas
b814712796 ; Checkdoc fixes in image-dired.el 2021-10-27 04:55:37 +02:00
Stefan Kangas
236457e052 image-dired: Improve mouse behaviour
* lisp/image-dired.el (image-dired-thumbnail-mode-map): Improve mouse
behaviour: ignore dragging, as it currently doesn't do anything
useful, and make all clicks just select the thumbnail.
(image-dired-mouse-display-image)
(image-dired-mouse-select-thumbnail): Move point to closest image
after clicking in buffer.
2021-10-27 04:34:25 +02:00
Stefan Kangas
16bd8dce28 image-dired: Don't ding at beginning or end of buffer
* lisp/image-dired.el
(image-dired--display-thumb-properties-fun): New defun.
(image-dired-forward-image, image-dired-backward-image): Don't ding
when moving past first or last image; instead show a message, wait a
second and then show image properties.
2021-10-27 04:30:35 +02:00
Stefan Kangas
ab11a3adf9 image-dired: Add new commands for beginning/end of buffer
* lisp/image-dired.el (image-dired-beginning-of-buffer)
(image-dired-end-of-buffer): New commands.
(image-dired-thumbnail-mode-map): Bind new beginning of buffer command
to '<' and 'M-<', and end of buffer command to '>' and 'M->'.
2021-10-27 03:32:37 +02:00
Stefan Kangas
203279a024 Add new function image-at-point-p
* lisp/image.el (image-at-point-p): New defun.
* doc/lispref/display.texi (Showing Images): Document above new defun.
2021-10-27 03:27:08 +02:00
Stefan Kangas
d22cd6d4c6 image-dired: Use an evenly spaced grid for thumbnails
* lisp/image-dired.el (image-dired-line-up): Use an evenly spaced
grid for thumbnails, even if image sizes differ.
2021-10-27 02:57:51 +02:00
Stefan Kangas
79c29ff8ff ; * lisp/image-dired.el (image-dired-cmd-pngnq-options): Fix :version. 2021-10-27 02:07:35 +02:00
Stefan Kangas
b37b080af1 image-dired: Use example.org in examples
* lisp/image-dired.el (image-dired-gallery-image-root-url)
(image-dired-gallery-thumb-image-root-url): Use example.org to be
RFC 2606 compliant.
2021-10-27 02:05:33 +02:00
Stefan Kangas
23d2e7d112 image-dired: Increase number of asynch thumbnail generation jobs
* lisp/image-dired.el (image-dired-queue-active-limit): Increase the
number of asynchronous thumbnail generation jobs to a maximum of 4 or
processor count divided by 2.  This makes thumbnail generation around
30 % faster when benchmarking this on my machine (8 cores/4 jobs).

(image-dired-debug): New defvar.
(image-dired-debug-message): New defun.

(image-dired--generate-thumbs-start): New defvar.
(image-dired-create-thumb-1, image-dired-display-thumbs): Display time
spent on thumbnail generation if 'image-dired-debug' is non-nil.
2021-10-27 01:52:05 +02:00
Stefan Kangas
e45b3fc521 Improve function documentation with text from XDG BDS spec
* lisp/xdg.el (xdg-config-home, xdg-cache-home, xdg-data-home)
(xdg-runtime-dir, xdg-config-dirs, xdg-data-dirs): Copy in the
text from the XDG Base Directory Specification to better explain
what these functions return.
2021-10-26 23:19:10 +02:00
Alan Mackenzie
b3a5ad14c1 CC Mode: minor amendments more accurately to handle virtual semicolons, etc.
* lisp/progmodes/cc-engine.el (c-laomib-loop): Check for a virtual semicolon
as well as a ;.
(c-guess-basic-syntax): CASE 5D - Use c-crosses-statement-barrier-p to check
whether we've gone back past a virtual semicolon.
2021-10-26 20:13:18 +00:00
Alan Mackenzie
5f150387f1 * lisp/progmodes/cc-engine.el (c-fontify-new-found-type): Declare near BO File 2021-10-26 16:58:07 +00:00
Michael Albinus
e6bbbd303f * test/infra/gitlab-ci.yml (build-image-inotify): Increase timeout.
(test-native-comp-speed0): Adapt make_params.
2021-10-26 18:52:39 +02:00
Mattias Engdegård
f56408a6f0 * lisp/progmodes/xref.el (xref-pop-marker-stack): Don't obsolete. 2021-10-26 10:10:02 +02:00
Mattias Engdegård
ef86025bcd ; * test/lisp/progmodes/elisp-mode-tests.el: repair test failure
The test used an internal variable that has been renamed; use the new
name.  (Any variable would do here.)
2021-10-26 10:04:24 +02:00
Mattias Engdegård
d8caa3d9fb Rename xref-pop-marker-stack to xref-go-back (bug#38797)
It is the natural name after the addition of `xref-go-forward`.
The old name is retained as an alias.

* lisp/progmodes/xref.el (xref-pop-marker-stack): Rename.
(xref-go-forward, xref-quit-and-pop-marker-stack)
(xref-find-definitions):
* lisp/menu-bar.el (menu-bar-goto-menu):
* lisp/progmodes/etags.el (find-tag-marker-ring, pop-tag-mark):
* lisp/progmodes/prog-mode.el (prog-context-menu):
* doc/emacs/maintaining.texi (Looking Up Identifiers):
* etc/NEWS:
Use the new name.
2021-10-25 20:45:18 +02:00
Mattias Engdegård
e97d4e4ab2 ; * lisp/menu-bar.el (menu-bar-goto-menu): Adjust new item position 2021-10-25 20:45:18 +02:00
Jonas Bernoulli
284c77eeb6 * lisp/transient.el: Update to package version 0.3.7. 2021-10-25 20:19:52 +02:00
Jonas Bernoulli
40400e6977 ; Revert parts of "Use string-replace instead of replace-regexp-in-string"
"transient.el" is also distributed as a separate package, which
supports Emacs versions as old as 25.1 (see "Package-Requires").
2021-10-25 20:18:05 +02:00