]> git.eshelyaron.com Git - emacs.git/log
emacs.git
16 months agoRemove compat code for XEmacs' itimer.el
Stefan Kangas [Sat, 12 Aug 2023 13:29:09 +0000 (15:29 +0200)]
Remove compat code for XEmacs' itimer.el

* lisp/progmodes/idlwave.el (idlwave-update-routine-info)
(idlwave-start-load-rinfo-timer):
* lisp/type-break.el (type-break-cancel-function-timers)
(type-break-run-at-time): Remove XEmacs compat code.

16 months agoMake dired-move-to-filename-regexp obsolete
Stefan Kangas [Sat, 12 Aug 2023 12:36:59 +0000 (14:36 +0200)]
Make dired-move-to-filename-regexp obsolete

* lisp/dired.el (dired-move-to-filename-regexp): Make Emacs 21
compatibility alias obsolete.

16 months agoMerge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Michael Albinus [Sat, 12 Aug 2023 13:17:59 +0000 (15:17 +0200)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs

16 months agoRemove superfluous check from vc-hooks.el
Michael Albinus [Sat, 12 Aug 2023 13:17:32 +0000 (15:17 +0200)]
Remove superfluous check from vc-hooks.el

* lisp/vc/vc-hooks.el (vc-registered): Don't check whether
`file-name-handler-alist' is bound, the check is superfluous.

16 months ago; * java/INSTALL (LOCATING NECESSARY FILES): New section.
Po Lu [Sat, 12 Aug 2023 12:58:13 +0000 (20:58 +0800)]
; * java/INSTALL (LOCATING NECESSARY FILES): New section.

16 months agoStop `use-package-report` from displaying an empty buffer
Stefan Kangas [Sat, 12 Aug 2023 10:43:19 +0000 (12:43 +0200)]
Stop `use-package-report` from displaying an empty buffer

* lisp/use-package/use-package-core.el (use-package-report): Signal
user-error if there are no statistics to display, instead of showing
an empty buffer.

16 months agoFix 'insert-file-contents' with non-regular files
Eli Zaretskii [Sat, 12 Aug 2023 08:02:52 +0000 (11:02 +0300)]
Fix 'insert-file-contents' with non-regular files

* src/fileio.c (Finsert_file_contents): Fix the doc string.  Erase
only the accessible portion of the buffer, not the entire buffer.
(Bug#65156)

16 months agoUpdate lists of non-UTF files
Paul Eggert [Sat, 12 Aug 2023 06:09:39 +0000 (23:09 -0700)]
Update lists of non-UTF files

* .gitattributes: Don't diff text files with encodings
incompatible with UTF-8.  Add some new binary file extensions,
like '.webp'.  etc/e/eterm-direct and java/emacs.keystore
are also binary.
* admin/notes/unicode: Update similarly.

16 months ago* lisp/emacs-lisp/cl-macs.el (cl--labels-convert): Fix bug#65017
Stefan Monnier [Sat, 12 Aug 2023 03:14:05 +0000 (23:14 -0400)]
* lisp/emacs-lisp/cl-macs.el (cl--labels-convert): Fix bug#65017

This fixes what I consider to be the core of the bug, by handling
`cl--labels-convert-cache` more carefully (i.e. being more careful how
we look up its value and by flushing it ASAP).

16 months agoImprove precision pixel scrolling
Po Lu [Sat, 12 Aug 2023 02:21:34 +0000 (10:21 +0800)]
Improve precision pixel scrolling

* lisp/pixel-scroll.el (pixel-scroll-precision-scroll-down-page)
(pixel-scroll-precision-scroll-up-page): Use
pos-visible-in-window-p to opt between the next line or to the
window start rather than computing the next position by hand.
(pixel-scroll-precision-mode): Disable
make-cursor-line-fully-visible.  (bug#65214)
* src/image.c (jpeg_load_body): Fix crash if libjpeg detects an
error before ximg is initialized.
* src/xdisp.c (display_and_set_cursor): Don't display cursor in
vscrolled-away row.

16 months ago* lisp/indent-aux.el (kill-ring-deindent-mode): Add autoload cookie.
Po Lu [Sat, 12 Aug 2023 01:06:52 +0000 (09:06 +0800)]
* lisp/indent-aux.el (kill-ring-deindent-mode): Add autoload cookie.

16 months agoMake kill-ring-deindent-mode autoloaded
Po Lu [Sat, 12 Aug 2023 01:04:19 +0000 (09:04 +0800)]
Make kill-ring-deindent-mode autoloaded

* lisp/indent-aux.el
(kill-ring-deindent-buffer-substring-function)
(kill-ring-deindent-mode, indent-aux):
* lisp/simple.el (kill-ring-deindent-buffer-substring-function)
(kill-ring-deindent-mode): Move kill-ring-deindent-mode to
indent-aux.el.

16 months agoUnbreak project-find-file's future history when cpd is not root
Dmitry Gutov [Sat, 12 Aug 2023 00:58:53 +0000 (03:58 +0300)]
Unbreak project-find-file's future history when cpd is not root

* lisp/progmodes/project.el (project-find-file): Pass in
buffer-file-name as absolute name (bug#63829).
(project--read-file-cpd-relative): Make it relative to the
appropriate common parent dir.

16 months agoxref-find-references-and-replace: Use identifier-at-point in prompt
Dmitry Gutov [Sat, 12 Aug 2023 00:39:32 +0000 (03:39 +0300)]
xref-find-references-and-replace: Use identifier-at-point in prompt

* lisp/progmodes/xref.el (xref-find-references-and-replace):
Use identifier-at-point in prompt as defined by backend (bug#63939).

16 months ago(project--keymap-prompt): Use help-key-binding face
Dmitry Gutov [Sat, 12 Aug 2023 00:34:53 +0000 (03:34 +0300)]
(project--keymap-prompt): Use help-key-binding face

* lisp/progmodes/project.el (project--keymap-prompt): Use
help-key-binding face and adjust the prompt to fit (bug#64799).

16 months ago; * lisp/files.el (delete-file): Add expand-file-name back.
Eli Zaretskii [Fri, 11 Aug 2023 12:03:48 +0000 (15:03 +0300)]
; * lisp/files.el (delete-file): Add expand-file-name back.

16 months ago; Improve documentation of a recent addition
Eli Zaretskii [Fri, 11 Aug 2023 11:52:12 +0000 (14:52 +0300)]
; Improve documentation of a recent addition

* lisp/simple.el (kill-ring-deindent-buffer-substring-function):
Doc fix.

16 months agoImprove kill-ring-deindent-mode
Po Lu [Fri, 11 Aug 2023 08:08:16 +0000 (16:08 +0800)]
Improve kill-ring-deindent-mode

* etc/NEWS:
* lisp/simple.el (kill-ring-deindent-buffer-substring-function):
(kill-ring-deindent-mode): Deindent by the column number at BEG
in lieu of the indentation at BEG.

16 months agoNew global minor mode `kill-ring-deindent-mode'
Po Lu [Fri, 11 Aug 2023 07:58:31 +0000 (15:58 +0800)]
New global minor mode `kill-ring-deindent-mode'

* etc/NEWS: Announce the new minor mode.

* lisp/simple.el (kill-ring-deindent-buffer-substring-function):
New function.
(kill-ring-deindent-mode): New minor mode, for trimming excess
indentation from saved text.

16 months agoMinor adjustments to Android port
Po Lu [Fri, 11 Aug 2023 06:55:21 +0000 (14:55 +0800)]
Minor adjustments to Android port

* java/org/gnu/emacs/EmacsService.java (readDirectoryEntry):
Also refrain from returning NULL or file names containing
non-representable NULL bytes.
* src/callproc.c (get_current_directory): Clean up by employing
android_is_special_directory.

16 months agoRepair mailutils configury
Po Lu [Fri, 11 Aug 2023 00:57:04 +0000 (08:57 +0800)]
Repair mailutils configury

* configure.ac (with_mailutils): When processing defaults,
set to yes-unless-android if with_features.
(HAVE_MAILUTILS): Later, disable Mailutils if yes-on-android
and with_android is set.  This is the minimal Emacs build
for the build machine.  (bug#65190)

16 months ago; * doc/misc/eshell.texi (Bugs and ideas): Remove already-fixed bugs.
Jim Porter [Thu, 10 Aug 2023 22:01:39 +0000 (15:01 -0700)]
; * doc/misc/eshell.texi (Bugs and ideas): Remove already-fixed bugs.

16 months agoReturn separators from 'eshell-split-commands' directly when requested
Jim Porter [Tue, 8 Aug 2023 05:28:24 +0000 (22:28 -0700)]
Return separators from 'eshell-split-commands' directly when requested

This eliminates the need for using a dynamically-bound variable to
hold the list of separators.

* lisp/eshell/esh-cmd.el (eshell--sep-terms): Remove.
(eshell-split-commands): New function, adapted from
'eshell-separate-commands'.
(eshell-separate-commands): Make obsolete, and call
'eshell-split-commands'.
(eshell-parse-command, eshell-parse-pipeline): Use
'eshell-split-commands'.

* lisp/eshell/esh-arg.el (eshell-parse-delimiter): Update comment.

16 months agoSimplify command parsing in Eshell
Jim Porter [Tue, 8 Aug 2023 05:15:18 +0000 (22:15 -0700)]
Simplify command parsing in Eshell

* lisp/eshell/esh-cmd.el (eshell-parse-command): Do all modifications
to each command in a single pass.
(eshell-parse-pipeline): Remove unncessary reversing of parsed
results.

16 months agoUniformly verify sfnt_read_table_directory doesn't return TTC header
Po Lu [Thu, 10 Aug 2023 09:24:24 +0000 (17:24 +0800)]
Uniformly verify sfnt_read_table_directory doesn't return TTC header

* src/sfntfont.c (sfnt_enum_font, sfntfont_read_cmap)
(sfnt_open_tables): Check for -1 return value from
sfnt_read_table_directory.

16 months ago; [NSString lispString]: clarify unpaired surrogate behaviour
Mattias Engdegård [Thu, 10 Aug 2023 08:56:21 +0000 (10:56 +0200)]
; [NSString lispString]: clarify unpaired surrogate behaviour

16 months agoScroll up and down in image-dired
Manuel Giraud [Thu, 9 Mar 2023 13:35:31 +0000 (14:35 +0100)]
Scroll up and down in image-dired

* lisp/image/image-dired.el (image-dired-scroll):
Function to manage scroll in image-dired.
(image-dired-scroll-up, image-dired-scroll-down): Scroll up and down
command in image-dired.
(image-dired-thumbnail-mode-map): Use them.  (Bug#65052)

16 months agoStreamline definition of BOOT_TIME_FILE on MS-Windows
Eli Zaretskii [Thu, 10 Aug 2023 08:44:49 +0000 (11:44 +0300)]
Streamline definition of BOOT_TIME_FILE on MS-Windows

* nt/inc/ms-w32.h: Don't define BOOT_TIME_FILE here...
* configure.ac: ...define it here instead, as for the other
systems.

16 months ago; Improve sectioning and documentation in xterm.c
Po Lu [Thu, 10 Aug 2023 06:15:03 +0000 (14:15 +0800)]
; Improve sectioning and documentation in xterm.c

* src/xterm.c (x_dnd_compute_toplevels, x_dnd_get_target_window_1)
(x_dnd_get_wm_state_and_proto, xi_frame_selected_for)
(xi_convert_event_state, x_free_xi_devices)
(xi_populate_device_from_info): Improve sectioning, fill some
lines to 80 columns.  Not all lines could be filled as a result
of XCB's heretically long identifier names.

16 months ago; * lisp/calendar/cal-move.el (calendar-scroll-left): Fix last change.
Po Lu [Thu, 10 Aug 2023 05:32:30 +0000 (13:32 +0800)]
; * lisp/calendar/cal-move.el (calendar-scroll-left): Fix last change.

16 months agoAlso fix calendar-scroll-left
Po Lu [Thu, 10 Aug 2023 05:30:33 +0000 (13:30 +0800)]
Also fix calendar-scroll-left

* lisp/calendar/cal-move.el (calendar-scroll-left): Use
`calendar-event-buffer' instead of assuming that EVENT's
posn-window is always a window.

16 months agoRepair several minor breakages
Po Lu [Thu, 10 Aug 2023 05:25:29 +0000 (13:25 +0800)]
Repair several minor breakages

* lisp/calendar/calendar.el (calendar-event-buffer): New
function.
(calendar-cursor-to-date, calendar-other-month):

* lisp/calendar/holidays.el (calendar-list-holidays)
(calendar-mark-holidays):

* lisp/calendar/lunar.el (calendar-lunar-phases): Use that
function to derive event windows, in case these commands are
being called from the menu bar.

* lisp/doc-view.el (doc-view-tool-bar-map): Fix typo in help
text.

16 months ago; * configure.ac: Fix typo.
Po Lu [Thu, 10 Aug 2023 01:58:02 +0000 (01:58 +0000)]
; * configure.ac: Fix typo.

16 months agoFix the MS-DOS, Haiku, USG, etc builds
Po Lu [Thu, 10 Aug 2023 01:53:26 +0000 (01:53 +0000)]
Fix the MS-DOS, Haiku, USG, etc builds

* configure.ac (emacs_cv_boot_time_file): Only compute this on
GNU/Linux, the sole system with systemd.
* nt/inc/ms-w32.h (BOOT_TIME_FILE): Remove now redundant #undef.
* src/filelock.c (get_boot_time): Eschew BOOT_TIME_FILE if not
defined.

16 months agoFurther improve android.texi
Po Lu [Thu, 10 Aug 2023 01:03:23 +0000 (09:03 +0800)]
Further improve android.texi

* doc/emacs/android.texi (Android Environment): Improve
sectioning by replacing subsections with simple entries in the
concept index.

16 months agoFix crash when reading TTC font for glyph mapping table selection
Po Lu [Thu, 10 Aug 2023 00:58:04 +0000 (08:58 +0800)]
Fix crash when reading TTC font for glyph mapping table selection

* src/sfnt.c (sfnt_read_cmap_table): Seek to the table directory
if DESC->offset is provided.
* src/sfntfont.c (sfntfont_read_cmap): Accurately verify cmap
subtable header size.  (bug#65185)

16 months agoMake node-less sections subsections in android.texi
Po Lu [Thu, 10 Aug 2023 00:42:23 +0000 (08:42 +0800)]
Make node-less sections subsections in android.texi

* doc/emacs/android.texi (Android Environment): Change node-less
sections into subsections.

16 months agoFix pinch gestures after toolkit menu
Po Lu [Thu, 10 Aug 2023 00:40:48 +0000 (08:40 +0800)]
Fix pinch gestures after toolkit menu

* src/xmenu.c (leave_toolkit_menu): Restore gesture event
mask.  (bug#65129)

16 months agoAdjust to random-seed move
Paul Eggert [Wed, 9 Aug 2023 19:06:25 +0000 (12:06 -0700)]
Adjust to random-seed move

For some time, GNU/Linux systems have put their random-seed file
somewhere other than where src/filelock.c looks for it.
Catch up to this by having 'configure' scout for it.
* configure.ac (BOOT_TIME_FILE):
Define this at configure-time.
* nt/inc/ms-w32.h (BOOT_TIME_FILE): Override 'configure'.
* src/filelock.c (BOOT_TIME_FILE): Remove default definition,
since 'configure' defaults it now.

16 months ago; Improve INSTALL files
Eli Zaretskii [Wed, 9 Aug 2023 19:03:00 +0000 (22:03 +0300)]
; Improve INSTALL files

* INSTALL:
* java/INSTALL: Improve and clarify instructions.

16 months ago; Fix whitespace in eglot.el
Eli Zaretskii [Wed, 9 Aug 2023 13:15:25 +0000 (16:15 +0300)]
; Fix whitespace in eglot.el

* lisp/progmodes/eglot.el (eglot-server-programs): Fix whitespace.
Reported by Allen Li <darkfeline@felesatra.moe>.  (Bug#65161)

16 months ago; * test/lisp/net/tramp-tests.el: duck make-process bytecomp warning
Mattias Engdegård [Wed, 9 Aug 2023 12:57:07 +0000 (14:57 +0200)]
; * test/lisp/net/tramp-tests.el: duck make-process bytecomp warning

16 months agoDon't signal when I-search occurs within a kbd macro
Po Lu [Wed, 9 Aug 2023 12:42:44 +0000 (20:42 +0800)]
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)

16 months agoRemove harmful and redundant bindings from the byte compiler.
Alan Mackenzie [Wed, 9 Aug 2023 11:27:28 +0000 (11:27 +0000)]
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.

16 months agoFaster NSString to Lisp string conversion
Mattias Engdegård [Wed, 9 Aug 2023 10:34:06 +0000 (12:34 +0200)]
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.

16 months agoRemove a DEFSYM that no longer needs to be in the C core.
Eric S. Raymond [Wed, 9 Aug 2023 10:05:24 +0000 (06:05 -0400)]
Remove a DEFSYM that no longer needs to be in the C core.

* src/fileio.c (syms_of_fileio): Remove Qmove_file_to_trash.

16 months agoFix crashes runninging android-emacs with bad LD_LIBRARY_PATH
Po Lu [Wed, 9 Aug 2023 06:23:25 +0000 (14:23 +0800)]
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.

16 months agoImprove Emacsbug output
Po Lu [Wed, 9 Aug 2023 04:21:03 +0000 (12:21 +0800)]
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.

16 months agoAdd a string check to delete-file-internal.
Eric S. Raymond [Wed, 9 Aug 2023 04:02:22 +0000 (00:02 -0400)]
Add a string check to delete-file-internal.

* src/fileio.c (delete-file-internal): Argument should be a string.

16 months ago* lisp/ldefs-boot.el: Restore no-byte-compile cookie.
Po Lu [Wed, 9 Aug 2023 01:50:35 +0000 (09:50 +0800)]
* lisp/ldefs-boot.el: Restore no-byte-compile cookie.

16 months ago* doc/misc/calc.texi (Musical Notes): Fix build with Texinfo 4.13.
Po Lu [Wed, 9 Aug 2023 01:21:36 +0000 (09:21 +0800)]
* doc/misc/calc.texi (Musical Notes): Fix build with Texinfo 4.13.

16 months agoRun Git hooks within xcu4
Po Lu [Wed, 9 Aug 2023 01:20:15 +0000 (09:20 +0800)]
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.

16 months ago; Minor adjustments to configury, loaddefs and gitignore
Po Lu [Wed, 9 Aug 2023 01:19:11 +0000 (09:19 +0800)]
; 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.

16 months ago; * .gitignore: Add exec/aclocal.m4.
Stefan Kangas [Wed, 9 Aug 2023 01:35:18 +0000 (03:35 +0200)]
; * .gitignore: Add exec/aclocal.m4.

16 months agoAdd calling convention to face-attr-construct
Stefan Kangas [Wed, 9 Aug 2023 01:30:56 +0000 (03:30 +0200)]
Add calling convention to face-attr-construct

* lisp/faces.el (face-attr-construct): Add
advertised-calling-convention declaration.

16 months agoDon't depend on Automake to generate exec/aclocal.m4
Po Lu [Wed, 9 Aug 2023 00:26:45 +0000 (08:26 +0800)]
Don't depend on Automake to generate exec/aclocal.m4

* autogen.sh (do_git): Generate exec/aclocal.m4 by hand.
(bug#65160)

16 months agoFix all my attributions to be correct and consistent...
Eric S. Raymond [Wed, 9 Aug 2023 00:02:17 +0000 (20:02 -0400)]
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

16 months agoFix percentage sizes in SVG display (bug#64908)
Alan Third [Sat, 5 Aug 2023 09:39:31 +0000 (10:39 +0100)]
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.

16 months ago; Fix thinko
Stefan Kangas [Tue, 8 Aug 2023 17:53:22 +0000 (19:53 +0200)]
; Fix thinko

16 months agoMake news-path variable obsolete
Stefan Kangas [Tue, 8 Aug 2023 17:16:23 +0000 (19:16 +0200)]
Make news-path variable obsolete

* lisp/gnus/nnspool.el (news-path): Make obsolete.
(nnspool-spool-directory): Don't use above obsolete variable.

16 months ago; Fix typo
Stefan Kangas [Tue, 8 Aug 2023 17:08:56 +0000 (19:08 +0200)]
; Fix typo

16 months agoMake ffap compat aliases obsolete
Stefan Kangas [Tue, 8 Aug 2023 17:07:00 +0000 (19:07 +0200)]
Make ffap compat aliases obsolete

* lisp/ffap.el (ffap-newsgroup-regexp, ffap-newsgroup-heads)
(ffap-newsgroup-p): Make compatibility aliases obsolete.

16 months agoMake lm-verify footer checking more strict
Stefan Kangas [Tue, 8 Aug 2023 17:04:48 +0000 (19:04 +0200)]
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).

16 months agoOpen Pipfile and flake8 config files in conf-mode
Stefan Kangas [Tue, 8 Aug 2023 17:01:18 +0000 (19:01 +0200)]
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.

16 months agoCheck keyword args of make-pipe-process (bug#65030)
Mattias Engdegård [Tue, 8 Aug 2023 16:33:50 +0000 (18:33 +0200)]
Check keyword args of make-pipe-process (bug#65030)

* lisp/emacs-lisp/bytecomp.el (make-pipe-process): Add check.

16 months agoBetter error for missing or bad :name arg in make-process etc
Mattias Engdegård [Tue, 8 Aug 2023 16:09:08 +0000 (18:09 +0200)]
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.

16 months agoCheck keyword args of make-process
Helmut Eller [Thu, 3 Aug 2023 06:33:40 +0000 (08:33 +0200)]
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

16 months agoDisable json and tree-sitter with --without-all
Ulrich Müller [Tue, 8 Aug 2023 06:34:43 +0000 (08:34 +0200)]
Disable json and tree-sitter with --without-all

* configure.ac (OPTION_DEFAULT_IFAVAILABLE): Disable the option if
--without-all was specified.  (Bug#65142)

16 months ago; Update pdumper dump_buffer hash (bug#65146).
Basil L. Contovounesios [Tue, 8 Aug 2023 12:57:34 +0000 (14:57 +0200)]
; Update pdumper dump_buffer hash (bug#65146).

16 months ago; .mailmap: Flip entry.
Basil L. Contovounesios [Tue, 8 Aug 2023 12:43:22 +0000 (14:43 +0200)]
; .mailmap: Flip entry.

Earl Hyatt's canonical info was the wrong way around (bug#49407).

16 months ago* lisp/tooltip.el (tooltip-cancel-delayed-tip): Fix missing argument.
David Ponce [Tue, 8 Aug 2023 10:47:13 +0000 (12:47 +0200)]
* lisp/tooltip.el (tooltip-cancel-delayed-tip): Fix missing argument.

This resurrects tooltips, see bug#65147.

16 months agoRepair test failures stemming from Android merge
Po Lu [Tue, 8 Aug 2023 12:20:02 +0000 (20:20 +0800)]
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.

16 months ago; Fix dired-aux-tests failure (bug#65143)
Mattias Engdegård [Tue, 8 Aug 2023 10:24:27 +0000 (12:24 +0200)]
; 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.

16 months ago; Fix bad bytecomp-tests cases
Mattias Engdegård [Tue, 8 Aug 2023 10:05:48 +0000 (12:05 +0200)]
; Fix bad bytecomp-tests cases

* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--test-cases):
Repair broken test cases.

16 months agoTeach byte-compiler about Aristotelian identity
Mattias Engdegård [Mon, 7 Aug 2023 16:14:42 +0000 (18:14 +0200)]
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.

16 months ago; * src/fileio.c (Ffile_selinux_context): Avoid unused variable.
Po Lu [Tue, 8 Aug 2023 08:21:45 +0000 (16:21 +0800)]
; * src/fileio.c (Ffile_selinux_context): Avoid unused variable.

16 months agoAvoid caching file status when they are about to change
Po Lu [Tue, 8 Aug 2023 08:17:10 +0000 (16:17 +0800)]
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.

16 months agoMinor improvements to write-region heuristic
Po Lu [Tue, 8 Aug 2023 08:02:49 +0000 (16:02 +0800)]
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.

16 months ago* src/androidvfs.c (android_saf_file_open): Improve commentary.
Po Lu [Tue, 8 Aug 2023 06:05:43 +0000 (14:05 +0800)]
* src/androidvfs.c (android_saf_file_open): Improve commentary.

16 months agoFix truncation for the Android internal storage provider
Po Lu [Tue, 8 Aug 2023 06:04:36 +0000 (14:04 +0800)]
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.

16 months agoMerge remote-tracking branch 'savannah/master' into master-android-1
Po Lu [Tue, 8 Aug 2023 05:39:45 +0000 (13:39 +0800)]
Merge remote-tracking branch 'savannah/master' into master-android-1

16 months agoUtilize more frequently supported file access modes
Po Lu [Tue, 8 Aug 2023 05:39:16 +0000 (13:39 +0800)]
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.

16 months agoEnable visiting FIFOs as files
Po Lu [Tue, 8 Aug 2023 05:37:00 +0000 (13:37 +0800)]
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.

16 months agoAdd calling convention to x-compose-font-name
Stefan Kangas [Tue, 8 Aug 2023 04:11:51 +0000 (06:11 +0200)]
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.

16 months agoMake x-font-name-charset-alist obsolete
Stefan Kangas [Tue, 8 Aug 2023 03:52:31 +0000 (05:52 +0200)]
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.

16 months agoFix some emacs_fopen confusion
Paul Eggert [Tue, 8 Aug 2023 04:23:28 +0000 (21:23 -0700)]
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.

16 months agoMake XEmacs compat aliases for timers obsolete
Stefan Kangas [Tue, 8 Aug 2023 02:53:08 +0000 (04:53 +0200)]
Make XEmacs compat aliases for timers obsolete

* lisp/emacs-lisp/timer.el (disable-timeout, add-timeout): Make
XEmacs compat aliases obsolete.  Update all callers.

16 months agoFix listing of directory contents after "cd" in Eshell
Jim Porter [Sun, 6 Aug 2023 20:34:18 +0000 (13:34 -0700)]
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).

16 months agoMake Emacs 21 compat aliases easy-mmode-* obsolete
Stefan Kangas [Tue, 8 Aug 2023 02:03:17 +0000 (04:03 +0200)]
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.

16 months agoMake describe-keymap tests more robust
Stefan Kangas [Tue, 8 Aug 2023 01:45:19 +0000 (03:45 +0200)]
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.

16 months agoDelete useless conditional in describe-keymap
Stefan Kangas [Tue, 8 Aug 2023 01:37:54 +0000 (03:37 +0200)]
Delete useless conditional in describe-keymap

* lisp/help-fns.el (describe-keymap): Delete useless
conditional.  (Bug#65128)

16 months ago; * configure.ac: Fix typo in commentary.
Po Lu [Tue, 8 Aug 2023 00:55:23 +0000 (08:55 +0800)]
; * configure.ac: Fix typo in commentary.

16 months agoEschew linking Gnulib files to cross unless building for Android
Po Lu [Tue, 8 Aug 2023 00:55:02 +0000 (08:55 +0800)]
Eschew linking Gnulib files to cross unless building for Android

* configure.ac: Don't link Gnulib files to cross unless building
for Android.

16 months agoSimplify lockfile name calculation
Paul Eggert [Mon, 7 Aug 2023 20:57:13 +0000 (13:57 -0700)]
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.

16 months agoPacify --enable-gcc-warnings with emacs_fdopen
Paul Eggert [Mon, 7 Aug 2023 16:17:56 +0000 (09:17 -0700)]
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.

16 months agoFix configuring with --enable-checking on non-Android platforms
Eli Zaretskii [Mon, 7 Aug 2023 14:43:33 +0000 (17:43 +0300)]
Fix configuring with --enable-checking on non-Android platforms

* configure.ac (ENABLE_CHECKING): Fix test for --with-android.

16 months agoFix mouse face display bug on MS-DOS
Po Lu [Mon, 7 Aug 2023 13:14:53 +0000 (21:14 +0800)]
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.

16 months ago* nt/gnulib-cfg.mk: Excise unneeded entries.
Po Lu [Mon, 7 Aug 2023 12:18:46 +0000 (20:18 +0800)]
* nt/gnulib-cfg.mk: Excise unneeded entries.

16 months ago* nt/gnulib-cfg.mk: Excise unneeded entries.
Po Lu [Mon, 7 Aug 2023 12:17:55 +0000 (20:17 +0800)]
* nt/gnulib-cfg.mk: Excise unneeded entries.

16 months agoStop tracking exec/config.h.in
Po Lu [Mon, 7 Aug 2023 12:15:33 +0000 (20:15 +0800)]
Stop tracking exec/config.h.in

* .gitignore: Add exec/config.h.in.

* exec/config.h.in: Remove from Git.