Po Lu [Tue, 4 Oct 2022 01:25:06 +0000 (09:25 +0800)]
Fix deiconification handling on FVWM and possibly other window managers
I can't believe we weren't doing this before.
* src/xterm.c (x_handle_wm_state): New function.
(handle_one_xevent): Handle window state changes in WM_STATE
messages, and use them for signalling deiconification.
(bug#58164)
Stefan Kangas [Mon, 3 Oct 2022 22:07:22 +0000 (00:07 +0200)]
Merge from origin/emacs-28
992611b10a Fix documentation of 'TAB' in cc-mode 08e485a2a5 Fix 'org-export-dispatch' command name in manual e5a49f44ff * src/emacs.c (load_pdump): Fix use of xpalloc. 7ff5207624 Avoid assertion violation in 'xpalloc'
Juri Linkov [Mon, 3 Oct 2022 19:54:16 +0000 (22:54 +0300)]
* lisp/repeat.el (repeat-exit-key): Replace type 'key-sequence' with 'key'.
(repeat-post-hook, repeat-echo-message-string): Add backward-compatibility
code for repeat-exit-key to keep support for 'key-sequence' type (bug#55986).
Juri Linkov [Mon, 3 Oct 2022 19:51:33 +0000 (22:51 +0300)]
* lisp/repeat.el (repeat-exit): New command.
(repeat-exit-function): New variable.
(repeat-post-hook): Set repeat-exit-function.
Call repeat-exit from run-with-idle-timer.
Also use repeat--exit.
(repeat--exit): New internal function.
* lisp/help-fns.el (help-fns--insert-menu-bindings): Make this
work better for menus that turn out to not be reachable after all
-- i.e., don't insert " and " before the heading in certain cases.
* lisp/ecomplete.el (ecomplete-add-item): Allow forcing new values.
(ecomplete--remove-item):
(ecomplete--prompt-type): New functions.
(ecomplete-edit, ecomplete-remove): New commands.
Po Lu [Mon, 3 Oct 2022 12:18:22 +0000 (20:18 +0800)]
Fix coding systems used for X input methods
* doc/emacs/mule.texi (International): Refer to X Coding as
well.
(Communication Coding): Document that locale-coding-system is
not always used on X to decode keyboard input.
(X Coding): New node.
* etc/NEWS: Announce change to input method coding resolution.
* lisp/term/x-win.el (x-get-input-coding-system): New function.
* src/coding.c (syms_of_coding): Update doc string of
locale-coding-system.
* src/xfns.c (struct x_xim_text_conversion_data)
(x_xim_text_to_utf8_unix_1, x_xim_text_to_utf8_unix_2)
(x_xim_text_to_utf8_unix): Accept dpyinfo. Use the coding
system specified inside if possible.
(xic_preedit_draw_callback): Pass dpyinfo.
* src/xterm.c (handle_one_xevent): Use XIM coding system for IM
input.
(xim_open_dpy): Try to determine the input method coding system.
(mark_xterm): Mark `xim_coding'.
(syms_of_xterm): New variable `x-input-coding-system'.
* src/xterm.h (struct x_display_info): New field `xim_coding'.
(FRAME_X_XIM_CODING): New macro.
We do not want to support several keymap formats in
`keymap-set' and friends -- the point is to have an
interface with easy-to-understand semantics that
give good feedback on valid/invalid key sequences.
Paul Eggert [Sun, 2 Oct 2022 23:49:20 +0000 (16:49 -0700)]
Port TZ settings to POSIX
* lisp/Makefile.in (.el.elc):
* lisp/net/tramp-sh.el (tramp-sh-handle-set-file-times):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-set-file-times):
Use the POSIX standard TZ=UTC0 rather than the GNU extension
TZ=UTC to set the time zone to UTC.
Paul Eggert [Sun, 2 Oct 2022 20:37:39 +0000 (13:37 -0700)]
Prefer static_assert to verify in seccomp-filter
Prefer static_assert in just one file for now; the idea is to do
it elsewhere eventually. static_assert is standard (starting with
C23) whereas verify is not, and static_assert can be used even in
pre-C23 files due to Gnulib’s support for it.
* lib-src/seccomp-filter.c: Do not include verify.h.
Prefer static_assert to verify.
Alan Mackenzie [Sun, 2 Oct 2022 20:31:12 +0000 (20:31 +0000)]
Suppress irritating/misleading message in make bootstrap about old .elc files
These are the "compile-first" .elc files, artificially given an old timestamp
to cause them later to be native compiled. This fixes bug #58224.
* lisp/Makefile.in (compile-first .el.elc): Give these .elc's the UTC epoch.
Amend the comment.
* src/lread.c (Fload): New variable, epoch_timestamp, initialized to binary
zero. Compare with this the timestamp of .elc's being loaded, and if they
match, don't output the message about the source file being newer than the
file being loaded.
Juri Linkov [Sun, 2 Oct 2022 18:50:08 +0000 (21:50 +0300)]
* lisp/vc/vc-git.el (vc-git-checkin): Add more checks for vc-git-patch-string
Check that vc-git-patch-string contains the same changes that already exists
in the staged area when files were added/removed by vc commands (bug#52349).
Juri Linkov [Sun, 2 Oct 2022 18:34:57 +0000 (21:34 +0300)]
In vc-git-log-incoming use the repository in the command "fetch" (bug#50340)
* lisp/vc/vc-git.el (vc-git-log-incoming): Use repository part
from non-nil remote-location in the command "fetch".
* lisp/vc/vc.el (vc-log-incoming, vc-log-outgoing): Mention in
docstrings and prompts that REMOTE-LOCATION can be a remote branch name.
* doc/emacs/maintaining.texi (VC Change Log): For commands
vc-log-incoming and vc-log-outgoing, use the term "remote location"
instead of "repository".
Stefan Monnier [Sun, 2 Oct 2022 17:52:57 +0000 (13:52 -0400)]
keymap.el: Ease up support for non-`kbd` formats.
While we want to standardize on the `kbd` syntax for user-facing code,
the internal vector representation of key sequences is not going away,
so let's not impose silly `key-description + key-parse` roundtrips.
Also, provide some support for packages stuck with user configs defined
to hold old-style key formats.
* lisp/keymap.el (keymap-set): Allow vectors as `key`.
(key-parse-old-format): New function, which stands out better than
`key-description` when searching for uses of the old syntax.
Fix coding system problems in gnus-read-ephemeral-bug-group
* lisp/gnus/gnus-group.el (gnus-read-ephemeral-bug-group): Don't
bind coding system variables, because that leads to loading other
files (like cookie files) using that coding system (bug#58227).
* lisp/url/url-handlers.el (url-insert-file-literally): New function.
(url-insert): Allow forcing no-decode.
Stefan Kangas [Sun, 2 Oct 2022 13:16:17 +0000 (15:16 +0200)]
Decrease use of the word "Emacsen" in Tramp docs
* lisp/net/tramp-archive.el:
* lisp/net/tramp-smb.el:
* lisp/net/tramp-uu.el:
* lisp/net/tramp.el: Don't say "Emacsen" when a different wording
would be clearer.
* lisp/language/misc-lang.el ("Gothic"): New language environment.
Add sample text and input method.
* lisp/international/fontset.el (script-representative-chars)
(setup-default-fontset): Support gothic.
* lisp/leim/quail/misc-lang.el ("gothic"): New input method.
* etc/HELLO: Add Gothic greetings.
* etc/NEWS: Announce the new language environment.
Po Lu [Sun, 2 Oct 2022 00:28:56 +0000 (08:28 +0800)]
Only rely on EWMH window activation if possible
* xterm.c (x_ewmh_activate_frame): Remove unnecessary
x_wm_supports check.
(x_focus_frame): When the window manager supports
_NET_ACTIVE_WINDOW, just use it; anything else may confuse the
window manager.
Michael Albinus [Sat, 1 Oct 2022 15:17:39 +0000 (17:17 +0200)]
Use a version for the Tramp cache
* lisp/net/tramp-cache.el (tramp-cache-version): New defconst.
(top): Check the cache version, and flush the cache in case of
mismatch. Suggested by Paul Pogonyshev <pogonyshev@gmail.com>.
* lisp/net/tramp-cmds.el (tramp-cleanup-all-connections):
Re-initialize the cache version.
Stefan Kangas [Sat, 1 Oct 2022 15:16:03 +0000 (17:16 +0200)]
Decrease use of the word "Emacsen" in docs
"Emacsen" is either a less clear way of saying "old versions of
Emacs", or an implicit reference to XEmacs. We recommend against
using it in the FAQ. So use the more clear wording instead.
Make mailcap consistent about regexp-quoting minors
* lisp/net/mailcap.el (mailcap-mime-data): Quote regexp.
(mailcap-mime-extensions): Ditto.
(mailcap--regexp-quote-type): New function.
(mailcap-parse-mimetype-file): Use it to get consistent quoting of
(regexp) strings (bug#52038). Before you'd get both
application/vnd\.ms-excel and application/vnd.ms-excel (etc),
making prompting confusing.
Fix url-retrieve-synchronously on very short timeouts
* lisp/url/url.el (url-retrieve-synchronously): Don't kill the
process buffer unless we made one (bug#58218). This makes HTTP
free connection marking work on premature timeouts.
* doc/misc/modus-themes.org (Load theme depending on time of day): Add
missing keyword from sample configuration.
(Full support for packages or face groups): Update list of supported packages.
(Note on goto-address-mode faces): Add documentation about possible
user-level tweaks.
(Are these color schemes?): Fix typo.
(Acknowledgements): Update list of contributors to the project.
* etc/themes/modus-themes.el (modus-themes--version): Update to
current stable version.
(modus-themes-vivendi-colors): Tweak value of a single color.
(modus-themes-faces): Update list of supported faces.
(modus-themes-custom-variables): Remove outdated "TODO" comment.
* etc/themes/modus-operandi-theme.el:
* etc/themes/modus-vivendi-theme.el: Update version header.
comint-fl: Prevent fontification of output as input
* lisp/comint.el (comint-output-filter): Inhibit jit-lock
fontification of inserted process output before marking it with the
'output' filed property (bug#58169).
Sean Whitton [Sat, 24 Sep 2022 23:17:56 +0000 (16:17 -0700)]
Add vc-edit-next-command
* lisp/vc/vc.el (vc-read-revision): Override
vc-filter-command-function back to its default value.
(vc-print-branch-log): Remove recently-added prefix argument.
(vc-edit-next-command): New command.
* lisp/vc/vc-hooks.el (vc-prefix-map): Bind it to 'C-x v !'.
* etc/NEWS:
* doc/emacs/vc1-xtra.texi (Editing Shell Commands): Document it.
Don't refresh the frame in with-locale-environment
* lisp/international/mule-cmds.el (with-locale-environment):
Inhibit refresh so that there's no flickering (bug#58193).
(set-locale-environment): Allow inhibiting the refresh.
* lisp/international/mule.el (set-terminal-coding-system): Ditto.
* lisp/doc-view.el: (doc-view--pdf-outline):
(doc-view-imenu-index):
(doc-view-imenu-setup): Fix multiple empty index generation for
documents without an outline, caching the result (see discussion in
bug#58103).
(doc-view--imenu-subtree): Fix for nested imenus (bug introduced in
commit fe002cc8ce) (bug#58180).