]> git.eshelyaron.com Git - emacs.git/log
emacs.git
3 years ago* src/haikufns.c (haiku_create_frame): Error if font wasn't found.
Po Lu [Sat, 19 Feb 2022 02:19:29 +0000 (02:19 +0000)]
* src/haikufns.c (haiku_create_frame): Error if font wasn't found.

3 years agoUtilize new string decoding feature in GTK native input
Po Lu [Sat, 19 Feb 2022 01:18:27 +0000 (09:18 +0800)]
Utilize new string decoding feature in GTK native input

* src/gtkutil.c (xg_im_context_commit): Don't decode strings
manually using g_utf8_to_ucs4 but pass unibyte string as the
keystroke event arg instead.

3 years agoHandle multiple directory separators in gnus-search results
Eric Abrahamsen [Fri, 18 Feb 2022 16:37:33 +0000 (08:37 -0800)]
Handle multiple directory separators in gnus-search results

Try to treat the file names more like file names, less like strings
to massage.

* lisp/gnus/gnus-search.el (gnus-search-indexed-parse-output): Use
`expand-file-name' to collapse separators and generally canonicalize
the name. Use `file-name-split' and joining instead of regexp
munging.

3 years agoFix background stipple with `alpha_background'
Po Lu [Fri, 18 Feb 2022 13:24:42 +0000 (21:24 +0800)]
Fix background stipple with `alpha_background'

* src/xterm.c (x_fill_rectangle): Fix treatment of foreground
and background colors when there is a stipple.

3 years agoFix a crash on some versions of GTK
Po Lu [Fri, 18 Feb 2022 10:01:58 +0000 (18:01 +0800)]
Fix a crash on some versions of GTK

* src/emacsgtkfixed.c (XSetWMNormalHints): Fix potential
arithmetic fault.

3 years agoMerge from origin/emacs-28
Eli Zaretskii [Fri, 18 Feb 2022 08:38:52 +0000 (10:38 +0200)]
Merge from origin/emacs-28

1e4b04c Improve documentation of filling and justification commands
9fd396e * lisp/progmodes/subword.el (superword-mode): Doc fix.  (Bug#...
e303cb1 Fix indexing of module functions that return complex types.

3 years ago; Merge from origin/emacs-28
Eli Zaretskii [Fri, 18 Feb 2022 08:38:50 +0000 (10:38 +0200)]
; Merge from origin/emacs-28

The following commit was skipped:

b30ef09 Prevent crashes caused by invalid locale coding systems

3 years agoMerge from origin/emacs-28
Eli Zaretskii [Fri, 18 Feb 2022 08:38:47 +0000 (10:38 +0200)]
Merge from origin/emacs-28

c8442df ; Separate command and concept index in Transient manual
8aa052c ; Fix Transient manual
5b7752a Fix problem with popd for in remote shell buffers
38f6ea1 Import texi source file for transient manual
df34929 Update to Org 9.5.2-15-gc5ceb6

3 years ago; Merge from origin/emacs-28
Eli Zaretskii [Fri, 18 Feb 2022 08:38:45 +0000 (10:38 +0200)]
; Merge from origin/emacs-28

The following commits were skipped:

fe27479 Fix 'exchange-point-and-mark' in 'transient-mark-mode'
2289a7a2 Fix "C-SPC C-SPC" after "C-x C-x"

3 years agoMerge from origin/emacs-28
Eli Zaretskii [Fri, 18 Feb 2022 08:38:42 +0000 (10:38 +0200)]
Merge from origin/emacs-28

# Conflicts:
# lisp/startup.el

3 years agoFix blurry text on multiple scale monitor setups
Po Lu [Fri, 18 Feb 2022 07:48:50 +0000 (15:48 +0800)]
Fix blurry text on multiple scale monitor setups

* src/pgtkterm.c (pgtk_copy_bits): Preserve window scale factor
on temporary surface.  (bug#54040)

3 years agoImprove documentation of filling and justification commands
Eli Zaretskii [Fri, 18 Feb 2022 07:47:44 +0000 (09:47 +0200)]
Improve documentation of filling and justification commands

* doc/lispref/text.texi (Filling):
* lisp/textmodes/fill.el (fill-region-as-paragraph)
(default-justification, set-justification, justify-current-line):
Clarify "canonicalization" of spaces and the meaning of
justification styles.  (Bug#54047)
(set-justification-left, set-justification-right)
(set-justification-full): Improve wording of doc strings.

3 years ago* lisp/progmodes/subword.el (superword-mode): Doc fix. (Bug#54045)
Eli Zaretskii [Fri, 18 Feb 2022 07:01:06 +0000 (09:01 +0200)]
* lisp/progmodes/subword.el (superword-mode): Doc fix.  (Bug#54045)

3 years agoMake sure nnselect search query is properly parsed
Andrew G Cohen [Fri, 18 Feb 2022 06:01:55 +0000 (14:01 +0800)]
Make sure nnselect search query is properly parsed

* lisp/gnus/gnus-search.el (gnus-search-make-spec): The search query
should not be interpreted as raw, but whatever the underlying search
engine expects.

3 years agoFix gnus searching of native servers
Andrew G Cohen [Fri, 18 Feb 2022 05:56:19 +0000 (13:56 +0800)]
Fix gnus searching of native servers

* lisp/gnus/gnus-group.el (gnus-group-make-search-group):
(gnus-group-read-ephemeral-search-group):  Find the real server even
when the group is native.

3 years agoMake treatment of `alpha-background' more consistent
Po Lu [Fri, 18 Feb 2022 05:47:56 +0000 (13:47 +0800)]
Make treatment of `alpha-background' more consistent

* src/xterm.c (x_clear_glyph_string_rect):
(x_draw_glyph_string_background): Ignore alpha_background on all
cursors.

3 years agoFix gnus-search-run-search methods
Eric Abrahamsen [Fri, 18 Feb 2022 05:28:40 +0000 (21:28 -0800)]
Fix gnus-search-run-search methods

* lisp/gnus/gnus-search.el (gnus-search-run-search): Both these
implementations were setting the current buffer and then not setting
it back.

3 years agoMake stipple backgrounds respect `alpha-background'
Po Lu [Fri, 18 Feb 2022 02:34:20 +0000 (10:34 +0800)]
Make stipple backgrounds respect `alpha-background'

* src/xterm.c (x_fill_rectangle): Respect `alpha-background'
when drawing stipple.

3 years agoFix mis-parsing of certain malformed XBM files
Po Lu [Fri, 18 Feb 2022 01:37:36 +0000 (09:37 +0800)]
Fix mis-parsing of certain malformed XBM files

* src/image.c (xbm_scan): Return error on a character literal
that doesn't start with "\x".

3 years agoParse XBM images which use character escapes for hex literals
Po Lu [Fri, 18 Feb 2022 01:12:48 +0000 (09:12 +0800)]
Parse XBM images which use character escapes for hex literals

* src/image.c (xbm_scan): Implement parsing of hex escapes in
character literals.

3 years agoFix gnus-search notmuch thread searches
Eric Abrahamsen [Thu, 17 Feb 2022 21:09:49 +0000 (13:09 -0800)]
Fix gnus-search notmuch thread searches

* lisp/gnus/gnus-search.el (gnus-search-run-search): Multiple things
wrong with collecting thread ids from the search results, and
constructing a new search query.
(gnus-search-indexed-search-command): Use list appending rather than
backtick construction, that was more confusing than it was helpful.

3 years ago* lisp/mouse.el (context-menu-entry): Don't create menu for Help commands.
Juri Linkov [Thu, 17 Feb 2022 18:28:43 +0000 (20:28 +0200)]
* lisp/mouse.el (context-menu-entry): Don't create menu for Help commands.

Help commands that describe keybindings call context-menu-entry bound to
a key.  This causes too much trouble when trying to build the context menu
in a temporary Help buffer that is not displayed in a window.
OTOH, there is no information in context menus useful for Help commands.
So `help-buffer-under-preparation' is added to filter out such calls.
(bug#53910)

3 years ago; * lisp/international/fontset.el (otf-script-alist): Update.
Eli Zaretskii [Thu, 17 Feb 2022 17:23:46 +0000 (19:23 +0200)]
; * lisp/international/fontset.el (otf-script-alist): Update.

3 years agoResurrect innocent joke in byte-opt.el
Eli Zaretskii [Thu, 17 Feb 2022 14:35:03 +0000 (16:35 +0200)]
Resurrect innocent joke in byte-opt.el

* lisp/emacs-lisp/byte-opt.el: Resurrect innocent joke in a
comment.

3 years agoFix files-tests on MS-Windows
Eli Zaretskii [Thu, 17 Feb 2022 14:30:42 +0000 (16:30 +0200)]
Fix files-tests on MS-Windows

* test/lisp/files-tests.el
(files-tests-zzdont-rewrite-precious-files): Renamed from
'files-tests-dont-rewrite-precious-files', to fix a subtle problem
that breaks 2 tests on MS-Windows.
(files-tests-revert-buffer)
(files-tests-revert-buffer-with-fine-grain): No need to disable
file locking anymore.

3 years agoFix or remove outdated comments
Mattias Engdegård [Thu, 17 Feb 2022 13:39:42 +0000 (14:39 +0100)]
Fix or remove outdated comments

* src/eval.c (funcall_lambda): Rewrite obsolete comment.
* src/bytecode.c (exec_byte_code): Remove lying comment and
unneeded #define.
* lisp/emacs-lisp/byte-opt.el: Remove car.  Keep pig.
(byte-compile-log-lap-1): Remove obsolete and irrelevant comment.

3 years ago* lisp/face-remap.el: Fix bug#53294
Stefan Monnier [Thu, 17 Feb 2022 13:37:24 +0000 (08:37 -0500)]
* lisp/face-remap.el: Fix bug#53294

* lisp/face-remap.el (face-remap--copy-face): New function.
(face-attrs--make-indirect-safe): Use it.

3 years agoSpeed up exiting "emacs -Q"
Eli Zaretskii [Thu, 17 Feb 2022 13:26:37 +0000 (15:26 +0200)]
Speed up exiting "emacs -Q"

* lisp/files.el (files--buffers-needing-to-be-saved): Don't call
functions from seq.el.  Using seq.el has an annoying side-effect
of slowing down "C-x C-c" from "emacs -Q" due to the need to load
seq.el.

3 years agoFix indexing of module functions that return complex types.
Philipp Stephani [Thu, 17 Feb 2022 13:02:28 +0000 (14:02 +0100)]
Fix indexing of module functions that return complex types.

Return types that consist of more than one word need to be enclosed in
braces, see Info node `(texinfo) Typed Functions'.  Otherwise they are
indexed incorrectly.

* doc/lispref/internals.texi (Module Values): Enclose multi-word
return types in braces.

3 years agoFix crash when displaying XBM images on a 32-bit visual
Po Lu [Thu, 17 Feb 2022 12:44:53 +0000 (20:44 +0800)]
Fix crash when displaying XBM images on a 32-bit visual

* src/image.c (Create_Pixmap_From_Bitmap_Data): Fix use of wrong
(default) depth.

3 years agoImplement XBM images on Haiku
Po Lu [Thu, 17 Feb 2022 12:35:39 +0000 (12:35 +0000)]
Implement XBM images on Haiku

* src/image.c (image_create_bitmap_from_data): Handle allocation
failures on Haiku.
(Create_Pixmap_From_Bitmap_Data): Implement for Haiku.

3 years agoAdd a NEWS entry for the bookmark changes (bug#54030)
Lars Ingebrigtsen [Thu, 17 Feb 2022 11:57:15 +0000 (12:57 +0100)]
Add a NEWS entry for the bookmark changes (bug#54030)

* lisp/bookmark.el (bookmark-bmenu-mode): Make the type shorter.

3 years agoDon't prefix bookmark name with VC backend name
Matthias Meulien [Wed, 16 Feb 2022 07:49:07 +0000 (08:49 +0100)]
Don't prefix bookmark name with VC backend name

* lisp/vc/vc-dir.el (vc-dir-bookmark-make-record): Remove prefix from
bookmark name.

3 years agoExtend bookmark menu with with handler type column
Matthias Meulien [Tue, 15 Feb 2022 22:39:02 +0000 (23:39 +0100)]
Extend bookmark menu with with handler type column

* lisp/bookmark.el (bookmark-bmenu--revert): Extend table entries with
handler type.
(bookmark-bmenu-mode): Add handler type column.
* lisp/doc-view.el (doc-view-bookmark-jump): Set bookmark handler type.
* lisp/help-mode.el (help-bookmark-jump): Set bookmark handler type.
* lisp/image-dired.el (image-dired-bookmark-jump): Set bookmark handler type.
* lisp/info.el (Info-bookmark-jump): Set bookmark handler type.
* lisp/net/eww.el (eww-bookmark-jump): Set bookmark handler type.
* lisp/vc/vc-dir.el (vc-dir-bookmark-jump): Set bookmark handler type.
* lisp/woman.el (woman-bookmark-jump): Set bookmark handler type.

3 years agoUpdate modus-themes to version 2.1.0
Protesilaos Stavrou [Thu, 17 Feb 2022 11:15:39 +0000 (13:15 +0200)]
Update modus-themes to version 2.1.0

* doc/misc/modus-themes.org (Customization Options): Document new user
options and relevant changes.
(Option for links, Option for box buttons)
(Option for completion framework aesthetics, Option for mail citations)
(Option for intense markup in Org and others)
(Option for diff buffer looks, Option for org-mode block styles)
(Option for Org agenda constructs)
(Option for the headings' overall style): Update user options.
(More accurate colors in terminal emulators): Add section on how to
improve the accuracy of color reproduction in terminal emulators.
(Case-by-case face specs using the themes' palette)
(Face specs at scale using the themes' palette, Override colors)
(Override colors through blending, Custom Org user faces): Improve
wording.
(Custom Org emphasis faces): Add section about bespoke faces for Org
emphasis markers.
(Backdrop for pdf-tools): Improve sample code.
(Ediff without diff color-coding): Add section about user-level
changes to the style of Ediff buffers.
(Full support for packages or face groups): Update lists of supported
packages.
(Indirectly covered packages): Update list of indirectly supported
packages.
(Note on underlines in compilation buffers): Clarify wording.
(Note on EWW and Elfeed fonts): Be more specific about 'shr' faces.
(Are these color schemes?): Answer frequently asked question.
(Acknowledgements): Update acknowledgements' section.

* etc/themes/modus-themes.el (modus-themes-operandi-colors)
(modus-themes-vivendi-colors): Update color palettes.
(modus-themes-subtle-red, modus-themes-subtle-green)
(modus-themes-subtle-yellow, modus-themes-subtle-blue)
(modus-themes-subtle-magenta, modus-themes-subtle-cyan)
(modus-themes-subtle-neutral, modus-themes-intense-red)
(modus-themes-intense-green, modus-themes-intense-yellow)
(modus-themes-intense-blue, modus-themes-intense-magenta)
(modus-themes-intense-cyan, modus-themes-intense-neutral)
(modus-themes-refine-red, modus-themes-refine-green)
(modus-themes-refine-yellow, modus-themes-refine-blue)
(modus-themes-refine-magenta, modus-themes-refine-cyan)
(modus-themes-nuanced-red, modus-themes-nuanced-green)
(modus-themes-nuanced-yellow, modus-themes-nuanced-blue)
(modus-themes-nuanced-magenta, modus-themes-nuanced-cyan)
(modus-themes-special-cold, modus-themes-special-mild)
(modus-themes-special-warm, modus-themes-special-calm)
(modus-themes-diff-added, modus-themes-diff-changed)
(modus-themes-diff-removed, modus-themes-diff-refine-added)
(modus-themes-diff-refine-changed, modus-themes-diff-refine-removed)
(modus-themes-diff-focus-added, modus-themes-diff-focus-changed)
(modus-themes-diff-focus-removed, modus-themes-diff-heading)
(modus-themes-heading-1, modus-themes-heading-2, modus-themes-heading-3)
(modus-themes-heading-4, modus-themes-heading-5, modus-themes-heading-6)
(modus-themes-heading-7, modus-themes-heading-8, modus-themes-hl-line)
(modus-themes-variable-pitch, modus-themes-lang-note)
(modus-themes-lang-warning, modus-themes-lang-error)
(modus-themes-reset-soft, modus-themes-reset-hard): Fix typo in
':group'.
(modus-themes-markup-code): Add face.
(modus-themes--headings-choice, modus-themes-headings)
(modus-themes-org-agenda): Update documentation about typographic
weights.
(modus-themes-org-blocks, modus-themes-completions): Update doc string
and add new stylistic variant.
(modus-themes-intense-markup): Deprecate old user option.  Replace it
with 'modus-themes-markup'.
(modus-themes-mail-citations): Update doc string and add another
stylistic variant.
(modus-themes-box-buttons): Add new user option.
(modus-themes--slant): Tweak how slant is applied.
(modus-themes--markup, modus-themes--prompt, modus-themes--paren)
(modus-themes--syntax-foreground, modus-themes--syntax-extra)
(modus-themes--syntax-string, modus-themes--syntax-comment)
(modus-themes--heading, modus-themes--agenda-structure)
(modus-themes--agenda-habit, modus-themes--org-block-delim)
(modus-themes--mode-line-attrs, modus-themes--standard-completions)
(modus-themes--link, modus-themes--link-color, modus-themes--region)
(modus-themes--hl-line, modus-themes--mail-cite): Tweak private
functions.
(modus-themes--button): Adjust private function.
(modus-themes--heading-weights): Deprecate it.  Replace by
'modus-themes-weights'.
(modus-themes-faces): Update faces.

* etc/themes/modus-vivendi-theme.el
* etc/themes/modus-operandi-theme.el: Bump version number.

For a detailed change log, read:
<https://protesilaos.com/codelog/2022-02-17-modus-themes-2-1-0/>.

3 years agoHave setopt check types
Lars Ingebrigtsen [Thu, 17 Feb 2022 11:31:12 +0000 (12:31 +0100)]
Have setopt check types

* doc/lispref/variables.texi (Setting Variables): Note type checking.
* lisp/cus-edit.el (setopt--set): New function to avoid having
Customize saving values, too.
(setopt): Use it.

3 years agoFix warning during dumping on MS-DOS
Po Lu [Thu, 17 Feb 2022 11:10:24 +0000 (19:10 +0800)]
Fix warning during dumping on MS-DOS

* lisp/cus-start.el (standard): Filter out
`process-error-pause-time' on MS-DOS.

3 years agoPrevent menu items leak if x-pre-popup-menu-hook signals
Po Lu [Thu, 17 Feb 2022 10:01:30 +0000 (18:01 +0800)]
Prevent menu items leak if x-pre-popup-menu-hook signals

* src/menu.c (x_popup_menu_1): Make sure menu items are
discarded if the pre popup menu hook signals.

3 years agoFix problem with "~" in Tramp
Michael Albinus [Thu, 17 Feb 2022 09:40:52 +0000 (10:40 +0100)]
Fix problem with "~" in Tramp

* lisp/net/tramp.el (tramp-handle-substitute-in-file-name):
Remove special handling of "~" in localname.  (Bug#53053)

3 years agoPrevent crashes caused by invalid locale coding systems
Po Lu [Thu, 17 Feb 2022 07:35:41 +0000 (15:35 +0800)]
Prevent crashes caused by invalid locale coding systems

* src/xterm.c (handle_one_xevent): Prevent a signal inside
`setup_coding_system' which crashes recent versions of GLib if
the locale coding system is invalid.

Do not merge to master.

3 years ago* src/xterm.c (x_init_master_valuators): Clear `pending_enter_reset'.
Po Lu [Thu, 17 Feb 2022 05:34:01 +0000 (13:34 +0800)]
* src/xterm.c (x_init_master_valuators): Clear `pending_enter_reset'.

3 years agoImprove handling of XI2 wheel movement
Po Lu [Thu, 17 Feb 2022 05:25:01 +0000 (13:25 +0800)]
Improve handling of XI2 wheel movement

* src/xterm.c (handle_one_xevent): Process movement in all
directions and send it as a single event.

3 years agoFix SIGFPE on some fonts when calculating their average width on Haiku
Po Lu [Thu, 17 Feb 2022 02:32:55 +0000 (02:32 +0000)]
Fix SIGFPE on some fonts when calculating their average width on Haiku

* src/haiku_font_support.cc (estimate_font_ascii): Avoid divison
by zero.

3 years ago* src/emacsgtkfixed.c (XSetWMSizeHints): Improve fix for bug#8919.
Po Lu [Thu, 17 Feb 2022 02:28:02 +0000 (10:28 +0800)]
* src/emacsgtkfixed.c (XSetWMSizeHints): Improve fix for bug#8919.

3 years agoDon't auto-lower when moving onto a menu bar on Haiku
Po Lu [Thu, 17 Feb 2022 01:26:14 +0000 (01:26 +0000)]
Don't auto-lower when moving onto a menu bar on Haiku

* src/haiku_io.c (haiku_len): Handle `MENU_BAR_LEFT'.
* src/haiku_support.cc (EmacsMenuBar::MouseMoved): New function.
* src/haiku_support.h (enum haiku_event_type): New event
`MENU_BAR_LEFT'.
(struct haiku_menu_bar_left_event): New structure.
* src/haikuterm.c (haiku_read_socket): Don't auto-lower when the
mouse exits the frame view onto the menu bar and handle
MENU_BAR_LEFT events.

3 years agoHandle `unspecified' values of symbolic font values on Haiku
Po Lu [Thu, 17 Feb 2022 01:25:24 +0000 (01:25 +0000)]
Handle `unspecified' values of symbolic font values on Haiku

* src/haikufont.c (haikufont_spec_or_entity_to_pattern): Handle
`unspecified' values of symbolic values.

3 years agoFix problem with file-modification-time in tramp-sshfs.el
Michael Albinus [Wed, 16 Feb 2022 19:22:45 +0000 (20:22 +0100)]
Fix problem with file-modification-time in tramp-sshfs.el

* lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist):
* lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler-alist):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler-alist):
* lisp/net/tramp-sshfs.el (tramp-sshfs-file-name-handler-alist):
Use `tramp-handle-file-notify-add-watch',
`tramp-handle-file-notify-rm-watch' and
`tramp-handle-file-notify-valid-p'.
(tramp-sshfs-handle-write-region): Set file modification time.
(Bug#54016)

* test/lisp/net/tramp-tests.el (tramp--test-asynchronous-processes-p):
Filter out tramp-adb on multi-byte `default-directory'.
(tramp--test-hpux-p, tramp--test-macos-p): Protect against errors.
(tramp--test-check-files): Discriminate also tramp-sshfs.el.

3 years agoFix computation of outline heading level for non-git diff
Matthias Meulien [Mon, 14 Feb 2022 21:29:49 +0000 (22:29 +0100)]
Fix computation of outline heading level for non-git diff

* lisp/vc/diff-mode.el (diff-setup-buffer-type): Compute outline heading level
using diff-hunk-header-re (bug#51809).
(diff--font-lock-prettify): Disable prettify in non-git diff.

3 years agoAdd support for Tai Tham script
Eli Zaretskii [Wed, 16 Feb 2022 15:07:58 +0000 (17:07 +0200)]
Add support for Tai Tham script

* lisp/international/fontset.el (setup-default-fontset)
(script-representative-chars): Add tai-tham.
* lisp/language/thai.el ("Northern Thai"): New language
environment.  Patch by Richard Wordingham
<richard.wordingham@ntlworld.com>.  Set
'composition-function-table' for the Tai Tham block.  Original
code by Richard Wordingham <richard.wordingham@ntlworld.com>.

* etc/HELLO: Add Northern Thai greeting.
* etc/NEWS: Announce addition of Northern Thai language environment.

3 years ago; * etc/NEWS: Fix wording of a recently added text.
Eli Zaretskii [Wed, 16 Feb 2022 13:37:57 +0000 (15:37 +0200)]
; * etc/NEWS: Fix wording of a recently added text.

3 years ago; Separate command and concept index in Transient manual
Jonas Bernoulli [Wed, 16 Feb 2022 12:06:17 +0000 (13:06 +0100)]
; Separate command and concept index in Transient manual

* doc/misc/transient.texi (cp): Use cp index for Concept index.
* doc/misc/transient.texi (fn): Use fn index for Commands as well.

3 years agoFix recent change in xwidget.c
Po Lu [Wed, 16 Feb 2022 11:54:40 +0000 (19:54 +0800)]
Fix recent change in xwidget.c

* src/xwidget.c (xwidget_init_view): Don't assume ttip_widget
is NULL if tooltips have not been initialized.

3 years agoSpeed up count_size_as_multibyte
Mattias Engdegård [Wed, 16 Feb 2022 11:27:59 +0000 (12:27 +0100)]
Speed up count_size_as_multibyte

This function is used in many places to calculate the length of
a unibyte string converted to multibyte.

* src/character.c (count_size_as_multibyte): Move the overflow test
outside the loop, which makes it much faster.  Standard compilers
will even vectorise it if asked to (-O2 in Clang, -O3 in GCC).

3 years agoAvoid emacs-module-tests failure on macOS
Mattias Engdegård [Wed, 16 Feb 2022 11:26:30 +0000 (12:26 +0100)]
Avoid emacs-module-tests failure on macOS

* test/src/emacs-module-tests.el (module/describe-function-1):
Prevent string mismatch caused by line breaks after filling;
the macOS dynamic library suffix (.dylib) is longer than on other
platforms.

3 years agoFix frame focus handling with native input
Po Lu [Wed, 16 Feb 2022 07:40:39 +0000 (15:40 +0800)]
Fix frame focus handling with native input

* lisp/term/x-win.el (x-gtk-use-native-input-watcher): Stop
passing frame parameter  to `x-internal-focus-input-context'.
* src/xfns.c (Fx_internal_focus_input_context): Focus all focus
frames from all displays.

3 years agoResolve xwidget scrolling mysteries
Po Lu [Wed, 16 Feb 2022 06:38:06 +0000 (14:38 +0800)]
Resolve xwidget scrolling mysteries

* src/xterm.c (x_any_window_to_frame): Handle xwidget views.
(handle_one_xevent): Always increment values array when handling
motion events.

3 years ago* etc/NEWS: Improve the PGTK entry.
Po Lu [Wed, 16 Feb 2022 03:28:08 +0000 (11:28 +0800)]
* etc/NEWS: Improve the PGTK entry.

3 years agoDecode keyboard input as latin-1 whenever appropriate
Po Lu [Wed, 16 Feb 2022 02:53:00 +0000 (10:53 +0800)]
Decode keyboard input as latin-1 whenever appropriate

* src/keyboard.c (kbd_buffer_get_event_1): Use `coding'
property if present.

* src/termhooks.h (enum event_kind): Document meaning of
`coding' property on text strings.

* src/xterm.c (handle_one_xevent): Set coding property on text
to latin-1 if it was obtained with XLookupString.

3 years agoDon't decode text within XIM callbacks or handle_one_xevent
Po Lu [Wed, 16 Feb 2022 02:10:13 +0000 (10:10 +0800)]
Don't decode text within XIM callbacks or handle_one_xevent

* src/keyboard.c (kbd_buffer_get_event_1):
(kbd_buffer_get_event_2): New functions.
(kbd_buffer_get_event): Accept a new meaning of
MULTIBYTE_CHAR_KEYSTROKE_EVENT where .arg can be a unibyte
string to be decoded in the locale coding system.

* src/termhooks.h (enum event_kind): Document new meaning of
.arg in a multibyte keystroke event.

* src/xfns.c (struct x_xim_text_conversion_data): New struct.
(x_xim_text_to_utf8_unix_1):
(x_xim_text_to_utf8_unix_2): New functions.
(x_xim_text_to_utf8_unix): Handle decode failure correctly.
(xic_preedit_draw_callback): Abort IM context if text could not
be decoded correctly.

* src/xterm.c (handle_one_xevent): Utilize new meaning of
MULTIBYTE_CHAR_KEYSTROKE_EVENT.

3 years ago; Fix Transient manual
Eli Zaretskii [Tue, 15 Feb 2022 19:06:21 +0000 (21:06 +0200)]
; Fix Transient manual

* doc/misc/transient.texi (all nodes): Replace ".." with Texinfo
style ``..'' quoting or by @dfn{..} or by other appropriate
markup, like @samp{..}.  Add indexing.  Fix punctuation.  Fix
markup of keyboard commands.

3 years agoFix problem with popd for in remote shell buffers
Michael Albinus [Tue, 15 Feb 2022 17:13:04 +0000 (18:13 +0100)]
Fix problem with popd for in remote shell buffers

* lisp/shell.el (shell-prefixed-directory-name):
Use `file-local-name' for DIR.  (Bug#53927)

3 years agoImport texi source file for transient manual
Jonas Bernoulli [Tue, 15 Feb 2022 16:49:04 +0000 (17:49 +0100)]
Import texi source file for transient manual

* doc/misc/Makefile.in: Add transient to INFO_COMMON.
* doc/misc/transient.texi: New file.

3 years agoMerge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Michael Albinus [Tue, 15 Feb 2022 15:16:50 +0000 (16:16 +0100)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs

3 years agoSome Tramp cleanup
Michael Albinus [Tue, 15 Feb 2022 15:15:55 +0000 (16:15 +0100)]
Some Tramp cleanup

* doc/misc/tramp.texi (Remote processes): Add also tramp-sshfs.el.

* lisp/net/tramp-adb.el (tramp-adb-handle-make-process):
Error-out for multi-byte `default-directory'.

* lisp/net/tramp.el (tramp-tolerate-tilde): Move it up.
(tramp-handle-abbreviate-file-name): Use it.
(tramp-read-passwd): Show literal passphrase prompt.

3 years ago; * etc/NEWS: Improve wording of savehist.el's entry.
Eli Zaretskii [Tue, 15 Feb 2022 14:33:42 +0000 (16:33 +0200)]
; * etc/NEWS: Improve wording of savehist.el's entry.

3 years agoDon't attempt to connect to a remote server during 'abbreviate-file-name'
Jim Porter [Mon, 14 Feb 2022 21:16:05 +0000 (13:16 -0800)]
Don't attempt to connect to a remote server during 'abbreviate-file-name'

* lisp/net/tramp.el (tramp-handle-abbreviate-file-name): Only use the
"home-directory" when a connection has been established.

3 years agoAllow savehist-additional-variables to truncate lists
Lars Ingebrigtsen [Tue, 15 Feb 2022 10:29:43 +0000 (11:29 +0100)]
Allow savehist-additional-variables to truncate lists

* lisp/savehist.el (savehist-save): Allow truncating values (bug#30943).

3 years agoAdjust files-test-file-size-human-readable test
Lars Ingebrigtsen [Tue, 15 Feb 2022 09:59:56 +0000 (10:59 +0100)]
Adjust files-test-file-size-human-readable test

* test/lisp/files-tests.el (files-test-file-size-human-readable):
Fix test after recent change.

3 years agoMake autoarg obsolete
Lars Ingebrigtsen [Tue, 15 Feb 2022 09:54:30 +0000 (10:54 +0100)]
Make autoarg obsolete

* lisp/obsolete/autoarg.el: Make obsolete.

3 years ago; Fix commit d6fba624e6
Arash Esbati [Tue, 15 Feb 2022 09:00:57 +0000 (10:00 +0100)]
; Fix commit d6fba624e6

* doc/misc/gnus.texi (Gravatars): Adjust vindex entries.

3 years agoFix parsing of some semibold font styles on Haiku
Po Lu [Tue, 15 Feb 2022 07:27:31 +0000 (07:27 +0000)]
Fix parsing of some semibold font styles on Haiku

* src/haiku_font_support.cc (font_style_to_flags): Accept
"Semibold" to mean SemiBold as well.  Reported by
augiedoggie <augiedoggie@users.noreply.github.com>.

3 years agoDisable auto-lowering and raising on Haiku when a popup is active
Po Lu [Tue, 15 Feb 2022 07:21:18 +0000 (07:21 +0000)]
Disable auto-lowering and raising on Haiku when a popup is active

* src/haikuterm.c (haiku_new_focus_frame):
(haiku_read_socket): Don't raise or lower if popup is activated.

3 years agoReplace use of `DefaultRootWindow' with our recorded root window
Po Lu [Tue, 15 Feb 2022 05:41:52 +0000 (13:41 +0800)]
Replace use of `DefaultRootWindow' with our recorded root window

* src/xfns.c (x_relative_mouse_position):
(x_set_parent_frame):
(Fx_mouse_absolute_pixel_position):
(Fx_set_mouse_absolute_pixel_position):
* src/xterm.c (x_iconify_frame): Use dpyinfo->root_window
instead of DefaultRootWindow.

3 years agoImprove the help message for the pgtk configure option
Po Lu [Tue, 15 Feb 2022 04:52:30 +0000 (12:52 +0800)]
Improve the help message for the pgtk configure option

* configure.ac: Describe the purpose of PGTK better.

3 years ago; * doc/lispref/variables.texi (Setting Variables): Fix a typo.
Aleksandr Vityazev [Mon, 14 Feb 2022 20:30:58 +0000 (20:30 +0000)]
; * doc/lispref/variables.texi (Setting Variables): Fix a typo.

3 years ago* src/xterm.c (init_xterm): Use more reliable method to disable XI2.
Po Lu [Tue, 15 Feb 2022 02:23:49 +0000 (10:23 +0800)]
* src/xterm.c (init_xterm): Use more reliable method to disable XI2.

3 years agoBetter handle devices being enabled on XI2
Po Lu [Tue, 15 Feb 2022 01:19:12 +0000 (09:19 +0800)]
Better handle devices being enabled on XI2

* src/xterm.c (handle_one_xevent): Don't abort on DeviceChanged
if the device couldn't be found, instead regenerating the device
hierarchy to see if it was enabled.

3 years agoFix docstring and init of Gnus search -remove-prefix options
Eric Abrahamsen [Tue, 15 Feb 2022 00:06:14 +0000 (16:06 -0800)]
Fix docstring and init of Gnus search -remove-prefix options

* lisp/gnus/gnus-search.el (*-remove-prefix): For all engine defaults,
remove incorrect docs stating this is a regexp (it's a string). Also,
use `expand-file-name' to get the correct default value, not `concat'
and (getenv "HOME").

3 years agoFix manual documentation of Gnus tool bars
Eric Abrahamsen [Mon, 14 Feb 2022 23:11:37 +0000 (15:11 -0800)]
Fix manual documentation of Gnus tool bars

* doc/misc/gnus.texi: The options `gnus-use-toolbar',
`gnus-toolbar-thickness', and `gnus-summary-mail-toolbar' no longer
exist. Other options in this section have been renamed from "toolbar"
to "tool-bar".

3 years agoBe more explicit about the meaning of "remove prefix" in Gnus search
Eric Abrahamsen [Mon, 14 Feb 2022 23:20:06 +0000 (15:20 -0800)]
Be more explicit about the meaning of "remove prefix" in Gnus search

* doc/misc/gnus.texi (Search Engines): It's easy to get confused about
what we're removing and why.

3 years ago; * doc/lispref/variables.texi (Setting Variables): Fix markup.
Eli Zaretskii [Mon, 14 Feb 2022 17:47:44 +0000 (19:47 +0200)]
; * doc/lispref/variables.texi (Setting Variables): Fix markup.

3 years ago; Improve a recently added NEWS entry about 'command-query'.
Eli Zaretskii [Mon, 14 Feb 2022 17:38:56 +0000 (19:38 +0200)]
; Improve a recently added NEWS entry about 'command-query'.

3 years agoImprove recent addition to documentation of face remapping
Eli Zaretskii [Mon, 14 Feb 2022 17:23:28 +0000 (19:23 +0200)]
Improve recent addition to documentation of face remapping

* doc/lispref/display.texi (Basic Faces): Make the list of basic
faces more complete.
(Face Remapping): Improve wording of a recent addition; add
cross-reference to "Basic Faces".

3 years agoImprove format of values returned by 'file-size-human-readable'
Eli Zaretskii [Mon, 14 Feb 2022 16:59:38 +0000 (18:59 +0200)]
Improve format of values returned by 'file-size-human-readable'

* lisp/files.el (file-size-human-readable): Emit one digit of the
fractional part of the size only if there's just one digit before
the decimal point.

3 years agoFix typo in Face Remapping
Lars Ingebrigtsen [Mon, 14 Feb 2022 14:16:42 +0000 (15:16 +0100)]
Fix typo in Face Remapping

* doc/lispref/display.texi (Face Remapping): Fix typo.

3 years agoDon't signal errors in abbrev-table-p
Lars Ingebrigtsen [Mon, 14 Feb 2022 11:00:22 +0000 (12:00 +0100)]
Don't signal errors in abbrev-table-p

* lisp/abbrev.el (abbrev-table-p): Ignore the error.
* src/lread.c (oblookup): Signal `wrong-type-argument' instead of
`error' if it turns out that we're not really in an obarray (bug#53988).

3 years agoImprove stability of message-hide-headers
Philip Kaludercic [Mon, 14 Feb 2022 10:51:06 +0000 (11:51 +0100)]
Improve stability of message-hide-headers

* message.el (message-hide-headers): Use a pointer instead of tracking
the "end-of-headers" point manually (bug#53991).

3 years agoPremultiply background color by alpha for images
Po Lu [Mon, 14 Feb 2022 10:39:56 +0000 (18:39 +0800)]
Premultiply background color by alpha for images

* src/xterm.c (x_query_frame_background_color): Premultiply
colors as X wants them when built without Cairo.

3 years agoFix typo in previous Face Remapping doc change
Lars Ingebrigtsen [Mon, 14 Feb 2022 10:39:55 +0000 (11:39 +0100)]
Fix typo in previous Face Remapping doc change

* doc/lispref/display.texi (Face Remapping): Fix typo.

3 years agoNote caveat about remapping basic faces
Lars Ingebrigtsen [Mon, 14 Feb 2022 10:38:11 +0000 (11:38 +0100)]
Note caveat about remapping basic faces

* doc/lispref/display.texi (Face Remapping): Note caveat about
basic faces (bug#53636).

3 years agoImprove Haiku selection handling
Po Lu [Mon, 14 Feb 2022 10:17:58 +0000 (10:17 +0000)]
Improve Haiku selection handling

* lisp/select.el (gui--selection-value-internal): Use X types on
Haiku as well.

* lisp/term/haiku-win.el (haiku--selection-type-to-mime): Update
types to correspond better with X.

* src/haikuselect.c (Fhaiku_selection_data):
(Fhaiku_selection_put): Remove a great deal of ad hoc code now
handled by the regular selection machinery.

3 years agoAdd a mechanism for querying before executing a command
Lars Ingebrigtsen [Mon, 14 Feb 2022 10:20:41 +0000 (11:20 +0100)]
Add a mechanism for querying before executing a command

* doc/emacs/custom.texi (Disabling): Document it.
* doc/lispref/commands.texi (Disabling Commands): Document the
low-level stuff.

* lisp/simple.el (command-execute): Respect the `(query ...)'
value for `disabled'.
(command-execute--query): New function.
(command-query): New function.

3 years agoHandle allocation failures of fringe bitmaps on Haiku
Po Lu [Mon, 14 Feb 2022 07:12:17 +0000 (07:12 +0000)]
Handle allocation failures of fringe bitmaps on Haiku

* src/haikuterm.c (haiku_define_fringe_bitmap): Handle
allocation failures.

3 years ago* etc/TODO: Update some entires related to macOS and NS.
Po Lu [Mon, 14 Feb 2022 06:05:46 +0000 (14:05 +0800)]
* etc/TODO: Update some entires related to macOS and NS.

Xwidgets have worked on NS for a long time, "smooth scrolling"
is now available as `pixel-scroll-precision-mode' for all GUI
platforms, and some mouse gestures have been implemented on NS
and X.

3 years agoEnsure bad values don't leak into scroll valuators after DeviceChange
Po Lu [Mon, 14 Feb 2022 05:13:13 +0000 (13:13 +0800)]
Ensure bad values don't leak into scroll valuators after DeviceChange

* src/xterm.c (xi_reset_scroll_valuators_for_device_id): New
argument `pending_only'.
(handle_one_xevent): Reset pending scroll valuators on XI_Enter
and mark valuators updated via DeviceChanged events as pending.

* src/xterm.h (struct xi_scroll_valuator_t): New field
`pending_enter_reset'.

3 years agoRestore valuator values after receiving a DeviceChanged event
Po Lu [Mon, 14 Feb 2022 03:51:22 +0000 (11:51 +0800)]
Restore valuator values after receiving a DeviceChanged event

* src/xterm.c (x_init_master_valuators): Generate valuators for
both master and slave devices.
(handle_one_xevent): Find current valuator info and use that to
populate scroll valuators after a device changed.

3 years agoImprove efficency of handling DeviceChanged events
Po Lu [Mon, 14 Feb 2022 03:16:38 +0000 (11:16 +0800)]
Improve efficency of handling DeviceChanged events

* src/xterm.c (handle_one_xevent): Just update the device that
was changed on DeviceChanged and only do hierarchy recalculation
upon HierarchyChanged events.

3 years agoTry to reduce empty areas on GTK when a frame is being resized
Po Lu [Mon, 14 Feb 2022 01:52:05 +0000 (09:52 +0800)]
Try to reduce empty areas on GTK when a frame is being resized

* src/xterm.c (x_fill_rectangle):
(x_clear_rectangle, x_draw_image_glyph_string):
(x_clear_area): Don't use picture if frame background is opaque.

3 years agoFix wide fringe bitmap processing on Haiku
Po Lu [Mon, 14 Feb 2022 01:34:09 +0000 (01:34 +0000)]
Fix wide fringe bitmap processing on Haiku

* src/haiku_support.cc (BBitmap_import_mono_bits): Rewrite to
use ImportBits.
(BBitmap_import_fringe_bitmap): New function.

* src/haiku_support.h: Update prototypes.

* src/haikuterm.c (haiku_define_fringe_bitmap): Pass entire
short array to BBitmap_import_fringe_bitmap instead.

3 years agoImprove Tramp's process-file implementations
Michael Albinus [Sun, 13 Feb 2022 19:50:51 +0000 (20:50 +0100)]
Improve Tramp's process-file implementations

* lisp/net/tramp-adb.el (tramp-adb-handle-process-file)
* lisp/net/tramp-sh.el (tramp-sh-handle-process-file):
* lisp/net/tramp-smb.el (tramp-smb-handle-process-file):
* lisp/net/tramp-sshfs.el (tramp-sshfs-handle-process-file):
Improve implementation.  (Bug#53854)

* test/lisp/net/tramp-tests.el (tramp-test28-process-file)
(tramp--test-check-files, tramp-test47-unload): Extend tests.