Commit graph

82141 commits

Author SHA1 Message Date
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
Eric Abrahamsen
e73b8ae86f IMAP search should only use charset utf-8 with multibyte strings
Background: Exchange servers cannot accept "charset utf-8" search
strings. The code originally set that charset for any server with
literal+ capability, borking all searches on an Exchange server. This
code only sets utf-8 for multibyte search strings in particular, which
would be borken for Exchange anyway.

* lisp/gnus/gnus-search.el (gnus-search-imap-search-command): Ensure
we're only doing the literal+ dance for multibyte strings (multibyte
strings will have had newlines inserted in an earlier step).
2021-10-25 09:55:12 -07:00
Glenn Morris
3378549572 Merge from origin/emacs-28
a2c17e115e (origin/emacs-28) Merge branch 'emacs-28' of git.savannah....
fde56eeb76 Revert "Fix a typo in emacs-lisp-intro.texi"
4779d3ba19 * doc/lispref/functions.texi (Mapping Functions): Use #' w...
85ea3f7f47 Fix issue with interpreting ANSI codes in eshell
50f9436146 image-dired: Doc fix to better explain thumbnail generation
bb475e10b9 Clarify two image-dired docstrings
f5b4bb4a6f Fix flymake example backend conditions in the manual
0771d8939a * etc/PROBLEMS: Mention problems with regexp matcher.  (Bu...
ee579033b9 * test/lisp/repeat-tests.el: New file.
7385a7667f * lisp/tab-bar.el (tab-bar-move-repeat-map): Fix alias bin...
56caf1c9b8 Use restrictive umask when creating image-dired data
3b5de7f991 ; lisp/transient.el: Revert some misguided stylistic fixes.
2021-10-25 09:34:37 -07:00
Glenn Morris
f2dfe1e780 Merge from origin/emacs-28
817c929eda Doc fix for concat
3eca2ad2a1 * lisp/image-dired.el (image-dired-external-viewer): Suppo...
2021-10-25 09:34:37 -07:00
Lars Ingebrigtsen
d53bf7e5b4 Add the "always" zsh builtin to zsh mode
* lisp/progmodes/sh-script.el (sh-builtins): Add the "always" zsh
keyword (bug#51387).
2021-10-25 17:42:13 +02:00
Mattias Engdegård
65b34f688c Add xref forward history (bug#38797)
Make it possible to go forward as well as back in the Xref history.
The new `xref-go-forward` is bound to `C-M-,`.

* lisp/progmodes/etags.el (find-tag-marker-ring-length): Update.
(tags-location-ring-length): New.
(find-tag-marker-ring): Keep as dummy.
(tags-location-ring, tags-reset-tags-tables):
Use `tags-location-ring-length` instead of `xref-marker-ring-length`.
* lisp/progmodes/xref.el (xref-marker-ring-length, xref-marker-ring)
(xref-set-marker-ring-length):
Make obsolete.
(xref--history, xref-go-forward, xref-forward-history-empty-p): New.
(xref-push-marker-stack, xref-pop-marker-stack)
(xref-clear-marker-stack, xref-marker-stack-empty-p):
Use `xref--history`.
* lisp/menu-bar.el (menu-bar-goto-menu): Add Forward entry.
* doc/emacs/maintaining.texi (Looking Up Identifiers): Document.
* etc/NEWS: Announce.
2021-10-25 17:34:37 +02:00
Lars Ingebrigtsen
46941bcc2a Allow viewing .heic images via image-convert
* lisp/files.el (auto-mode-alist): Support the Apple .heic/HEIF
image format (bug#51381).
2021-10-25 17:19:32 +02:00
Lars Ingebrigtsen
9ce0008edd Change the with-delayed-message syntax to allow future extensibility
* doc/lispref/display.texi (Progress): Document it.
* lisp/subr.el (with-delayed-message): Change the syntax to allow
future extensibility.

* lisp/net/eww.el (eww-display-html): Use it.
2021-10-25 17:10:34 +02:00
Miha Rihtaršič
85ea3f7f47 Fix issue with interpreting ANSI codes in eshell
* lisp/eshell/esh-mode.el (eshell-mode): Make window point advance on
insertion.
(eshell-output-filter): Don't use insert-before-markers (bug#45380).
2021-10-25 15:24:35 +02:00
Martin Rudalics
4143b1d630 ; Fix mangled indentation in 'display-buffer' doc-string 2021-10-25 11:26:33 +02:00
Martin Rudalics
beaddd87f7 Allow 'display-buffer' to set up body size of chosen window (Bug#17065)
* doc/lispref/windows.texi (Buffer Display Action Alists):
Describe new possible values for 'window-height', 'window-width'
and 'window-size' action alist entries.
* lisp/window.el (window--display-buffer): Handle new values for
'window-height', 'window-width' and 'window-size' ALIST entries.
(display-buffer): Update doc-string for new values of some
action alist entries.
* etc/NEWS: Mention new values of some action alist entries.
2021-10-25 10:42:17 +02:00
Stefan Kangas
709e1e59f0 New function xdg-state-home
* lisp/xdg.el (xdg-state-home): New function.  This returns
$XDG_STATE_HOME according to the XDG Base Directory Specification
version 0.8 (08th May 2021).
2021-10-25 07:56:34 +02:00
Stefan Kangas
f8fed417a5 image-dired: Improve XDG compliance
* lisp/image-dired.el (xdg): Require.
(image-dired-main-image-directory): Prefer XDG_PICTURES_HOME.
(image-dired-thumb-name): Simplify by using 'xdg-cache-home'.
2021-10-25 07:54:11 +02:00
Stefan Kangas
5dd07e1ba1 Double value of image-dired-show-all-from-dir-max-files
* lisp/image-dired.el (image-dired-show-all-from-dir-max-files):
Double the amount of files in directory before prompting.  This could
be even higher, as the thumbnails are generated asynchronously and are
small by default.
2021-10-25 07:38:19 +02:00
Stefan Kangas
79f7e87da5 image-dired: Add support for GraphicsMagick
* lisp/image-dired.el (image-dired-cmd-create-thumbnail-program)
(image-dired-cmd-create-thumbnail-options)
(image-dired-cmd-create-temp-image-program)
(image-dired-cmd-create-temp-image-options)
(image-dired-cmd-rotate-thumbnail-program)
(image-dired-cmd-rotate-thumbnail-options): Add support for the
GraphicsMagick command line tool ("gm convert", "gm mogrify").
2021-10-25 03:50:04 +02:00
Stefan Kangas
057f45abec Support new Thumbnail Managing Standard sizes in image-dired
* lisp/image-dired.el
(image-dired--thumbnail-managing-standard-sizes): New defconst.
(image-dired-thumbnail-storage)
(image-dired-thumb-name, image-dired-insert-thumbnail)
(image-dired-thumb-size, image-dired-create-thumb-1): Support larger
thumbnail sizes mandated by new version of the Thumbnail Managing
Standard (December 2020, Version 0.9.0).
2021-10-25 02:12:48 +02:00
Stefan Kangas
bb475e10b9 Clarify two image-dired docstrings
* lisp/image-dired.el (image-dired-dir): Doc fix; clarify that
thumbnails will be saved in "$XDG_CACHE_HOME/thumbnails", as per the
Thumbnail Managing Standard.
(image-dired-thumb-size): Doc fix; clarify that this option will be
ignored when using the Thumbnail Managing Standard.
2021-10-25 02:12:34 +02:00
Stefan Kangas
608e694a30 Use SHA1 when creating thumbnail file name
* lisp/image-dired.el (image-dired-thumb-name): Improve docstring.
Use SHA1 for hashing when creating file name.  SHA1 is slightly faster
than MD5, and has a few more bits.
2021-10-24 23:26:25 +02:00
Lars Ingebrigtsen
57f3a1eb00 Display a message if HMTL rendering takes a long time
* lisp/net/eww.el (eww-display-html): Display a message if HTML
rendering takes a long time (bug#19776).
2021-10-24 22:21:19 +02:00
Lars Ingebrigtsen
c2055d41b4 Add new macro `with-delayed-message'
* doc/lispref/display.texi (Progress): Document it.
* lisp/subr.el (with-delayed-message): New macro.

* src/eval.c (with_delayed_message_display)
(with_delayed_message_cancel): Helper functions.
(Ffuncall_with_delayed_message): New function (bug#19776).
2021-10-24 22:21:19 +02:00
Alan Mackenzie
374f14fb99 CC Mode: Fontify "found types" which are recognized after being first scanned
This aims to fix the scenario where on jit-lock's first scan of a type, it is
not recognized as such, and only later does this happen.  The fontification of
such found types is now done by background scanning in short time slices
immediately after initialising the mode.

* lisp/progmodes/cc-engine.el (c-add-type-1): New function.
(c-add-type): Extract c-add-type-1 from it, and reformulate the mechanism for
protecting c-found-types from excessive partial identifiers.

* lisp/progmodes/cc-fonts.el (c-font-lock-complex-decl-prepare): Remove the
code which cleared c-found-types on fontification at BOB.
(c-find-types-background): New function, based on c-font-lock-declarations).
(c-type-finder-timer-func): New function.
(c-re-redisplay-timer): New variable.
(c-force-redisplay, c-fontify-new-found-type): New functions.

* lisp/progmodes/cc-mode.el (c-type-finder-timer, c-inhibit-type-finder): New
variables.
(c-leave-cc-mode-mode): Nullify c-post-command-hook, c-post-gc-hook, and
c-type-finder-timer when the last CC Mode buffer of a session is killed.
(c-type-finder-pos): New variable.
(c-basic-common-init): Initialize/Install c-post-command, c-c-type-finder-pos,
c-type-finder-timer, and c-post-gc-hook.
(c-new-id-start, c-new-id-end, c-new-id-is-type): New variables.
(c-update-new-id): New function.
(c-post-command): New post command hook function, used for checking moving
away from partially typed identifiers, and making them full identifiers.
(c-post-gc-hook): New hook to prevent CC Mode activity immediately following
GC, thus allowing keyboard/mouse input to be registered.
(c-before-change): Add code to clear c-found-types on a buffer change at BOB.
(c-after-change): Call c-update-new-id to keep track of partially typed
identifiers.

* doc/misc/cc-mode.texi (Found Types): New @section in the @Chapter Font
Locking.

* lisp/progmodes/cc-vars.el (c-type-finder-time-slot)
(c-type-finder-repeat-time, c-type-finder-chunk-size): New customizable
options.
2021-10-24 19:59:18 +00:00
Juri Linkov
7385a7667f * lisp/tab-bar.el (tab-bar-move-repeat-map): Fix alias binding of tab-move.
(tab-bar-move-tab-backward): Put 'repeat-map' symbol property.
2021-10-24 22:22:16 +03:00
Lars Ingebrigtsen
89365d748f Fix mouse buttons in dired--make-directory-clickable
* lisp/dired.el (dired--make-directory-clickable): Adjust mouse
clicks to conform to our standards.
2021-10-24 21:21:25 +02:00
Stefan Kangas
56caf1c9b8 Use restrictive umask when creating image-dired data
* lisp/image-dired.el (image-dired-dir)
(image-dired-sane-db-file): Create thumbnail directory and
.image-dired_db with umask 077.  This avoids creating world readable
copies of private data, and is in fact mandated by the Thumbnail
Managing Standard that we aim to support.
2021-10-24 21:20:16 +02:00
Jonas Bernoulli
3b5de7f991
; lisp/transient.el: Revert some misguided stylistic fixes.
These aren't actual modes.  Set checkdoc-symbol-words to avoid
false-positives.  The first line of doc-strings of methods do
not need to end with period.
2021-10-24 21:18:24 +02:00
Lars Ingebrigtsen
74846b8d30 Don't unhide first thread if entering without selecting article
* lisp/gnus/gnus-sum.el (gnus-summary-first-unread-subject)
(gnus-summary-first-unseen-subject)
(gnus-summary-first-unseen-or-unread-subject): Use it.
(gnus-summary--goto-and-possibly-unhide): New function -- don't
unhide the first thread unless necessary (bug#51344).
2021-10-24 20:25:12 +02:00
Stefan Kangas
e6946bf5f2 Improve documentation of image-dired thumbnails
* lisp/image-dired.el: Fix documentation on thumbnail file format to
correctly say that it can be either PNG or JPEG; not just JPEG.  Also
fix inconsistent formatting in comments.
* lisp/image-dired.el (image-dired-thumbnail-storage): Improve
docstring.
2021-10-24 19:51:26 +02:00
Stefan Kangas
6498a1a3ad Add support for pngquant to image-dired
* lisp/image-dired.el (image-dired-cmd-pngnq-program)
(image-dired-cmd-pngnq-options): Add support for pngquant.
Prefer, in this order: pngquant, pngnq-s9, pngnq-s for reasons of
speed and how actively maintained the projects seem to be.
2021-10-24 19:51:26 +02:00
Lars Ingebrigtsen
d64936d8f6 Fix define-erc-response-handler indentation
* lisp/erc/erc-backend.el (define-erc-response-handler): Add
proper indentation.
2021-10-24 18:54:31 +02:00
Stefan Kangas
c0ea1c8863 ; Unbreak creating thumbnails in image-dired
* lisp/image-dired.el (image-dired-insert-thumbnail): Unbreak
creating thumbnails after my previous commit.
2021-10-24 18:21:22 +02:00
Stefan Kangas
68d11cc248 Add new option help-link-key-to-documentation
* lisp/help.el (help-link-key-to-documentation): New user option.
(substitute-command-keys): Add a link from keys to the command they
are bound to, if the above new option is non-nil.  (Bug#8951)
* etc/NEWS: Announce the new option.
2021-10-24 16:47:22 +02:00
William Xu
860e8c524b Make dired directory components clickable
* lisp/dired.el (dired-readin): Use it.

* lisp/dired.el (dired-make-directory-clickable): New user option.

* lisp/dired.el (dired--make-directory-clickable): New function
(bug#21973).
2021-10-24 16:15:17 +02:00
Mattias Engdegård
03d7dcb461 Don't use obsolete variable find-tag-marker-ring
* lisp/progmodes/js.el (js-find-symbol):
* lisp/progmodes/octave.el (octave-find-definition):
Call `xref-push-marker-stack` instead of manipulating the obsolete
variable `find-tag-marker-ring`.
2021-10-24 15:23:34 +02:00
Lars Ingebrigtsen
c1a71ea774 Clean up duplicated setting in scheme-mode-variables
* lisp/progmodes/scheme.el (scheme-mode-variables): Remove
repeated setting.
2021-10-24 15:07:32 +02:00
Lars Ingebrigtsen
559fb593d7 Allow matching non-.git URLs in bug-reference
* lisp/progmodes/bug-reference.el
(bug-reference--build-forge-setup-entry): Allow matching non-.git
URLs, with and without slashes (bug#51316).
2021-10-24 14:14:42 +02:00
Stefan Kangas
6b0a1b4fdf Don't hard-code image-dired thumbnail type
* lisp/image-dired.el (image-dired-insert-thumbnail): Detect thumbnail
image type instead of hard-coding it.
2021-10-24 12:26:58 +02:00
Stefan Kangas
3eca2ad2a1 * lisp/image-dired.el (image-dired-external-viewer): Support feh. 2021-10-24 12:21:13 +02:00
Glenn Morris
b931e11a03 Merge from origin/emacs-28
c7f53824a8 (origin/emacs-28) Update publicsuffix.txt from upstream
9a50f760e9 ; * doc/lispref/modes.texi (Hooks): Clarify wording.  (Bug...
e154fd9119 Refer to the info node on keymaps in map-keymap docstring
4fd5c8df67 Clarify abnormal hook documentation
6fa5206770 Update to Org 9.5-59-g52e6f1
39413a45bf ; * doc/lispref/functions.texi (Calling Functions): Fix la...
43914ab01f Improve documentation of cl-reduce
ef37a86cac Improve documentation of apply-partially
1e8be48738 Fix typos
8c5fbd712b Revert commit 225ca617b7, and apply another fix
cdbd03345d Fix documentation of posn-at-x-y
598732c899 ; * src/vm-limit.c (get_lim_data): Fix a typo.  (Bug#18238)
efdffd86c5 ; * etc/refcards/README: Prefer HTTPS in link.

# Conflicts:
#	etc/NEWS
2021-10-24 01:55:45 -07:00
Stefan Kangas
aea4af5119 Make dired-x-guess-file-name-at-point obsolete
* lisp/dired-x.el (dired-x-guess-file-name-at-point): Make
obsolete in favour of 'thing-at-point'.
(dired-x-read-filename-at-point): Use 'thing-at-point' instead of
above obsolete function.
2021-10-24 08:38:15 +02:00
Kyle Meyer
6fa5206770 Update to Org 9.5-59-g52e6f1 2021-10-23 13:46:59 -04:00
Dmitry Gutov
6958bd0252 Support :company-deprecated completion property
* lisp/progmodes/elisp-mode.el (elisp--company-deprecated):
New function.
(elisp-completion-at-point): Use it.
2021-10-23 16:29:30 +03:00
Michael Albinus
8c5fbd712b Revert commit 225ca617b7, and apply another fix
* lisp/minibuffer.el (read-file-name-default): Revert commit
225ca617b7.  (Bug#50976).

* lisp/shell.el (shell): Remove volume letter for remote shell
file name.  (Bug#49229)
2021-10-23 15:21:14 +02:00
Alan Mackenzie
32d8a48709 Revert "CC Mode: Fontify "found types" which are recognized after being ..."
This reverts commit 51719617eb.  The commit
caused a hang at start-up with a big desktop.
2021-10-23 09:29:26 +00:00
Stefan Kangas
ad7fd3cb47 Partially remove exiftool dependency from image-dired.el
* lisp/image-dired.el (exif): Require.
(image-dired-cmd-read-exif-data-program)
(image-dired-cmd-read-exif-data-options)
(image-dired-get-exif-data): Make obsolete in favour of using
exif.el.  This removes a dependency on external exiftool for some
operations.
(image-dired-get-exif-file-name)
(image-dired-thumbnail-set-image-description): Use exif.el
functions instead of exiftool.
* lisp/image/exif.el (exif-tag-alist): Add description and
copyright fields.
* test/lisp/image-dired-tests.el: New file.
2021-10-23 08:31:03 +02:00
Stefan Kangas
bb06d5648e Add new function exif-field
* test/lisp/image/exif-tests.el (exif-elem): Move function from here...
* lisp/image/exif.el (exif-field): ...to here, and rename.
(exif-orientation):
* test/lisp/image/exif-tests.el (test-exif-parse)
(test-exif-parse-short): Use above new function.
2021-10-23 08:13:43 +02:00
Stefan Kangas
241574375d Add links to commentary reached with finder-list-keywords
* lisp/finder.el (finder-goto-xref): Move from here...
* lisp/emacs-lisp/package.el (package--finder-goto-xref): ...to
here.  Make the old name into an obsolete function alias.
(package--finder-xref): New button type.
(package--describe-add-library-links): Factor out new function...
* lisp/finder.el (finder-commentary): ...from here.
(describe-package-1): Call above new function.  This fixes an
issue where commentaries reached via 'finder-list-keywords' did
not have links.  (Bug#10814)
2021-10-23 05:28:32 +02:00
Alan Mackenzie
51719617eb CC Mode: Fontify "found types" which are recognized after being first scanned
This aims to fix the scenario where on jit-lock's first scan of a type, it is
not recognized as such, and only later does this happen.  The fontification of
such found types is now done by background scanning in short time slices
immediately after initialising the mode.

* lisp/progmodes/cc-engine.el (c-add-type-1): New function.
(c-add-type): Extract c-add-type-1 from it, and reformulate the mechanism for
protecting c-found-types from excessive partial identifiers.

* lisp/progmodes/cc-fonts.el (c-font-lock-complex-decl-prepare): Remove the
code which cleared c-found-types on fontification at BOB.
(c-find-types-background): New function, based on c-font-lock-declarations).
(c-types-finder-timer-func): New function.
(c-re-redisplay-timer): New variable.
(c-force-redisplay, c-fontify-new-found-type): New functions.

* lisp/progmodes/cc-mode.el (c-type-finder-timer): New variable.
(c-leave-cc-mode-mode): Nullify c-post-command-hook and c-type-finder-timer
when the last CC Mode buffer of a session is killed.
(c-type-finder-pos): New variable.
(c-basic-common-init): Initialize c-type-finder-pos and c-type-finder-timer.
(c-new-id-start, c-new-id-end, c-new-id-is-type): New variables.
(c-update-new-id): New function.
(c-post-command): New post command hook function, used for checking moving
away from partially typed identifiers, and making them full identifiers.
(c-before-change): Add code to clear c-found-types on a buffer change at BOB.
(c-after-change): Call c-update-new-id to keep track of partially typed
identifiers.

* doc/misc/cc-mode.texi (Found Types): New @section in the @Chapter Font
Locking.

* lisp/progmodes/cc-vars.el (c-type-finder-time-slot)
(c-type-finder-repeat-time, c-type-finder-chunk-size): New customizable
options.
2021-10-22 19:55:01 +00:00
Glenn Morris
4cf06bb751 Merge from origin/emacs-28
b0d64be0bc (origin/emacs-28) Improve some NEWS entries
7fde84e881 Improve documentation of syntax-ppss-context slightly
5ecbed01b2 ; * test/lisp/mh-e/mh-utils-tests.el: Update macro declara...
168665da59 Move some xwidget entries
efde024361 time-stamp-tests: improvements to test macros
06c944cff1 Fix rfc6068-parse-mailto-url autoload
9b6b5e37ef Regexp-quote github domains in bug-reference
1f6cdeb12c Ensure valid end/beginning lines in message-mark-inserted-...
9b46150ab0 * etc/NEWS: Improve 'repeat-mode' entry.
9c37b812da ; * lisp/repeat.el (repeat-mode): Fix docstring typo.
caf87d80fa * lisp/repeat.el (repeat-keep-prefix): Expand description.
24083c8d13 * lisp/net/eww.el (eww-retrieve-command): Add :tag.
cf7d8fb1d7 Add description of cards to etc/refcards/README
d2849cc645 Fix 'calculate-lisp-indent' when "[" starts containing sex...
2a0a368ddc Fix typo in doc/emacs/anti.texi
9529e1d2fb Update doc of Edebug specification for macros
5bc522b4f4 ; * lisp/simple.el (kill-region): A better fix for bug#51320.
ee6bdd6eef Fix non-interactive behavior of 'kill-region'
2b7655ca0e ; More accurate doc string for 'tab-bar-format'
2841e26744 * test/lisp/dabbrev-tests.el: Use 'kbd' for readable keys.
1cdb4d2077 * lisp/menu-bar.el (menu-bar-keymap): Add optional arg KEY...

# Conflicts:
#	etc/NEWS
#	lisp/progmodes/bug-reference.el
2021-10-22 09:39:39 -07:00
Itai Y. Efrat
06c944cff1 Fix rfc6068-parse-mailto-url autoload
* lisp/net/browse-url.el (rfc6068-parse-mailto-url): Fix autoload
cookie (bug#51333).
2021-10-22 17:07:56 +02:00