Eric Abrahamsen [Thu, 15 Oct 2020 04:39:46 +0000 (21:39 -0700)]
New gnus-search library
This library provides a fundamental reworking of the search
functionality previously found in nnir.el. It uses class-based search
engines to interface with external searching facilities, and a parsed
search query syntax that can search multiple engines.
* lisp/gnus/gnus-search.el: New library containing search
functionality for Gnus.
* doc/misc/gnus.texi: Document.
* lisp/gnus/gnus-group.el (gnus-group-make-search-group,
gnus-group-read-ephemeral-search-group): Remove references to nnir,
change meaning of prefix argument, change values of nnselect-function
and nnselect-args.
* lisp/gnus/nnselect.el: Replace references to nnir
(nnselect-request-article): Use gnus-search functions, and search
criteria.
(nnselect-request-thread, nnselect-search-thread): Use gnus-search
thread search.
(gnus-summary-make-search-group): Switch to use gnus-search function
and arguments.
* test/lisp/gnus/search-tests.el: Tests for new functionality.
* test/lisp/net/tramp-tests.el (tramp-test14-delete-directory):
Do not run trash test for ange-ftp.
(tramp-test16-directory-files)
(tramp-test19-directory-files-and-attributes): Check COUNT argument.
Mauro Aranda [Tue, 3 Nov 2020 13:02:51 +0000 (10:02 -0300)]
Fix customizing user options of type face
* lisp/cus-edit.el (face): Move the %f escape after the tag, because
otherwise customizing a face user option doesn't work:
custom-variable-value-create thinks that everything up until the first
":" is part of the tag, and the item widget doesn't know how to handle
the %f escape.
Stefan Kangas [Tue, 3 Nov 2020 01:06:05 +0000 (02:06 +0100)]
Use lexical-binding in pcmpl-cvs.el
* lisp/pcmpl-cvs.el: Use lexical-binding.
(executable): Remove unnecessary require.
(pcmpl-cvs-binary): Remove redundant :group arg.
(pcmpl-cvs-tags): Quote function symbol as such.
Stefan Kangas [Tue, 3 Nov 2020 00:35:01 +0000 (01:35 +0100)]
Fix exiting the finder-commentary buffer
* lisp/finder.el (finder-exit): Fix exiting the finder-commentary
buffer. (Bug#44384)
(finder-buffer): New defconst.
(finder-list-keywords): Use above new defconst.
Harald Jörg [Mon, 2 Nov 2020 22:44:58 +0000 (23:44 +0100)]
cperl-mode: Skip a test for older Emacsen (preparing for ELPA)
* test/lisp/progmodes/cperl-mode-tests.el (cperl-bug37127):
Skip this test for older Emacsen. The bug has been fixed
in Emacs, but outside of CPerl mode, and therefore will not
be available for older versions via ELPA.
Reuben Thomas [Mon, 2 Nov 2020 21:37:46 +0000 (21:37 +0000)]
Fix previous code change to `ispell--call-enchant-lsmod'
* lisp/textmodes/ispell.el (ispell--call-enchant-lsmod): Restore the
use of with-current-buffer, to avoid enchant-lsmod’s output being
dumped into the current buffer.
Glenn Morris [Mon, 2 Nov 2020 17:27:40 +0000 (09:27 -0800)]
Merge from origin/emacs-27
1fc9de4b81 Improve reproducibility of generated -pkg.el files da6234e2df Make sure pixel sizes are zero when setting window size fo... 2d15296db1 Fix failure of 'emacs --daemon' on Cygwin 8abce5b0c6 CC Mode: Only recognize foo (*bar) as a function pointer w... 85d1d8d768 Fix NEWS entry for fix of Bug#44080 2443b15a91 * src/buffer.c (syms_of_buffer) <fill-column>: Improve doc...
* test/src/dired-tests.el: Removed. Tests moved to
test/lisp/dired-tests.el.
* test/lisp/dired-tests.el (dired-test-bug27899): Tag it :unstable.
(dired-test-directory-files)
(dired-test-directory-files-and-attributes): New tests.
To be backward compatible, this function must return nil when there is
a symbol at point but no documentation for it. Before this fixed it
returned the string "<symbol-name>: nil".
* lisp/progmodes/elisp-mode.el (elisp--documentation-one-liner):
Check callback actually produced non-nil doc.
* lisp/emacs-lisp/easy-mmode.el (easy-mmode--arg-docstring):
Only document the values we want to support, not the ones we
actually support.
(define-minor-mode): Partially revert to previous behaviour.
Stefan Kangas [Sun, 1 Nov 2020 21:49:12 +0000 (22:49 +0100)]
Fix mistake in Lisp conversion of describe-map-tree
* lisp/help.el (describe-map-tree): Fix mistake in conversion to Lisp
from the C function describe_map_tree; make the condition match the
now removed C code. (Bug#44360)
Juri Linkov [Sun, 1 Nov 2020 21:35:41 +0000 (23:35 +0200)]
Transient input methods bound to 'C-x \' (bug#44266)
* lisp/international/mule-cmds.el (ctl-x-map): Bind 'C-x \' to
'transient-input-method'.
(input-method-function): New defcustom.
(transient-input-method): New command.
The old texinfo domain seems to no longer be controlled by the GNU
project, starting at least as early as 2012. See also:
https://web.archive.org/web/20120410044746/http://www.texinfo.org/
Stefan Kangas [Sun, 1 Nov 2020 14:27:17 +0000 (15:27 +0100)]
Insert describe-map-tree header into original buffer
* lisp/help.el (describe-map-tree): Insert header into the original
buffer, not in standard-output.
* test/src/keymap-tests.el
(describe-buffer-bindings/header-in-current-buffer)
(describe-buffer-bindings/returns-nil): New tests.
Ref: https://debbugs.gnu.org/39149#31
* lisp/emacs-lisp/easy-mmode.el (easy-mmode--arg-docstring):
Clarify when minor modes are switched on/off when called from lisp
(bug#44341).
(define-minor-mode): Make calls from Lisp switch the mode on/off
as documented.
Mauro Aranda [Sun, 1 Nov 2020 13:10:08 +0000 (10:10 -0300)]
Fix saving a face setting with Customize
* lisp/cus-edit.el (custom-face-save): Make sure we back up into the
:shown-value property what the user has edited so far, if we are going
to recreate the custom-face widget. (Bug#44331)
* src/print.c (print_object): In case of Lisp_Int, print integers
as characters when Vinteger_output_format is Qt, and in hex format
when Vinteger_output_format is 16.
(Vinteger_output_format): New variable.
* test/src/print-tests.el (print-integer-output-format): New test.
Juri Linkov [Sat, 31 Oct 2020 19:38:26 +0000 (21:38 +0200)]
Improve goto-line in regard to narrowed buffers (bug#44294)
* lisp/simple.el (goto-line): Rewrite to first find the position
of the line where to go, then later don't widen the buffer
when the found position is still inside narrowed part of buffer.
* lisp/isearch.el (isearch-message-prefix): Warn about narrowed buffer
in case of no more matches found.
Amin Bandali [Sat, 31 Oct 2020 18:07:11 +0000 (14:07 -0400)]
Replace irc.freenode.net with chat.freenode.net
chat.freenode.net has been the preferred address for connecting to the
freenode IRC network for years now. Replace the occurrences of
irc.freenode.net with chat.freenode.net.
Modified globbing such as *.txt(W) for all world-writable files ending
in .txt apparently never worked correctly.
* lisp/eshell/em-pred.el (eshell-predicate-alist): Use correct
elisp syntax for octal constants.
(eshell-pred-file-mode): Return a boolean, not a number.
'assoc' is not side-effect-free; constprop its pure subset
Since a supplied test function can do anything, assoc is not
side-effect-free (bug#44018). However, with only two arguments it is
pure and should be optimised accordingly.
* lisp/emacs-lisp/byte-opt.el (side-effect-free-fns): Remove 'assoc'.
(byte-optimize-assoc): Constant-propagate through 2-arg assoc calls.
* test/lisp/emacs-lisp/bytecomp-tests.el
(byte-opt-testsuite-arith-data): Add test cases.
Stefan Monnier [Sat, 31 Oct 2020 13:07:53 +0000 (09:07 -0400)]
* src/xdisp.c (syms_of_xdisp) <"scroll-minibuffer-conservatively">: New var
Fix bug#44070, which causes the minibuffer display to jump upon minor edit
(redisplay_window): Obey it.
* lisp/simple.el (end-of-buffer): Obey it.
* test/src/xdisp-tests.el (xdisp-tests--in-minibuffer): New macro,
extracted from `xdisp-tests--minibuffer-resizing`.
(xdisp-tests--minibuffer-resizing): Use it.
(xdisp-tests--minibuffer-scroll): New test.
Trim and explain set of safe forms for 'unsafep' (bug#44018)
* lisp/emacs-lisp/unsafep.el:
Add comment explaining the policy for which forms can be considered
'safe' in the sense of unsafep. Remove ones that didn't make the cut:
play-sound-file (large attack surface)
catch, throw (alter program flow, inject data)
replace-regexp-in-string (execute arbitary code)
error, signal (deceptive messages)
* test/lisp/emacs-lisp/unsafep-tests.el (unsafep-tests--unsafe):
Add test cases.
* etc/NEWS: Announce the change.
Parse GDB/MI results directly instead of going via JSON (bug#44173)
Translating GDB/MI into JSON is an unnecessary and fragile detour
that made it hard to deal with octal escapes in strings correctly.
Parse GDB/MI directly instead.
* lisp/progmodes/gdb-mi.el (gdb-mi-decode-strings): Adjust doc string.
(gdb-mi-decode, gud-gdbmi-marker-filter): Remove gdb-mi-decode.
(gdb-jsonify-buffer): Remove.
(gdb-mi--parse-tuple-or-list, gdb-mi--parse-c-string)
(gdb-mi--parse-value, gdb-mi--parse-result-or-value)
(gdb-mi--parse-results, gdb-mi--fix-key, gdb-mi--extend-fullname)
(gdb-mi--c-string-from-string): New functions.
(gdb-json-read-buffer, gdb-json-string, gdb-json-partial-output):
Rename to gdb-mi--read-buffer, gdb-mi--from-string and
gdb-mi--partial-output respectively. Remove useless FIX-LIST
argument. FIX-KEY is now a symbol, not a string. All callers updated.
(gdb-tooltip-print, gdbmi-bnf-log-stream-output, gdb-internals)
(gdb-console, gdb-done-or-error, gdb-get-source-file-list)
(gdb-get-prompt, gdb-get-source-file):
Use gdb-mi--c-string-from-string instead of 'read'.
* test/lisp/progmodes/gdb-mi-tests.el: New file.
Eli Zaretskii [Sat, 31 Oct 2020 09:41:53 +0000 (11:41 +0200)]
Speed up ls-lisp
This speeds up Dired by 25% in large directories.
* lisp/ls-lisp.el (ls-lisp--time-locale): New defvar.
(ls-lisp-format-time): calculate the locale for formatting times
only once and cache the value in 'ls-lisp--time-locale'.
(Bug#44273)
Glenn Morris [Sat, 31 Oct 2020 02:20:24 +0000 (19:20 -0700)]
Improve reproducibility of generated -pkg.el files
* lisp/emacs-lisp/package.el (package-generate-description-file):
Don't include the full name of the source file in the header,
since that varies non-reproducibly according to the build directory.
https://bugs.debian.org/972861
Note that elpa.gnu.org's admin/archive-contents.el does this by hand
and already only includes the nondirectory part.