1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 18:40:39 -08:00
Commit graph

143564 commits

Author SHA1 Message Date
Mattias Engdegård
0cbcc6223a '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.
2020-10-31 14:31:43 +01:00
Eli Zaretskii
8d72075aeb Improve support for displaying Javanese script
* lisp/international/fontset.el (setup-default-fontset)
(script-representative-chars): Add Javanese entries.

* etc/HELLO: Fix the Javanese text.  See
https://omniglot.com/language/phrases/javanese.php for the
source.
2020-10-31 15:20:18 +02:00
Stefan Monnier
7103192cd2 * 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.
2020-10-31 09:07:53 -04:00
Mattias Engdegård
c3a20804a8 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.
2020-10-31 13:42:07 +01:00
Mattias Engdegård
a78c6141bc 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.
2020-10-31 13:42:07 +01:00
Eli Zaretskii
7f30bf7206 * etc/HELLO: Add Egyptian Hieroglyphs. 2020-10-31 13:02:52 +02:00
Eli Zaretskii
66ceb148c7 Support prettified display of fractional numbers
* lisp/composite.el (composition-function-table): Define an entry
for U+2044 FRACTION SLASH, for prettier display of fractional
numbers.
2020-10-31 12:40:25 +02:00
Michael Albinus
dc16c70bad Check also for "DragonFly" remote systems in Tramp
* lisp/net/tramp-sh.el (tramp-open-connection-setup-interactive-shell):
Check also for "DragonFly".
2020-10-31 11:29:06 +01:00
Eli Zaretskii
96ec034071 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)
2020-10-31 11:41:53 +02:00
Eli Zaretskii
41c4f337c8 * doc/lispref/commands.texi (Key Sequence Input): Fix indexing. 2020-10-31 10:01:44 +02:00
Jared Finder
a105db13e1 Updating docs with all special window prefix keys.
* doc/lispref/commands.texi (Key Sequence Input): Add documentation for
missing special window areas.  Explicitly call out window or frame.
2020-10-31 09:59:16 +02:00
Jared Finder
2a6337a6c4 Fix unit tests broken by changes to xt-mouse.el
* test/lisp/xt-mouse-tests.el (xt-mouse-tracking-basic)
(xt-mouse-tracking-utf-8): Update expected escape sequence.
2020-10-31 09:57:00 +02:00
Eli Zaretskii
8800d8c640 Revert "Temporarily mark two failing tests"
This reverts commit a8426f4672.
A proper fix for the test is about to be installed shortly.
2020-10-31 09:56:14 +02:00
Thien-Thi Nguyen
73bc7b543b Make hideshow.el work with Mhtml mode
Suggested by Ian Williams <norbekian9@gmail.com>.

* lisp/textmodes/mhtml-mode.el: Require ‘pcase’ when compiling.
(mhtml-forward): New func.
* lisp/progmodes/hideshow.el (hs-special-modes-alist):
Add entry for ‘mhtml-mode’.
2020-10-30 22:40:11 -04:00
João Távora
74c45a62e1 Shoosh byte-compilation warning in lisp/emacs-lisp/eldoc.el
Per bug#43609, elisp-eldoc-documentation-function is again in master,
but since it's now officially obsoleted, this backward compatibility
shim in eldoc--eval-expression-setup shouldn't unnecessarily trigger
warnings in master's code.

* lisp/emacs-lisp/eldoc.el (eldoc--eval-expression-setup): Shoosh
by-compilation warning.
2020-10-30 22:31:20 +00:00
João Távora
3758be484e Don't make ElDoc doc buffer visible in buffer list by default
Fixes: bug#44334

* lisp/emacs-lisp/eldoc.el (eldoc-doc-buffer): No longer take
INTERACTIVE arg.  Show buffer if invisible.
(eldoc--format-doc-buffer): Don't change buffer visibility.
(eldoc-display-in-buffer): Show buffer if invisible if by calling
eldoc-doc-buffer.
2020-10-30 22:31:20 +00:00
João Távora
2e1ab3e583 Bring back elisp-eldoc-documentation-function, marked obsolete
Fixes: bug#43609

It's not useful for ElDoc's eldoc-mode mechanism in Elisp, and nothing
in Emacs uses it, but it wasn't strictly marked internal, so it's best
to bring it back.

* lisp/progmodes/elisp-mode.el (elisp--documentation-one-liner):
New helper.
(elisp-eldoc-documentation-function): New function, with
obsoletion warning.
2020-10-30 22:31:20 +00:00
Stefan Monnier
7500abaa8e * lisp/simple.el (blink-matching-open): Fix bug#37127
Don't call `syntax-propertize` from within narrowing

* lisp/progmodes/cperl-mode.el (cperl-forward-re): Revert last patch,
since it is now redundant.

* test/lisp/progmodes/cperl-mode-tests.el (cperl-bug37127):
Remove unused var; fix test so it really catches the previous bug;
tweak the code to use mode-agnostic commands so it also works in `perl-mode`.
2020-10-30 18:10:06 -04:00
Michael Albinus
3f1dd62a0c Fix Bug#44289
* lisp/files.el (directory-listing-before-filename-regexp):
Support DD-MMM-YYYY format.  (Bug#44289)
2020-10-30 20:40:49 +01:00
Lars Ingebrigtsen
0d8c6df6c1 Tweak previous python-mode region fix
* lisp/progmodes/python.el (python-shell-buffer-substring): Tweak
the previous fix for bug#39398 to behave somewhat more like it
used to.
2020-10-30 16:15:42 +01:00
Lars Ingebrigtsen
bb60887b0d Revert "Adjust python tests after fix for bug#39398"
This reverts commit c6fb23873a.

The code is tweaked to be more backwards-compatible.
2020-10-30 16:10:57 +01:00
Lars Ingebrigtsen
c5611bfc42 Fix copying symbolic links in eshell
* lisp/eshell/em-unix.el (eshell-shuffle-files): Don't bug out
when copying symbolic links (bug#38577).
2020-10-30 16:07:25 +01:00
Stefan Kangas
0f1f795fc8 ; Fix typo in my last commit
* test/lisp/emacs-lisp/text-property-search-tests.el
(text-property-search--pos-test): Fix typo.
2020-10-30 14:16:25 +01:00
Dima Kogan
0836335cdf Add a new command to regenerate a hunk in diff-mode
* lisp/vc/diff-mode.el (diff-refresh-hunk): New function (bug#44312).
(diff-mode-map): Bind C-c C-l.
2020-10-30 14:04:06 +01:00
Lars Ingebrigtsen
32c5f1c7a8 Fix fontifying of ::= in Makefiles
* lisp/progmodes/make-mode.el (makefile-match-dependency): Don't
fontify the POSIX immediate assignment operator ::= as a
dependency (bug#44319).
2020-10-30 13:50:49 +01:00
Harald Jörg
101a3b7830 Suppress a misleading message when closing a paren in a regex
* lisp/progmodes/cperl-mode.el (cperl-forward-re): Suppress an
error message about "End of string/RE not found" when we are
at the end of a narrowed buffer where the end of a RE is
temporarily unavailable (Bug#37127).

* test/lisp/progmodes/cperl-mode-tests.el (cperl-bug37127):
Add a test to verify that the message is suppressed when
inappropriate, but appears when the RE *is* incomplete.
2020-10-30 13:24:01 +01:00
Stefan Kangas
b295174210 Clarify point position after text-property-search
* lisp/emacs-lisp/text-property-search.el
(text-property-search-forward, text-property-search-backward): Doc fix
to clarify placement of point after search.
* test/lisp/emacs-lisp/text-property-search-tests.el
(text-property-search--pos-test): New defun.
(text-property-search-forward-point-at-beginning)
(text-property-search-backward-point-at-end): New test.
2020-10-30 13:23:31 +01:00
Lars Ingebrigtsen
daa21fb895 Tweak the gdb-mi error message
* lisp/progmodes/gdb-mi.el (gdb--check-interpreter): Make the
error message less misleading (bug#40279).
2020-10-30 13:18:47 +01:00
Neil Roberts
f018cffca0 Use nobreak-space on all non-ASCII whitespace characters
* doc/emacs/display.texi (Text Display): Document it.

* src/xdisp.c (get_next_display_element): Use blankp to test whether
to use the nobreak_space face (bug#44236).
2020-10-30 13:13:31 +01:00
Lars Ingebrigtsen
02ecbf58e4 Make list-timers do sub-second times
* lisp/emacs-lisp/timer-list.el (list-timers): Do sub-second times
(bug#39956).
2020-10-30 12:10:53 +01:00
Lars Ingebrigtsen
617f70bc7d `format-time' can now do sub-second times
* doc/lispref/os.texi (Time Parsing): Document it.

* lisp/calendar/time-date.el (format-seconds): Allow formatting
sub-second times.
2020-10-30 12:10:53 +01:00
Stefan Kangas
ff3838ecc3 ; Remove spurious FIXMEs in my last commit 2020-10-30 11:41:47 +01:00
Stefan Kangas
122ace858b Add shortdoc navigation commands
* lisp/emacs-lisp/shortdoc.el (text-property-search): Require.
(shortdoc-mode): New major mode.
(shortdoc-mode-map): New variable.
(shortdoc--goto-section): New macro.
(shortdoc-next, shortdoc-previous, shortdoc-next-section)
(shortdoc-previous-section): New commands.
(shortdoc-display-group): Use new shortdoc-models.  Propertize
section header.
(shortdoc--display-function): Propertize function header.
2020-10-30 11:40:43 +01:00
Hugh Daschbach
4f6b7a0149 * test/lisp/net/dbus-tests.el (dbus-test09-get-managed-objects): Expand test. 2020-10-30 08:59:11 +01:00
Stefan Monnier
3e63213a1f * lisp/mail/binhex.el (binhex-char-int): Add missing release 2020-10-29 22:40:03 -04:00
Basil L. Contovounesios
e9af1ed44e Remove Debbugs 'thanks' from submit-emacs-patch
* lisp/mail/emacsbug.el (submit-emacs-patch): Remove unneeded
'thanks' following Debbugs pseudo-header, which leaves other
pseudo-headers entered by the user unprocessed (bug#44322).
2020-10-30 00:05:10 +00:00
Basil L. Contovounesios
d7a2d7250d Modify only local send hook in submit-emacs-patch
* lisp/mail/emacsbug.el (submit-emacs-patch): Don't modify global
message-send-hook.
2020-10-29 23:33:29 +00:00
Harald Jörg
96e371b44a cperl-mode: Make timeout test more robust
* test/lisp/progmodes/cperl-mode-tests.el
(cperl-mode-test-bug-10483): Increase the timeout to 2 seconds
and mark the test as expensive.  Also, suppress it for Emacs
versions below 28, where the test times out though the function
works in manual tests.  (Bug#44317)
2020-10-29 22:44:47 +01:00
Basil L. Contovounesios
a6cb425240 Simplify some bibtex.el variable definitions
* lisp/textmodes/bibtex.el (bibtex-include-OPTkey)
(bibtex-user-optional-fields, bibtex-BibTeX-entry-alist)
(bibtex-biblatex-entry-alist, bibtex-generate-url-list): Use :risky
tag instead of risky-local-variable property.

(bibtex-entry-format, bibtex-maintain-sorted-entries)
(bibtex-sort-entry-class, bibtex-dialect)
(bibtex-autokey-name-case-convert-function): Use :safe tag instead
of safe-local-variable property.

(bibtex-autokey-name-case-convert-function): Let custom function
default to 'identity', not 'ignore'.

(bibtex-strings, bibtex-reference-keys): Define with defvar-local
instead of defvar+make-variable-buffer-local.
2020-10-29 20:42:31 +00:00
Stefan Kangas
020a334992 * lisp/reposition.el: Use lexical-binding. 2020-10-29 19:21:15 +01:00
Stefan Monnier
7b02d9ba48 * lisp/progmodes/tcl.el: Better match Tcl string formation rules (bug#39277)
(tcl--word-delimiters): New const.
(tcl--syntax-of-quote): New function.
(tcl-syntax-propertize-function): Use them.
(tcl-mode): Enable `syntax-propertize-multiline`.

* test/manual/indent/tcl.tcl: New file.
2020-10-29 13:38:59 -04:00
Michael Albinus
372739b406 Handle several children of PATH in dbus-managed-objects-handler
* lisp/net/dbus.el (dbus-managed-objects-handler): Handle several
children of PATH.  (Bug#44298)

* src/dbusbind.c (xd_signature, xd_append_arg): Check object path.

* test/lisp/net/dbus-tests.el (dbus-test09-get-managed-objects):
Tag it :expensive-test.  Remove superfluous check.
2020-10-29 16:56:40 +01:00
Michael Albinus
f5e080fb1f Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs 2020-10-29 16:55:12 +01:00
Stefan Kangas
be59466be7 Fix CUA Mode menu entry to be less confusing
Note that the old text was incorrect; shift-selection is controlled by
the variable shift-select-mode.

* lisp/menu-bar.el (menu-bar-options-menu): Make CUA Mode menu entry
less confusing when cua-enable-cua-keys is nil.  (Bug#43322)
2020-10-29 15:50:21 +01:00
Lars Ingebrigtsen
ada9b7c9ce Tweak previous article-treat-ansi-sequences fix
* lisp/gnus/gnus-art.el (article-treat-ansi-sequences): Redo the
previous fix to avoid a compilation warning (bug#44299).
2020-10-29 12:38:13 +01:00
Hugh Daschbach
1fb85fb138 * test/lisp/net/dbus-tests.el (dbus-test09-get-managed-objects): New test. 2020-10-29 12:16:45 +01:00
Andreas Schwab
8cd0ce9b85 Don't spill ansi-color across parts in articles
* lisp/gnus/gnus-art.el (article-treat-ansi-sequences): Reset
ansi-color-context-region.  (Bug#44299)
2020-10-29 10:21:17 +01:00
Juri Linkov
eae31b01a2 * lisp/bindings.el (narrow-map): Bind C-x n g to goto-line-relative (bug#9917) 2020-10-29 11:18:33 +02:00
Juri Linkov
46b3db5579 Widen buffer before going to point found by xref-find-definitions (bug#44294)
* lisp/progmodes/elisp-mode.el (xref-location-marker): Widen before going
to the found position.

* lisp/progmodes/etags.el (etags-goto-tag-location): Rerun after removing
narrowing.

* lisp/simple.el (goto-line-read-args): Use buffer-narrowed-p.
2020-10-29 11:09:20 +02:00
Mattias Engdegård
bb3d13ac35 ; * lisp/emacs-lisp/shortdoc.el (regexp): less contrived rx example 2020-10-28 15:05:35 +01:00