1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-02 08:22:22 +00:00
Commit Graph

168234 Commits

Author SHA1 Message Date
Andrea Corallo
b93107c20b Fix emacs-lisp-native-compile-and-load eln target directory (bug#64226)
* lisp/emacs-lisp/comp.el (comp-spill-lap-function): Don't use
`byte+native-compile' to select output directory but always axpect
it explicit through `native-compile-target-directory'.
(batch-byte+native-compile): Set `native-compile-target-directory'.
* test/src/comp-tests.el (comp-tests-bootstrap): Set
`native-compile-target-directory'.
2023-08-09 15:19:26 +02:00
Eli Zaretskii
164588b174 ; Fix whitespace in eglot.el
* lisp/progmodes/eglot.el (eglot-server-programs): Fix whitespace.
Reported by Allen Li <darkfeline@felesatra.moe>.  (Bug#65161)
2023-08-09 16:15:25 +03:00
Mattias Engdegård
3065dfc660 ; * test/lisp/net/tramp-tests.el: duck make-process bytecomp warning 2023-08-09 15:05:35 +02:00
Po Lu
caa3bc8aa8 Don't signal when I-search occurs within a kbd macro
* lisp/isearch.el (isearch-mode): Check last-event-frame is not
`macro' before providing it to `device-class'.  (bug#65175)
2023-08-09 20:43:37 +08:00
Alan Mackenzie
18a84922c5 Remove harmful and redundant bindings from the byte compiler.
This fixes bug#65017.  Binding symbols-with-pos-enabled in two
macro handling functions was harmful; one of these caused
cl--labels-convert to fail.  Binding print-symbols-bare in many
places in the byte compiler was redundant.

* lisp/emacs-lisp/bytecomp.el (byte-compile-recurse-toplevel)
(byte-compile-initial-macro-environment)
(byte-compile-output-file-form, byte-compile-output-docform)
(byte-compile-preprocess): Remove bindings of
print-symbols-bare.

* lisp/emacs-lisp/macroexp.el (macroexp--compiler-macro)
(internal-macroexpand-for-load): Remove bindings of
symbols-with-pos-enabled.
(internal-macroexpand-for-load): Remove binding of
print-symbols-bare.
2023-08-09 11:29:22 +00:00
Eli Zaretskii
7e3c616086 ; Re-enable the /dev/urandom test
* test/src/fileio-tests.el (fileio-tests--non-regular-insert):
Remove :unstable, but comment out the single failing test.
2023-08-09 07:25:59 -04:00
Mattias Engdegård
722b1ebc6e Faster NSString to Lisp string conversion
Since we know that the value from [NSString UTF8String] is valid
UTF-8, using make_string is wastefully slow.

* src/nsfns.m (count_utf8_chars): New function, at least twice as fast
as parse_str_as_multibyte used by make_string for this purpose.
([NSString lispString]): Use count_utf8_chars.  We now always make a
multibyte string because there is no reason not to.
2023-08-09 13:02:00 +02:00
Eric S. Raymond
08cc48e496 Remove a DEFSYM that no longer needs to be in the C core.
* src/fileio.c (syms_of_fileio): Remove Qmove_file_to_trash.
2023-08-09 06:06:01 -04:00
Mattias Engdegård
ff21717f05 Disable failing test (bug#65156)
* test/src/fileio-tests.el (fileio-tests--non-regular-insert):
Mark as :unstable, since /dev/urandom is seekable.

Do not merge to master.
2023-08-09 10:23:28 +02:00
Po Lu
3b34b85cc8 Fix crashes runninging android-emacs with bad LD_LIBRARY_PATH
* doc/emacs/input.texi (Touchscreens, On-Screen Keyboards): Fix
section titles.

* src/android-emacs.c (main): If EMACS_LD_LIBRARY_PATH is set,
make it LD_LIBRARY_PATH.

* src/android.c (JNICALL): Set LD_LIBRARY_PATH as well as
EMACS_LD_LIBRARY_PATH.
2023-08-09 14:23:25 +08:00
Po Lu
82a67d227e Improve Emacsbug output
* lisp/mail/emacsbug.el (report-emacs-bug--os-description):
Handle `android'.
(emacs-build-description): Don't print the Android build
fingerprint here.
2023-08-09 12:22:12 +08:00
Eric S. Raymond
dbca2e797a Add a string check to delete-file-internal.
* src/fileio.c (delete-file-internal): Argument should be a string.
2023-08-09 00:02:51 -04:00
Po Lu
4767f5eaee Better fix for bug#65156
* src/fileio.c (Finsert_file_contents): Correct seek-ability
test, since lseek returns -1 upon failure.  (Bug#65156)
2023-08-09 10:49:44 +08:00
Po Lu
5af838769d * lisp/ldefs-boot.el: Restore no-byte-compile cookie. 2023-08-09 09:50:35 +08:00
Po Lu
391ff93f76 * doc/misc/calc.texi (Musical Notes): Fix build with Texinfo 4.13. 2023-08-09 09:48:33 +08:00
Po Lu
8c607783b9 Run Git hooks within xcu4
* build-aux/git-hooks/pre-commit (LC_ALL):
* build-aux/git-hooks/prepare-commit-msg (SHA1): Run using xcu4
tools.
2023-08-09 09:48:32 +08:00
Po Lu
3f2e009ac3 ; Minor adjustments to configury, loaddefs and gitignore
* .gitignore: Add exec/aclocal.m4.

* configure.ac (bitmapdirs): Circumvent shell substitution that
isn't supported by the Bourne shell.

* lisp/ldefs-boot.el: Update from loaddefs.el.
2023-08-09 09:48:32 +08:00
Stefan Kangas
af907c060a ; * .gitignore: Add exec/aclocal.m4. 2023-08-09 03:35:18 +02:00
Stefan Kangas
08c5cba2e4 Add calling convention to face-attr-construct
* lisp/faces.el (face-attr-construct): Add
advertised-calling-convention declaration.
2023-08-09 03:30:56 +02:00
Po Lu
6f2e48bc52 Don't depend on Automake to generate exec/aclocal.m4
* autogen.sh (do_git): Generate exec/aclocal.m4 by hand.
(bug#65160)
2023-08-09 08:28:18 +08:00
Eric S. Raymond
fce3815921 Fix all my attributions to be correct and consistent...
...in case people are trying to track me down for questions.

.mailmap, ChangeLog.1, admin/notes/copyright, doc/emacs/ChangeLog.1,
doc/emacs/ack.texi, doc/lispref/ChangeLog.1, doc/misc/gnus.texi,
etc/ChangeLog.1, lib-src/ChangeLog.1, lisp/ChangeLog.13,
lisp/ChangeLog.14, lisp/ChangeLog.15, lisp/ChangeLog.17,
lisp/ChangeLog.3, lisp/ChangeLog.4, lisp/ChangeLog.5,
lisp/ChangeLog.6, lisp/ChangeLog.7, lisp/emacs-lisp/lisp-mnt.el,
lisp/finder.el, lisp/loadhist.el, lisp/play/cookie1.el,
lisp/progmodes/asm-mode.el, lisp/progmodes/gud.el,
lisp/progmodes/make-mode.el, lisp/term/AT386.el, src/ChangeLog.3
2023-08-08 20:07:52 -04:00
Alan Third
66a3bb36f9 Fix percentage sizes in SVG display (bug#64908)
* src/image.c (svg_css_length_to_pixels): Make percent units always
return zero and handle font size based units better.
(svg_load_image): Don't rely on the width and height values from the
SVG actually having any useful data, even if they're explicitly set.
2023-08-08 22:14:45 +01:00
Eli Zaretskii
dd1d8414b3 Fix insert-file-contents with pipes and /dev/stdin
* src/fileio.c (Finsert_file_contents): Restore logic of
non-regular but seekable files.  (Bug#65156)
2023-08-08 22:18:46 +03:00
Stefan Kangas
72e24ed031 ; Fix thinko 2023-08-08 19:53:22 +02:00
Stefan Kangas
2752573dfb Make news-path variable obsolete
* lisp/gnus/nnspool.el (news-path): Make obsolete.
(nnspool-spool-directory): Don't use above obsolete variable.
2023-08-08 19:53:18 +02:00
Stefan Kangas
b8c05636ca ; Fix typo 2023-08-08 19:08:56 +02:00
Stefan Kangas
62e990db7a Make ffap compat aliases obsolete
* lisp/ffap.el (ffap-newsgroup-regexp, ffap-newsgroup-heads)
(ffap-newsgroup-p): Make compatibility aliases obsolete.
2023-08-08 19:07:00 +02:00
Stefan Kangas
dabb713eb0 Make lm-verify footer checking more strict
* lisp/emacs-lisp/lisp-mnt.el (lm-verify): Make file footer regexp
more strict to match requirement in old versions of package.el (now
only a warning).
2023-08-08 19:05:01 +02:00
Stefan Kangas
10e4be740d Open Pipfile and flake8 config files in conf-mode
* lisp/progmodes/python.el (auto-mode-alist): Open Pipfile and flake8
configuration files in conf-mode.
2023-08-08 19:03:11 +02:00
Mattias Engdegård
41e766b449 Check keyword args of make-pipe-process (bug#65030)
* lisp/emacs-lisp/bytecomp.el (make-pipe-process): Add check.
2023-08-08 18:35:19 +02:00
Mattias Engdegård
516736cfa6 Better error for missing or bad :name arg in make-process etc
Improve on the famously bad error message given when the :name keyword
parameter is missing or of the wrong type in calls to make-process,
make-pipe-process and make-network-process (bug#65030).

* src/process.c (get_required_string_keyword_param): New function.
(Fmake_process, Fmake_pipe_process, Fmake_network_process): Use it.
2023-08-08 18:23:00 +02:00
Helmut Eller
3e79fd3d4e Check keyword args of make-process
The functions make-process and make-network-process have many
keyword args and it's easy to misspell some of them.

Use a compiler macro to warn about some possible mistakes.

* lisp/emacs-lisp/bytecomp.el (bytecomp--check-keyword-args): New
  helper.
  (make-process, make-network-process): Define a compiler macro that
  performs some checks but doesn't anything else.

* test/lisp/emacs-lisp/bytecomp-tests.el: Add some tests.

* test/lisp/emacs-lisp/bytecomp-resources/:
  (warn-make-process-missing-keyword-arg.el,
   warn-make-process-missing-keyword-value.el,
   warn-make-process-repeated-keyword-arg.el,
   warn-make-process-unknown-keyword-arg.el): New test files
2023-08-08 18:23:00 +02:00
Ulrich Müller
efb3ef0fe0 Disable json and tree-sitter with --without-all
* configure.ac (OPTION_DEFAULT_IFAVAILABLE): Disable the option if
--without-all was specified.  (Bug#65142)
2023-08-08 16:29:42 +02:00
Basil L. Contovounesios
d2f29bd3ce ; Update pdumper dump_buffer hash (bug#65146). 2023-08-08 14:57:34 +02:00
Basil L. Contovounesios
91854ceaee ; .mailmap: Flip entry.
Earl Hyatt's canonical info was the wrong way around (bug#49407).
2023-08-08 14:43:22 +02:00
David Ponce
22ebef12e9 * lisp/tooltip.el (tooltip-cancel-delayed-tip): Fix missing argument.
This resurrects tooltips, see bug#65147.
2023-08-08 15:33:45 +03:00
Eli Zaretskii
50649a6d1a ; * etc/PROBLEMS: Fix wording. 2023-08-08 15:22:14 +03:00
Po Lu
2b67609c34 Repair test failures stemming from Android merge
* lisp/kmacro.el (kmacro-step-edit-query)
(kmacro-step-edit-pre-command): Use `dummy-event' instead of
[nil] to continue a kbd macro; this is because nil now has a
function key map.
* src/androidfns.c (Fx_hide_tip): Allow calling this as a stub.
* src/fileio.c (Finsert_file_contents): In adherence to the
documentation, forbid supplying a BEG offset even for seekable
files, i.e. /dev/urandom on Linux kernel based systems.
2023-08-08 20:20:39 +08:00
Mattias Engdegård
0c58350b31 ; Fix dired-aux-tests failure (bug#65143)
* lisp/dired-aux.el (dired-do-create-files): Preserve the return value
that isn't documented but used by dired-test-bug30624 in
dired-aux-tests.  Change suggested by Po Lu.
2023-08-08 12:24:27 +02:00
Mattias Engdegård
5ab53729df ; Fix bad bytecomp-tests cases
* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--test-cases):
Repair broken test cases.
2023-08-08 12:05:48 +02:00
Mattias Engdegård
89bd651976 Teach byte-compiler about Aristotelian identity
* lisp/emacs-lisp/byte-opt.el (byte-optimize-equal, byte-optimize-eq):
Optimise (eq X X) -> t where X is a variable; idem for eql and equal.
* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--test-cases):
Add test case.
2023-08-08 11:46:18 +02:00
Po Lu
eeda9eff1a ; * src/fileio.c (Ffile_selinux_context): Avoid unused variable. 2023-08-08 16:21:45 +08:00
Po Lu
440f017658 Avoid caching file status when they are about to change
* java/org/gnu/emacs/EmacsSafThread.java (EmacsSafThread)
(cacheFileStatus): New argument NO_CACHE.
(cacheDirectoryFromCursor, statDocument1):
* java/org/gnu/emacs/EmacsService.java (EmacsService)
(statDocument): Plumb that argument through each of these wrapper
functions.
* src/android.c (android_init_emacs_service): Adjust JNI
function signatures to agree with statDocument1.
* src/androidvfs.c (android_saf_stat): Plumb that argument
through here.
(android_saf_tree_stat, android_saf_file_open): And don't cache
file status if a write is imminent.
2023-08-08 16:17:10 +08:00
Po Lu
27113c22f7 Minor improvements to write-region heuristic
* src/androidvfs.c (android_saf_stat): Set STATB->st_dev.
(android_fstat): Likewise.
(NATIVE_NAME): Seek to start of file after truncation.
* src/fileio.c (write_region): Use stat instead of open+fstat
to obtain updated mtime.
2023-08-08 16:02:49 +08:00
Po Lu
27a57f4cca * src/androidvfs.c (android_saf_file_open): Improve commentary. 2023-08-08 14:05:43 +08:00
Po Lu
5e7e7304c3 Fix truncation for the Android internal storage provider
* java/org/gnu/emacs/EmacsSafThread.java (openDocument1): If
truncate is specified while resorting to `w', try truncating the
file by hand.
2023-08-08 14:04:36 +08:00
Po Lu
8cd1681c32 Merge remote-tracking branch 'savannah/master' into master-android-1 2023-08-08 13:39:45 +08:00
Po Lu
d35ead5bd8 Utilize more frequently supported file access modes
* java/org/gnu/emacs/EmacsSafThread.java (openDocument1): Use
plain r or w where possible, as the fileio stuff is now better
prepared for FIFOs.
(openDocument): New argument READ.
* java/org/gnu/emacs/EmacsService.java (openDocument): New
argument READ.
* src/android.c (android_init_emacs_service): Adjust
correspondingly.
* src/androidvfs.c (android_saf_file_open): Don't support
O_APPEND.  Pass read as well as trunc and write.
2023-08-08 13:39:16 +08:00
Po Lu
3fb2c174d3 Enable visiting FIFOs as files
* doc/lispref/files.texi (Reading from Files): Document new
`if-regular' value of REPLACE.

* etc/NEWS: Announce the new value.

* lisp/files.el (basic-save-buffer-2): Demote errors saving
backup files, since FIFOs cannot be copied.
(revert-buffer-insert-file-contents--default-function): Supply
`if-regular' instead of t as REPLACE.

* src/fileio.c (selinux_enabled_p): New function.
(Fcopy_file, Ffile_selinux_context, Fset_file_selinux_context):
Call that function to ascertain if SELinux applies to a file.
(read_non_regular): Don't assume `emacs_fd_read' always returns
int.
(Finsert_file_contents): If REPLACE is if-regular and FILENAME
is a special non-seekable file, fall back to erasing the buffer
before inserting the contents of that file.
(syms_of_fileio) <Qif_regular>: New symbol.
2023-08-08 13:37:00 +08:00
Stefan Kangas
52ad5dc479 Add calling convention to x-compose-font-name
* lisp/international/fontset.el (x-compose-font-name): Add
advertised-calling-convention for argument ignored since 22.1.
2023-08-08 07:08:18 +02:00