(tab-bar-tab-name-format-truncated)
(tab-bar-tab-name-format-hints)
(tab-bar-tab-name-format-close-button)
(tab-bar-tab-name-format-face): New functions.
(tab-bar-tab-name-format-functions): New defcustom.
(tab-bar-tab-name-format-default): Rewrite to use
'tab-bar-tab-name-format-functions'.
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.
* 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.
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'.
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'.
* 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.
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.
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`.
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.
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.
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)
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)
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.
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.
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)
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)
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.
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.
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)
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.
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
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'.
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.
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>
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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)
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.
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.
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.