* lisp/faces.el (set-face-attribute): Mention new font weights in
doc string.
* src/font.c (struct table_entry): Allow more synonyms.
(weight_table): Expand to support separating medium and normal
weights. Also add heavy/ultra-heavy and some other variants.
(font_parse_fcname): Support more names.
* src/gtkutil.c (xg_weight_to_symbol): Support all the Pango weights.
(xg_style_to_symbol): Make into functions.
(xg_get_font): Adjust.
* src/w32font.c (w32_to_fc_weight): Use symbols.
* src/xfaces.c (syms_of_xfaces): Add the new symbols.
Miha Rihtaršič [Tue, 19 Oct 2021 16:41:13 +0000 (18:41 +0200)]
Avoid excessive specbinding in all-completions
* src/minibuf.c (match_regexps):
(Ftry_completion):
(Fall_completions):
(Ftest_completion): Use fast_string_match_internal to match against
regexps in completion-regexp-list without having to bind
case-fold-search.
Further fixes for Turkish case changes in unibyte strings
* src/casefiddle.c (struct casing_context): Add new slot to keep
track of what the previous operation was.
(case_character_impl): Set it.
(do_casify_unibyte_string): Use it to handle Turkish correctly.
* lisp/align.el (align-rules-list): Change to work without `C-u'.
(align): Doc clarification.
(align-regexp): Ditto, and change default `C-u' regexp from
"\\(\\s-*\\)" to "\\(\\s-*\\)" so that it'll make things columnar
if the user just hits RET through all the defaults.
Make downcasing unibyte strings in Turkish less wrong
* src/casefiddle.c (ascii_casify_character): New function.
(do_casify_unibyte_string): Use it to make downcasing tr_TR.UTF-8
"I" less wrong.
(Fdowncase): Mention caveats.
(Fupcase):
(Fcapitalize):
(Fupcase_initials): Refer to details in `downcase'.
(syms_of_casefiddle): Define more symbols.
Robert Pluim [Mon, 18 Oct 2021 09:51:10 +0000 (11:51 +0200)]
Handle VS-16 correctly for non-emoji codepoints
* admin/unidata/blocks.awk: Remove emoji overrides for codepoints with
Emoji_Presentation = No, they're no longer necessary.
* lisp/composite.el: Remove #xFE0F (VS-16) from the range handled by
`compose-gstring-for-variation-glyph' so it can be handled by
`font_range'.
* src/composite.c (syms_of_composite): New variable
`auto-composition-emoji-eligible-codepoints'.
* admin/unidata/emoji-zwj.awk: Generate value for
`auto-composition-emoji-eligible-codepoints'. Add
`composition-function-table' entries for 'codepoint + U+FE0F' for
them.
* src/font.c (codepoint_is_emoji_eligible): New function to check if
we should try to use the emoji font for a codepoint.
(font_range): Use it.
Tassilo Horn [Tue, 19 Oct 2021 05:05:18 +0000 (07:05 +0200)]
Adjust bug-reference-bug-regexp default values to match only at beg of word
Previously, the "bug 1" in "(debug 1)" has also been highlighted.
* lisp/progmodes/bug-reference.el (bug-reference-bug-regexp)
(bug-reference--setup-from-vc-alist,bug-reference-setup-from-mail-alist)
(bug-reference-setup-from-irc-alist): Adjust bug-reference-bug-regexp
default values to match only at the beginning of a word.
Michael Albinus [Mon, 18 Oct 2021 17:54:13 +0000 (19:54 +0200)]
Fix some Tramp problems
* lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist):
Use `tramp-adb-handle-file-executable-p' and
`tramp-adb-handle-file-readable-p'.
(tramp-adb-handle-file-executable-p)
(tramp-adb-handle-file-readable-p): New defuns.
(tramp-adb-handle-file-writable-p): Simplify.
(tramp-adb-handle-make-process): Handle :filter being t.
(tramp-adb-find-test-command): Remove.
* lisp/net/tramp-sh.el (tramp-sh-handle-file-readable-p):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-file-readable-p):
* lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
Use `tramp-handle-file-readable-p'.
(tramp-gvfs-handle-file-executable-p): Do not check whether file
exists, this is done in `tramp-check-cached-permissions'.
(tramp-gvfs-handle-file-readable-p): Remove.
* lisp/net/tramp.el (tramp-error): Move binding of `inhibit-message' ...
(tramp-signal-hook-function): ... here.
(tramp-handle-access-file): Rewrite.
(tramp-handle-file-readable-p): New defun.
(tramp-handle-make-process): Setting :filter to t works since
Emacs 29.1 only.
Glenn Morris [Mon, 18 Oct 2021 14:50:26 +0000 (07:50 -0700)]
Merge from origin/emacs-28
c163fd9260 (origin/emacs-28) Minor fixes for recent changes in ELisp ... fefada4816 Fix example in calc manual e74e17c1f0 Rewrites of Elisp manual including tab-bar and tab-line ch... 3b138917b7 ; * INSTALL: Fix typo. ce71446585 * lisp/tab-bar.el: Improve docstrings (bug#51247) ace4ce16a3 * lisp/tab-bar.el (tab-bar-mouse-move-tab): Don't drag tab... 04716ca48f Add tab-bar-drag-maybe for indication of tab dragging (bug... 81e3697600 * lisp/tab-bar.el: Add a new tab on [mouse-1] instead of [... a191d3c725 Add new and fix existing docstrings in tab-bar.el and tab-... 77dbaedadc Add tab bar support to the nextstep port 7b6fb486c2 Fix potential buffer overflow (bug#50767) ed9f5546aa Improve doc strings in tab-line.el 686a03ee22 More documentation fixes in tab-bar.el 35920791df Improve doc strings of tab-bar commands 2d15db6e89 Fix a semantic test on some macOS machines ac6ac76e3a Update to Org 9.5-57-g9bc3a2
Martin Rudalics [Mon, 18 Oct 2021 07:58:48 +0000 (09:58 +0200)]
Rewrites of Elisp manual including tab-bar and tab-line changes
* doc/lispref/buffers.texi (Current Buffer, Buffer List): Update
references to 'selected-window'.
* doc/lispref/elisp.texi (Top): Move up Selecting Windows section
in front of Window Sizes section.
* doc/lispref/frames.texi (Creating Frames): Say window system
instead of windowing system.
(Frame Layout): Add Tab Bar to layout.
(Layout Parameters): Add 'tab-bar-lines'.
(Input Focus): Say window system window instead of window
manager window. Fix reference to 'selected-window'.
* doc/lispref/objects.texi (Window Type): Minor rewrite.
* doc/lispref/windows.texi (Basic Windows): Rewrite. Settle on
term 'window system window' for disambiguation with our windows.
Move 'selected-window' description to Selecting Windows section.
Move schematic of window structure here. Use 'decorations' for
objects outside the window body. Say that the areas reserved
for continuation and truncation glyphs, vertical dividers and
line numbers are part of the window body.
(Windows and Frames): Minor rewrite, adding and fixing some
cross references. Move live window schematic to 'Basic Windows'
section.
(Selecting Windows): Move section in front of Window Sizes
section. Move description of 'selected-window' here. Move up
description of 'frame-selected-window' and
'set-frame-selected-window'. Update and move description of
'window-bump-use-time' here.
(Window Sizes): Throughout use the term 'decorations' instead of
enumerating them individually. Add 'window-tab-line-height'
description.
(Resizing Windows): Again use the term 'decorations' instead of
enumerating them individually.
(Splitting Windows): Minor fix.
(Cyclic Window Ordering): Improve descriptions of 'get-lru-window'
and 'get-mru-window'. Move 'window-bump-use-time' to Selecting
Windows section.
(Coordinates and Windows, Window Configurations): Once more use
the term 'decorations' instead of enumerating them individually.
* src/window.c (Fwindow_bump_use_time): Move after
'window-use-time'. Make it work for live windows only. Make
WINDOW argument optional. Update doc-string.
Daniel Martín [Sat, 16 Oct 2021 18:24:19 +0000 (20:24 +0200)]
New option show-paren-context-when-offscreen
* lisp/simple.el (blink-paren-open-paren-line-string): Extract
functionality that shows the open paren line in the echo area into its
own function, to reuse it from paren.el.
(blink-matching-open): Use blink-paren-open-paren-line-string.
* lisp/paren.el (show-paren-context-when-offscreen): New option
show-paren-context-when-offscreen.
(show-paren-function): Implement it using
blink-paren-open-paren-line-string.
* lisp/emacs-lisp/eldoc.el (eldoc-display-message-no-interference-p):
Make sure the feature works well with eldoc.
* test/lisp/paren-tests.el (paren-tests-open-paren-line): Test
blink-paren-open-paren-line-string.
* doc/emacs/programs.texi (Matching): Update the documentation.
* etc/NEWS: And announce the new feature.
Allow :filter t in make-process to work as with set-process-filter
* src/process.c (create_process):
(create_pty):
(Fmake_pipe_process):
(Fmake_serial_process): Don't add the read_fd if the filter is t
(which means that we don't accept output from the filter).
* lisp/vc/pcvs-defs.el (cvs-mode-diff-map):
* lisp/vc/pcvs.el (pcvs-defs):
(cvs-mode-diff-map): Move maps to pcvs (because the commands are
defined in pcvs.el and #' gives us checking) and transform from
easy-mmode-defmap to define-keymap.
* doc/lispref/keymaps.texi (Key Sequences):
(Changing Key Bindings): Document the various key syntaxes.
* lisp/emacs-lisp/byte-opt.el (byte-optimize-define-key)
(byte-optimize-define-keymap)
(byte-optimize-define-keymap--define): New functions to check and
expand ["..."] syntax at compile time.
Martin Rudalics [Sun, 17 Oct 2021 17:48:45 +0000 (20:48 +0300)]
Add tab-bar-drag-maybe for indication of tab dragging (bug#50993)
* lisp/tab-bar.el (tab-bar--event-to-item)
(tab-bar-mouse-move-tab): Set tab-bar-drag-maybe to nil.
(tab-bar-mouse-down-1): Set tab-bar-drag-maybe to t.
* src/xdisp.c (note_mouse_highlight): Set cursor to 'hand_cursor'
when tab_bar_drag_maybe is true.
(syms_of_xdisp): New variable tab-bar-drag-maybe.
Juri Linkov [Sun, 17 Oct 2021 17:27:16 +0000 (20:27 +0300)]
* lisp/tab-bar.el: Add a new tab on [mouse-1] instead of [down-mouse-1]
* lisp/tab-bar.el (tab-bar-mouse-down-1): Rename from
tab-bar-mouse-select-tab. Ignore 'add-tab'.
(tab-bar-mouse-1): Rename from tab-bar-mouse-close-tab-from-button.
Use binding of 'add-tab'.
(tab-bar-map): Rebind [down-mouse-1] from tab-bar-mouse-select-tab to
tab-bar-mouse-down-1, and [mouse-1] from tab-bar-mouse-close-tab-from-button
to tab-bar-mouse-1 (bug#51246).
Po Lu [Thu, 14 Oct 2021 10:38:26 +0000 (18:38 +0800)]
Fix minor issues with text display when cursor is in mouse face
* src/xdisp.c (get_cursor_offset_for_mouse_face): Don't calculate
offsets for the glyph the cursor is on, and move some logic to
get_glyph_pixel_width_delta_for_mouse_face.
(fill_composite_glyph_string)
(fill_gstring_glyph_string)
(fill_glyphless_glyph_string)
(fill_glyph_string)
(fill_image_glyph_string)
(fill_xwidget_glyph_string)
(fill_stretch_glyph_string): Set s->face to mouse face whenever
appropriate.
(get_glyph_pixel_width_delta_for_mouse_face): New function.
(set_glyph_string_background_width): Update background width and
s->width to take into account differing :box properties of the mouse
face, when producing strings for the cursor.
(erase_phys_cursor): Redraw mouse face when erasing a cursor on top of
the mouse face.
* src/xterm.c (x_set_mouse_face_gc): Stop setting s->face when under
mouse face because redisplay now does that for us.
* src/w32term.c (w32_set_mouse_face_gc): Likewise.
Po Lu [Fri, 15 Oct 2021 18:02:54 +0000 (19:02 +0100)]
Add tab bar support to the nextstep port
* src/nsfns.m (ns_change_tab_bar_height): New function.
(ns_set_tab_bar_lines): Check tab bar height and set tab bar
accordingly.
* src/nsterm.m (ns_clear_under_internal_border): Clear internal border
correctly when there is a tab bar.
(ns_create_terminal): Add ns_change_tab_bar_height.
(mouseDown): Handle tab bar mouse click events.
Alan Third [Mon, 4 Oct 2021 21:35:41 +0000 (22:35 +0100)]
Fix potential buffer overflow (bug#50767)
* src/image.c (svg_load_image): Check how many bytes were actually
written to the buffer. Don't check xmalloc return value as xmalloc
doesn't return if it fails.
Stefan Kangas [Sun, 17 Oct 2021 01:00:10 +0000 (03:00 +0200)]
Fix a semantic test on some macOS machines
* test/lisp/cedet/semantic/bovine/gcc-tests.el
(semantic-gcc-test-output-parser-this-machine): Fix test on some macOS
machines where running "gcc" runs "llvm" instead.
Glenn Morris [Sat, 16 Oct 2021 16:18:37 +0000 (09:18 -0700)]
Merge from origin/emacs-28
e8488808df Avoid aborts when a thread is signaled while "waiting for ... 21397cce51 Improve documentation string for 'compilation-error-regexp... 2971a6890f * lisp/emacs-lisp/comp.el (comp-trampoline-compile): Fix t... e842d7f29a Fix removal of fringe indication of bookmarks b5a0eda978 Prefer "graphical displays" to "X terminals" in documentation 4ad0fc0dd0 Precise documentation of file-notify-add-watch f5b8df14c6 Fixes to account for windows' tab lines ced72b6e4c * Fix `native-compile-target-directory' effectiveness on t... 502788bc3d Add missing single quotes in the Emacs manual 1af45ad04e ; * lisp/emacs-lisp/comp.el (comp-trampoline-compile): Fix... 12654b7423 * lisp/menu-bar.el (yank-menu-length): Fix docstring (bug#...
* test/infra/gitlab-ci.yml (variables): Set default value of
EMACS_TEST_TIMEOUT.
(.job-template): Propagate EMACS_TEST_TIMEOUT and EMACS_TEST_VERBOSE.
(test-all-inotify): Set specific EMACS_TEST_TIMEOUT.
Stefan Kangas [Wed, 13 Oct 2021 20:54:47 +0000 (22:54 +0200)]
Remove duplicate code in edmacro-parse-keys
* lisp/subr.el (kbd): Add argument NEED-VECTOR and make it suitable
for calling from 'edmacro-parse-keys'.
* lisp/edmacro.el (edmacro-parse-keys): Replace definition with a
call to 'kbd'.
This change was discussed in:
https://lists.gnu.org/r/emacs-devel/2021-10/msg00909.html