Mauro Aranda [Sat, 19 Feb 2022 12:34:11 +0000 (13:34 +0100)]
Fix types of some align.el defcustoms
* lisp/align.el (align-region-heuristic)
(align-large-region): Both options can be nil, but the defcustom type
didn't allow nil values.
(align-rules-list-type): The "Run If" and "Valid" attributes
should be functions, but the default value was t. Change it to
#'always (bug#54048).
Mauro Aranda [Sat, 19 Feb 2022 12:33:05 +0000 (13:33 +0100)]
Fix :match function for the key widget
* lisp/wid-edit.el (key): Calling key-valid-p directly doesn't work,
because the :match function is called with the widget and the value as
arguments (bug#54049).
Po Lu [Sat, 19 Feb 2022 12:05:18 +0000 (20:05 +0800)]
Improve portability of alpha channel visual detection
* src/xfns.c (select_visual): Look for PictVisuals with an alpha
channel instead of blindly assuming that 32 bit visuals have an
alpha channel.
(Fx_show_tip): Fix crash on some displays where child is None.
* src/xterm.c (x_term_init): Initialize Xrender before
calling select_visual.
Alan Mackenzie [Sat, 19 Feb 2022 10:38:19 +0000 (10:38 +0000)]
Fix symbols with position appearing in the output of `compile-defun'
This happened with the tags of a condition-case. Also fix the detection of
circular lists while stripping the positions from symbols with position.
* lisp/emacs-lisp/byte-run.el (byte-run--circular-list-p): Remove.
(byte-run--strip-s-p-1): Write a value of t into a hash table for each cons or
vector/record encountered. (This is to prevent loops with circular
structures.) This is now done for all arguments, not just those detected as
circular lists.
* lisp/emacs-lisp/bytecomp.el (byte-compile-file-form-defvar)
(byte-compile-form, byte-compile-dynamic-variable-op)
(byte-compile-constant, byte-compile-push-constant): Remove redundant calls to
`bare-symbol'.
(byte-compile-lambda): call `byte-run-strip-symbol-positions' on the arglist.
(byte-compile-out): call `byte-run-strip-symbol-positions' on the operand.
This is the main call to this function in bytecomp.el.
* src/fns.c (hashfn_eq): Strip the position from an argument which is a symbol
with position.
(hash_lookup): No longer strip a position from a symbol with position.
(sxhash_obj): Add handling for symbols with position, substituting their bare
symbols when symbols with position are enabled.
Eli Zaretskii [Sat, 19 Feb 2022 09:19:48 +0000 (11:19 +0200)]
Fix character compositions on the mode line
* src/composite.c (composition_compute_stop_pos)
(Ffind_composition_internal): When characters come from a string,
determine whether to compose them from that string's multibyteness,
not from that of the current buffer. (Bug#53729)
Po Lu [Sat, 19 Feb 2022 08:21:51 +0000 (16:21 +0800)]
Don't ignore events from XI2 slave devices anymore
All the machinery needed to keep track of events from those
devices is already in place, so that's no longer required.
* src/xterm.c (x_get_scroll_valuator_delta):
(xi_reset_scroll_valuators_for_device_id):
(handle_one_xevent): Don't ignore XI devices that are not master
pointers or keyboards.
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.
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
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.
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.
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.
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.
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)
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.
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.
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.
* 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/>.
* 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.
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.
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.
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.
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.
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).
* 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.
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.
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.
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.
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.
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>.
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.
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").
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".
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".
* 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).