]> git.eshelyaron.com Git - emacs.git/log
emacs.git
5 years agoUse input-decode-map in the manuals
Lars Ingebrigtsen [Wed, 24 Jul 2019 12:37:28 +0000 (14:37 +0200)]
Use input-decode-map in the manuals

* doc/misc/edt.texi (Changes):
* doc/emacs/custom.texi (Terminal Init): Use input-decode-map
instead of local-function-key-map, according to Stefan Monnier.

5 years agoUse destructuring in filenotify backend handlers
Mattias Engdegård [Sat, 20 Jul 2019 17:45:51 +0000 (19:45 +0200)]
Use destructuring in filenotify backend handlers

* lisp/filenotify.el (file-notify--callback-inotify)
(file-notify--callback-kqueue, file-notify--callback-w32notify)
(file-notify--callback-gfilenotify, file-notify--callback): Use cl-defun.

5 years agoUse defstruct instead of list for filenotify pending-rename
Mattias Engdegård [Sat, 8 Jun 2019 17:58:41 +0000 (19:58 +0200)]
Use defstruct instead of list for filenotify pending-rename

* lisp/filenotify.el (file-notify--rename): New defstruct.
(file-notify--pending-rename): Changed type.
(file-notify--handle-event): Adapt to new type.

5 years agoRefactor the callback half of filenotify.el
Mattias Engdegård [Sun, 19 May 2019 09:45:38 +0000 (11:45 +0200)]
Refactor the callback half of filenotify.el

Split callback code into backend-specific and general parts.  Refactor
pending event, which is always a rename, to include relevant
information only.  General clean-up.

* lisp/filenotify.el (file-notify--pending-event): Rename.
(file-notify--event-watched-file, file-notify--event-file-name)
(file-notify--event-file1-name, file-notify--event-cookie): Remove.
(file-notify--rename, file-notify--expand-file-name)
(file-notify--callback-inotify, file-notify--callback-kqueue)
(file-notify--callback-w32notify, file-notify--callback-gfilenotify)
(file-notify--call-handler, file-notify--handle-event): New.
(file-notify-callback): Split general parts into
file-notify--call-handler and file-notify--handle-event.
(file-notify--add-watch-inotify, file-notify--add-watch-kqueue)
(file-notify--add-watch-w32notify)
(file-notify--add-watch-gfilenotify): Use new callbacks.

5 years agoDon't use internal filenotify function in test
Mattias Engdegård [Sun, 19 May 2019 15:57:19 +0000 (17:57 +0200)]
Don't use internal filenotify function in test

* test/lisp/filenotify-tests.el
(file-notify--test-file, file-notify--test-add-watch): New.
(file-notify--test-event-test, file-notify--test-event-handler)
(file-notify-test02-rm-watch, file-notify-test03-events)
(file-notify-test05-file-validity, file-notify-test07-many-events)
(file-notify-test08-backup, file-notify-test09-watched-file-in-watched-dir):
Avoid using the internal `file-notify--event-watched-file' so that it
can be removed from filenotify.el.
Instead, pass the file name to the callback as an extra argument;
use `file-notify--test-add-watch' instead of `file-notify-add-watch'.

5 years agoLocal definitions of accessors only used in test
Mattias Engdegård [Sun, 19 May 2019 14:06:20 +0000 (16:06 +0200)]
Local definitions of accessors only used in test

* test/lisp/filenotify-tests.el (file-notify--test-event-file)
(file-notify--test-event-file1, file-notify--test-event-test)
(file-notify--test-event-handler):
Define accessors locally, so that they can be removed from filenotify.el.

5 years agosoap-client: Do not double-encode duplicate types
Thomas Fitzsimmons [Wed, 24 Jul 2019 08:56:59 +0000 (04:56 -0400)]
soap-client: Do not double-encode duplicate types

* lisp/net/soap-client.el (soap-encode-xs-complex-type): Eliminate
duplicates from type hierarchy before encoding values.

5 years agosoap-client: Encode simple type attributes
Thomas Fitzsimmons [Wed, 24 Jul 2019 08:54:31 +0000 (04:54 -0400)]
soap-client: Encode simple type attributes

* lisp/net/soap-client.el (soap-encode-xs-simple-type-attributes):
Encode simple type attributes.

5 years agosoap-client: Allow attributes and a value
Thomas Fitzsimmons [Wed, 24 Jul 2019 08:45:07 +0000 (04:45 -0400)]
soap-client: Allow attributes and a value

* lisp/net/soap-client.el (soap-encode-xs-basic-type): Allow
attributes and a value to be specified in the same element.

5 years ago* lisp/gnus/gnus-cus.el (gnus-extra-group-parameters): Allow nil
Andreas Schwab [Wed, 24 Jul 2019 07:33:45 +0000 (09:33 +0200)]
* lisp/gnus/gnus-cus.el (gnus-extra-group-parameters): Allow nil
for modseq.

5 years agoCustomizable char-fold with char-fold-symmetric, char-fold-include (bug#35689)
Juri Linkov [Tue, 23 Jul 2019 20:27:28 +0000 (23:27 +0300)]
Customizable char-fold with char-fold-symmetric, char-fold-include (bug#35689)

* doc/emacs/search.texi (Lax Search): Document
char-fold-symmetric, char-fold-include, char-fold-exclude.

* lisp/char-fold.el (char-fold--default-include)
(char-fold--default-exclude, char-fold--default-symmetric)
(char-fold--previous): New defconsts.
(char-fold-include, char-fold-exclude, char-fold-symmetric):
New defcustoms.
(char-fold-make-table): Use them.
(char-fold-update-table): New function called at top-level.

* test/lisp/char-fold-tests.el (char-fold--test-no-match-exactly)
(char-fold--permutation): New functions.
(char-fold--test-without-customization)
(char-fold--test-with-customization): New tests.

5 years agoMerge pdumper.c and alloc.c builtin symbol tests
Paul Eggert [Tue, 23 Jul 2019 18:18:16 +0000 (11:18 -0700)]
Merge pdumper.c and alloc.c builtin symbol tests

* src/alloc.c (c_symbol_p): Move from here ...
* src/lisp.h (c_symbol_p): ... to here, and make it more portable
to hypothetical platforms where pointers are wider than ptrdiff_t.
* src/pdumper.c (dump_builtin_symbol_p): Use c_symbol_p.

5 years agoMake "Compiling" in the mode line a clickable command
Lars Ingebrigtsen [Tue, 23 Jul 2019 17:49:48 +0000 (19:49 +0200)]
Make "Compiling" in the mode line a clickable command

* lisp/progmodes/compile.el (compilation-goto-in-progress-buffer):
New command.
(compilation-in-progress): Don't put the in-progress mode-line
marker among the minor modes (because it's not a minor mode), and
add a command that allows you to switch to the in-progress
compilation buffer (bug#27252).

5 years agoFollow decomposition chains when constructing char-fold-table
Robert Pluim [Mon, 22 Jul 2019 18:27:59 +0000 (20:27 +0200)]
Follow decomposition chains when constructing char-fold-table

* lisp/char-fold.el (char-fold-make-table): Decompose the
decomposition of each character, adding equivalences to the original
character, until no more decompositions are left.

5 years agoRefer to local-function-key-map in various manuals
Lars Ingebrigtsen [Tue, 23 Jul 2019 17:15:10 +0000 (19:15 +0200)]
Refer to local-function-key-map in various manuals

* doc/misc/viper.texi (Key Bindings):
* doc/misc/efaq.texi (X key translations for Emacs)
(No Escape key):
* doc/misc/edt.texi (Changes):
* doc/emacs/msdos-xtra.texi (MS-DOS Keyboard):
* doc/emacs/custom.texi (Terminal Init): Refer to
local-function-key-map instead of function-key-map, since the
latter isn't supposed to be changed (bug#27490).

5 years agoImprove pdumper doc; say unexec is deprecated
Paul Eggert [Tue, 23 Jul 2019 16:19:09 +0000 (09:19 -0700)]
Improve pdumper doc; say unexec is deprecated

Say that pdumping cannot redump unless -batch is used.  Say that
the traditional unexec dumping method is by default not available,
and is deprecated.  Don't call dump files "portable", as dump files
are not any more portable than the Emacs executables themselves.
Just call them "dump files".  Similar, prefer "portable dumper"
(since the dumper code is portable) to "portable dumping" (since
the dump file is not).  Be more systematic about calling them
"dump files" instead of "dumped images" or whatnot.

5 years ago* src/fns.c (hashfn_user_defined): Make sure we always return a fixnum.
Stefan Monnier [Tue, 23 Jul 2019 12:29:21 +0000 (08:29 -0400)]
* src/fns.c (hashfn_user_defined): Make sure we always return a fixnum.

5 years agoFix problems in CC Mode with " being entered into a comment at EOB.
Alan Mackenzie [Tue, 23 Jul 2019 09:55:49 +0000 (09:55 +0000)]
Fix problems in CC Mode with " being entered into a comment at EOB.

* lisp/progmodes/cc-engine.el (c-full-lit-near-cache): Amend the definition
such that an element's END element will be nil if the pertinent literal is
open at EOB.
(c-full-pp-to-literal): Before setting the aforementioned END element, check
that we're no longer in a literal.  (c-literal-limits): When
c-full-pp-to-literal returns a list with a nil END element, replace this by
(point-max) to keep the interface of c-literal-limits unchanged.

* lisp/progmodes/cc-mode.el (c-after-change-mark-abnormal-strings): Having
found a string quote, check it is not inside an unterminated comment (i.e. one
at EOB).

5 years agoSupport "%x" etc. formats on more floats
Paul Eggert [Tue, 23 Jul 2019 08:42:32 +0000 (01:42 -0700)]
Support "%x" etc. formats on more floats

* doc/lispref/strings.texi (Formatting Strings): Document this.
* src/editfns.c (styled_format): Support %o, %x, and %X on
finite floats less than zero or greater than UINTMAX_MAX.
* test/src/editfns-tests.el (format-%x-large-float)
(read-large-integer, format-%o-negative-float):
Adjust tests to match extended behavior.
Rename the latter test from format-%o-invalid-float,
since the float is no longer invalid.

* test/src/editfns-tests.el (format-%x-large-float)
(read-large-integer): Test this.

5 years agoTweak performance of cmpfn_profiler
Paul Eggert [Tue, 23 Jul 2019 05:09:05 +0000 (22:09 -0700)]
Tweak performance of cmpfn_profiler

* src/profiler.c (cmpfn_profiler):
Improve performance when VECTORP (bt1) && EQ (bt1, bt2).

5 years agoAvoid overexposing fixnums for hash codes
Paul Eggert [Tue, 23 Jul 2019 04:27:33 +0000 (21:27 -0700)]
Avoid overexposing fixnums for hash codes

Following a suggestion by Stefan Monnier in:
https://lists.gnu.org/r/emacs-devel/2019-07/msg00530.html
* doc/lispref/hash.texi (Creating Hash, Defining Hash):
* src/fns.c (Fsxhash_eq, Fsxhash_eql, Fsxhash_equal, Fmake_hash_table):
Don’t insist that hash codes be fixnums, reverting
the recent doc changes to the contrary.
* src/bytecode.c (exec_byte_code): Special-case only the eq case,
as the others aren’t worth tuning now that we treat bignum hashes
like fixnums.
* src/fns.c (hashfn_user_defined): If the hash code is a bignum,
reduce its hash down to a fixnum.

5 years agoDocument normal usage in ibuffer.el
Stefan Kangas [Sun, 30 Jun 2019 06:31:21 +0000 (08:31 +0200)]
Document normal usage in ibuffer.el

* lisp/ibuffer.el (Commentary): Document normal usage.  (Bug#5608)
Remove redundant :group args.

5 years agoDo not pdump user-defined hashtabs
Paul Eggert [Tue, 23 Jul 2019 01:33:39 +0000 (18:33 -0700)]
Do not pdump user-defined hashtabs

* src/pdumper.c (dump_hash_table_stable_p):
Signal an error if a hash table has user-defined tests (Bug#36769).
* src/fns.c (hashfn_user_defined): Now extern.

5 years agoKeep track of consing while GC’s inhibited
Paul Eggert [Tue, 23 Jul 2019 01:05:31 +0000 (18:05 -0700)]
Keep track of consing while GC’s inhibited

* src/alloc.c (allow_garbage_collection): Do not discard the count
of consing that occurred while GC was inhibited.
Problem and initial fix reported by Pip Cet in:
https://lists.gnu.org/r/emacs-devel/2019-07/msg00523.html

5 years agoAvoid byte compiler warning for subr.el
Pip Cet [Mon, 22 Jul 2019 20:09:42 +0000 (20:09 +0000)]
Avoid byte compiler warning for subr.el

* lisp/subr.el (number-sequence): Simplify to avoid byte compiler warning.

5 years agoRemove no-longer-needed integer overflow code
Paul Eggert [Mon, 22 Jul 2019 23:26:27 +0000 (16:26 -0700)]
Remove no-longer-needed integer overflow code

* lisp/calculator.el (calculator-number-to-string):
Use truncate, not calculator-truncate, since integer
overflow cannot occur here.
* lisp/calendar/cal-persia.el (calendar-persian-year-from-absolute):
* lisp/gnus/gnus-agent.el (gnus-agent-read-article-number):
* lisp/gnus/nnmaildir.el (nnmaildir--group-maxnum)
(nnmaildir--new-number):
* lisp/scroll-bar.el (scroll-bar-scale):
* lisp/simple.el (beginning-of-buffer, end-of-buffer):
Simplify, now that integer overflow cannot occur.

5 years agoAdjust regexp for parsing IMAP header response
Eric Abrahamsen [Mon, 22 Jul 2019 17:00:06 +0000 (10:00 -0700)]
Adjust regexp for parsing IMAP header response

* lisp/gnus/nnimap.el (nnimap-transform-headers): The first header
might have no value, or a continuation header might start with a
newline.

5 years ago* lisp/progmodes/opascal.el: Tweak code to ease edebugging
Stefan Monnier [Mon, 22 Jul 2019 19:41:17 +0000 (15:41 -0400)]
* lisp/progmodes/opascal.el: Tweak code to ease edebugging

(opascal-strings): Inline in its sole use.
(opascal-save-excursion): Add Edebug spec.
(opascal-is): Remove.  Use `memq` directly instead.
(opascal--in): New pcase pattern.
(opascal-literal-end-pattern): Remove unused function.
(opascal--scan-non-whitespace-backward): New macro.
(opascal-block-start, opascal-else-start, opascal-is-use-clause-end)
(opascal-previous-indent-of, opascal-section-indent-of)
(opascal-enclosing-indent-of): Use it.
(opascal-corrected-indentation): Presume we're already at first token.
(opascal-indent-line): Use indent-line-to.
(opascal-new-comment-line): Declare obsolete.
(opascal-mode-map): Keep the default M-j binding instead.

5 years agoFix case of IMAP Noselect flag
Eric Abrahamsen [Mon, 22 Jul 2019 17:56:34 +0000 (10:56 -0700)]
Fix case of IMAP Noselect flag

* lisp/gnus/nnimap.el (nnimap-get-groups): We should be looking for
%Noselect, not %NoSelect.

5 years agoRemove some obsolete integer overflow handling
Mattias Engdegård [Mon, 22 Jul 2019 11:45:40 +0000 (13:45 +0200)]
Remove some obsolete integer overflow handling

* lisp/subr.el (number-sequence):
* lisp/org/org-gnus.el (org-gnus-follow-link):
* lisp/ls-lisp.el (ls-lisp-insert-directory):
Remove dead code guarding against integer overflow.

5 years ago* lisp/progmodes/opascal.el: Allow inline `var` decl in `for` (bug#36348)
Stefan Monnier [Mon, 22 Jul 2019 17:10:35 +0000 (13:10 -0400)]
* lisp/progmodes/opascal.el: Allow inline `var` decl in `for` (bug#36348)

(opascal-enclosing-indent-of): Ignore decls "neutered" by delimiter.

5 years agoMake tramp test regexp more robust
Mattias Engdegård [Sat, 20 Jul 2019 17:16:38 +0000 (19:16 +0200)]
Make tramp test regexp more robust

* test/lisp/net/tramp-tests.el (tramp-test17-insert-directory):
Match a greater variety of human-readable size values.

5 years agoSupport history files in remote shells (Bug#36742)
Michael Albinus [Mon, 22 Jul 2019 11:04:14 +0000 (13:04 +0200)]
Support history files in remote shells (Bug#36742)

* doc/emacs/misc.texi (Shell Ring): Mention history file for
remote shells.

* lisp/shell.el (shell--start-prog): New buffer-local variable.
(shell): Set it.
(shell-mode): Handle history file for remote shells. (Bug#36742)

5 years agoHandle persistence of windows' scroll bar and fringes settings (Bug#36193)
Martin Rudalics [Mon, 22 Jul 2019 07:19:18 +0000 (09:19 +0200)]
Handle persistence of windows' scroll bar and fringes settings (Bug#36193)

* doc/lispref/display.texi (Fringe Size/Pos): Document new
argument PERSISTENT of 'set-window-fringes'.
(Scroll Bars): Document new argument PERSISTENT of
'set-window-scroll-bars'.  Mention that HORIZONTAL-TYPE must
be 'bottom' to show a horizontal scroll bar on mini windows.
* lisp/window.el (window-min-pixel-height): For mini windows the
minimum height is one line.
(window--min-size-1): Use value returned by
'window-min-pixel-height' when dealing with mini windows.
(window--resize-mini-window): Try to handle horizontal scroll
bars and size restrictions more accurately.
(window--state-put-2): Handle persistence of scroll bar
settings.
* src/frame.c (make_frame): Allow horizontal scroll bars in
mini windows.
(adjust_frame_size): Drop PIXELWISE argument in
'resize_frame_windows' calls.
* src/window.c (set_window_buffer): Don't override WINDOW's
scroll bar and fringe settings when marked as persistent.
(resize_frame_windows): Drop fourth argument PIXELWISE - SIZE
is always specified in terms of pixels.  Try to handle height
of mini windows more accurately.
(grow_mini_window, shrink_mini_window): Use body height of
mini window when calculating expected height change.  Take
horizontal scroll bars into account.
(struct saved_window): Two new members to handle persistence
of window fringes and scroll bars.
(Fset_window_configuration, save_window_save): Handle
persistence of fringes and scroll bars.
(set_window_fringes, set_window_scroll_bars): New arguments
PERSISTENT.  Make dimension checks more accurate.
(Fset_window_fringes): New argument PERSISTENT.
(Fwindow_fringes, Fwindow_scroll_bars): Add PERSISTENT to
return values.
(Fset_window_scroll_bars): New argument PERSISTENT.  In
doc-string mention that 'bottom' must be specified to get a
horizontal scroll bar in mini windows.
(compare_window_configurations): Add checks for persistence of
fringes and scroll bars.
* src/window.h (struct window): New boolean slots
'fringes_persistent' and 'scroll_bars_persistent'.
(WINDOW_HAS_HORIZONTAL_SCROLL_BAR): Allow horizontal scroll bars
for mini windows.
(resize_frame_windows): Remove fourth argument of
'resize_frame_windows' in external declaration.
* src/xdisp.c (resize_mini_window): Use box text height to
tell whether mini window height changed.
(set_horizontal_scroll_bar): Set mini window's horizontal
scroll bar when its type is specified as 'bottom'.
* etc/NEWS: Mention new options for 'set-window-fringes' and
'set-window-scroll-bars'.

5 years agoImplement C++ Mode attributes. This fixes bug #36650.
Alan Mackenzie [Sun, 21 Jul 2019 21:08:03 +0000 (21:08 +0000)]
Implement C++ Mode attributes.  This fixes bug #36650.

* lisp/progmodes/cc-engine.el (c-looking-at-c++-attribute)
(c-enclosing-c++-attribute, c-slow-enclosing-c++-attribute): New macro and
functions.
(c-crosses-statement-barrier-p): Add [ into skip-chars for C++ Mode, and use
it to detect and skip over an attribute whilst scanning forward.
(c-sws-lit-type): Use the new value 'attribute.
(c-invalidate-sws-region-before): Put a save-match-data around this function.
Detect and handle an enclosing attribute at either END or BEG.
(c-invalidate-sws-region-after): Handle C++ attributes.
(c-forward-sws, c-backward-sws): Handle C++ attributes.

* lisp/progmodes/cc-mode.el (c-fl-decl-end): Detect and handle point being
inside a C++ attribute.

5 years agoFix lifetime error in previous patch
Paul Eggert [Sun, 21 Jul 2019 19:31:51 +0000 (12:31 -0700)]
Fix lifetime error in previous patch

Problem reported by Pip Cet in:
https://lists.gnu.org/r/emacs-devel/2019-07/msg00520.html
* src/alloc.c (inhibit_garbage_collection): Use new function.
(allow_garbage_collection): Accept intmax_t, not pointer.
* src/eval.c (default_toplevel_binding, do_one_unbind)
(backtrace_eval_unrewind, Fbacktrace__locals, mark_specpdl):
Support SPECPDL_UNWIND_INTMAX.
(record_unwind_protect_excursion): New function.
* src/lisp.h (enum specbind_tag): New constant SPECPDL_UNWIND_INTMAX.
(union specbinding): New member unwind_intmax.

5 years agoSpeed up maybe_gc when GC is inhibited
Paul Eggert [Sun, 21 Jul 2019 18:20:07 +0000 (11:20 -0700)]
Speed up maybe_gc when GC is inhibited

* src/alloc.c (allow_garbage_collection)
(inhibit_garbage_collection): Temporarily bump
consing_until_gc, to improve performance of maybe_gc while
garbage collection is inhibited.  Suggested by Stefan Monnier in:
https://lists.gnu.org/r/emacs-devel/2019-07/msg00511.html

5 years agoAvoid integer overflow in hash table size
Paul Eggert [Sun, 21 Jul 2019 18:20:07 +0000 (11:20 -0700)]
Avoid integer overflow in hash table size

* src/fns.c (INDEX_SIZE_BOUND): Use a tighter bound.
(maybe_resize_hash_table): Avoid integer overflow when
checking for hash table size overflow.  Fix confusion
between INDEX_SIZE_BOUND (which is for the index vector)
and hash table size.  Fix typo in debugging message
when ENABLE_CHECKING.

5 years agoImprove doc for hash tables
Paul Eggert [Sun, 21 Jul 2019 18:20:07 +0000 (11:20 -0700)]
Improve doc for hash tables

* doc/lispref/hash.texi (Creating Hash, Defining Hash):
* src/fns.c (Fsxhash_eq, Fsxhash_eql, Fsxhash_equal):
Say that hashes are fixnums.
(Fmake_hash_table): Say that that an integer rehash-size
should be a fixnum.
* doc/lispref/hash.texi (Defining Hash): Say that hash and
comparison functions should be consistent and pure, and should
return quickly.

5 years agopure_alloc returns cleared memory
Paul Eggert [Sun, 21 Jul 2019 18:20:07 +0000 (11:20 -0700)]
pure_alloc returns cleared memory

* src/alloc.c (pure_alloc): Clear any heap-allocated storage.
This is simpler than auditing all the callers to make sure
they don’t assume pure memory is cleared memory, and the
performance implication is nonexistent except when Emacs
is misconfigured.  Also, add an assertion to catch
caller misuse when pure space is exhausted.

5 years agoMake the unflag-p parameter in dired-mark-unmarked-files work
Lars Ingebrigtsen [Sun, 21 Jul 2019 15:40:51 +0000 (17:40 +0200)]
Make the unflag-p parameter in dired-mark-unmarked-files work

* lisp/dired-x.el (dired-mark-unmarked-files): Make the unflag-p
parameter work (bug#27465).

5 years agoDon't override SSH_AUTH_SOCK in the example emacs.service file
Lars Ingebrigtsen [Sun, 21 Jul 2019 15:11:59 +0000 (17:11 +0200)]
Don't override SSH_AUTH_SOCK in the example emacs.service file

* etc/emacs.service (ExecStop): Don't override SSH_AUTH_SOCK by
default, because it varies by distribution where the socket is
(bug#27620).

5 years agoFill footnotes better on `M-q'
Lars Ingebrigtsen [Sun, 21 Jul 2019 14:43:07 +0000 (16:43 +0200)]
Fill footnotes better on `M-q'

* lisp/mail/footnote.el (footnote--fill-paragraph): New function
(bug#27775).
(footnote-mode): Use it.

5 years agoFix expand-file-name for names starting with '~'
Ken Brown [Mon, 15 Jul 2019 13:32:49 +0000 (09:32 -0400)]
Fix expand-file-name for names starting with '~'

* src/fileio.c: (file_name_absolute_no_tilde_p):
New static function.
(Fexpand_file_name): If the current buffer's default-directory
starts with "~user" where "user" is not a valid user name, don't
give the '~' a special meaning.  Just treat the value of
default-directory as a relative name.  (Bug#36502)
* test/src/fileio-tests.el
(fileio-tests--relative-default-directory): Add a test.

5 years agoFix inline-quote Edebug spec
Gemini Lasswell [Sun, 21 Jul 2019 13:40:41 +0000 (15:40 +0200)]
Fix inline-quote Edebug spec

* lisp/emacs-lisp/inline.el (inline-quote): Fix the edebug spec
(bug#31051).

5 years agoTweak recent hash-table fix
Paul Eggert [Sun, 21 Jul 2019 06:21:14 +0000 (23:21 -0700)]
Tweak recent hash-table fix

* src/fns.c (maybe_resize_hash_table): Completely initialize the
new ‘next’ vector before allocating more vectors, as this
preserves locality a bit better and it’s safer not to leave an
uninitialized Lisp object around.  Use next_size instead of
new_size to compute new index size.

5 years agoFix crash if user test munges hash table
Paul Eggert [Sun, 21 Jul 2019 02:40:03 +0000 (19:40 -0700)]
Fix crash if user test munges hash table

* src/fns.c (restore_mutability)
(hash_table_user_defined_call): New functions.
(cmpfn_user_defined, hashfn_user_defined): Use them.
(make_hash_table, copy_hash_table):
Mark new hash table as mutable.
(check_mutable_hash_table): New function.
(Fclrhash, Fputhash, Fremhash): Use it instead of CHECK_IMPURE.
* src/lisp.h (struct hash_table_test): User-defined functions
now take pointers to struct Lisp_Hash_Table, not to struct
hash_table_test.  All uses changed.
(struct Lisp_Hash_Table): New member ‘mutable’.
* src/pdumper.c (dump_hash_table): Copy it.
* test/src/fns-tests.el (test-hash-function-that-mutates-hash-table):
New test, which tests for the bug.

5 years agoSimplify hashfn/cmpfn calling convention
Paul Eggert [Sun, 21 Jul 2019 02:40:03 +0000 (19:40 -0700)]
Simplify hashfn/cmpfn calling convention

* src/fns.c (cmpfn_eql, cmpfn_equal, cmpfn_user_defined)
(hashfn_eq, hashfn_equal, hashfn_eql, hashfn_user_defined):
* src/profiler.c (cmpfn_profiler, hashfn_profiler):
Use new calling convention where the return value is a fixnum
instead of EMACS_UINT.  While we’re at it, put the hash table
at the end, since that’s a bit simpler and generates better
code (at least on the x86-64).  All callers changed.
* src/fns.c (hash_lookup): Store fixnum rather than EMACS_UINT.
All callers changed.
(hash_put): Take a fixnum rather than an EMACS_UINT.
All callers changed.  Remove unnecessary eassert (XUFIXNUM does it).
* src/lisp.h (struct hash_table_test):
Adjust signatures of cmpfn and hashfn.

5 years agoInhibit GC after inhibit_garbage_collection
Paul Eggert [Sun, 21 Jul 2019 02:40:03 +0000 (19:40 -0700)]
Inhibit GC after inhibit_garbage_collection

Without this patch, there are unlikely ways that garbage
collection could occur (sometimes causing undefined behavior)
even when inhibit_garbage_collection is in effect.
* src/alloc.c (garbage_collection_inhibited): New var.
(pure_alloc): Increment it if pure space is exhausted, so that
garbage_collect_1 no longer needs to inspect
pure_bytes_used_before_overflow.
(allow_garbage_collection): New function.
(inhibit_garbage_collection): Increment the new variable rather
than specbinding a user variable.
(garbage_collect_1): Do not garbage collect if the new variable
is set, rather than if pure_bytes_used_before_overflow is set.

5 years agoSimplify maybe_gc implementation
Paul Eggert [Sun, 21 Jul 2019 02:40:03 +0000 (19:40 -0700)]
Simplify maybe_gc implementation

* src/alloc.c (consing_until_gc): New variable, replacing the
combination of consing_since_gc and gc_relative_threshold.
All uses changed.
(byte_ct): Move decl here from lisp.h.
(memory_full_cons_threshold): New an enum constant.
(free_cons): Check for integer overflow in
statistics calculation.
* src/lisp.h (object_ct): Move decl here from alloc.c.
(OBJECT_CT_MAX): New macro.
(maybe_gc): Simplify accordingly.

5 years agoRename ‘pure’ to ‘purecopy’
Paul Eggert [Sun, 21 Jul 2019 02:40:03 +0000 (19:40 -0700)]
Rename ‘pure’ to ‘purecopy’

* src/lisp.h (struct Lisp_Hash_Table): Rename ‘pure’ member to
‘purecopy’, as the old name was quite confusing (it did not
mean the hash table was pure).  All uses changed.

5 years agoFix hash table overallocation etc.
Paul Eggert [Sun, 21 Jul 2019 02:40:02 +0000 (19:40 -0700)]
Fix hash table overallocation etc.

* src/fns.c (set_hash_key_and_value, set_hash_next)
(set_hash_hash, set_hash_index): Remove.  All uses removed.
(maybe_resize_hash_table): Don’t update h->next until it’s
known that all the allocations succeeded, to avoid trashing
the hash table if memory is exhausted.  Don’t overallocate the
other vectors.  Don’t output growth message if the hash table
didn’t actually grow due to allocation failure.  Assume C99
decls after statements.

5 years agoMerge from emacs-26
Noam Postavsky [Sun, 21 Jul 2019 02:02:36 +0000 (22:02 -0400)]
Merge from emacs-26

150bdfe43a Handle completely undecoded input in term (Bug#29918)
021f32cca1 * doc/misc/forms.texi (Control File Format): Fix a doc error.
76538d09b7 Fix typo in package-alist docstring
b2fde4b5e8 * doc/lispref/text.texi (Mode-Specific Indent): Fix a typo...
7e62778548 ; Another minor change in 'bidi-display-reordering's doc s...
4455ddbe56 Improve doc string of 'bidi-display-reordering'
34ee26dd93 Add warning to bidi-display-reordering doc string

# Conflicts:
# lisp/term.el
# test/lisp/term-tests.el

5 years agoHandle completely undecoded input in term (Bug#29918)
Noam Postavsky [Wed, 17 Jul 2019 11:20:20 +0000 (07:20 -0400)]
Handle completely undecoded input in term (Bug#29918)

* lisp/term.el (term-emulate-terminal): Avoid errors if the whole
decoded string is eight-bit characters.  Don't attempt to save the
string for next iteration in that case.
* test/lisp/term-tests.el (term-decode-partial)
(term-undecodable-input): New tests.

5 years agoUse lexical-binding in compface.el
Basil L. Contovounesios [Sat, 20 Jul 2019 17:52:59 +0000 (18:52 +0100)]
Use lexical-binding in compface.el

* lisp/image/compface.el: Use lexical-binding.  Extend Keywords
header.
(uncompface): Call call-process-region directly.

5 years ago* lisp/files.el (file-size-function): Add :version tag
Oleh Krehel [Sat, 20 Jul 2019 17:22:51 +0000 (19:22 +0200)]
* lisp/files.el (file-size-function): Add :version tag

5 years ago* test/manual/indent/octave.m (spmd): Add test for last change
Stefan Monnier [Sat, 20 Jul 2019 16:19:57 +0000 (12:19 -0400)]
* test/manual/indent/octave.m (spmd): Add test for last change

5 years ago* lisp/progmodes/octave.el (matchedrules): Add `spmd...end` (bug#36703)
Stefan Monnier [Sat, 20 Jul 2019 16:05:07 +0000 (12:05 -0400)]
* lisp/progmodes/octave.el (matchedrules): Add `spmd...end` (bug#36703)

5 years agoFix last change to format-spec
Basil L. Contovounesios [Sat, 20 Jul 2019 15:46:04 +0000 (16:46 +0100)]
Fix last change to format-spec

* doc/lispref/text.texi (Interpolated Strings): Use @result and fix
typos.
* lisp/format-spec.el: Avoid loading subr-x at runtime.
(format-spec--parse-modifiers): Optimize slightly.

5 years agoAllow counter-clockwise rotations in image-rotate
Basil L. Contovounesios [Tue, 16 Jul 2019 21:51:27 +0000 (22:51 +0100)]
Allow counter-clockwise rotations in image-rotate

* lisp/image.el (image-rotate): Extend with an optional argument
specifying the rotation in degrees (bug#35421).
* doc/lispref/display.texi (Showing Images):
* etc/NEWS: Document the change.
* test/lisp/image-tests.el (image-rotate): New test.

5 years agoMark the gnus-article-date-headers NEWS entry as documented
Lars Ingebrigtsen [Sat, 20 Jul 2019 13:03:33 +0000 (15:03 +0200)]
Mark the gnus-article-date-headers NEWS entry as documented

5 years agoEnable showing local time and lapsed time in Gnus
Adam Sjøgren [Sat, 20 Jul 2019 13:02:22 +0000 (15:02 +0200)]
Enable showing local time and lapsed time in Gnus

* lisp/gnus/gnus-art.el (article-make-date-combine-with-lapsed) factor
code out into new function, used for providing both combined-lapsed
and combined-local-lapsed.

5 years agoClean up code in nnimap-parse-flags slightly
Lars Ingebrigtsen [Thu, 18 Jul 2019 13:17:27 +0000 (15:17 +0200)]
Clean up code in nnimap-parse-flags slightly

* lisp/gnus/nnimap.el (nnimap-parse-flags): Clean up code
slightly, removing redundant checks for `end'.

5 years ago* doc/misc/forms.texi (Control File Format): Fix a doc error.
N. Jackson [Mon, 15 Jul 2019 22:22:44 +0000 (18:22 -0400)]
* doc/misc/forms.texi (Control File Format): Fix a doc error.

(Bug#36693)

Copyright-paperwork-exempt: yes

5 years agoFix last change
Eli Zaretskii [Sat, 20 Jul 2019 09:34:02 +0000 (12:34 +0300)]
Fix last change

* etc/NEWS: Call out the change in matching REGEXP.

* lisp/files.el (magic-mode-alist)
(magic-fallback-mode-alist): Doc fix.  (Bug#36401)

5 years agoMake REs in magic-(fallback-)mode-alist case-sensitive.
Benjamin Riefenstahl [Sun, 14 Jul 2019 15:09:39 +0000 (17:09 +0200)]
Make REs in magic-(fallback-)mode-alist case-sensitive.

These variables are used for well-defined file formats where relaxed
case matching is not wanted usually.

* lisp/files.el (magic-mode-alist, magic-fallback-mode-alist): Update
the doc string.
(set-auto-mode): Make looking-at for elements of magic-mode-alist and
magic-fallback-mode-alist use case-fold-search == nil.
* lisp/files.el (files-test-magic-mode-alist-re-baseline)
(files-test-magic-mode-alist-re-no-match)
(files-test-magic-mode-alist-re-case-diff): Add.

5 years agoMake finder-exit use quit-window (Bug#33610)
Stefan Kangas [Thu, 11 Jul 2019 22:43:12 +0000 (00:43 +0200)]
Make finder-exit use quit-window (Bug#33610)

* lisp/finder.el (finder-exit): Quit window instead of
deleting.  This restores previous contents of the window,
if any, that was usurped by "C-h p" to show the list of
packages.

5 years agoRemove duplicated code in octave-eldoc-function
Mauro Aranda [Mon, 8 Jul 2019 22:22:20 +0000 (19:22 -0300)]
Remove duplicated code in octave-eldoc-function

* lisp/progmodes/octave.el (octave-eldoc-function): The
test of position of the opening parenthesis in
inferior-octave-process was duplicated.  Remove one of
the tests.  (Bug#36557)

5 years ago* lisp/files.el (file-size-function): New defcustom
Oleh Krehel [Fri, 19 Jul 2019 16:55:29 +0000 (18:55 +0200)]
* lisp/files.el (file-size-function): New defcustom

5 years agoNeater free disk space formatting
Mattias Engdegård [Fri, 19 Jul 2019 09:16:46 +0000 (11:16 +0200)]
Neater free disk space formatting

* lisp/files.el (get-free-disk-space): Update doc string.
Use `iec' style and proper spacing.

5 years agoHave 'display-buffer-reuse-window' prefer window on selected frame (Bug#36680)
Martin Rudalics [Fri, 19 Jul 2019 08:08:08 +0000 (10:08 +0200)]
Have 'display-buffer-reuse-window' prefer window on selected frame (Bug#36680)

* lisp/window.el (display-buffer-reuse-window): Preferably reuse
window on selected frame (Bug#36680).
* doc/lispref/windows.texi (Buffer Display Action Functions): Say
that 'display-buffer-reuse-window' prefers window on the selected
frame.

5 years agoDon't load elec-pair in elisp-mode (Bug#36539)
Noam Postavsky [Sun, 7 Jul 2019 16:22:37 +0000 (12:22 -0400)]
Don't load elec-pair in elisp-mode (Bug#36539)

* lisp/progmodes/elisp-mode.el (emacs-lisp-set-electric-text-pairs):
New function.
(emacs-lisp-mode): Add it to electric-pair-mode-hook, if elec-pair
hasn't been loaded yet.

5 years agoUse lexical-binding in help-fns-tests.el (Bug#36585)
Stefan Kangas [Wed, 10 Jul 2019 22:34:25 +0000 (00:34 +0200)]
Use lexical-binding in help-fns-tests.el (Bug#36585)

* test/lisp/help-fns-tests.el: Use lexical-binding.  Doc fix.

5 years agoDeclare mwheel-install obsolete (Bug#36553)
Stefan Kangas [Mon, 8 Jul 2019 15:59:51 +0000 (17:59 +0200)]
Declare mwheel-install obsolete (Bug#36553)

* lisp/mwheel.el: Update `Commentary' section.
(mwheel-install): Declare obsolete in favor of mouse-wheel-mode.
* etc/NEWS: Announce it.

5 years ago* lisp/vc/vc-git.el (vc-git-log-search): Remove shell-quote-argument.
Juri Linkov [Thu, 18 Jul 2019 22:35:27 +0000 (01:35 +0300)]
* lisp/vc/vc-git.el (vc-git-log-search): Remove shell-quote-argument.

(Bug#36644)

5 years agoMerge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Michael Albinus [Thu, 18 Jul 2019 18:46:39 +0000 (20:46 +0200)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs

5 years ago; Fix last commit in tramp-sh.el
Michael Albinus [Thu, 18 Jul 2019 18:46:25 +0000 (20:46 +0200)]
; Fix last commit in tramp-sh.el

5 years agoUse lexical-binding in asm-mode.el and add tests
Simen Heggestøyl [Thu, 18 Jul 2019 18:39:47 +0000 (20:39 +0200)]
Use lexical-binding in asm-mode.el and add tests

* lisp/progmodes/asm-mode.el: Use lexical-binding.
(asm-comment-char): Remove redundant :group arg.
(asm-mode): Use `setq-local'.
(asm-calculate-indentation): Remove moot `or'.

* test/lisp/progmodes/asm-mode-tests.el: New file with tests for
asm-mode.el.

5 years agoDetermine `file-notify' handler in Tramp from `special-event-map'.
Michael Albinus [Thu, 18 Jul 2019 18:26:24 +0000 (20:26 +0200)]
Determine `file-notify' handler in Tramp from `special-event-map'.

* lisp/net/tramp-sh.el (tramp-sh-gio-monitor-process-filter)
(tramp-sh-gvfs-monitor-dir-process-filter)
(tramp-sh-inotifywait-process-filter): Determine `file-notify'
handler from `special-event-map'.

5 years ago* lisp/server.el (server-ensure-safe-dir): Revert part of b663c8372495
Stefan Monnier [Thu, 18 Jul 2019 15:10:05 +0000 (11:10 -0400)]
* lisp/server.el (server-ensure-safe-dir): Revert part of b663c8372495

A non-cosmetic change that was mistakenly included.

5 years agoUpdate a tramp test for get-free-disk-space change
Glenn Morris [Thu, 18 Jul 2019 15:03:36 +0000 (08:03 -0700)]
Update a tramp test for get-free-disk-space change

* test/lisp/net/tramp-tests.el (tramp-test17-insert-directory):
Handle optional unit suffix in free space.

5 years ago* lisp/files.el (get-free-disk-space): Use file-size-human-readable
Oleh Krehel [Thu, 18 Jul 2019 12:53:11 +0000 (14:53 +0200)]
* lisp/files.el (get-free-disk-space): Use file-size-human-readable

Since there is no longer an option to do:

    (setq directory-free-space-args "-Pmh")

5 years ago* lisp/abbrev.el (abbrev-prefix-mark): Fix a typo. (Bug#36715)
Eli Zaretskii [Thu, 18 Jul 2019 12:44:51 +0000 (15:44 +0300)]
* lisp/abbrev.el (abbrev-prefix-mark): Fix a typo.  (Bug#36715)

5 years agoFix indexing of Gnus entry in gnus-group-unsubscribe-group
Eric Abrahamsen [Thu, 18 Jul 2019 03:34:48 +0000 (20:34 -0700)]
Fix indexing of Gnus entry in gnus-group-unsubscribe-group

* lisp/gnus/gnus-group.el (gnus-group-unsubscribe-group): Hopefully
  that's the last of these.

5 years agoAdd xref-file-name-display
Stephen Leake [Wed, 17 Jul 2019 16:17:36 +0000 (09:17 -0700)]
Add xref-file-name-display

* lisp/progmodes/xref.el (xref-file-name-display): New user variable.
(xref-location-group): Use it.

* etc/NEWS: Mention it.

5 years ago* test/lisp/progmodes/cc-mode-tests.el: Add a test with /***/ in #define lines
Nick Drozd [Wed, 17 Jul 2019 14:07:26 +0000 (14:07 +0000)]
* test/lisp/progmodes/cc-mode-tests.el: Add a test with /***/ in #define lines

5 years agoFix typo in package-alist docstring
Basil L. Contovounesios [Wed, 17 Jul 2019 14:02:21 +0000 (15:02 +0100)]
Fix typo in package-alist docstring

Pointed out by Michael Heerdegen <michael_heerdegen@web.de>.
* lisp/emacs-lisp/package.el (package-alist): Fix docstring
grammar (bug#17403).

5 years ago* lisp/progmodes/cc-fonts.el (gtkdoc-font-lock-keywords): Fix faulty regexp
Alan Mackenzie [Wed, 17 Jul 2019 09:35:26 +0000 (09:35 +0000)]
* lisp/progmodes/cc-fonts.el (gtkdoc-font-lock-keywords): Fix faulty regexp

5 years agoAn electric test is now passing
Glenn Morris [Tue, 16 Jul 2019 23:04:54 +0000 (16:04 -0700)]
An electric test is now passing

* test/lisp/electric-tests.el
(electric-pair-whitespace-chomping-2-at-point-4-in-c++-mode-in-strings):
Seems to pass since today's cc-mode changes.

5 years ago* lisp/wid-edit.el: Previous change needs subr-x.
Glenn Morris [Tue, 16 Jul 2019 22:57:51 +0000 (15:57 -0700)]
* lisp/wid-edit.el: Previous change needs subr-x.

5 years agoTreat the "Link" link in gnus-summary-browse-urls specially
Sam Steingold [Tue, 16 Jul 2019 21:23:27 +0000 (17:23 -0400)]
Treat the "Link" link in gnus-summary-browse-urls specially

* lisp/gnus/gnus-sum.el (gnus-collect-urls): Make sure that
the URL labeled "Link" is the first in the return list.
(gnus-summary-browse-url): Use the 1st URL as the default.
* lisp/wid-edit.el (widget-text): New function.

5 years agoCC Mode: allow bogusly "adjacent" double quote marks to pair up syntactically
Alan Mackenzie [Tue, 16 Jul 2019 20:01:12 +0000 (20:01 +0000)]
CC Mode: allow bogusly "adjacent" double quote marks to pair up syntactically

For this introduce the text property c-fl-syn-tab to "mirror" syntax-table.

* lisp/progmodes/cc-defs.el (c-is-escaped, c-will-be-escaped, c-put-syn-tab)
(c-clear-syn-tab, c-clear-syn-tab-properties, c-with-extended-string-fences):
new macros.
(c-point): Use c-is-escaped
(c-search-forward-char-property, c-search-backward-char-property)
(c-search-forward-char-property-with-value-on-char)
(c-search-forward-char-property-without-value-on-char): Fix regexp error
involving \n.

* lisp/progmodes/cc-engine.el (c-semi-pp-to-literal): User
c-with-extended-string-fences around a parse-partial-sexp.
(c-full-get-near-cache-entry): Fix an off-by-one error.
(c-full-pp-to-literal): Avoid writing duplicate entries into a cache.
(c-after-change-unmark-raw-strings): Use c-clear-syn-tab-properties.

* lisp/progmodes/cc-mode.el (c-leave-cc-mode-mode): Clear the c-fl-syn-tab
properties, too.
(c-basic-common-init): Mark c-fl-syn-tab as a non-sticky text property.
(c-depropertize-new-text): Also handle c-fl-syn-tab.
(c-multiline-string-check-final-quote, c-parse-quotes-after-change): Use
c-is-escaped.
(c-fl-syn-tab-region): New variable.
(c-clear-string-fences, c-restore-string-fences, c-remove-string-fences): New
functions.
(c-before-change-check-unbalanced-strings)
(c-after-change-mark-abnormal-strings, c-after-change-escape-NL-in-string):
Use the new functions and macros.
(c-before-change, c-after-change, c-font-lock-fontify-region): Restore the
syntax-table text properties from c-fl-syn-tab text properties for these
functions.
(c-electric-pair-inhibit-predicate): Test the c-fl-syn-tab property rather
than syntax-table.

5 years agoFix failing secrets-test03-items
Basil L. Contovounesios [Tue, 16 Jul 2019 16:41:18 +0000 (17:41 +0100)]
Fix failing secrets-test03-items

* test/lisp/net/secrets-tests.el: Use lexical-binding.
(secrets-test03-items): Do not assume :xdg:schema attribute is
silently added to the front of the collection (bug#36694).
(secrets-test04-search, secrets-test-all): Quote function symbols as
such.

5 years agoFix calc number formatting with digit grouping (bug#36689)
Mattias Engdegård [Tue, 16 Jul 2019 15:18:32 +0000 (17:18 +0200)]
Fix calc number formatting with digit grouping (bug#36689)

The functions math-format-hex and math-format-octal were not
implemented, yet called, leading to a crash when using hex or octal
radix with digit grouping.

* test/lisp/calc/calc-tests.el (calc-test-format-radix): New test.
* lisp/calc/calc-ext.el: Don't declare non-existing functions.
(math--format-integer-fancy): Don't call non-existing functions.
* lisp/calc/calc-bin.el (math-format-binary, math-binary-digits):
Simplify, fixing 0-padding bug.

5 years agoRevert "Add support for paths to svg.el"
Lars Ingebrigtsen [Tue, 16 Jul 2019 13:44:58 +0000 (15:44 +0200)]
Revert "Add support for paths to svg.el"

This reverts commit d6bc55ae2dc98c83e58a28e380ce4bcf2ed00bb3.

Paperwork not ready for Felix Klee; will reapply once that's in place.

5 years agoRevert "* doc/lispref/display.texi (SVG Images): Add menu for subsection."
Lars Ingebrigtsen [Tue, 16 Jul 2019 13:43:57 +0000 (15:43 +0200)]
Revert "* doc/lispref/display.texi (SVG Images): Add menu for subsection."

This reverts commit e5cd597c7736b587f80c16fde1c53f904d921310.

Paperwork nod ready for the SVG Path patch.

5 years agoSet revert-buffer-function in ert-results-mode
Mattias Engdegård [Thu, 11 Jul 2019 13:22:23 +0000 (15:22 +0200)]
Set revert-buffer-function in ert-results-mode

* lisp/emacs-lisp/ert.el (ert-results-mode): Set revert-buffer-function
to re-run the same test selection.  It is a good fit and permits use of
the standard "g" key binding.

5 years agoPrevent infinite loop on entering wdired-mode
Stephen Berman [Tue, 16 Jul 2019 09:04:56 +0000 (11:04 +0200)]
Prevent infinite loop on entering wdired-mode

* lisp/wdired.el (wdired-preprocess-symlinks): Remove unneeded use
of beginning-of-line, which also triggers an infinite loop in a
find-dired buffer that doesn't end with a newline (see discussion
in bug#35609).

5 years ago* lisp/vc/vc.el (vc-log-search): New command (bug#36644).
Juri Linkov [Mon, 15 Jul 2019 22:27:19 +0000 (01:27 +0300)]
* lisp/vc/vc.el (vc-log-search): New command (bug#36644).

* lisp/vc/vc-git.el (vc-git-log-search): New function.
(vc-git-log-view-mode): Check vc-log-view-type for log-search.

5 years ago* lisp/vc/vc-dir.el (vc-dir-search): Remove lambda.
Juri Linkov [Mon, 15 Jul 2019 22:12:12 +0000 (01:12 +0300)]
* lisp/vc/vc-dir.el (vc-dir-search): Remove lambda.

(Bug#31578) Thanks to Dmitry Gutov <dgutov@yandex.ru>