1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-28 07:50:48 -08:00
Commit graph

161833 commits

Author SHA1 Message Date
Alan Mackenzie
c19ca5eb7f 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.
2022-11-07 12:20:07 +00:00
Po Lu
802671493d Avoid invalid values showing up in scroll valuators
* src/xterm.c (xi_populate_device_from_info): Reset emacs_value
when invalid_p is cleared.
2022-11-07 18:08:57 +08:00
Juri Linkov
236703ca05 * lisp/outline.el (outline-minor-mode): Ensure margins are either 0 or 1.
This check is necessary to make it idempotent to multiple calls.
2022-11-07 10:14:45 +02:00
Stefan Monnier
35221a7bd5 (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.
2022-11-07 00:38:43 -05:00
Stefan Kangas
61d55ce3bb 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
2022-11-06 23:21:01 +01:00
Philip Kaludercic
8fe62b2ab5 Revert "* lisp/vc/vc-git.el (vc-git--rev-parse): Allow abbreviating commits"
This reverts commit 307ad21004.
2022-11-06 22:50:59 +01:00
Ingo Lohmar
4103b6c407 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.
2022-11-06 17:31:05 +01:00
Mattias Engdegård
e46f680489 ; * lisp/emacs-lisp/package.el (package-load-all-descriptors): Use \` 2022-11-06 16:01:13 +01:00
Eli Zaretskii
6cb963ff19 ; 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.
2022-11-06 16:45:30 +02:00
Stefan Kangas
9c0b90e6a9 Prefer defvar-keymap in octave.el
* lisp/progmodes/octave.el (octave-mode-map): Prefer
defvar-keymap.
2022-11-06 15:40:19 +01:00
Stefan Kangas
2ea9f69f07 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)
2022-11-06 15:38:10 +01:00
Eli Zaretskii
5233186611 Revert "Pacify -Wnull-dereference"
This reverts commit dad452552b.
Please don't assume I write such code by omission.
2022-11-06 16:31:25 +02:00
Po Lu
44138d5ecc ; * src/image.c (syms_of_image): Add missed part of change.
Author:
2022-11-06 20:11:56 +08:00
Po Lu
5f8c655a44 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.
2022-11-06 20:07:49 +08:00
Po Lu
dad452552b 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.
2022-11-06 19:42:36 +08:00
Po Lu
f305d1ab3a 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.
2022-11-06 19:39:01 +08:00
Eli Zaretskii
cd296e19a2 ; * src/itree.h (forget_itree): Make the prototype conditional. 2022-11-06 12:22:11 +02:00
Eli Zaretskii
24e5abdc06 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)
2022-11-06 11:33:38 +02:00
Davide Masserut
6a132f9b52 Bind "DEL" in dictionary-mode
* lisp/net/dictionary.el (dictionary-mode-map): Bind DEL to
'scroll-down-command'.  (Bug#58986)
2022-11-06 10:13:37 +02:00
Eli Zaretskii
45e318a184 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>.
2022-11-06 10:08:58 +02:00
Eli Zaretskii
d59c32201e ; 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)
2022-11-06 09:43:32 +02:00
Juri Linkov
69a55568bf * 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.
2022-11-06 09:37:12 +02:00
Matt Armstrong
23dd27a979 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.
2022-11-06 00:05:55 -04:00
Stefan Monnier
6e5ec08551 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.
2022-11-05 17:22:37 -04:00
Matt Armstrong
5c9895fffe 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.
2022-11-05 16:48:55 -04:00
Matt Armstrong
26d2ac38e9 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.
2022-11-05 16:45:18 -04:00
Matt Armstrong
2fc6e715a2 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.
2022-11-05 16:44:06 -04:00
Brian Cully
4e10821334 lisp/eshell/em-tramp.el: Rename 'TRAMP' to 'Tramp'. 2022-11-05 12:05:05 -07:00
Brian Cully
062d16c3eb 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.
2022-11-05 12:05:05 -07:00
Juri Linkov
8a49a88853 ; * lisp/progmodes/project.el (project-kill-buffer-conditions): Fix typo. 2022-11-05 19:45:57 +02:00
Juri Linkov
9828b596e5 * etc/NEWS: Remove remark implemented by 'vc-default-checkin-patch'. 2022-11-05 19:40:48 +02:00
Juri Linkov
7926cf7341 * lisp/net/dictionary.el (dictionary-search): Use format-prompt. 2022-11-05 19:34:47 +02:00
Juri Linkov
2637ef8f48 * lisp/tab-bar.el (tab-bar-fixed-width): Improve width calculations. 2022-11-05 19:15:42 +02:00
Philip Kaludercic
270020a4b4 Rephrase 'package-vc-ensure-packages' docstring
* lisp/emacs-lisp/package-vc.el (package-vc-ensure-packages): Make it
easier to read.
2022-11-05 17:44:57 +01:00
Philip Kaludercic
1557bb9d8f ; 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'.
2022-11-05 17:44:54 +01:00
Michael Albinus
22e8c679ee * lisp/jka-compr.el (jka-compr-load): Add MUST-SUFFIX argument. 2022-11-05 17:39:17 +01:00
Eli Zaretskii
26460328bc Fix the unexec build
* src/itree.c (forget_itree): New function.
* src/emacs.c (Fdump_emacs): Call 'forget_itree'.
2022-11-05 15:19:42 +02:00
Eli Zaretskii
ae497d75f7 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.
2022-11-05 14:28:53 +02:00
Nicolas Graner
e275dd2894 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)
2022-11-05 14:01:19 +02:00
Po Lu
ae7dcba6c5 Make sqlite.c build with SQlite in Fedora 9
* src/sqlite.c (sqlite_prepare_errdata): Use sqlite3_errmsg
instead of sqlite3_errstr.
2022-11-05 19:43:30 +08:00
Eli Zaretskii
656cc127f2 Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2022-11-05 13:12:32 +02:00
Po Lu
154ecf6197 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.
2022-11-05 19:11:29 +08:00
Eli Zaretskii
22fb5397de ; 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.
2022-11-05 13:11:28 +02:00
F. Jason Park
8721e87a6e ; * etc/ERC-NEWS: Mention move to erc-common.el. 2022-11-04 19:32:23 -07:00
dickmao
c2d657e7c4 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.
2022-11-04 19:32:23 -07:00
F. Jason Park
ae0642f859 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.
2022-11-04 19:32:23 -07:00
F. Jason Park
0606b095d2 * lisp/erc/erc.el (erc-cmd-RECONNECT): Fix macro arg. 2022-11-04 19:32:23 -07:00
F. Jason Park
913aa90013 ; * test/lisp/erc/erc-services-tests.el: Remove cruft. 2022-11-04 19:32:23 -07:00
Dmitry Gutov
06f0d4793c project-kill-buffer-conditions: Tweak
* lisp/progmodes/project.el (project-kill-buffer-conditions): Tweak.
2022-11-05 02:54:32 +02:00
Matt Armstrong
a0d08878f1 ; Make clang-format handle FOR_EACH_LIVE_BUFFER
* .clang-format (ForEachMacros): Add
FOR_EACH_LIVE_BUFFER.  (Bug#59027)
2022-11-05 01:47:17 +01:00