1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00
Commit graph

161371 commits

Author SHA1 Message Date
Lars Ingebrigtsen
b5dc0513d5 Make Fsqlite_select error data better
* src/sqlite.c (Fsqlite_select): Add more the more specific error
text to the error data (bug#58363).
2022-10-09 16:17:22 +02:00
Lars Ingebrigtsen
0ce91ed8b4 Clean up Fsqlite_select slightly
* src/sqlite.c (Fsqlite_select): Clean up code slightly.
2022-10-09 15:38:52 +02:00
Po Lu
22374f2122 Fix user time handling bug on GNOME Shell and Metacity
* src/xfns.c (x_window): Avoid extraneous
XChangeWindowAttributes.
* src/xterm.c (x_display_set_last_user_time): New argument
SET_PROPERTY.  Do not change the user time property if it is not
true.  All callers changed.
(handle_one_xevent): Avoid setting the user time property on
LeaveNotify and XI_Leave events.
2022-10-09 19:58:17 +08:00
Stefan Kangas
a2dd9d683a Merge from origin/emacs-28
32ef7550ed ; Improve documentation of 'file-in-directory-p'
2022-10-09 06:31:06 +02:00
Stefan Monnier
9d47364634 * lisp/url/url-file.el (url-file): Don't bind coding-system-for-read
Binding it causes errors when some of the enclosed code ends up
loading a `.el` file, and it is unnecessary since the rest of
the code (in `url-file-asynch-callback`) is already careful to
use `insert-file-contents-literally`.
2022-10-08 23:06:45 -04:00
Mattias Engdegård
81eb7c1809 ; * test/src/fns-tests.el (fns-tests--string-lessp-cases): Extend. 2022-10-08 18:48:30 +02:00
Mattias Engdegård
e4769b20f1 Restrict string-lessp vectorisation to safe architectures
* src/fns.c (HAVE_FAST_UNALIGNED_ACCESS): New.
(Fstring_lessp): Only use word operations where safe, because string
data from purespace may be unaligned.
2022-10-08 18:48:30 +02:00
Mattias Engdegård
9af63d2e8b Better Lisp_String comments
* src/lisp.h (struct Lisp_String): Comments improved.
* src/pdumper.c (dump_string): Update hash (comment change only).
2022-10-08 18:48:30 +02:00
Mattias Engdegård
71b3a37569 Improved format string error message (bug#58168)
* src/editfns.c (styled_format): Better message when the conversion
char is non-ASCII from a unibyte format string.
2022-10-08 18:48:30 +02:00
Stefan Monnier
8de7995ae6 package.el: Understand a few more variations in tarball formats
* lisp/emacs-lisp/package.el (package-untar-buffer): Fix thinko.
(package-tar-file-info): Handle the case where the first file is in
a subdirectory.

* test/lisp/emacs-lisp/package-tests.el (package-test-bug58367): New test.
* test/lisp/emacs-lisp/package-resources/ustar-withsub-0.1.tar:
* test/lisp/emacs-lisp/package-resources/v7-withsub-0.1.tar: New files.
2022-10-08 12:19:40 -04:00
Eli Zaretskii
b8ab4f018b ; * lisp/vc/vc.el (vc-prepare-patches-separately): Doc fix. 2022-10-08 17:40:25 +03:00
Philip Kaludercic
84945e86be
; * lisp/vc/vc.el (vc-prepare-patches-separately): Fix docstring
Noticed by German Pacenza.
2022-10-08 15:43:11 +02:00
Philip Kaludercic
aa350ba275
; Add missing documentation strings
* lisp/vc/vc.el (vc-read-revision): Add a docstring.
(vc-read-multiple-revisions): Add a docstring.
2022-10-08 15:43:11 +02:00
Lars Ingebrigtsen
49160969ce Make sqlite-select signal errors when there's an error
* src/sqlite.c (load_dll_functions): Update.
(Fsqlite_select): Signal an error when there's an error preparing
the statement.
2022-10-08 15:41:14 +02:00
Lars Ingebrigtsen
5017f2573f Fix vtable-insert-object line insertion
* lisp/emacs-lisp/vtable.el (vtable-insert-object): Pass in the
correct ellipsis values (bug#58370).
(vtable--insert-line): Don't bug out on missing optional arguments.
2022-10-08 15:26:01 +02:00
Visuwesh
e3fac2be04 Fix misleading prompt in vc-git-create-tag
* lisp/vc/vc-git.el (vc-git-create-tag): Actually pass the DEFAULT
argument to vc-read-revision (bug#58378).
2022-10-08 15:13:48 +02:00
Lars Ingebrigtsen
dc9f07d39f Fix typo in etc/TODO 2022-10-08 14:57:47 +02:00
Michael Albinus
594b3b2cfa * etc/TODO (Wishlist items): Add libarchive(3) integration. 2022-10-08 14:54:38 +02:00
Lars Ingebrigtsen
6b56099268 Mention seq-keep in shortdoc
* lisp/emacs-lisp/shortdoc.el (sequence): Mention seq-keep.
2022-10-08 13:20:17 +02:00
Eli Zaretskii
32ef7550ed ; Improve documentation of 'file-in-directory-p'
* lisp/files.el (file-in-directory-p): Clarify doc string.

* doc/lispref/files.texi (Truenames): Move the documentation of
'file-in-directory-p' from here...
(Contents of Directories): ...to here.  Add index entries.
(Bug#58364)
2022-10-08 14:13:50 +03:00
João Távora
0848387fa2 Fix docstring of eglot-list-connections-mode
* eglot.el (eglot-list-connections-mode): Fix mistaken reference
to similar non-Eglot code.
2022-10-08 11:19:10 +01:00
Philip Kaludercic
59df0a7bd9
Add a VC command to prepare patches
* doc/emacs/vc1-xtra.texi (Miscellaneous VC):  Add new node.
(Editing VC Commands):  Document new feature.
* etc/NEWS:  Mention 'vc-prepare-patch'.
* lisp/vc/log-view.el: Autoload 'log-view-get-marked'.
* lisp/vc/vc-git.el (vc-git-prepare-patch):  Add Git implementation.
* lisp/vc/vc-hg.el (vc-git-prepare-patch):  Add Mercurial implementation.
* lisp/vc/vc-bzr.el (vc-git-prepare-patch):  Add Bazaar implementation.
* lisp/vc/vc.el (vc-read-revision):  Add a MULTIPLE argument.
(vc-read-multiple-revisions):  Add an auxiliary function that always
calls 'vc-read-revision' with a non-nil value for MULTIPLE.
(vc-prepare-patches-separately):  Add user option.
(message-goto-body):  Declare function.
(message--name-table):  Declare function.
(vc-default-prepare-patch): Add a default implementation.
(vc-prepare-patch):  Add command.  (Bug#57400)
2022-10-08 11:51:38 +02:00
Po Lu
5e7e85af02 Stop passing CurrentTime to SetInputFocus
* src/xterm.c (xi_focus_handle_for_device, handle_one_xevent):
Set the last user time where required for focus to be handled
correctly.
(x_focus_frame): Do not perform actions prohibited by the ICCCM.
2022-10-08 16:38:48 +08:00
समीर सिंह Sameer Singh
75b7aacbf6 Add support for the Coptic script (bug#58330)
* lisp/language/misc-lang.el ("Coptic"): New language environment.
Add sample text and input method.
* lisp/international/fontset.el (script-representative-chars)
(setup-default-fontset): Support coptic.
* lisp/leim/quail/misc-lang.el ("coptic"): New input method.

* etc/HELLO: Add a Coptic greeting.
* etc/NEWS: Announce the new language environment.
2022-10-08 10:46:48 +03:00
Stefan Kangas
3191950839 Merge from origin/emacs-28
cfb1e21844 Update name of hs-mouse-toggle-hiding in Emacs manual
2022-10-08 06:30:23 +02:00
Stefan Kangas
89ccf78db2 ; Silence byte-compiler in benchmark.el
* lisp/emacs-lisp/benchmark.el (cl-lib): Require.
2022-10-07 23:15:13 +02:00
Stefan Kangas
5b28c3784f Prefer defvar-keymap in bibtex.el
* lisp/textmodes/bibtex.el (bibtex-mode-map): Prefer defvar-keymap.
2022-10-07 22:45:28 +02:00
Stefan Kangas
5e83c0117e Fix setting the wallpaper with "swaybg" and "wbg"
* lisp/image/wallpaper.el (wallpaper-setter): Add 'init-action'
and 'detach' fields to structure.
(wallpaper--init-action-kill): New helper function.
(wallpaper--default-setters): Use above new fields for "swaybg" and
"wbg", to start/restart the corresponding processes as needed.
(wallpaper-default-set-function): Call 'init-action' function if
there is one.  If 'detach', use 'call-process' instead of
'start-process'.  (Bug#57781)

* test/lisp/image/wallpaper-tests.el (wallpaper--find-setter)
(wallpaper--find-setter/call-predicate)
(wallpaper--find-setter/set-current-setter)
(wallpaper-set/runs-command, wallpaper-set/runs-command/detach)
(wallpaper-set/calls-init-action)
(wallpaper-set/calls-wallpaper-set-function): New tests.
2022-10-07 22:07:09 +02:00
Stefan Monnier
d6831d1b0a subr.el (inhibit-point-motion-hooks): Mark it as obsolete
When Emacs-25 changed the default of `inhibit-point-motion-hooks` to t,
/etc/NEWS declared it as obsolete and so did its docstring, but
it was not marked as obsolete so as not to emit too many warnings
in code where it was impractical to remove the let-binding while
keeping backward compatibility with older Emacsen.
Those backward compatibility issues are not serious any more now that
Emacs-25 is itself considered old.

* lisp/subr.el (inhibit-point-motion-hooks): Mark it as obsolete.
* src/textprop.c (inhibit-point-motion-hooks): Don't mention it being
obsolete in the docstring any more.
* lisp/simple.el (line-move-1, line-move-finish): Silence warnings.
2022-10-07 14:15:40 -04:00
Stefan Monnier
e3824f0a31 * lisp/isearch.el (isearch-search): Don't bind inhibit-point-motion-hooks
The let-binding was added back in 1997 (commit 79c7a4fa5f)
"because we might have to search inside invisible and intangible text".
So it's been redundant since Emacs-25 changed the default to t.
2022-10-07 14:07:17 -04:00
Stefan Monnier
c61010567f verilog-mode.el: Don't bind inhibit-point-motion-hooks
Keep binding it in Emacs<25 but not in Emacs≥25 (where such bindings
are redundant and the var is declared obsolete).

* lisp/progmodes/verilog-mode.el (verilog-save-buffer-state):
Don't bind `inhibit-point-motion-hooks` if Emacs≥25.
(verilog-save-font-no-change-functions): Same, and refrain from
binding `before/after-change-functions` as well while we're at it,
since `inhibit-modification-hooks` already covers it in Emacs≥25.
2022-10-07 13:54:36 -04:00
Stefan Monnier
3c7f05133c (nxml-with-invisible-motion): Delete macro.
Don't use this macro any more since it doesn't do anything since Emacs-25
changed the default of `inhibit-point-motion-hooks` to t.

* lisp/nxml/nxml-util.el (nxml-with-invisible-motion): Delete macro.
* lisp/nxml/nxml-mode.el (nxml-mode, nxml-cleanup):
* lisp/nxml/rng-valid.el (rng-do-some-validation):
* lisp/nxml/rng-nxml.el (rng-set-state-after): Don't use it.
2022-10-07 13:25:36 -04:00
Stefan Monnier
42fd433aca * lisp/pcomplete.el (pcomplete-arg): Simplify 2022-10-07 12:54:29 -04:00
Stefan Monnier
3bf53ad05c (line-move-1): Obey inhibit-point-motion-hooks
`line-move-1` was written back before `inhibit-point-motion-hooks`
was made obsolete and it's written under the assumption that its
value is nil, whereas since Emacs-25 it's t.

To work around problems linked to a nil value of
`inhibit-point-motion-hooks`, the code temporarily binds that var to
t while it moves around trying to find the final destination and then
later in a few key spots it binds it "back" to nil so as to run the
point-motion hooks according to the final destination, as if the
overall motion had been made "normally".

Change the code so that the "bind back" indeed binds the var back to
the value it had originally, rather than always to nil.

* lisp/simple.el (line-move-1): Obey `inhibit-point-motion-hooks`
(line-move-finish): New optional arg `not-ipmh`.
2022-10-07 12:51:14 -04:00
Stefan Monnier
f3769bc32a org.el: Improve bindings of inhibit-* vars
Remove binding of `inhibit-point-motion-hooks` (it's t by default
anyway and it's obsolete) and don't "manually" bind
`inhibit-modification-hooks`.

* lisp/org/org.el (org-unfontify-region): Use `with-silent-modifications`.
(org-display-inline-remove-overlay): Remove ineffective binding of
`inhibit-modification-hooks` around code which doesn't modify the
buffer anyway.
2022-10-07 12:29:56 -04:00
Stefan Monnier
4840b91e41 Remove aliases of with-silent-modifications
There were many reinventions of `with-silent-modifications` (tho
many of them weren't reinventions but copy&paste of code from
font-lock, IIUC).  Now that those don't even need to let-bind
`inhibit-point-motion-hooks` they're really just obsolete.

* lisp/font-lock.el (save-buffer-state): Delete macro.
(font-lock-unfontify-region, font-lock-default-fontify-region):
Use `with-silent-modifications` instead.
(font-lock-after-change-function, font-lock-fontify-block): Don't
let-bind `inhibit-point-motion-hooks`.

* lisp/htmlfontify.el (hfy-save-buffer-state): Delete macro.
(hfy-mark-trailing-whitespace, hfy-unmark-trailing-whitespace):
Use `with-silent-modifications` instead.

* lisp/jit-lock.el (with-buffer-prepared-for-jit-lock): Delete macro.
(jit-lock--debug-fontify, jit-lock-refontify, jit-lock-function)
(jit-lock-fontify-now, jit-lock-force-redisplay)
(jit-lock-deferred-fontify, jit-lock-context-fontify)
(jit-lock-after-change): Use `with-silent-modifications` instead.

* lisp/progmodes/antlr-mode.el (save-buffer-state-x): Delete macro.
(antlr-hide-actions): Use `with-silent-modifications` instead.

* lisp/progmodes/hideshow.el (hs-life-goes-on): Don't
let-bind `inhibit-point-motion-hooks`.
2022-10-07 12:25:09 -04:00
Stefan Monnier
d28581101a Remove redundant let-bindings of inhibit-point-motion-hooks
`inhibit-point-motion-hooks` has defaulted to t (and been declared
obsolete) since Emacs-25, so remove left-over bindings to that
now default value.

* lisp/dabbrev.el (dabbrev--search):
* lisp/format.el (format-insert-file):
* lisp/forms.el (forms-next-field, forms-prev-field):
* lisp/minibuf-eldef.el (minibuf-eldef-setup-minibuffer):
* lisp/simple.el (primitive-undo):
* lisp/cedet/semantic/edit.el (semantic-change-function):
* lisp/cedet/srecode/fields.el (srecode-field-mod-hook):
* lisp/cedet/srecode/insert.el (srecode-insert-fcn):
* lisp/erc/erc-button.el (erc-button-add-buttons):
* lisp/erc/erc.el (erc-display-line):
* lisp/eshell/em-script.el (eshell-source-file):
* lisp/eshell/em-smart.el (eshell-smart-scroll-window):
* lisp/eshell/esh-arg.el (eshell-parse-arguments):
* lisp/eshell/esh-cmd.el (eshell-with-temp-command):
* lisp/eshell/esh-mode.el (eshell-send-input, eshell-output-filter):
* lisp/gnus/gnus-art.el (gnus-with-article-headers)
(article-hide-headers, article-hide-boring-headers)
(article-decode-mime-words, article-decode-charset)
(article-decode-encoded-words, article-decode-group-name)
(article-decode-idna-rhs, article-hide-list-identifiers)
(article-strip-banner, article-really-strip-banner)
(article-strip-leading-blank-lines)
(article-strip-multiple-blank-lines, article-strip-leading-space)
(article-strip-trailing-space, article-strip-all-blank-lines)
(gnus-article-narrow-to-signature, gnus-article-show-hidden-text)
(article-date-ut, article-verify-x-pgp-sig)
(gnus-article-only-boring-p, gnus-article-highlight-signature)
(gnus-article-add-buttons, gnus-signature-toggle, gnus-button-push):
* lisp/gnus/gnus-cite.el (gnus-article-highlight-citation)
(gnus-article-fill-cited-article, gnus-article-hide-citation)
(gnus-article-toggle-cited-text, gnus-article-hide-citation-maybe)
(gnus-cite-parse-wrapper, gnus-cite-add-face, gnus-cite-toggle):
* lisp/gnus/gnus-gravatar.el (gnus-gravatar-insert):
* lisp/gnus/gnus-rfc1843.el (rfc1843-decode-article-body):
* lisp/gnus/gnus-sum.el (gnus-summary-toggle-header):
* lisp/gnus/gnus-util.el (gnus-fetch-field):
* lisp/gnus/message.el (message-fetch-field, message-reply)
(message-followup, message-hide-headers):
* lisp/net/goto-addr.el (goto-address-fontify):
* lisp/obsolete/linum.el (linum-update-window):
* lisp/play/zone.el (zone-shift-left, zone-shift-right)
(zone-fill-out-screen):
* lisp/progmodes/opascal.el (opascal-save-excursion):
* lisp/progmodes/vhdl-mode.el (vhdl-prepare-search-2):
* lisp/textmodes/enriched.el (enriched-encode):
* lisp/textmodes/flyspell.el (flyspell-word-search-backward)
(flyspell-word-search-forward):
* lisp/textmodes/table.el (table--point-entered/left-cell-function):
Remove let-binding of `inhibit-point-motion-hooks`.
2022-10-07 12:16:47 -04:00
Lars Ingebrigtsen
cfb1e21844 Update name of hs-mouse-toggle-hiding in Emacs manual
* doc/emacs/programs.texi (Hideshow): Update the name of
hs-mouse-toggle-hiding (bug#58331).
2022-10-07 14:40:48 +02:00
Matt Armstrong
67a20bb4b5 Handle successive mime sections in decoding.
rmailsum.el (rmail-epa-decode):Handle blank lines at start.
Handle both ending delim and another starting delim.
2022-10-07 08:17:50 -04:00
Mattias Engdegård
def6fa4246 Speed up string-lessp for multibyte strings
Improve comparison speed when both arguments are multibyte strings,
at least one of them containing a non-ASCII character.  (All-ASCII
multibyte strings are already fast.)
The speed-up is about 2× for strings of 10 chars, 10× for strings of
100 chars.

* src/fns.c (Fstring_lessp): Quickly skip the common prefix by
comparing words.
2022-10-07 13:57:54 +02:00
Mattias Engdegård
6b4c17dec0 Clearer byte-compiler arity warnings (bug#58319)
* lisp/emacs-lisp/bytecomp.el (byte-compile-arglist-signature-string):
Replace '3+' and '3-4' with '3 or more' and '3 or 4', respectively.
2022-10-07 13:57:54 +02:00
Miha Rihtaršič
e84b732cbc comint-fontify-input: Don't fontify output as input, different approach
* lisp/comint.el (comint-output-filter): Propertize process output
with field=output before inserting it into buffer to prevent
comint-fontify-input from fontifying it (bug#58169).
2022-10-07 13:44:21 +02:00
Miha Rihtaršič
46c2f152c2 Revert "comint-fl: Prevent fontification of output as input"
This reverts commit 90744ff0be.
2022-10-07 13:44:21 +02:00
Michael Albinus
17d0f61c80 * lisp/dired.el (dired-make-relative): Make change less aggressive. 2022-10-07 13:14:46 +02:00
Po Lu
6edb676c18 Handle IM server disconnects during preedit
* src/xterm.c (x_maybe_clear_preedit): New function.
(xim_destroy_callback): Call that function.
2022-10-07 18:39:32 +08:00
Stefan Kangas
6c956de80a Improve package-check-signature docstring
* lisp/emacs-lisp/package.el (package-check-signature): Improve
docstring.
2022-10-07 11:27:26 +02:00
Stefan Kangas
55bd6a5cd4 ; Make wallpaper--format-arg more resilient
* lisp/image/wallpaper.el (wallpaper--format-arg): Make more
resilient to errors.
2022-10-07 10:53:55 +02:00
Stefan Kangas
ed1401c64d Merge from origin/emacs-28
5f8849425c Fix typo in `(emacs) Lisp Doc'
f0a06364fb Fix references to 'default-indent-new-line'
2022-10-07 06:30:21 +02:00
Michael Albinus
87301f2623 Better support for remote file names in dired
* lisp/dired.el (dired-make-relative): Expand DIR anyway, because
it could also be an abbreviated remote file name.  (Bug#58300)
2022-10-06 22:18:21 +02:00
Manuel Giraud
8c8a54dd23 ; * lisp/battery.el (battery-bsd-apm): No need for `executable-find'. 2022-10-06 20:07:23 +02:00