1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-25 06:50:46 -08:00
Commit graph

168110 commits

Author SHA1 Message Date
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
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
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
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
Stefan Kangas
44e919adb6 Make x-font-name-charset-alist obsolete
* lisp/international/fontset.el (x-font-name-charset-alist): Make
obsolete.  It has been a no-op since Emacs 22.
2023-08-08 07:08:18 +02:00
Paul Eggert
85b6c150c8 Fix some emacs_fopen confusion
Problem reported by Po Lu in:
https://lists.gnu.org/r/emacs-devel/2023-08/msg00195.html
* src/comp.c (comp_hash_source_file, Fcomp__release_ctxt):
* src/sysdep.c (get_up_time, procfs_ttyname, procfs_get_total_memory):
Be more systematic about using emacs_fclose on streams that were
opened with emacs_fopen or emacs_fdopen.  Do this even if not
Android, as this simplifies checking that it's done consistently.
* src/lisp.h (emacs_fclose): If it’s just fclose,
make it a macro rather than a function, to avoid confusing gcc
-Wmismatched-dealloc.
(emacs_fopen): Move decl here from sysstdio.h, because sysstdio.h
is included from non-Emacs executables and emacs_fopen is good
only inside Emacs.
* src/sysdep.c (emacs_fclose): Define as a function only if Android.
2023-08-07 21:26:36 -07:00
Stefan Kangas
a579739e2b Make XEmacs compat aliases for timers obsolete
* lisp/emacs-lisp/timer.el (disable-timeout, add-timeout): Make
XEmacs compat aliases obsolete.  Update all callers.
2023-08-08 04:53:08 +02:00
Jim Porter
301e6a747a Fix listing of directory contents after "cd" in Eshell
* lisp/eshell/em-dirs.el (eshell/cd): Ensure we don't close the I/O
handles prematurely.  Additionally, don't clobber the "cd" command's
last-command info.

* test/lisp/eshell/em-dirs-tests.el (em-dirs-test/cd):
(em-dirs-test/cd/list-files-after-cd): New tests (bug#65110).
2023-08-07 19:35:43 -07:00
Stefan Kangas
b48793253b Make Emacs 21 compat aliases easy-mmode-* obsolete
* lisp/emacs-lisp/easy-mmode.el (easy-mmode-define-minor-mode)
(easy-mmode-define-global-mode): Make Emacs 21 compatibility aliases
obsolete.
* doc/lispref/loading.texi (Autoload):
* doc/lispref/modes.texi (Defining Minor Modes): Don't document
above obsolete aliases.
2023-08-08 04:03:17 +02:00
Stefan Kangas
3eedcf6ee9 Make describe-keymap tests more robust
* test/lisp/help-fns-tests.el
(help-fns-test-describe-keymap/symbol)
(help-fns-test-describe-keymap/value)
(help-fns-test-describe-keymap/not-keymap)
(help-fns-test-describe-keymap/let-bound)
(help-fns-test-describe-keymap/dynamically-bound-no-file): Make
tests independent of minibuffer-local-must-match-map.
2023-08-08 03:54:02 +02:00
Stefan Kangas
bbd69f1663 Delete useless conditional in describe-keymap
* lisp/help-fns.el (describe-keymap): Delete useless
conditional.  (Bug#65128)
2023-08-08 03:40:03 +02:00
Po Lu
594e03526b ; * configure.ac: Fix typo in commentary. 2023-08-08 08:55:23 +08:00
Po Lu
a97edc9556 Eschew linking Gnulib files to cross unless building for Android
* configure.ac: Don't link Gnulib files to cross unless building
for Android.
2023-08-08 08:55:02 +08:00
Paul Eggert
4a2367d2f0 Simplify lockfile name calculation
* src/filelock.c (get_boot_time):
Move ‘counter’ decl to simplify #ifdef nesting.
(lock_file_1): Refactor two snprintf calls into one.
Don’t assume INT_MAX < SIZE_MAX.
2023-08-07 13:59:44 -07:00
Paul Eggert
7cd8236d35 Pacify --enable-gcc-warnings with emacs_fdopen
* src/lisp.h (emacs_fdopen): Now ATTRIBUTE_MALLOC
ATTRIBUTE_DEALLOC (emacs_fclose, 1), to pacify gcc
-Wsuggest-attribute=malloc on non-Android platforms.
2023-08-07 09:19:42 -07:00
Eli Zaretskii
a95253f5cc Fix configuring with --enable-checking on non-Android platforms
* configure.ac (ENABLE_CHECKING): Fix test for --with-android.
2023-08-07 17:43:33 +03:00
Po Lu
72a606bb27 Fix mouse face display bug on MS-DOS
* src/msdos.c (tty_draw_row_with_mouse_face): Tweak coordinates to
reflect the number of glyphs used within the margin area.
2023-08-07 21:14:53 +08:00
Po Lu
6990af4ca9 * nt/gnulib-cfg.mk: Excise unneeded entries. 2023-08-07 20:18:46 +08:00