]> git.eshelyaron.com Git - emacs.git/log
emacs.git
2 years ago; * etc/NEWS: Mention that order of overlays might change. (Bug#59067)
Eli Zaretskii [Thu, 10 Nov 2022 10:21:10 +0000 (12:21 +0200)]
; * etc/NEWS: Mention that order of overlays might change.  (Bug#59067)

2 years ago; * src/buffer.c (Foverlays_in): Doc fix. (Bug#59067)
Eli Zaretskii [Thu, 10 Nov 2022 10:18:18 +0000 (12:18 +0200)]
; * src/buffer.c (Foverlays_in): Doc fix.  (Bug#59067)

2 years agoAvoid dumping core upon SIGHUP in non-interactive sessions
Eli Zaretskii [Thu, 10 Nov 2022 10:12:56 +0000 (12:12 +0200)]
Avoid dumping core upon SIGHUP in non-interactive sessions

* src/emacs.c (terminate_due_to_signal): Don't special-case
SIGINT.  Patch by Paul Eggert <eggert@cs.ucla.edu>.  (Bug#58956)

2 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Thu, 10 Nov 2022 10:09:39 +0000 (12:09 +0200)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

2 years ago; * test/lisp/dired-tests.el (dired-test-bug59047): Rename.
Eli Zaretskii [Thu, 10 Nov 2022 10:08:47 +0000 (12:08 +0200)]
; * test/lisp/dired-tests.el (dired-test-bug59047): Rename.

2 years ago* lisp/progmodes/cc-mode.el (c-fl-decl-start): Fix off-by-one error.
Alan Mackenzie [Thu, 10 Nov 2022 10:06:20 +0000 (10:06 +0000)]
* lisp/progmodes/cc-mode.el (c-fl-decl-start): Fix off-by-one error.

This fixes bug #59070.

2 years agoMake 'dired-hide-details-mode' work after 'dired-hide-subdir'
Gabriel do Nascimento Ribeiro [Sat, 5 Nov 2022 11:27:50 +0000 (08:27 -0300)]
Make 'dired-hide-details-mode' work after 'dired-hide-subdir'

* lisp/dired.el (dired--unhide): Restore text properties.
(Bug#59047)

* test/lisp/dired-tests.el (dired-test-bugXXXX): New test.

2 years agoRewrite the `kill-buffer-delete-auto-save' tests (bug#59028)
Matt Armstrong [Fri, 4 Nov 2022 19:43:30 +0000 (12:43 -0700)]
Rewrite the `kill-buffer-delete-auto-save' tests (bug#59028)

These tests had been annoying to me when run in interactive mode.
They failed to bind `kill-buffer-delete-auto-save' as needed, so they
depended on the user's settings, and they failed to mock out the
"Buffer modified, save?" prompt.

* test/src/buffer-tests.el (test-kill-buffer-auto-save): New helper
function that mocks the two different kinds of prompts that occur when
killing modified buffers that visit a file.  Tests fail if expected
prompts are not issued.
(test-kill-buffer-auto-save-default): Use it, and explicitly bind
`kill-buffer-delete-auto-save' to nil.
(test-kill-buffer-auto-save-delete): Delete it.
(test-kill-buffer-auto-save-delete-yes): New test for the "yes" half
of the old `test-kill-buffer-auto-save-delete'.
(test-kill-buffer-auto-save-delete-yes): Ditto for the "no" half.

2 years agoBetter support for 'textarea' and 'select' tags in EWW
Nicolas Graner [Wed, 2 Nov 2022 21:28:45 +0000 (22:28 +0100)]
Better support for 'textarea' and 'select' tags in EWW

* lisp/net/eww.el (eww-tag-textarea, eww-tag-select): Don't miss
'textarea' and 'select' tags.  (Bug#58973)

2 years agoBe a little more paranoid about XI 2.0 implementations
Po Lu [Thu, 10 Nov 2022 05:25:28 +0000 (13:25 +0800)]
Be a little more paranoid about XI 2.0 implementations

* src/xterm.c (xi_populate_device_from_info):
(xi_disable_devices): Do not restore valuator values if the
valuator info has a mode of Relative and a value of 0.0.

2 years agoMake 't' in bs-mode be more defensive
Juanma Barranquero [Thu, 10 Nov 2022 00:31:22 +0000 (01:31 +0100)]
Make 't' in bs-mode be more defensive

* lisp/bs.el (bs-visit-tags-table): Verify that the
buffer holds a tags-table file before using it as
such. This is identical to bug#54133 affecting
Buffer-menu, and this fix is copied from the one
by Eli Zaretskii in commit 794fbd1c07 of 2022-02-24.
Thanks to Bob Rogers <rogers@rgrjr.com> for noticing.

2 years agoOptimize c-bs-interval, changing its value from 5000 to 2000
Alan Mackenzie [Wed, 9 Nov 2022 21:28:18 +0000 (21:28 +0000)]
Optimize c-bs-interval, changing its value from 5000 to 2000

* lisp/progmodes/cc-engine.el (c-bs-interval): This optimization speeds
forward scrolling in a C Mode buffer by ~2.4%, backward scrolling by ~1.8%.

2 years ago* lisp/tab-bar.el (tab-bar-auto-width): Add selected-frame to the cache key.
Juri Linkov [Wed, 9 Nov 2022 17:29:37 +0000 (19:29 +0200)]
* lisp/tab-bar.el (tab-bar-auto-width): Add selected-frame to the cache key.

2 years agoAvoid assertion violations in matrix_row
Eli Zaretskii [Wed, 9 Nov 2022 14:25:02 +0000 (16:25 +0200)]
Avoid assertion violations in matrix_row

* src/xdisp.c (cursor_in_mouse_face_p): Avoid rare assertion
violations when the cursor's VPOS winds up being invalid for the
window.  (Bug#59147)

2 years ago* lisp/thread.el (thread-list-mode-map): Prefer defvar-keymap.
Stefan Kangas [Wed, 9 Nov 2022 14:10:24 +0000 (15:10 +0100)]
* lisp/thread.el (thread-list-mode-map): Prefer defvar-keymap.

2 years agoDelete emacs < 26.2 workaround in eglot--apply-text-edits
Stephen Leake [Wed, 9 Nov 2022 14:00:40 +0000 (06:00 -0800)]
Delete emacs < 26.2 workaround in eglot--apply-text-edits

* lisp/progmodes/eglot.el (eglot--apply-text-edits): Delete emacs <
26.2 workaround; fixes bug in ada-mode test.

2 years ago; Fix typos in help.texi
Eli Zaretskii [Wed, 9 Nov 2022 13:26:42 +0000 (15:26 +0200)]
; Fix typos in help.texi

* doc/lispref/help.texi (Documentation Groups): Fix typos.
Reported by Yuan Fu <casouri@gmail.com>.  (Bug#59136)

2 years agoTeach thing-at-point to recognize bracketed IPv6 URLs
F. Jason Park [Wed, 13 Jul 2022 08:54:19 +0000 (01:54 -0700)]
Teach thing-at-point to recognize bracketed IPv6 URLs

* lisp/thingatpt.el (thing-at-point-bounds-of-url-at-point): Allow
IPv6 addresses as hosts.  Overshoots in the case of bracketed markup
but is rescued by `thing-at-point--bounds-of-well-formed-url'.
* test/lisp/thingatpt-tests.el (thing-at-point-test-data): Add cases
for IPv6 URLs.  Bug#56514.

2 years agoMake the PGTK port display a loud warning when run under X
Po Lu [Wed, 9 Nov 2022 13:04:39 +0000 (21:04 +0800)]
Make the PGTK port display a loud warning when run under X

* src/pgtkterm.c (pgtk_display_x_warning): New function.
(pgtk_term_init): Call it.

2 years ago"Fix" iconification handling on PGTK
Po Lu [Wed, 9 Nov 2022 12:41:17 +0000 (20:41 +0800)]
"Fix" iconification handling on PGTK

* src/pgtkterm.c (pgtk_iconify_frame): Write some more comments
and refrain from setting the frame as iconified here.
(map_event): Remove redundant braces.
(window_state_event): Remove useless code and manage frame
visibility as correctly as possible under Wayland while
iconified.  (bug#55836)

2 years agoAvoid use of `uint' type in XKB code
Po Lu [Wed, 9 Nov 2022 12:17:39 +0000 (20:17 +0800)]
Avoid use of `uint' type in XKB code

* src/xterm.c (x_find_modifier_meanings, handle_one_xevent): Use
`unsigned int' instead of `uint'.

2 years ago* src/lread.c (syms_of_lread): Drop unused capture group.
Mattias Engdegård [Wed, 9 Nov 2022 10:54:57 +0000 (11:54 +0100)]
* src/lread.c (syms_of_lread): Drop unused capture group.

2 years agobytecomp.el (byte-recompile-directory): Fix negated ignore logic
Nicholas Vollmer [Tue, 8 Nov 2022 00:57:34 +0000 (19:57 -0500)]
bytecomp.el (byte-recompile-directory): Fix negated ignore logic

Previous logic would only compile files which matched the
byte-compile-ignore-files regular expression.  (Bug#59115)

2 years ago* lisp/tab-bar.el (tab-bar-auto-width): Use 'frame-inner-width'.
Juri Linkov [Wed, 9 Nov 2022 08:39:51 +0000 (10:39 +0200)]
* lisp/tab-bar.el (tab-bar-auto-width): Use 'frame-inner-width'.

2 years ago* lisp/tab-bar.el (tab-bar-get-buffer-tab): Add optional arg 'all-tabs'.
Juri Linkov [Wed, 9 Nov 2022 07:45:17 +0000 (09:45 +0200)]
* lisp/tab-bar.el (tab-bar-get-buffer-tab): Add optional arg 'all-tabs'.

2 years agoEUDC: Add ecomplete and mailabbrev backends
Alexander Adolf [Tue, 8 Nov 2022 18:39:19 +0000 (13:39 -0500)]
EUDC: Add ecomplete and mailabbrev backends

* doc/misc/eudc.texi (Overview): Add ecomplete and mailabbrev
nodes.
(ecomplete, mailabbrev): New nodes.
(Installation): Add ecomplete and mailabbrev nodes.
(LDAP Configuration): Use code formatting instead of quotes.
(macOS Contacts Configuration): Likewise.
(ecomplete Configuration): New node.
(mailabbrev Configuration): Likewise.
* etc/NEWS (EUDC): Mention ecomplete and mailabbrev backends,
mention eudc-server-hotlist default change.
* lisp/net/eudc-vars.el (eudc-known-protocols): Add ecomplete and
mailabbrev.
(eudc-server-hotlist): Add entries for ecomplete and mailabbrev.
* lisp/net/eudcb-ecomplete.el: New EUDC backend file.
* lisp/net/eudcb-mailabbrev.el: Likewise.
* test/lisp/net/eudc-resources/ecompleterc,
test/lisp/net/eudc-resources/mailrc: New eudc-tests resource
files.
* test/lisp/net/eudc-tests.el (eudc-test-rfc5322-quote-phrase)
(eudc-test-make-address, eudcb-ecomplete, eudcb-mailabbrev): New
test cases.

2 years agoEUDC: Deprecate eudc-server variable
Thomas Fitzsimmons [Tue, 8 Nov 2022 18:30:17 +0000 (13:30 -0500)]
EUDC: Deprecate eudc-server variable

* lisp/net/eudc-vars.el (eudc-server): Deprecate variable for
Emacs 29.1.

2 years ago* lisp/progmodes/eglot.el (eglot--pos-to-lsp-position): Improve comment
Stephen Leake [Tue, 8 Nov 2022 17:45:26 +0000 (09:45 -0800)]
* lisp/progmodes/eglot.el (eglot--pos-to-lsp-position): Improve comment

2 years agoCC Mode: Improve accuracy of recognition of bitfields
Alan Mackenzie [Tue, 8 Nov 2022 14:55:40 +0000 (14:55 +0000)]
CC Mode: Improve accuracy of recognition of bitfields

* lisp/progmodes/cc-engine.el (c-forward-decl-or-cast-1): When we've got two
identifiers followed by a colon, additionally check for a number (or
identifier) followed by a semicolon or comma before concluding we have a
bitfield.

2 years agoDon't use @w around @xref in ede.texi
Robert Pluim [Tue, 8 Nov 2022 09:40:43 +0000 (10:40 +0100)]
Don't use @w around @xref in ede.texi

Texinfo 7 warns about this now.

* doc/misc/ede.texi (ede-project-placeholder, ede-project,
ede-cpp-root-project, ede-simple-project,ede-simple-base-project,
ede-proj-project, project-am-makefile, ede-step-project, ede-target,
ede-proj-target, ede-proj-target-makefile,
semantic-ede-proj-target-grammar, ede-proj-target-makefile-objectcode,
ede-proj-target-makefile-archive, ede-proj-target-makefile-program,
ede-proj-target-makefile-shared-object, ede-proj-target-elisp,
ede-proj-target-elisp-autoloads,
ede-proj-target-makefile-miscelaneous, ede-proj-target-makefile-info,
ede-proj-target-scheme, project-am-target, project-am-objectcode,
project-am-program, project-am-header-noinst, project-am-header-inst,
project-am-lisp, project-am-texinfo, project-am-man,
ede-compilation-program, ede-compiler, ede-object-compiler,
ede-linker): Remove @w around @xref.

2 years agoClean up some duplicate event group conversion code
Po Lu [Tue, 8 Nov 2022 11:59:47 +0000 (19:59 +0800)]
Clean up some duplicate event group conversion code

* src/xterm.c (xi_convert_event_keyboard_state): New function.
Move keyboard event state over.
(handle_one_xevent): Use it where necessary.

2 years agoCC Mode: Stabilize the fontification in the presence of "register" keywords
Alan Mackenzie [Tue, 8 Nov 2022 11:53:37 +0000 (11:53 +0000)]
CC Mode: Stabilize the fontification in the presence of "register" keywords

This fixes bug #58883.

* lisp/progmodes/cc-engine.el (c-forward-decl-or-cast-1): New variable
unsafe-maybe.  Set it in CASE 10 rather than setting c-record-type-identifiers
to nil.  Near the end of the function, when unsafe-maybe is set, bind
c-promote-possible-types to 'just-one rather than t around the call to
c-forward-type.

2 years agoEUDC: Add eudc-ignore-options-file customization
Thomas Fitzsimmons [Tue, 8 Nov 2022 00:34:33 +0000 (19:34 -0500)]
EUDC: Add eudc-ignore-options-file customization

* etc/NEWS (EUDC): Document eudc-ignore-options-file.
* doc/misc/eudc.texi (The Server Hotlist): Likewise
* lisp/net/eudc-vars.el (eudc-ignore-options-file): New variable.
(eudc-options-file): Mention new variable.
* lisp/net/eudc.el: Warn on load if eudc-ignore-options-file is
set but the options file exists.
(eudc-set-server): Support
eudc-ignore-options-file.
(eudc-bookmark-server): Likewise.
(eudc-save-options): Likewise.  (Bug#56154)

2 years ago; * lisp/tab-bar.el (tab-bar-auto-width): Remaining renaming in docstring.
Juri Linkov [Mon, 7 Nov 2022 18:05:38 +0000 (20:05 +0200)]
; * lisp/tab-bar.el (tab-bar-auto-width): Remaining renaming in docstring.

2 years ago; Improve documentation of automatic tab-bar tab resizing
Eli Zaretskii [Mon, 7 Nov 2022 13:40:33 +0000 (15:40 +0200)]
; Improve documentation of automatic tab-bar tab resizing

* etc/NEWS:
* lisp/tab-bar.el (tab-bar-auto-width): Rename from
tab-bar-fixed-width.  All similar variables changed accordingly;
all users changed.
(tab-bar-auto-width, tab-bar-auto-width-max)
(tab-bar-auto-width-min): Doc fixes.

* etc/NEWS: Resurrect the lost Local variables section.

2 years agoAdd missing SAFE_FREE on XI 2.0 servers
Po Lu [Mon, 7 Nov 2022 12:33:28 +0000 (20:33 +0800)]
Add missing SAFE_FREE on XI 2.0 servers

* src/xterm.c (xi_populate_device_from_info): Add missing
SAFE_FREE.

2 years agoCC Mode: Fix infinite loop in c-brace-stack-at.
Alan Mackenzie [Mon, 7 Nov 2022 12:20:07 +0000 (12:20 +0000)]
CC Mode: Fix infinite loop in c-brace-stack-at.

This fixes bug #59038.  The infinite loop occurred with a buffer containing
Base-64 encoded text rather than appropriate C Mode text.

* lisp/progmodes/cc-engine.el (c-update-brace-stack): Don't execute
c-beginning-of-current-token unless the previous c-syntactic-re-search-forward
has succeeded at least once.

2 years agoAvoid invalid values showing up in scroll valuators
Po Lu [Mon, 7 Nov 2022 10:05:54 +0000 (18:05 +0800)]
Avoid invalid values showing up in scroll valuators

* src/xterm.c (xi_populate_device_from_info): Reset emacs_value
when invalid_p is cleared.

2 years ago* lisp/outline.el (outline-minor-mode): Ensure margins are either 0 or 1.
Juri Linkov [Mon, 7 Nov 2022 08:14:45 +0000 (10:14 +0200)]
* lisp/outline.el (outline-minor-mode): Ensure margins are either 0 or 1.

This check is necessary to make it idempotent to multiple calls.

2 years ago(itree_insert_gap, itree_delete_gap): Minor optimization
Stefan Monnier [Mon, 7 Nov 2022 05:38:43 +0000 (00:38 -0500)]
(itree_insert_gap, itree_delete_gap): Minor optimization

`limit` can get smaller in either of the two children of a node.
It can also happen that the root node itself has a low enough limit
that the loop can be interrupted right away.

The previous code only checked `limit` when going down to a left
child, which is not wrong, but tests suggest that it is also very
common to reach this limit when going to a right child, so move the
test accordingly.

* src/itree.c (itree_insert_gap, itree_delete_gap): Check `limit` for
all nodes, rather than only when following a `left` pointer.

2 years agoMerge from origin/emacs-28
Stefan Kangas [Sun, 6 Nov 2022 22:21:01 +0000 (23:21 +0100)]
Merge from origin/emacs-28

70fb03a49a ; * doc/emacs/search.texi (Lax Search): Improve suggestion...
5779df0c5b ; * doc/lispref/searching.texi: Remove reference to Posix....
46929f6b73 ; Improve documentation of character classes in regexps

2 years agoRevert "* lisp/vc/vc-git.el (vc-git--rev-parse): Allow abbreviating commits"
Philip Kaludercic [Sun, 6 Nov 2022 21:18:24 +0000 (22:18 +0100)]
Revert "* lisp/vc/vc-git.el (vc-git--rev-parse): Allow abbreviating commits"

This reverts commit 307ad210040251ea0de2e7f453350c4497bda874.

2 years agoFix sql-{beginning,end}-of-statement counting
Ingo Lohmar [Sun, 6 Nov 2022 16:31:05 +0000 (17:31 +0100)]
Fix sql-{beginning,end}-of-statement counting

* lisp/progmodes/sql.el (sql-beginning-of-statement, sql-end-of-statement):
Do not count statement separators if inside a string.

2 years ago; * lisp/emacs-lisp/package.el (package-load-all-descriptors): Use \`
Mattias Engdegård [Sun, 6 Nov 2022 14:59:58 +0000 (15:59 +0100)]
; * lisp/emacs-lisp/package.el (package-load-all-descriptors): Use \`

2 years ago; Avoid compiler warnings in 'extend_face_to_end_of_line'
Eli Zaretskii [Sun, 6 Nov 2022 14:45:30 +0000 (16:45 +0200)]
; Avoid compiler warnings in 'extend_face_to_end_of_line'

* src/xdisp.c (extend_face_to_end_of_line): Return if no
default_face is cached or could be realized.  This avoids
compilation warnings about NULL pointer dereferences.

2 years agoPrefer defvar-keymap in octave.el
Stefan Kangas [Sun, 6 Nov 2022 14:40:19 +0000 (15:40 +0100)]
Prefer defvar-keymap in octave.el

* lisp/progmodes/octave.el (octave-mode-map): Prefer
defvar-keymap.

2 years agoFix failing eshell alias tests
Stefan Kangas [Sun, 6 Nov 2022 14:34:58 +0000 (15:34 +0100)]
Fix failing eshell alias tests

* test/lisp/eshell/esh-var-tests.el (esh-var-test/alias/function)
(esh-var-test/alias/symbol-pair): Fix tests.  (Bug#59062)

2 years agoRevert "Pacify -Wnull-dereference"
Eli Zaretskii [Sun, 6 Nov 2022 14:31:25 +0000 (16:31 +0200)]
Revert "Pacify -Wnull-dereference"

This reverts commit dad452552bebf832e737ebb946b5eea6cd57f63f.
Please don't assume I write such code by omission.

2 years ago; * src/image.c (syms_of_image): Add missed part of change.
Po Lu [Sun, 6 Nov 2022 12:11:56 +0000 (20:11 +0800)]
; * src/image.c (syms_of_image): Add missed part of change.

Author:

2 years agoFix splash screen display on NS and Haiku with native image APIs
Po Lu [Sun, 6 Nov 2022 12:07:49 +0000 (20:07 +0800)]
Fix splash screen display on NS and Haiku with native image APIs

* src/image.c (syms_of_image): Add Qsvg image type if SVG is
also supported by native image APIs.

2 years agoPacify -Wnull-dereference
Po Lu [Sun, 6 Nov 2022 11:42:36 +0000 (19:42 +0800)]
Pacify -Wnull-dereference

* src/xdisp.c (extend_face_to_end_of_line): Use FACE_FROM_ID,
not FACE_FROM_ID_OR_NULL, when the next line proceeds to
immediately dereference the face.

2 years agoWrite more commentary on XI2 device management
Po Lu [Sun, 6 Nov 2022 11:37:02 +0000 (19:37 +0800)]
Write more commentary on XI2 device management

* src/xterm.c (xi_populate_device_from_info): Take dpyinfo.
Describe what master and slave devices are, how they represent
seats, and how they are used to multiplex user input.  Also
simplify ifdefs and avoid looping over scroll classes on XI 2.0.
(x_cache_xi_devices, handle_one_xevent): Adjust accordingly.
(x_term_init): Set dpyinfo->xi2_version before calling
x_cache_xi_devices.

2 years ago; * src/itree.h (forget_itree): Make the prototype conditional.
Eli Zaretskii [Sun, 6 Nov 2022 10:22:11 +0000 (12:22 +0200)]
; * src/itree.h (forget_itree): Make the prototype conditional.

2 years agoFix face extension when Org narrows the buffer
Eli Zaretskii [Sun, 6 Nov 2022 09:33:38 +0000 (11:33 +0200)]
Fix face extension when Org narrows the buffer

* src/xdisp.c (extend_face_to_end_of_line): Make sure glyph rows
at ZV use the default face for extension.  (Bug#59065)

2 years agoBind "DEL" in dictionary-mode
Davide Masserut [Thu, 3 Nov 2022 14:16:21 +0000 (15:16 +0100)]
Bind "DEL" in dictionary-mode

* lisp/net/dictionary.el (dictionary-mode-map): Bind DEL to
'scroll-down-command'.  (Bug#58986)

2 years agoImprove documentation of Edebug overwriting buffer point
Eli Zaretskii [Sun, 6 Nov 2022 08:08:58 +0000 (10:08 +0200)]
Improve documentation of Edebug overwriting buffer point

* doc/lispref/edebug.texi (Edebug Display Update)
(Edebug Options): More details about Edebug changing buffer point
position.  Reported by Alan Mackenzie <acm@muc.de>.

2 years ago; Minor copyedits in Eglot manual
Eli Zaretskii [Sun, 6 Nov 2022 07:43:32 +0000 (09:43 +0200)]
; Minor copyedits in Eglot manual

* doc/misc/eglot.texi (Customizing Eglot): More accurate wording
of how 'eglot-workspace-configuration' are sent to LSP servers.
(Bug#58986)

2 years ago* lisp/tab-bar.el (tab-bar-fixed-width-max): Change :type from cons to list.
Juri Linkov [Sun, 6 Nov 2022 07:37:12 +0000 (09:37 +0200)]
* lisp/tab-bar.el (tab-bar-fixed-width-max): Change :type from cons to list.

This will allow possible future extensions to customize Double (HiDPI).

(tab-bar-fixed-width-min): Change :type from cons to list.
(tab-bar-fixed-width): Use the list instead of cons.

2 years agoitree.c and buffer-tests.el: Incorporate code review feedback
Matt Armstrong [Sat, 5 Nov 2022 23:31:19 +0000 (16:31 -0700)]
itree.c and buffer-tests.el: Incorporate code review feedback

* src/itree.c: Improve wording in `itree_insert_gap` comment.
* test/src/buffer-tests.el (test-overlay-insert-before-markers-at-start):
Don't rely on (point-min) being 1.
(test-overlay-insert-before-markers-at-end): ditto.
(test-overlay-insert-before-markers-empty): ditto.

2 years agobuffer.c: evaporate overlays in all indirect buffers
Stefan Monnier [Sat, 5 Nov 2022 21:22:37 +0000 (17:22 -0400)]
buffer.c: evaporate overlays in all indirect buffers

This fixes bug#58928.  The patch works by moving the
`evaporate_overlays` check closer to `itree_delete_gap`.

* src/buffer.c (adjust_overlays_for_delete_in_buffer): New function,
integrating the functionality of `evaporate_overlays`.
(adjust_overlays_for_delete): Use it.
(evaporate_overlays): Delete function.

* src/buffer.h (evaporate_overlays): Delete declaration.

* src/insdel.c (adjust_markers_for_replace): Minor optimization.
(adjust_after_replace, replace_range, replace_range_2, del_range_2):
Don't call `evaporate_overlays`.

* test/src/buffer-tests.el (buffer-tests--overlays-indirect-evaporate):
Remove the `:expected-result :failed` attribute.

2 years agoAdd a test for overlay evaporation across indirect buffers
Matt Armstrong [Wed, 2 Nov 2022 02:40:20 +0000 (19:40 -0700)]
Add a test for overlay evaporation across indirect buffers

* test/src/buffer-tests.el (buffer-tests--overlays-indirect-evaporate):
Test evaporation of overlays triggered by deleting text in base
and in indirect buffers.  Test doesn't pass at the moment.

2 years agoMinor tweaks to the fix for `insert-before-markers' overlay fix
Matt Armstrong [Fri, 4 Nov 2022 22:24:40 +0000 (15:24 -0700)]
Minor tweaks to the fix for `insert-before-markers' overlay fix

(bug#58928)

* src/buffer.c (adjust_overlays_for_insert): wrap to less than 80
chars.
* src/itree.c: document BEFORE_MARKERS.

2 years agoTweak the overlay related `insert-before-markers' tests
Matt Armstrong [Fri, 4 Nov 2022 22:02:17 +0000 (15:02 -0700)]
Tweak the overlay related `insert-before-markers' tests

* test/src/buffer-tests.el (test-overlay-insert-before-markers-empty):
Move code down to the other tests related to insertion.  Test all
front/rear insert combinations.  To make the test more clear, at least
to me, hard code all character positions.
(test-overlay-insert-before-markers-at-start): For both front-advance
modes verify that `insert-before-markers' at and overlay's start
advances it.
(test-overlay-insert-before-markers-at-end): For both rear-advance
modes test that `insert-before-markers' at an overlay's end advances
it.
(test-overlay-insert-before-markers-non-empty): Delete, replaced by
the two tests above.

2 years agolisp/eshell/em-tramp.el: Rename 'TRAMP' to 'Tramp'.
Brian Cully [Mon, 31 Oct 2022 15:55:45 +0000 (11:55 -0400)]
lisp/eshell/em-tramp.el: Rename 'TRAMP' to 'Tramp'.

2 years agoAdd the "doas" alias to eshell.
Brian Cully [Thu, 27 Oct 2022 01:10:21 +0000 (21:10 -0400)]
Add the "doas" alias to eshell.

  * lisp/eshell/em-tramp.el (eshell/doas): new function.
  (eshell--method-wrap-directory): new function.
  (eshell/sudo): accept '-s'/'--shell' for interactive use.
  * test/lisp/eshell/em-tramp-tests.el
  (em-tramp-test/sudo-shell) (em-tramp-test/sudo-user-shell)
  (em-tramp-test/doas-basic) (em-tramp-test/doas-user)
  (em-tramp-test/doas-shell) (em-tramp-test/doas-user-shell): new
  tests.
  * etc/NEWS: mention new 'doas' eshell command.
  * doc/misc/eshell.texi: add 'doas' command documentation.

2 years ago; * lisp/progmodes/project.el (project-kill-buffer-conditions): Fix typo.
Juri Linkov [Sat, 5 Nov 2022 17:45:57 +0000 (19:45 +0200)]
; * lisp/progmodes/project.el (project-kill-buffer-conditions): Fix typo.

2 years ago* etc/NEWS: Remove remark implemented by 'vc-default-checkin-patch'.
Juri Linkov [Sat, 5 Nov 2022 17:40:48 +0000 (19:40 +0200)]
* etc/NEWS: Remove remark implemented by 'vc-default-checkin-patch'.

2 years ago* lisp/net/dictionary.el (dictionary-search): Use format-prompt.
Juri Linkov [Sat, 5 Nov 2022 17:34:47 +0000 (19:34 +0200)]
* lisp/net/dictionary.el (dictionary-search): Use format-prompt.

2 years ago* lisp/tab-bar.el (tab-bar-fixed-width): Improve width calculations.
Juri Linkov [Sat, 5 Nov 2022 17:15:42 +0000 (19:15 +0200)]
* lisp/tab-bar.el (tab-bar-fixed-width): Improve width calculations.

2 years agoRephrase 'package-vc-ensure-packages' docstring
Philip Kaludercic [Sat, 5 Nov 2022 15:43:05 +0000 (16:43 +0100)]
Rephrase 'package-vc-ensure-packages' docstring

* lisp/emacs-lisp/package-vc.el (package-vc-ensure-packages): Make it
easier to read.

2 years ago; Rename 'package-vc-link-directory' to '-install-from-checkout'
Philip Kaludercic [Sat, 5 Nov 2022 15:31:16 +0000 (16:31 +0100)]
; Rename 'package-vc-link-directory' to '-install-from-checkout'

* doc/emacs/package.texi (Fetching Package Sources): Rename instances
* etc/NEWS: Rename instances.
* lisp/emacs-lisp/package-vc.el (package-vc-link-directory): Rename to
'package-vc-install-from-checkout'.

2 years ago* lisp/jka-compr.el (jka-compr-load): Add MUST-SUFFIX argument.
Michael Albinus [Sat, 5 Nov 2022 16:39:17 +0000 (17:39 +0100)]
* lisp/jka-compr.el (jka-compr-load): Add MUST-SUFFIX argument.

2 years agoFix the unexec build
Eli Zaretskii [Sat, 5 Nov 2022 13:19:42 +0000 (15:19 +0200)]
Fix the unexec build

* src/itree.c (forget_itree): New function.
* src/emacs.c (Fdump_emacs): Call 'forget_itree'.

2 years agoFix warnings in sqlite.c in the MS-Windows build
Eli Zaretskii [Sat, 5 Nov 2022 12:28:53 +0000 (14:28 +0200)]
Fix warnings in sqlite.c in the MS-Windows build

* src/sqlite.c (sqlite3_errstr) [WINDOWSNT]: Define and load from
the DLL only if the SQLite3 version is at least 3.7.15.
(sqlite_prepare_errdata) [SQLITE_VERSION_NUMBER >= 3007015]: Use
the original code if sqlite3_errstr is available.

2 years agoAvoid error when forwarding messages from Rmail
Nicolas Graner [Thu, 3 Nov 2022 21:49:43 +0000 (22:49 +0100)]
Avoid error when forwarding messages from Rmail

* lisp/gnus/message.el (message-mail): Verify that In-Reply-To has
a string value before matching it with a regexp.  (Bug#59007)

2 years agoMake sqlite.c build with SQlite in Fedora 9
Po Lu [Sat, 5 Nov 2022 11:43:12 +0000 (19:43 +0800)]
Make sqlite.c build with SQlite in Fedora 9

* src/sqlite.c (sqlite_prepare_errdata): Use sqlite3_errmsg
instead of sqlite3_errstr.

2 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Sat, 5 Nov 2022 11:12:32 +0000 (13:12 +0200)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

2 years agoSimplify XI scroll class reporting code
Po Lu [Sat, 5 Nov 2022 11:09:42 +0000 (19:09 +0800)]
Simplify XI scroll class reporting code

* src/xterm.c (xi_populate_device_from_info): Use xnmalloc.
Avoid reading classes at all when the XI library only supports
2.0.
(xi_handle_new_classes): New function.
(xi_handle_device_changed): Move class parsing logic there to
avoid duplicating code.

2 years ago; Fix documentation of package-vc.el
Eli Zaretskii [Sat, 5 Nov 2022 11:11:28 +0000 (13:11 +0200)]
; Fix documentation of package-vc.el

* lisp/emacs-lisp/package-vc.el (package-vc-default-backend)
(package-vc-selected-packages, package-vc--archive-spec-alist)
(package-vc--archive-data-alist, package-vc--query-spec)
(package-vc--read-archive-data, package-vc-commit)
(package-vc--main-file, package-vc--generate-description-file)
(package-vc--build-documentation, package-vc--unpack-1)
(package-vc--guess-backend, package-vc--clone)
(package-vc--unpack, package-vc-update, package-vc--release-rev)
(package-vc-install, package-vc-checkout)
(package-vc-link-directory, package-vc-refresh)
(package-vc-prepare-patch, package-vc--archives-initialize): Doc fixes.

2 years ago; * etc/ERC-NEWS: Mention move to erc-common.el.
F. Jason Park [Sat, 5 Nov 2022 01:48:57 +0000 (18:48 -0700)]
; * etc/ERC-NEWS: Mention move to erc-common.el.

2 years agoMove ERC's core dependencies to separate file
dickmao [Fri, 1 Jul 2022 15:06:51 +0000 (11:06 -0400)]
Move ERC's core dependencies to separate file

Asking people to order require's is about as effective
as asking kids to keep off the grass.

* lisp/erc/erc-backend.el (erc--target, erc-auto-query,
erc-channel-list, erc-channel-users, erc-default-nicks,
erc-default-recipients, erc-format-nick-function,
erc-format-query-as-channel-p, erc-hide-prompt, erc-input-marker,
erc-insert-marker, erc-invitation, erc-join-buffer,
erc-kill-buffer-on-part, erc-kill-server-buffer-on-quit, erc-log-p,
erc-minibuffer-ignored, erc-networks--id, erc-nick,
erc-nick-change-attempt-count, erc-prompt-for-channel-key,
erc-prompt-hidden, erc-reuse-buffers, erc-verbose-server-ping,
erc-whowas-on-nosuchnick): Forward-declare variables.
(erc--open-target, erc--target-from-string, erc-active-buffer,
erc-add-default-channel, erc-banlist-update, erc-buffer-filter,
erc-buffer-list-with-nick, erc-channel-begin-receiving-names,
erc-channel-end-receiving-names, erc-channel-p,
erc-channel-receive-names, erc-cmd-JOIN, erc-connection-established,
erc-current-nick, erc-current-nick-p, erc-current-time,
erc-default-target, erc-delete-default-channel,
erc-display-error-notice, erc-display-server-message,
erc-emacs-time-to-erc-time, erc-format-message,
erc-format-privmessage, erc-get-buffer, erc-handle-login,
erc-handle-user-status-change, erc-ignored-reply-p,
erc-ignored-user-p, erc-is-message-ctcp-and-not-action-p,
erc-is-message-ctcp-p, erc-log-irc-protocol, erc-login,
erc-make-notice, erc-network, erc-networks--id-given,
erc-networks--id-reload, erc-nickname-in-use, erc-parse-user,
erc-process-away, erc-process-ctcp-query, erc-query-buffer-p,
erc-remove-channel-member, erc-remove-channel-users, erc-remove-user,
erc-sec-to-time, erc-server-buffer, erc-set-active-buffer,
erc-set-current-nick, erc-set-modes, erc-time-diff, erc-trim-string,
erc-update-mode-line, erc-update-mode-line-buffer,
erc-wash-quit-reason, erc-display-message, erc-get-buffer-create,
erc-process-ctcp-reply, erc-update-channel-topic, erc-update-modes,
erc-update-user-nick, erc-open, erc-update-channel-member):
Forward-declare functions.
(erc-response): Move to lisp/erc/erc-common.el.
(erc-compat--with-memoization): Use "erc-compat-" prefixed macro.

* lisp/erc/erc-common.el: New file.  Change indentation for
`erc-with-all-buffers-of-server' from 1 to 2.

* lisp/erc/erc-compat.el (erc-compat--with-memoization): Migrate macro
from `erc-backend' and rename.

* lisp/erc/erc-goodies.el: Require `erc-common' instead of `erc'.
(erc-controls-highlight-regexp, erc-controls-remove-regexp,
erc-input-marker, erc-insert-marker, erc-server-process, erc-modules,
erc-log-p): Forward declare variables.
(erc-buffer-list, erc-error, erc-extract-command-from-line):
Forward-declare functions.

* lisp/erc/erc-networks.el (erc--target, erc-insert-marker,
erc-kill-buffer-hook, erc-kill-server-hook, erc-modules,
erc-rename-buffers, erc-reuse-buffers, erc-server-announced-name,
erc-server-connected, erc-server-parameters, erc-server-process,
erc-session-server): Forward declare variables.
(erc--default-target, erc--get-isupport-entry, erc-buffer-filter,
erc-current-nick, erc-display-error-notice, erc-error, erc-get-buffer,
erc-server-buffer, erc-server-process-alive): Forward-declare
functions.
(erc-obsolete-var): Also suppress free-variable warnings.

* lisp/erc/erc.el: Require `erc-networks', `erc-goodies', and
`erc-backend' at top of file.  Don't require `erc-compat'.
(erc--server-last-reconnect-count, erc--server-reconnecting,
erc-channel-members-changed-hook, erc-network, erc-networks--id,
erc-server-367-functions, erc-server-announced-name,
erc-server-connect-function, erc-server-connected,
erc-server-current-nick, erc-server-lag, erc-server-last-sent-time,
erc-server-process, erc-server-quitting, erc-server-reconnect-count,
erc-server-reconnecting, erc-session-client-certificate,
erc-session-connector, erc-session-port, erc-session-server,
erc-session-user-full-name) Remove superfluous forward declarations.
(erc-message-parsed, tabbar--local-hlf, motif-version-string):
Relocate forward declares to central location.
(erc-session-password): Move to `erc-backend'.
(erc-downcase, erc-with-server-buffer, erc-server-user,
erc-channel-user, erc-get-channel-user, erc-get-server-user): Move to
lisp/erc/erc-common.el.
(erc-add-server-user, erc-remove-server-user,
erc-channel-user-owner-p, erc-channel-user-admin-p,
erc-channel-user-op-p, erc-channel-user-halfop-p,
erc-channel-user-voice-p): Convert from inline functions to normal
functions.
(define-erc-module, erc--target, erc--target-channel,
erc--target-channel-local, erc-log, erc-log-aux, erc-with-buffer,
erc-with-all-buffers-of-server): Move to lisp/erc/erc-common.el.
(erc-channel-members-changed-hook): Relocate option to avoid compiler
warning.
(erc-input, erc--input-split): Move to lisp/erc/erc-common.el.
(erc-controls-strip): Remove forward declaration temporarily until
this file stops requiring `erc-goodies'.

* test/lisp/erc/erc-networks-tests.el: Require `erc' instead of
`erc-networks'.
* test/lisp/erc/erc.el (erc--meta--backend-dependencies): Remove
obsolete test.  Don't require `erc-networks'. Bug#56340.

2 years agoOffer completions for GET subcommand flags in erc-dcc
F. Jason Park [Fri, 4 Nov 2022 12:01:35 +0000 (05:01 -0700)]
Offer completions for GET subcommand flags in erc-dcc

* lisp/erc/erc-dcc.el (pcomplete/erc-mode/DCC): Add /DCC GET switches.
This is unfinished business from bug#54458.
* test/lisp/erc/erc-dcc-tests.el (erc-dcc-tests--pcomplete-common,
pcomplete/erc-mode/DCC--get-basic, pcomplete/erc-mode/DCC--get-1flag,
pcomplete/erc-mode/DCC--get-2flags,
pcomplete/erc-mode/DCC--get-2flags-reverse): Add helper and tests for
completing /DCC GET switches.

2 years ago* lisp/erc/erc.el (erc-cmd-RECONNECT): Fix macro arg.
F. Jason Park [Fri, 4 Nov 2022 12:01:35 +0000 (05:01 -0700)]
* lisp/erc/erc.el (erc-cmd-RECONNECT): Fix macro arg.

2 years ago; * test/lisp/erc/erc-services-tests.el: Remove cruft.
F. Jason Park [Fri, 4 Nov 2022 12:01:35 +0000 (05:01 -0700)]
; * test/lisp/erc/erc-services-tests.el: Remove cruft.

2 years agoproject-kill-buffer-conditions: Tweak
Dmitry Gutov [Sat, 5 Nov 2022 00:54:20 +0000 (02:54 +0200)]
project-kill-buffer-conditions: Tweak

* lisp/progmodes/project.el (project-kill-buffer-conditions): Tweak.

2 years ago; Make clang-format handle FOR_EACH_LIVE_BUFFER
Matt Armstrong [Fri, 4 Nov 2022 22:24:57 +0000 (15:24 -0700)]
; Make clang-format handle FOR_EACH_LIVE_BUFFER

* .clang-format (ForEachMacros): Add
FOR_EACH_LIVE_BUFFER.  (Bug#59027)

2 years agoConfigure clang-format to use tabs
Matt Armstrong [Thu, 3 Nov 2022 21:34:03 +0000 (14:34 -0700)]
Configure clang-format to use tabs

* .clang-format (UseTab): Set to "Always", to match
the (indent-tabs-mode . t) in .dir-locals.el.  (Bug#59027)

2 years agoPrint "decrypted" rot13 text is buffer is read-only
Philip Kaludercic [Fri, 28 Oct 2022 17:44:47 +0000 (19:44 +0200)]
Print "decrypted" rot13 text is buffer is read-only

* lisp/rot13.el (rot13-region): Add fallback if buffer is read-only
* doc/emacs/rmail.texi (Rmail Rot13): Document new behaviour.

2 years ago* lisp/net/rcirc.el (rcirc-print): Replace misjudged assertion
Philip Kaludercic [Fri, 4 Nov 2022 22:06:11 +0000 (23:06 +0100)]
* lisp/net/rcirc.el (rcirc-print): Replace misjudged assertion

2 years ago* lisp/textmodes/css-mode.el (css-mode-map): Prefer defvar-keymap.
Stefan Kangas [Fri, 4 Nov 2022 19:26:01 +0000 (20:26 +0100)]
* lisp/textmodes/css-mode.el (css-mode-map): Prefer defvar-keymap.

2 years ago* lisp/dired-aux.el (dired-check-process): Use progress reporter.
Stefan Kangas [Fri, 4 Nov 2022 19:23:55 +0000 (20:23 +0100)]
* lisp/dired-aux.el (dired-check-process): Use progress reporter.

2 years ago; package-vc: Pacify byte-compiler
Stefan Kangas [Fri, 4 Nov 2022 19:15:42 +0000 (20:15 +0100)]
; package-vc: Pacify byte-compiler

* lisp/emacs-lisp/package-vc.el (package-vc-selected-packages):
Declare.

2 years agoUse progress reporter in cpp.el
Stefan Kangas [Fri, 4 Nov 2022 15:25:21 +0000 (16:25 +0100)]
Use progress reporter in cpp.el

* lisp/progmodes/cpp.el (cpp-highlight-buffer): Use progress
reporter.
(cpp-progress-time, cpp-progress-message): Make obsolete in favor
of 'make-progress-reporter'.
(cpp-message-min-time-interval): Doc fix.

2 years ago* lisp/progmodes/cpp.el (cpp-edit-mode-map): Prefer defvar-keymap.
Stefan Kangas [Fri, 4 Nov 2022 14:38:41 +0000 (15:38 +0100)]
* lisp/progmodes/cpp.el (cpp-edit-mode-map): Prefer defvar-keymap.

2 years agoPacify gcc -Wanalyzer-null-dereference
Paul Eggert [Fri, 4 Nov 2022 18:00:49 +0000 (11:00 -0700)]
Pacify gcc -Wanalyzer-null-dereference

This is for gcc 12.2.1 20220819 (Red Hat 12.2.1-2) x86-64
when Emacs is configured with --enable-gcc-warnings.
* src/buffer.c (Fmove_overlay): Prefer BASE_EQ to EQ in a place
where they’re equivalent because the only symbol allowed here is nil.

2 years agoMerge branch 'feature/package+vc'
Philip Kaludercic [Fri, 4 Nov 2022 17:57:45 +0000 (18:57 +0100)]
Merge branch 'feature/package+vc'

2 years ago* lisp/emacs-lisp/package-vc.el: Expand commentary feature/package+vc
Philip Kaludercic [Fri, 4 Nov 2022 17:53:02 +0000 (18:53 +0100)]
* lisp/emacs-lisp/package-vc.el: Expand commentary

2 years ago; * lisp/emacs-lisp/package-vc.el (package-vc): Add missing :prefix
Philip Kaludercic [Fri, 4 Nov 2022 17:19:01 +0000 (18:19 +0100)]
; * lisp/emacs-lisp/package-vc.el (package-vc): Add missing :prefix

2 years agoLink to Manual from the package-vc group
Philip Kaludercic [Fri, 4 Nov 2022 17:17:45 +0000 (18:17 +0100)]
Link to Manual from the package-vc group

* lisp/emacs-lisp/package-vc.el (package-vc): Add 'custom-manual'
link.

2 years ago; * doc/emacs/package.texi: Rename to "Fetching Package Sources"
Philip Kaludercic [Fri, 4 Nov 2022 17:17:02 +0000 (18:17 +0100)]
; * doc/emacs/package.texi: Rename to "Fetching Package Sources"