* lisp/calendar/appt.el (appt-check): Add space at the end
(bug#18164) -- all `global-mode-string' elements should have it
there to get an even space distribution.
Peter Münster [Wed, 18 Aug 2021 09:21:51 +0000 (11:21 +0200)]
Add support for history of image tags and completion in the minibuffer
* lisp/image-dired.el (image-dired-tag-history): New variable holding the
tag history.
(image-dired-tag-files, image-dired-tag-thumbnail, image-dired-delete-tag)
(image-dired-tag-thumbnail-remove): Use it for the user input.
Peter Münster [Tue, 17 Aug 2021 23:37:43 +0000 (01:37 +0200)]
New placement of newline characters in image-dired-db-file
It's more usual to have the newline at the end of the line, instead of the
beginning. This change avoids missing newline at the end of the file, an
empty line at the start and eventually a lot of empty lines when
`require-final-newline' is not nil.
* lisp/image-dired.el (image-dired-write-tags): Insert newline at the end
of the line, instead of the beginning.
(image-dired-remove-tag): Do not delete empty line at end of buffer.
Eli Zaretskii [Thu, 19 Aug 2021 12:44:55 +0000 (15:44 +0300)]
Fix inaccuracies in documentation of 'message-truncate-lines'
* doc/lispref/display.texi (Echo Area Customization):
* src/xdisp.c (syms_of_xdisp): Adjust the documentation of
message-truncate-lines to changes that fixed bug#46718.
João Távora [Wed, 18 Aug 2021 23:48:26 +0000 (00:48 +0100)]
Section by 'group-function' in Icomplete and Fido's vertical modes
Fixes: bug#48545
* lisp/icomplete.el (icomplete--augment): Rewrite from icomplete--affixate.
(icomplete--render-vertical): Rework.
(icomplete--vertical-minibuffer-setup): Separator is hardcoded "\n", no
need to set.
João Távora [Thu, 19 Aug 2021 10:04:37 +0000 (11:04 +0100)]
Improve fix of bug#49888 on no-pattern flex sorting
This version is functionally equivalent, but doesn't duplicate any
code. When nothing "flexy" is happening, it works by simply not doing
any metadata adjustments, instead of attempting to synthesize a
function to mimic the non-flex case.
Juri Linkov [Wed, 18 Aug 2021 17:01:03 +0000 (20:01 +0300)]
* lisp/mouse.el: More fixes for context-menu.
(context-menu-map): Remove menu title "Context Menu" (bug#50067).
(context-menu-minor): Reverse sub-menus to display exactly in the same order
as on the menu bar.
Disable auto compositions on the Linux console only
* lisp/term/linux.el (terminal-init-linux): Disable auto
compositions on "linux" consoles (bug#21363).
* src/composite.c (inhibit_auto_composition): New function to
implement this.
(composition_compute_stop_pos, composition_adjust_point)
(Ffind_composition_internal): Use it.
(syms_of_composite): Document it.
* src/lisp.h: Export tty_type_name.
* src/term.c (tty_type_name): Factored out.
(Ftty_type): Use it.
Peter Münster [Wed, 18 Aug 2021 12:53:25 +0000 (14:53 +0200)]
Add menu bindings to new functions in image-dired.el
* lisp/image-dired.el (image-dired--with-marked): New macro for
cycling over marked thumbnails.
(image-dired-tag-thumbnail, image-dired-tag-thumbnail-remove): Can
handle now also all marked thumbnails.
(image-dired-tag-marked-thumbnails): Remove it, because it's
obsoleted by `image-dired-tag-thumbnail' now.
(image-dired-delete-marked): Use new macro
`image-dired--with-marked', and add command to menu (bug#50000).
pillule [Wed, 18 Aug 2021 07:21:06 +0000 (09:21 +0200)]
Fix ediff3 layouts with window-combination-resize non-nil (Bug#49277)
* lisp/vc/ediff-wind.el (ediff-setup-windows-plain-compare)
(ediff-setup-windows-multiframe-compare): Fix three windows
layouts produced by ediff3 when 'window-combination-resize'
was customized to t and 'even-window-sizes' to nil.
Eli Zaretskii [Tue, 17 Aug 2021 18:29:58 +0000 (21:29 +0300)]
Another fix for quitting while displaying non-selected windows
* src/xdisp.c (handle_face_prop, extend_face_to_end_of_line):
Inhibit quitting around the call to face_at_pos, to prevent
leaking wrong value of point when the user quits while we
redisplay a non-selected window. (Bug#44448)
Eli Zaretskii [Tue, 17 Aug 2021 12:31:53 +0000 (15:31 +0300)]
Fix TTY display performance degradation due to many markers
* src/coding.c (encode_coding_object): Don't assume that
src_object == dst_object means src_object is the current buffer.
Add the missing commentary that explains the arguments.
(Bug#49127)
Michalis V [Tue, 17 Aug 2021 12:20:57 +0000 (14:20 +0200)]
Improve `forward-sexp' in *Help* buffers
* lisp/help-mode.el (help-mode-syntax-table): New variable (bug#39134).
(help-make-xrefs): Use it to make picking out symbols in curved
quotes work reliably.
(help-xref-on-pp): Ditto.
João Távora [Tue, 17 Aug 2021 11:48:37 +0000 (12:48 +0100)]
Jump to first,last completion with M-<, M-> in icomplete-vertical-mode
Fixes: bug#49005 Co-authored-by: Simon Lang <simon.lang@outlook.com>
* lisp/icomplete.el (icomplete-backward-completions): Return
non-nil iff something was stepped. Ajust docstring.
(icomplete-forward-completions): Adjust docstring.
(icomplete-vertical-goto-first, icomplete-vertical-goto-last): New commands.
(icomplete-vertical-mode-minibuffer-map): Bind new commands to M-< and M->.
* src/buffer.c (overlays_in): Treat the end of the buffer and the
end of the narrowed-to buffer the same (bug#19422).
(Foverlays_in): Adjust doc string.
Minor clarification for define-minor-mode :variable
* lisp/emacs-lisp/easy-mmode.el (define-minor-mode):
* doc/lispref/modes.texi (Defining Minor Modes): Clarify what the
setter function should do (bug#14875).
* lisp/textmodes/tex-mode.el (tex--prettify-symbols-alist): Remove
prettified version of `\par'. Many fonts don't display anything for
the character it was mapped to (#x2029 PARAGRAPH SEPARATOR), so
enabling prettification makes every `\par' disappear (bug#50073).
Dmitry Gutov [Mon, 16 Aug 2021 00:13:30 +0000 (03:13 +0300)]
Fix regressions in the last change
* lisp/vc/vc-git.el (vc-git-register):
Use file names verbatim with 'git update-index', as it only accepts
file names, not pathspecs (bug#39452).
* lisp/vc/vc.el (vc-print-root-log):
Expand ROOTDIR, so that vc-git-print-log doesn't receive an
abbreviated name. Literal pathspecs don't work with those.
Alan Mackenzie [Sun, 15 Aug 2021 19:43:58 +0000 (19:43 +0000)]
C++ Mode: Don't confuse the pointer operator -> with the type indicating ->
This fixes bug #47468.
* lisp/progmodes/cc-engine.el (c-looking-at-inexpr-block): While searching
backwards for "->" which is a type indicating operator, disallow also commas.
Alan Mackenzie [Sun, 15 Aug 2021 18:08:25 +0000 (18:08 +0000)]
CC Mode: Fix unstable fontification of doc strings.
Also optimize a loop over several line doc-comments.
* lisp/progmodes/cc-fonts.el (c-font-lock-doc-comments): New variable
comment-mid, used as the starting point for applying c-doc-face-name in a
line comments. In block comments, apply this face not from `comment-beg' but
from `region-beg', no earlier than the start of the fontification region.
João Távora [Sun, 15 Aug 2021 12:19:59 +0000 (13:19 +0100)]
Sort by recency in flex completion style when no flexy stuff happening
Fixes: bug#49888
* minibuffer.el (completion--flex-adjust-metadata): Fall back to usual
alphanumeric, length, recency strategy if no minibuffer input. There
is still a bug indicated by the nearby FIXMEs, though.
Run execute-extended-command key binding suggestion from a timer
* lisp/simple.el (execute-extended-command): Run the key binding
suggestion from a timer instead of in the program flow -- this
allows `post-command-hook' to be executed immediately (bug#50042).
Eli Zaretskii [Sun, 15 Aug 2021 11:11:23 +0000 (14:11 +0300)]
Fix unwarranted point movement after C-g
When the same buffer is displayed in more than one window,
redisplay temporarily moves point to the window-point when it
works on non-selected windows. If we allow C-g to quit out of
redisplay_window in this situation, point will appear to have
moved to the window-point of that non-selected window, which is
unwarranted. These changes prevent quitting in strategic places,
so that we never quit out of redisplay_window.
* src/xdisp.c (run_window_scroll_functions):
Prevent quitting while running window-scroll-functions, so that we
don't quit out of redisplay_window with temporarily moved point.
(redisplay_window): While redisplaying the mode line, prevent
quitting, to avoid exiting while point is temporarily moved.
(decode_mode_spec): Use safe_call1 instead of call1, to trap any
errors instead of letting them throw out of redisplay. (Bug#44448)
João Távora [Sun, 15 Aug 2021 08:12:23 +0000 (09:12 +0100)]
Fix bug#50063 when using icomplete-fido-kill with C-x p p
C-x p p utilizes a completion table "category" which is 'project-file'
icomplete-fido-kill only functioned for 'buffer' and 'file', and
failed with a non-informative message when something else was used.
* lisp/icomplete.el (icomplete-fido-kill): Support 'project-file'
class. Use cl-case, instead of pcase.
* lisp/emacs-lisp/map.el: Bump version to 3.1.
(map--merge): New merging subroutine that uses a hash table in place
of lists, for both efficiency and avoiding ambiguities (bug#49848).
(map-merge): Rewrite in terms of map--merge.
(map-merge-with): Ditto. This ensures that FUNCTION is called
whenever two keys are merged, even if they are not eql (which could
happen until now). It also makes map-merge-with consistent with
map-merge, thus achieving greater overall predictability.
* etc/NEWS: Announce this weakening of guarantees.
* test/lisp/emacs-lisp/map-tests.el (test-map-merge)
(test-map-merge-with): Don't depend on specific orderings. Test
that nil is correctly merged into a plist.
This face is intended for mark-up syntax and constructs inside text
using font-lock-doc-face; ie, documentation comments and strings in
programming modes.
* lisp/font-lock.el (font-lock-doc-markup-face): New face.
* lisp/cus-theme.el (custom-theme--listed-faces): Add it to the list.
* doc/lispref/modes.texi (Faces for Font Lock): Document it.
* etc/NEWS: Mention it.
Alan Mackenzie [Fri, 13 Aug 2021 20:58:30 +0000 (20:58 +0000)]
CC Mode: Fix a bug in yesterday's patch
* lisp/progmodes/cc-mode.el (c-before-change-check-unbalanced-strings): Check
the language has multi-line strings before calling
c-ml-string-opener-at-or-around-point.