]> git.eshelyaron.com Git - emacs.git/log
emacs.git
14 months ago* lisp/tab-bar.el: Show full tab names on tooltips (bug#65554).
Juri Linkov [Mon, 28 Aug 2023 06:52:36 +0000 (09:52 +0300)]
* lisp/tab-bar.el: Show full tab names on tooltips (bug#65554).

(tab-bar--format-tab): Use tab names for :help strings.
It's useful to see original tab names when the tab-bar displays names
truncated by tab-bar-auto-width, etc.
(tab-bar-format-menu-bar): Fix string case for consistency with other items.

14 months agoUpdate Android port
Po Lu [Mon, 28 Aug 2023 05:08:22 +0000 (13:08 +0800)]
Update Android port

* java/org/gnu/emacs/EmacsActivity.java (attachWindow, onDestroy)
(onWindowFocusChanged, onContextMenuClosed):

* java/org/gnu/emacs/EmacsContextMenu.java (onMenuItemClick):

* java/org/gnu/emacs/EmacsDialog.java (onClick, display1, onDismiss):

* java/org/gnu/emacs/EmacsOpenActivity.java (checkReadableOrCopy)
(onDestroy, onWindowFocusChanged, onPause):

* java/org/gnu/emacs/EmacsWindowAttachmentManager.java
(registerWindow, removeWindowConsumer, detachWindow)
(noticeIconified, noticeDeiconified): Remove superfluous
debugging code now that the Android port is stable.

* java/org/gnu/emacs/EmacsView.java (onLayout): Detect if the
IME is hidden while a toplevel window is focused, and clear
isCurrentlyTextEditor in that case.
(onApplyWindowInsets): New function.
(raise, lower, popupMenu, onCreateInputConnection): Delete
aforementioned debugging code.

14 months agoUse ensure-list in many more places
Stefan Kangas [Sun, 27 Aug 2023 19:45:30 +0000 (21:45 +0200)]
Use ensure-list in many more places

* lisp/align.el (align-region):
* lisp/auth-source-pass.el (auth-source-pass--build-result-many):
* lisp/auth-source.el (auth-source-ensure-strings):
* lisp/calendar/appt.el (appt-disp-window):
* lisp/cedet/mode-local.el (mode-local-map-mode-buffers):
* lisp/cus-edit.el (custom-prompt-variable)
(custom-variable-menu-create):
* lisp/dired-x.el (dired-mark-extension, dired-mark-suffix):
* lisp/emacs-lisp/checkdoc.el (checkdoc-defun-info):
* lisp/emacs-lisp/eieio.el (object-add-to-list):
* lisp/emulation/cua-base.el (cua--M/H-key):
* lisp/epg.el (epg--list-keys-1):
* lisp/faces.el (read-face-name):
* lisp/format.el (format-decode):
* lisp/gnus/gnus-score.el (gnus-home-score-file)
(gnus-all-score-files):
* lisp/gnus/gnus-uu.el (gnus-uu-grab-articles):
* lisp/gnus/message.el (message-make-forward-subject):
* lisp/gnus/nnmairix.el (nnmairix-create-search-group):
* lisp/gnus/spam.el (spam-copy-or-move-routine):
* lisp/help-fns.el (describe-face):
* lisp/ibuf-macs.el (define-ibuffer-filter):
* lisp/international/mule-cmds.el (select-safe-coding-system):
* lisp/net/imap.el (imap-send-command):
* lisp/printing.el (pr-menu-get-item):
* lisp/speedbar.el (speedbar-add-supported-extension)
(speedbar-add-ignored-directory-regexp):
* lisp/textmodes/rst.el (rst-forward-line-looking-at):
* lisp/vc/ediff-util.el (ediff-other-buffer):
* lisp/vc/diff.el (diff-no-select):
* lisp/vc/vc-dir.el (vc-dir-mark-state-files):
* lisp/wid-edit.el (widget-prompt-value):
* lisp/windmove.el (windmove-default-keybindings)
(windmove-display-default-keybindings)
(windmove-delete-default-keybindings)
(windmove-swap-states-default-keybindings):
* lisp/window.el (display-buffer-reuse-mode-window):
* lisp/woman.el (woman-expand-directory-path): Prefer ensure-list.

14 months ago; * lisp/tab-line.el: add missing require
Mattias Engdegård [Sun, 27 Aug 2023 19:27:39 +0000 (21:27 +0200)]
; * lisp/tab-line.el: add missing require

14 months agoFix a race condition in Eshell's external process management
Jim Porter [Sat, 10 Dec 2022 07:07:19 +0000 (23:07 -0800)]
Fix a race condition in Eshell's external process management

If a process is busy writing output when 'eshell-sentinel' is called,
it might take a bit of time to finish up.  Don't call
'eshell-kill-process-function' until we're really finished
(bug#59103).

* lisp/eshell/esh-proc.el (eshell-sentinel): Call
'eshell-kill-process-function' in 'finish-io'.

14 months agoUse new SVG icons in tab-bar and tab-line (bug#62562)
Juri Linkov [Sun, 27 Aug 2023 17:27:35 +0000 (20:27 +0300)]
Use new SVG icons in tab-bar and tab-line (bug#62562)

* lisp/tab-bar.el (tab-bar--load-buttons):
Add "symbols/plus_16.svg" to tab-bar-new.
Add "symbols/cross_16.svg" to tab-bar-close.
Add "symbols/menu_16.svg" to tab-bar-menu-bar.
(tab-bar-tab-name-format-default): Use 'add-face-text-property'.
(tab-bar-history-mode):
Add "symbols/chevron_left_16.svg" to tab-bar-back.
Add "symbols/chevron_right_16.svg" to tab-bar-forward.

* lisp/tab-line.el (tab-line-new): New icon with "symbols/plus_16.svg".
(tab-line-new-button): Use it with nil rear-nonsticky.
(tab-line-close): New icon with "symbols/cross_16.svg".
(tab-line-close-button): Use it with nil rear-nonsticky.
(tab-line-left): New icon with "symbols/chevron_left_16.svg".
(tab-line-left-button): Use it with nil rear-nonsticky.
(tab-line-right): New icon with "symbols/chevron_right_16.svg".
(tab-line-right-button): Use it with nil rear-nonsticky.
(tab-line-tab-name-format-default): Use 'add-face-text-property'.
(tab-line-auto-hscroll): Append the face in 'add-face-text-property'.

14 months ago; * lisp/net/eww.el (eww-open-in-new-buffer): Fix change for bug#65346.
Eli Zaretskii [Sun, 27 Aug 2023 16:39:22 +0000 (19:39 +0300)]
; * lisp/net/eww.el (eww-open-in-new-buffer): Fix change for bug#65346.

14 months agoFix manual image tests on macOS
Stefan Kangas [Sun, 27 Aug 2023 13:33:53 +0000 (15:33 +0200)]
Fix manual image tests on macOS

* test/manual/image-tests.el (ert): Require.
(image-tests--images): Fix typo.
(image-tests-load-image/svg-too-big)
(image-tests-load-image/svg-invalid): Skip test unless built with
SVG support.
(image-tests-image-metadata/gif)
(image-tests-image-metadata/webp): Disable tests on macOS.

14 months agoUpdate to Transient v0.4.3
Jonas Bernoulli [Fri, 25 Aug 2023 20:25:46 +0000 (22:25 +0200)]
Update to Transient v0.4.3

14 months agoSome minor Tramp changes
Michael Albinus [Sun, 27 Aug 2023 08:38:31 +0000 (10:38 +0200)]
Some minor Tramp changes

* lisp/net/tramp-adb.el (tramp-adb-handle-make-process):
Fix error message.

* lisp/net/tramp-cache.el (tramp-dump-connection-properties):
Remove `tramp-null-hop'.

* lisp/net/tramp-message.el (tramp-message, tramp-backtrace)
(tramp-error): Handle VEC being nil.

* lisp/net/tramp.el (tramp-null-hop): Add ;;;###tramp-autoload cookie.
Use pseudo method "local".
(tramp-file-name-unify): IF VEC is nil, set it to `tramp-null-hop'.
(tramp-set-completion-function): Support also functions with
METHOD as argument.
(tramp-get-completion-methods): Add argument HOP.
(tramp-completion-handle-file-name-all-completions): Use it.
(tramp-call-process-region): Set VEC if nil.

14 months agoCorrect display of stretch glyphs within hscrolled windows
Po Lu [Sun, 27 Aug 2023 02:19:46 +0000 (02:19 +0000)]
Correct display of stretch glyphs within hscrolled windows

* src/haikuterm.c
(haiku_draw_glyphless_glyph_string_foreground): Make char2b
static, stifling a GCC warning.
(haiku_draw_stretch_glyph_string): Use computed X if s->x is
outside the confines of the text area.

14 months agoUpdate Android port
Po Lu [Sun, 27 Aug 2023 01:24:01 +0000 (09:24 +0800)]
Update Android port

* java/org/gnu/emacs/EmacsView.java (onLayout): Provide for
occasions where the saved measured dimensions differ from that
saved by the view.

14 months ago(elisp--local-variables): Fix recent regression
Stefan Monnier [Sat, 26 Aug 2023 19:44:28 +0000 (15:44 -0400)]
(elisp--local-variables): Fix recent regression

While at it, make it work when completing code within `eval-when-compile`
and friends, where it failed in sometimes spectacular ways.

* lisp/progmodes/elisp-mode.el (elisp--local-macroenv): New var.
(elisp--local-variables): Use it.  Also, advice `macroexpand-1` since
`macroexpand-all` doesn't use `macroexpand` any more.
(prin1-char): Remove redundant "" arg.
(elisp--eval-defun-1): Align the `eval` call to what's used in
`custom-initialize-set`.

14 months agoClean up image error reporting somewhat
Stefan Kangas [Sat, 26 Aug 2023 12:38:36 +0000 (14:38 +0200)]
Clean up image error reporting somewhat

* src/image.c (image_not_found_error, image_invalid_data_error):
New functions.  All uses of image_error with "Invalid image data ..."
and "Cannot find image file ..." changed to use them.
(image_create_x_image_and_pixmap_1): Remove redundant Qnil arguments.

14 months agoMake `M-x align` rule count more precise
Stefan Kangas [Sat, 26 Aug 2023 10:02:17 +0000 (12:02 +0200)]
Make `M-x align` rule count more precise

* lisp/align.el (align--should-run-rule): Factor out new function...
(align-region): ...from here.  Avoid counting inactive rules towards
the total.

14 months ago; * src/emacs.c (main) [!HAVE_PDUMPER]: Avoid setting unused variable.
Eli Zaretskii [Sat, 26 Aug 2023 09:35:06 +0000 (12:35 +0300)]
; * src/emacs.c (main) [!HAVE_PDUMPER]: Avoid setting unused variable.

14 months agoMerge from origin/emacs-29
Eli Zaretskii [Sat, 26 Aug 2023 09:25:50 +0000 (05:25 -0400)]
Merge from origin/emacs-29

39d2285bdc9 ; * doc/emacs/sending.texi (Mail Aliases): Add some usefu...
f3fa436bc0f ; Fix doc string of 'current-idle-time'
02532bb5821 Fix custom :type of dired-mouse-drag-files
fc5de406be3 ; Improve SMTPmail documentation about OAuth2
1aaeaf22cef Account for string names in active file
48604565847 Fix 'makefile-browser-client' variable initialization

14 months agoRevise last change to copy-directory
Po Lu [Sat, 26 Aug 2023 08:27:03 +0000 (16:27 +0800)]
Revise last change to copy-directory

* lisp/files.el (copy-directory): Instead of demoting errors
from set-file-times, refrain from setting them if newname is
located within /contents.

14 months agoMake ispell localwords safe local variable
Joseph Turner [Tue, 15 Aug 2023 05:35:28 +0000 (22:35 -0700)]
Make ispell localwords safe local variable

* lisp/textmodes/ispell.el (ispell-buffer-session-localwords):
Make safe local variable to so that checkdoc can ignore words in a
project in batch mode.

14 months agoDo not raise a different frame when closing a frame
Daniel Martín [Fri, 18 Aug 2023 13:03:21 +0000 (15:03 +0200)]
Do not raise a different frame when closing a frame

* src/frame.h: Declare an NS-only function to make a frame the
key window.
* src/nsfns.m (ns_make_frame_key_window): Implement it.
* src/frame.c (delete_frame): Call ns_make_frame_key_window
instead of Fraise_frame.  (Bug#61525)

14 months agoImprove type of custom-theme-directory (Bug#65401)
Mauro Aranda [Sun, 20 Aug 2023 13:39:49 +0000 (10:39 -0300)]
Improve type of custom-theme-directory (Bug#65401)

* lisp/custom.el (custom-theme-directory): Make it of type directory.

14 months ago; Fix last change
Eli Zaretskii [Sat, 26 Aug 2023 07:54:43 +0000 (10:54 +0300)]
; Fix last change

* lisp/cus-theme.el (describe-theme-from-file): Fix doc string
and arguments.
(describe-theme-1): Fix the call to 'describe-theme-from-file'.
(Bug#65468)

14 months agoImprove 'describe-theme' (bug#65468)
Thierry Volpiatto [Wed, 23 Aug 2023 13:12:28 +0000 (13:12 +0000)]
Improve 'describe-theme' (bug#65468)

* lisp/cus-theme.el (describe-theme-from-file): New function.

14 months ago; * doc/emacs/sending.texi (Mail Aliases): Add some useful commands.
Eli Zaretskii [Sat, 26 Aug 2023 06:38:22 +0000 (09:38 +0300)]
; * doc/emacs/sending.texi (Mail Aliases): Add some useful commands.

14 months agoDemote errors from utimensat copying directories
Po Lu [Sat, 26 Aug 2023 01:53:32 +0000 (09:53 +0800)]
Demote errors from utimensat copying directories

* lisp/files.el (copy-directory): Wrap set-file-times within
with-demoted-errors.

* src/fileio.c (Fcopy_file): Adjust commentary.

14 months agoUse float not double in webp_load alpha conversion
Paul Eggert [Sat, 26 Aug 2023 01:43:57 +0000 (18:43 -0700)]
Use float not double in webp_load alpha conversion

* src/image.c (webp_load): Pacify gcc -Wdouble-promotion
by using (1 - a), where the 1 is converted to 1.0f, rather
than (1.0 - a), which mistakenly converts a to double.
Also, reindent to use GNU style.

14 months agoDisable XkbLC_ControlFallback
Po Lu [Sat, 26 Aug 2023 01:38:34 +0000 (09:38 +0800)]
Disable XkbLC_ControlFallback

* src/xterm.c (handle_one_xevent) <XI_KeyPress>: Fix typos within
the commentary.
(x_term_init) [HAVE_XKB]: Disable the ControlFallback library
control, lest Xlib map function keys with ControlMask set to
ASCII keysyms within inactive groups.

14 months ago; Delete redundant defvars; font-lock is preloaded
Stefan Kangas [Thu, 24 Aug 2023 23:40:20 +0000 (01:40 +0200)]
; Delete redundant defvars; font-lock is preloaded

14 months agoPrevent unwanted recursion in erc-nickbar-disable
F. Jason Park [Wed, 16 Aug 2023 04:14:07 +0000 (21:14 -0700)]
Prevent unwanted recursion in erc-nickbar-disable

* lisp/erc/erc-speedbar.el (erc-status-sidebar-mode--unhook): Remove
forward declaration.
(erc-speedbar--toggle-nicknames-sidebar): Inline
`erc-speedbar-close-nicknames-window'.  Don't call
`erc-speedbar-browser' and thus avoid adding excess timers.
(erc-speedbar--ensure): Inline `speedbar-enable-update' to avoid
unneeded call to `speedbar-set-timer', and ensure it only runs in
`speedbar-buffer'.
(erc-speedbar--shutting-down-p): New flag variable to avoid recursive
calls to `dframe-close-frame' and friends.
(erc-nickbar-mode, erc-nickbar-enable, erc-nickbar-disable): Move
logic formerly performed by `speedbar-disable-update' to
`erc-speedbar--toggle-nicknames-sidebar'.  When disabling, guard
against recursive calls to `dframe-close-frame' and friends.
(erc-speedbar--get-timers): New utility function, also for use in
testing.
(erc-speedbar--dframe-controlled): Bind
`erc-speedbar--shutting-down-p' flag non-nil around call to
`erc-nickbar-mode'.  Remove excess timer left behind due to
incompatible behavior from `dframe-close-frame'.  Let caller kill
buffer.
(erc-speedbar-close-nicknames-window): Remove unused command, new in
ERC 5.6 and Emacs 30.
* test/lisp/erc/erc-scenarios-status-sidebar.el
(erc-speedbar-close-nicknames-window): Remove forward declaration.
(erc-speedbar--get-timers): Add forward declaration.
(erc-scenarios-status-sidebar--nickbar): Fix faulty expectations of
desired behavior when disabling module.  Ensure timers canceled.
* test/lisp/erc/resources/erc-scenarios-common.el
(erc-scenarios-common--make-bindings): Shadow `timer-idle-list' to
avoid polluting global test environment with stray timers.
(Bug#63595)

14 months agoWarn about implicit logging in erc-truncate-mode
F. Jason Park [Fri, 18 Aug 2023 02:18:50 +0000 (19:18 -0700)]
Warn about implicit logging in erc-truncate-mode

* etc/ERC-NEWS: Add entry explaining that `erc-truncate-mode' no
longer quasi-activates `erc-log-mode' under certain conditions.
* lisp/erc/erc-log.el
(erc-log--call-when-logging-enabled-sans-module): Add helper for use
by the `truncate' module during initialization.
* lisp/erc/erc-truncate.el (erc-truncate-mode, erc-truncate-enable,
erc-truncate-disable): Warn on `erc-connect-pre-hook' when conditions
exist that would have seen logging transparently activated in older
ERC versions.
(erc-truncate--warn-about-logging): New function to warn about
implicit logging on pre-connect.
(erc-truncate-buffer-to-size): Clarify some comments and revise doc
string.
* test/lisp/erc/erc-scenarios-log.el (erc-scenarios-log--truncate):
Disable `erc-truncate-mode' even though `erc-modules' is shadowed so
that `erc-insert-done-hook' and friends are not contaminated.
`(Bug#60936)

14 months agoIgnore erc-response objects in error-notice helper
F. Jason Park [Fri, 18 Aug 2023 02:18:50 +0000 (19:18 -0700)]
Ignore erc-response objects in error-notice helper

* lisp/erc/erc-button.el (erc-button--display-error-notice-with-keys):
Remove `parsed' `erc-response' positional parameter, and don't pass it
to `erc-display-message' because the latter adds text properties
derived from such an object.  These properties can confuse other code
operating on an inserted error-notice message into thinking it
originated from the server.
* lisp/erc/erc-common.el (erc--with-dependent-type-match): Make macro
more readable.
* lisp/erc/erc-networks.el (erc-networks--set-name,
erc-networks--ensure-announced, erc-networks-on-MOTD-end): Remove
`erc-response' objects from inserted error-notices.
* test/lisp/erc/erc-button-tests.el
(erc-button--display-error-notice-with-keys): Add assertions for
overloaded first parameter.
* test/lisp/erc/erc-tests.el (erc--with-dependent-type-match): Update
expected expansion.

14 months agoAssume that font-lock is preloaded
Stefan Kangas [Sat, 19 Aug 2023 09:48:58 +0000 (11:48 +0200)]
Assume that font-lock is preloaded

* lisp/org/ox-beamer.el (org-mode): Assume that font-lock is
preloaded, which it has been since Emacs 22.1.
* lisp/textmodes/reftex.el (reftex-use-fonts): Make function obsolete
in favor of variable.  Update all callers.

14 months agoFix alpha blending for WebP images
Stefan Kangas [Fri, 25 Aug 2023 18:26:45 +0000 (20:26 +0200)]
Fix alpha blending for WebP images

* src/image.c (webp_load): Fix WebP transparency by doing manual alpha
blending instead of naive masking.  (Bug#59242)

14 months ago; * lisp/strokes.el: Delete commented out XEmacs compat code.
Stefan Kangas [Fri, 25 Aug 2023 18:22:21 +0000 (20:22 +0200)]
; * lisp/strokes.el: Delete commented out XEmacs compat code.

14 months ago; Delete code commented out since 1992
Stefan Kangas [Fri, 25 Aug 2023 15:43:50 +0000 (17:43 +0200)]
; Delete code commented out since 1992

14 months ago; Fix doc string of 'current-idle-time'
Eli Zaretskii [Fri, 25 Aug 2023 05:53:21 +0000 (08:53 +0300)]
; Fix doc string of 'current-idle-time'

* src/keyboard.c (Fcurrent_idle_time): Doc fix (bug#65512).

14 months agoAttempt to fix bug#65068
Po Lu [Fri, 25 Aug 2023 02:47:12 +0000 (10:47 +0800)]
Attempt to fix bug#65068

* src/xterm.c (handle_one_xevent) <KeyPress>: Prevent calls to
XkbTranslateKeysym with a modified keysym if overflow happens.
<XI_KeyPress>: Expound upon the different forms of key event
lookup and the chaotic code beneath within the commentary.
Discontinue separating keycode lookup from key translation.
Supply the effective group within the modifier mask provided
to both XKB translation functions.  (bug#65068)

14 months agoDon't try to set variable removed in Emacs 21
Stefan Kangas [Thu, 24 Aug 2023 23:41:47 +0000 (01:41 +0200)]
Don't try to set variable removed in Emacs 21

* lisp/eshell/em-ls.el (eshell-ls--insert-directory): Don't set
'font-lock-buffers', which was removed in Emacs 21.

14 months agoFix custom :type of dired-mouse-drag-files
Stefan Kangas [Thu, 24 Aug 2023 20:42:19 +0000 (22:42 +0200)]
Fix custom :type of dired-mouse-drag-files

* lisp/dired.el (dired-mouse-drag-files): Fix :type to allow
specifying 'move'.  (Bug#65497)

14 months agoModernize sql-postgres-options docstring
Stefan Kangas [Thu, 24 Aug 2023 20:07:44 +0000 (22:07 +0200)]
Modernize sql-postgres-options docstring

* lisp/progmodes/sql.el (sql-postgres-options): Don't refer to ancient
versions of PostgreSQL released in 1999 and 2001, respectively.

14 months ago; Improve SMTPmail documentation about OAuth2
Eshel Yaron [Thu, 24 Aug 2023 17:17:51 +0000 (19:17 +0200)]
; Improve SMTPmail documentation about OAuth2

* doc/misc/smtpmail.texi (Authentication): Fix authentication
mechanism count and add index entries for OAuth 2.0.  (Bug#65507)

14 months agoproject.el: Fixup two recent defcustoms
Dmitry Gutov [Thu, 24 Aug 2023 12:26:00 +0000 (15:26 +0300)]
project.el: Fixup two recent defcustoms

* lisp/progmodes/project.el (project-file-history-behavior):
Adjust positions inside 'const' forms.
(project-key-prompt-style): Correct the :type form (bug#64799).

14 months agoProperly parse format 4 cmap tables
Po Lu [Thu, 24 Aug 2023 08:32:42 +0000 (16:32 +0800)]
Properly parse format 4 cmap tables

* src/sfnt.c (sfnt_read_cmap_format_4): Read range_shift field
propery.  Prior to this, it would be inadvertently treated as an
entry within the segment end code array, which only functioned
by happenstance.
(sfnt_lookup_glyph_4): Remove workaround grounded upon an
erroneous interpretation of the bug fixed by the aformentioned
change.

* src/sfnt.h (struct sfnt_cmap_format_4): Introduce previously
absent `range_shift' field.

14 months agoAccount for string names in active file
James Thomas [Thu, 24 Aug 2023 07:05:51 +0000 (12:35 +0530)]
Account for string names in active file

Account also for strings when reading in group names from an active
file (bug#62812).
* lisp/gnus/nnmail.el (nnmail-parse-active): Make it similar to
gnus-active-to-gnus-format

14 months agoFix 'makefile-browser-client' variable initialization
Christoph Göttschkes [Wed, 23 Aug 2023 17:34:14 +0000 (19:34 +0200)]
Fix 'makefile-browser-client' variable initialization

* lisp/progmodes/make-mode.el (makefile-browser-client):
Initialize to nil.  (Bug#65487)

Copyright-paperwork-exempt: yes

14 months agoWhen waiting for a process in Eshell, consult its status
Jim Porter [Sun, 26 Mar 2023 23:55:24 +0000 (16:55 -0700)]
When waiting for a process in Eshell, consult its status

This should be functionally the same as the previous implementation in
most cases (which consulted its membership in 'eshell-process-list'),
but is more flexible.  It's now possible to wait for processes that
aren't in 'eshell-process-list'.

Additionally, use 'process-live-p' instead of examining
'process-status' in a few places.  This is simpler, and a bit more
correct too for certain types of processes (though it likely doesn't
matter in practice).

* lisp/eshell/esh-io.el (eshell-close-target)
(eshell-output-object-to-target)
* lisp/eshell/esh-proc.el (eshell-process-interact): Use
'process-live-p'.
(eshell-wait-for-process): Use 'process-live-p' and remove reference
to 'eshell-process-list'.

14 months agoStifle a compiler warning under GCC 13
Po Lu [Thu, 24 Aug 2023 05:13:23 +0000 (05:13 +0000)]
Stifle a compiler warning under GCC 13

* src/haiku_support.cc (MessageReceived): Shun snprintf, as GCC
produces false positives cautioning against truncation.

14 months agoCorrect invalid Texinfo markup
Po Lu [Thu, 24 Aug 2023 04:44:45 +0000 (12:44 +0800)]
Correct invalid Texinfo markup

* doc/lispref/processes.texi (Sentinels): Place . after @xref.

14 months agoInstall rcs2log within Emacs packages for Android
Po Lu [Thu, 24 Aug 2023 04:41:15 +0000 (12:41 +0800)]
Install rcs2log within Emacs packages for Android

* doc/emacs/android.texi (Android Environment): Mention the
`rcs2log' program name variable.  Also refine the wording of the
paragraph describing bundled programs a bit.

* doc/lispref/processes.texi (Subprocess Creation): Mention
`rcs2log' and `rcs2log-program-name'.  Correct typos and
spelling mistakes within the variable index.

* etc/NEWS: Amend the announcement of *-program-name to also
cite rcs2log.

* java/Makefile.in (install_temp): Copy rcs2log to
lib/*/librcs2log.so after minor revisions to change the
interpreter name.

* lisp/vc/vc-rcs.el (vc-rcs-rcs2log-program): Ground the program
name upon `rcs2log-program-name'.

* src/callproc.c (syms_of_callproc) <Vrcs2log_program_name>: New
defvar.  Define to `librcs2log.so' under Android, `rcs2log'
elsewhere.

14 months agoFix behavior of 'eshell-hist-ignoredups' when set to 'erase'
Jim Porter [Thu, 24 Aug 2023 01:27:45 +0000 (18:27 -0700)]
Fix behavior of 'eshell-hist-ignoredups' when set to 'erase'

* lisp/eshell/em-hist.el (eshell-add-input-to-history): Refactor to
use 'pcase' and correct the logic for the 'erase' case.

* test/lisp/eshell/em-hist-tests.el: Require our test helpers.
(eshell-write-readonly-history): Rename to...
(em-hist-test/write-readonly-history): ... this.
(em-hist-test/add-to-history/allow-dups)
(em-hist-test/add-to-history/no-consecutive-dups)
(em-hist-test/add-to-history/erase-dups): New tests (bug#63360).

14 months agoProperly detect medium fonts
Po Lu [Thu, 24 Aug 2023 01:08:11 +0000 (09:08 +0800)]
Properly detect medium fonts

* src/sfntfont.c (sfnt_decode_family_style): Refer to the
preferred family and subfamily if present.

14 months ago; Repair an ommission in a previous change to ses.texi
Po Lu [Thu, 24 Aug 2023 00:35:02 +0000 (08:35 +0800)]
; Repair an ommission in a previous change to ses.texi

* doc/misc/ses.texi (For Gurus) <menu>: Rename `Uses of
defadvice in SES' as per previous change.

14 months agoSupport 'comint-pager' in Eshell
Jim Porter [Wed, 23 Aug 2023 20:29:19 +0000 (13:29 -0700)]
Support 'comint-pager' in Eshell

* lisp/eshell/esh-var.el (eshell-variable-aliases-list): Add "PAGER".
(eshell-var-initialize): Make 'comint-pager' buffer-local and bind it
in subcommands so that we can temporarily set it as necessary.

* test/lisp/eshell/esh-var-tests.el (esh-var-test/pager-var/default)
(esh-var-test/pager-var/set, esh-var-test/pager-var/unset)
(esh-var-test/pager-var/set-locally): New tests.

* doc/misc/eshell.texi (Variables): Document this (bug#63778).

Co-authored-by: Morgan Smith <Morgan.J.Smith@outlook.com>
14 months agoAdjust documentation for defadvice obsoletion
Stefan Kangas [Wed, 23 Aug 2023 22:54:37 +0000 (00:54 +0200)]
Adjust documentation for defadvice obsoletion

* doc/lispref/functions.texi (Porting Old Advice): Unequivocally say
that 'defadvice' is obsolete.
* doc/emacs/trouble.texi (Coding Standards): Refer to 'advice-add'
instead of the now-obsolete 'defadvice'.  (Bug#64757)
* doc/misc/ses.texi (Uses of advice-add in SES): Rename node from
"Uses of defadvice in SES".  Remove 'undo-more' entry, since that
advice was deleted in 2007.

14 months agoRemove some macros in image-dired (Bug#65403)
Manuel Giraud [Sun, 13 Aug 2023 12:48:01 +0000 (14:48 +0200)]
Remove some macros in image-dired (Bug#65403)

* lisp/image/image-dired.el (image-dired--movement-command)
(image-dired--movement-command-line): Change macros to functions.
(image-dired--update-after-move): New function for book-keeping
after a move in image-dired.
(image-dired-scroll): Use it.

14 months ago; Fix typo (bug#63829)
Dmitry Gutov [Wed, 23 Aug 2023 18:23:41 +0000 (21:23 +0300)]
; Fix typo (bug#63829)

14 months agoproject-key-prompt-style: New option.
Dmitry Gutov [Wed, 23 Aug 2023 16:36:35 +0000 (19:36 +0300)]
project-key-prompt-style: New option.

* lisp/progmodes/project.el (project-file-history-behavior):
Add :group and :version tags.
(project-key-prompt-style): New option (bug#64799).

* etc/NEWS: Mention it.

14 months ago; Fix typo in documentation
Po Lu [Wed, 23 Aug 2023 13:19:57 +0000 (21:19 +0800)]
; Fix typo in documentation

* doc/emacs/android.texi (Android Software): Insert `file'
before file name.

14 months agoRevert "; Reverse debug spec of cl-flet (bug#65344)"
Gerd Möllmann [Wed, 23 Aug 2023 11:03:43 +0000 (13:03 +0200)]
Revert "; Reverse debug spec of cl-flet (bug#65344)"

This reverts commit cc0f546825e0db9ff78f82c62615686aa480a133.

14 months ago; Update vhdl-mode and vera-mode URLs
Mattias Engdegård [Wed, 23 Aug 2023 10:32:48 +0000 (12:32 +0200)]
; Update vhdl-mode and vera-mode URLs

* lisp/progmodes/vera-mode.el:
* lisp/progmodes/vhdl-mode.el: Update to (currently) working URLs.

14 months agoTramp cleanup
Michael Albinus [Wed, 23 Aug 2023 09:01:58 +0000 (11:01 +0200)]
Tramp cleanup

* lisp/net/tramp-compat.el (tramp-compat-temporary-file-directory):
Adapt docstring.

14 months ago* lisp/net/ange-ftp.el (ange-ftp-file-remote-p): Handle CONNECTED properly.
Michael Albinus [Wed, 23 Aug 2023 09:00:56 +0000 (11:00 +0200)]
* lisp/net/ange-ftp.el (ange-ftp-file-remote-p): Handle CONNECTED properly.

14 months ago* lisp/files.el (file-remote-p): Simplify.
Michael Albinus [Wed, 23 Aug 2023 09:00:34 +0000 (11:00 +0200)]
* lisp/files.el (file-remote-p): Simplify.

14 months agoEnable remote file name completion in eshell depending on command (bug#65356)
Michael Albinus [Wed, 23 Aug 2023 07:53:40 +0000 (09:53 +0200)]
Enable remote file name completion in eshell depending on command (bug#65356)

* lisp/eshell/em-cmpl.el (eshell-cmpl-remote-file-ignore):
New user option.
(eshell-cmpl-initialize): Use it.
(eshell-external-command-p): New defun.
(eshell-complete-parse-arguments):
Set `pcomplete-remote-file-ignore' depending on the command.

14 months agoRepair displaying compound glyph components with anchor points
Po Lu [Wed, 23 Aug 2023 04:09:08 +0000 (12:09 +0800)]
Repair displaying compound glyph components with anchor points

* src/sfnt.c (sfnt_interpret_compound_glyph_1): Move
initialization of x and y out of conditional.

14 months agoFix bibtex-font-lock-url-regexp
Roland Winkler [Wed, 23 Aug 2023 02:42:49 +0000 (21:42 -0500)]
Fix bibtex-font-lock-url-regexp

Fix bibtex-font-lock-url-regexp to allow line breaks
between the field name and the field string.

14 months agoUse current file name for more "other project" future history
Spencer Baugh [Wed, 23 Aug 2023 02:11:55 +0000 (05:11 +0300)]
Use current file name for more "other project" future history

In the previous commit we added support for using the current buffer's
file name as future history for project-find-file even when switching
to another project with project-switch-project.  Make this work for
project-find-dir and project-or-external-find-file too.

* lisp/progmodes/project.el (project--find-default-from): Add.
(project-find-file, project-or-external-find-file): Use
project--find-default-from with buffer-file-name.
(project-find-dir): Use project--find-default-from with
default-directory.

14 months agoSupport adjusting file-name-history to the current project
Spencer Baugh [Thu, 17 Aug 2023 19:41:04 +0000 (15:41 -0400)]
Support adjusting file-name-history to the current project

This adds project-file-history-behavior which has the effect described in
its docstring.  Implementing a sort of sharing of file-name-history
between projects.

* lisp/progmodes/project.el (project-file-history-behavior):
New option.  (bug#63829)
(project--transplant-file-name): Add.
(project--read-file-cpd-relative): Move history manipulations to
project--read-file-name.
(project--read-file-name): New function.  Refer to
project-file-history-behavior.
(project-find-file-in, project-find-dir): Use it.
(project-or-external-find-file): Bind the new option to t, to avoid
touching the external file names.

* etc/NEWS: Announce the new option.

Co-authored-by: Dmitry Gutov <dmitry@gutov.dev>
14 months agoMake org-mouse compatible with touch screen event emulation
Po Lu [Wed, 23 Aug 2023 01:56:35 +0000 (09:56 +0800)]
Make org-mouse compatible with touch screen event emulation

* lisp/org/org-mouse.el (org-mouse-down-mouse): Characterize as
an `ignored-mouse-command'.

14 months agoFix compatibility problems with several fonts
Po Lu [Wed, 23 Aug 2023 01:08:03 +0000 (09:08 +0800)]
Fix compatibility problems with several fonts

* src/sfnt.c (sfnt_lookup_glyph_8): Perform binary search
instead of combing through each group if the table is large.
(sfnt_read_simple_glyph): Avoid losing if the last byte of a
vector is identical to the last byte of the glyph data.
(sfnt_read_gvar_table): Don't overwrite gvar table data while
reading shared coordinates.

14 months agoExpand project file names before storing them
Spencer Baugh [Sat, 19 Aug 2023 12:24:45 +0000 (08:24 -0400)]
Expand project file names before storing them

Before, whatever project-root returned, we stored as the root
directory of the project in project-list and project-list-file.  This
could lead to duplicate entries or bad behavior if projects were
accessed by different file names, e.g. both /home/user/src/emacs and
~/src/emacs.

Now project-list-file contains only expanded paths and project--list
contains only abbreviated paths.  We abbreviate filenames before
setting project--list, and expand filenames before writing to
project-list-file.  We only do this for local files, though, to avoid
making remote connections; the situation will still be bad for remote
projects, but at least this is an improvement.

* lisp/progmodes/project.el (project--write-project-list): Call
expand-file-name.
(project--read-project-list, project-remember-project)
(project--remove-from-project-list): Call abbreviate-file-name.

14 months agoAdd a bit of logging for gnus-search search engine results
Eric Abrahamsen [Tue, 22 Aug 2023 16:27:33 +0000 (09:27 -0700)]
Add a bit of logging for gnus-search search engine results

Help users figure out the cause of unexpected "no search results"
situations.

14 months ago; * lisp/eshell/esh-io.el (eshell-virtual-target): Remove default constructor.
Jim Porter [Tue, 22 Aug 2023 16:11:13 +0000 (09:11 -0700)]
; * lisp/eshell/esh-io.el (eshell-virtual-target): Remove default constructor.

14 months ago; * lisp/eshell/esh-io.el (eshell-get-target): Fix docstring typos.
Jim Porter [Tue, 22 Aug 2023 16:07:51 +0000 (09:07 -0700)]
; * lisp/eshell/esh-io.el (eshell-get-target): Fix docstring typos.

14 months agoIllustrate more font problems
Po Lu [Tue, 22 Aug 2023 13:42:06 +0000 (21:42 +0800)]
Illustrate more font problems

* etc/PROBLEMS (Runtime problems specific to Android): Mention
problems with three other fonts users have inquired into.

14 months ago; Add another noise macro
Po Lu [Tue, 22 Aug 2023 09:53:40 +0000 (17:53 +0800)]
; Add another noise macro

* .dir-locals.el (c-mode) <c-noise-macro-names>: Classify
TEST_STATIC as a noise macro.

14 months agoAvoid crashes rescaling fonts with long names
Po Lu [Tue, 22 Aug 2023 09:34:41 +0000 (17:34 +0800)]
Avoid crashes rescaling fonts with long names

* src/font.c (font_rescale_ratio): Check NAME is not nil before
matching it against a regexp.

14 months ago; Amend doc strings of two functions
Po Lu [Tue, 22 Aug 2023 09:17:32 +0000 (17:17 +0800)]
; Amend doc strings of two functions

* src/dispnew.c (syms_of_display):

* src/frame.c (Fwindow_system): Revise doc strings to mention
the `android' value.

14 months agoOptimize format 12 cmap table lookup
Po Lu [Tue, 22 Aug 2023 08:44:53 +0000 (16:44 +0800)]
Optimize format 12 cmap table lookup

* src/sfnt.c (sfnt_compare_char): New function.
(sfnt_lookup_glyph_12): Detect ``large'' cmap tables of format
12 and perform a binary search.  Such tables are frequently
provided by CJK fonts.

14 months ago; Reverse debug spec of cl-flet (bug#65344)
Gerd Möllmann [Tue, 22 Aug 2023 08:16:40 +0000 (10:16 +0200)]
; Reverse debug spec of cl-flet (bug#65344)

14 months agoTake precautions against NULL returns from getPrimaryClip
Po Lu [Tue, 22 Aug 2023 07:28:38 +0000 (15:28 +0800)]
Take precautions against NULL returns from getPrimaryClip

* java/org/gnu/emacs/EmacsSdk11Clipboard.java (getClipboardData):
Return null if the clip data is not set.  Also delete superfluous
debugging code.  (bug#65445)
(getClipboard): Don't dereference NULL clip data.

14 months agoAvoid errors in posn-col-row if fonts disappear from an X server
Po Lu [Tue, 22 Aug 2023 04:35:33 +0000 (12:35 +0800)]
Avoid errors in posn-col-row if fonts disappear from an X server

* lisp/window.el (window-font-width, window-font-height): Resort
to frame-char-width/height should the font returned by font-info
be unavailable.

14 months ago; * etc/DEBUG: Fix typo.
Po Lu [Tue, 22 Aug 2023 02:45:29 +0000 (10:45 +0800)]
; * etc/DEBUG: Fix typo.

14 months ago* etc/DEBUG: Mention android_exception_check specifics. (bug#65445)
Po Lu [Tue, 22 Aug 2023 02:43:58 +0000 (10:43 +0800)]
* etc/DEBUG: Mention android_exception_check specifics.  (bug#65445)

14 months agoCorrect invalid Texinfo markup
Po Lu [Tue, 22 Aug 2023 02:01:22 +0000 (10:01 +0800)]
Correct invalid Texinfo markup

* doc/emacs/files.texi (Visiting): Don't enclose an entire form
within @var, use @code for the whole form and @var for
individual variables within instead.

* doc/lispref/commands.texi (Key Sequence Input): @xref must be
followed by either , or ..

* doc/lispref/processes.texi (Filter Functions): Introduce
punctuation absent from the last sentence of a paragraph.

14 months ago; * doc/misc/eshell.texi (Globbing): Fix duplicated index.
Jim Porter [Tue, 22 Aug 2023 01:45:36 +0000 (18:45 -0700)]
; * doc/misc/eshell.texi (Globbing): Fix duplicated index.

14 months agoMerge from origin/emacs-29
Jim Porter [Tue, 22 Aug 2023 01:23:12 +0000 (18:23 -0700)]
Merge from origin/emacs-29

b72f23a532b ; Fix 'desktop-restore-reuses-frames' customize values

14 months ago; Merge from origin/emacs-29
Jim Porter [Tue, 22 Aug 2023 01:23:12 +0000 (18:23 -0700)]
; Merge from origin/emacs-29

The following commit was skipped:

45cc57ac258 ; Silence byte-compiler

14 months agoMerge from origin/emacs-29
Jim Porter [Tue, 22 Aug 2023 01:23:11 +0000 (18:23 -0700)]
Merge from origin/emacs-29

3296031ad74 ; Another improvement for documentation of pixelwise scro...
baeb2d71ae7 Support defun navigation for DEFUN in c-ts-mode (bug#64442)
781ddd7e7d8 Fix touchpad scrolling on MS-Windows
c125bd060e2 Fix order in which package-vc dependencies are resolved
500ced133ad Fix building of VC package manuals with relative org link...
456ecabe9e8 Fix the documentation of 'cl-flet'
f6ebd1ef0d0 ; * src/treesit.c (Ftreesit_node_parent): Improve comment...
fac0e2d5334 Avoid false "wrong passphrase" messages in EPA
8f683b51d8b Fix jsx font-lock in older tree-sitter-js grammars
d9af79ae39d Fix cloning 'face-remapping-alist' for indirect buffers
636fb267c46 Improve documentation of case transfer in replacement com...
7856d51436b Fix horizontal scrolling of images with C-f
8cf5659ec2f ; Fix defcustom in completion.el
a8c8a4e3680 ; * src/fns.c (Fcopy_sequence): Doc fix.  (Bug#64960)
205d87cdca0 Fix unpacking ZIP archives on MS-Windows
3712e8bc385 ; Fix typos in lisp/keymap.el doc strings (bug#65329).
21b2ecee661 Fix command example in Eshell manual
26949819df0 ; lisp/progmodes/csharp-mode.el (treesit-query-capture): ...
221ed70b90a ; Improve documentation of 'define-alternatives'
32280205e27 Add user options mentioned in the Eshell manual to the va...
cf3145a486b * Add missing alias to `native-comp-enable-subr-trampolin...
922b6490286 * Add missing alias to `native-comp-enable-subr-trampolin...
6962823c83c ; * etc/PROBLEMS: Fix typo and clarify wording.

# Conflicts:
# doc/misc/eshell.texi

14 months ago; Fix issues running gitmerge
Jim Porter [Tue, 22 Aug 2023 01:19:24 +0000 (18:19 -0700)]
; Fix issues running gitmerge

* .gitattributes: Ignore whitespace issues in java/INSTALL.

* build-aux/git-hooks/pre-commit (git_diff): Explicitly allow
"ChangeLog.android".

* java/README: Remove extra trailing newline.

14 months agoImprove Android adaptive icon
Po Lu [Tue, 22 Aug 2023 01:20:47 +0000 (09:20 +0800)]
Improve Android adaptive icon

* java/res/drawable/emacs_background.xml: Delete trailing whitespace
and modify gradient offset to match emacs.svg.

* java/res/drawable/emacs_foreground.xml: Delete trailing
whitespace and remove redundant path.

14 months agoRepair desktop notification on Android 31
Po Lu [Tue, 22 Aug 2023 00:04:16 +0000 (08:04 +0800)]
Repair desktop notification on Android 31

* java/org/gnu/emacs/EmacsDesktopNotification.java (display1):
Provide FLAG_IMMUTABLE under Android S and later, not just
versions of Android after S.  (bug#65433)

14 months agoUse generics to define Eshell output targets
Jim Porter [Sun, 12 Mar 2023 02:44:43 +0000 (18:44 -0800)]
Use generics to define Eshell output targets

This is more flexible than before, since third-party code can add new
output target types without advising these functions.  It also
resolves an issue where redirecting to a symbol that has a value in
its function slot doesn't work.

* lisp/eshell/esh-io.el (eshell-virtual-target): New struct.
(eshell-get-target, eshell-output-object-to-target): Reimplement via
'cl-defgeneric'.
(eshell-close-target): Reimplement via 'cl-defgeneric' and simplify
'process' method.

14 months ago; Remove unused Eshell target type
Jim Porter [Sat, 11 Mar 2023 23:37:38 +0000 (15:37 -0800)]
; Remove unused Eshell target type

Eshell creates all output targets in 'eshell-get-target', and that
function never returns a cons cell.

* lisp/eshell/esh-io.el (eshell-close-target)
(eshell-output-object-to-target): Remove 'consp' condition.

14 months agoAllow splicing Eshell globs in-place
Jim Porter [Thu, 17 Aug 2023 19:23:26 +0000 (12:23 -0700)]
Allow splicing Eshell globs in-place

This means that Eshell globs can now expand the same way as if the
user had typed each matching file individually.

* lisp/eshell/em-glob.el (eshell-glob-splice-results): New option.
(eshell-no-command-globbing, eshell-add-glob-modifier): Handle spliced
globs.
(eshell-extended-glob): Always return a list when splicing.

* lisp/eshell/em-pred.el (eshell-parse-arg-modifier): Ensure
'eshell-splice-args' is always at the end of the list of modifiers if
present.

* test/lisp/eshell/em-glob-tests.el
(em-glob-test/expand/splice-results)
(em-glob-test/expand/no-splice-results)
(em-glob-test/expand/explicitly-splice-results)
(em-glob-test/expand/explicitly-listify-results): New tests.
(em-glob-test/no-matches): Check result when
'eshell-glob-splice-results' is nil/non-nil.

* doc/misc/eshell.texi (Arguments): Expand explanation about argument
flattening.
(Globbing): Document splicing behavior of globs.

* etc/NEWS: Announce this change.

14 months ago; Fix 'desktop-restore-reuses-frames' customize values
Eli Zaretskii [Mon, 21 Aug 2023 18:18:08 +0000 (21:18 +0300)]
; Fix 'desktop-restore-reuses-frames' customize values

* lisp/desktop.el (desktop-restore-reuses-frames): Fix defcustom's
value.  (Bug#65435)

14 months ago; * test/lisp/cus-edit-tests.el: remove unused var (bug#63290)
Mattias Engdegård [Mon, 21 Aug 2023 15:04:44 +0000 (17:04 +0200)]
; * test/lisp/cus-edit-tests.el: remove unused var (bug#63290)

14 months agoDon't describe lexbound uncompiled function as 'closures'
Mattias Engdegård [Mon, 21 Aug 2023 14:58:24 +0000 (16:58 +0200)]
Don't describe lexbound uncompiled function as 'closures'

* lisp/help-fns.el (help-fns-function-description-header):
Describe lexbound uncompiled functions as functions.
Whether they technically close over any lexical variables isn't of
interest here.

14 months agoProperly enumerate GX fonts of the same family with divergent styles
Po Lu [Mon, 21 Aug 2023 12:44:23 +0000 (20:44 +0800)]
Properly enumerate GX fonts of the same family with divergent styles

* doc/emacs/android.texi (Android Fonts): Revise explanation of
GX font replacement during font enumeration.

* src/sfntfont.c (sfnt_replace_fonts_p): If PREV and DESC are of
the same family and both are GX fonts, restrict actions taken to
removing duplicate styles from PREV.  Reported by a user who
tried to install GX versions of Cascadia Mono, which are
distributed as two files providing the bold and italic variation
axes respectively.

14 months agoExplicitly disallow named-let in code using dynamic binding
Mattias Engdegård [Mon, 21 Aug 2023 11:50:03 +0000 (13:50 +0200)]
Explicitly disallow named-let in code using dynamic binding

There is no point in permitting named-let to be used in dynbound code;
our code transforms are simply not valid in that context, and it's not
worth the trouble to make it work (to the extent that it is at all
possible). (Bug#59576)

* lisp/emacs-lisp/subr-x.el (named-let):
Error if used with dynamic binding.
* doc/lispref/variables.texi (Local Variables): Amend manual.