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.
Eli Zaretskii [Sat, 16 Oct 2021 11:47:32 +0000 (14:47 +0300)]
Avoid aborts when a thread is signaled while "waiting for input".
* src/process.c (kbd_is_ours): New function.
(wait_reading_process_output): Set 'waiting_for_input' only if the
current thread is monitoring the keyboard descriptor. See also
https://lists.gnu.org/archive/html/emacs-devel/2021-10/msg01180.html.
(Bug#51229)
Stefan Kangas [Fri, 15 Oct 2021 18:22:11 +0000 (20:22 +0200)]
Prefer "graphical displays" to "X terminals" in documentation
* doc/lispref/objects.texi (Ctl-Char Syntax): Fix incorrect remark;
some text terminals can generate ASCII control characters.
(Other Char Bits):
* lisp/bindings.el:
* lisp/gnus/gnus-undo.el (gnus-undo-mode-map): Say "graphical display"
and "GUI display" instead of "X terminal"; the latter term is
archaic. (Bug#51217)
Michael Albinus [Fri, 15 Oct 2021 14:29:11 +0000 (16:29 +0200)]
Precise documentation of file-notify-add-watch
* doc/lispref/os.texi (File Notifications):
* lisp/filenotify.el (file-notify-add-watch): Precise, that
watching a directory includes reports on file changes for some
backends. (Bug#51146)
Martin Rudalics [Fri, 15 Oct 2021 08:21:05 +0000 (10:21 +0200)]
Fixes to account for windows' tab lines
* doc/lispref/display.texi (Size of Displayed Text): Fix entry
on 'window-text-pixel-size'.
* lisp/window.el (window--dump-window): Dump tab-line-height and
scroll-bar-height too.
(window--min-size-1): Take 'window-tab-line-height' into account.
* src/xdisp.c (Fwindow_text_pixel_size): Fix doc-string of
'window-text-pixel-size'. Rename last argument to 'MODE-LINES'.
Michael Albinus [Thu, 14 Oct 2021 12:32:47 +0000 (14:32 +0200)]
Accept process-filter t in Tramp
* lisp/net/tramp.el (tramp-handle-make-process):
* lisp/net/tramp-adb.el (tramp-adb-handle-make-process):
* lisp/net/tramp-sh.el (tramp-sh-handle-make-process): Filter can be t.
* test/lisp/net/tramp-tests.el (tramp-test29-start-file-process)
(tramp-test30-make-process): Test filter equal t.
Peter Münster [Tue, 12 Oct 2021 12:31:58 +0000 (14:31 +0200)]
Fix point movement in image-dired
* lisp/image-dired.el (image-dired-thumb-file-marked-p): Don't
move point in associated dired buffer.
(image-dired-delete-marked): Revert "Fix deletion of associated image"
because it was wrong and introduced another problem (bug#51152).
Stefan Kangas [Mon, 11 Oct 2021 13:10:26 +0000 (15:10 +0200)]
Fontify "print" and "exec" as functions in python-mode
This change was first made on master, but on closer consideration it
is better to fix this bug already in Emacs 28.1.
* lisp/progmodes/python.el (python-font-lock-keywords-level-2):
Fontify "print" and "exec" as functions, which is the case in
Python 3. (Bug#43298) Do not merge to master.
Juri Linkov [Mon, 11 Oct 2021 18:27:50 +0000 (21:27 +0300)]
Copy parent face attributes to tab-line-tab-current instead of inheriting face
* lisp/tab-line.el (tab-line-tab-current): Don't inherit face from
'tab-line-tab' to not inherit the face attribute :height from 'tab-line',
because :height of mouse-face is added to the base face.
Copy here most of the parent face attributes (bug#50798).
Paul Eggert [Sun, 10 Oct 2021 20:59:16 +0000 (13:59 -0700)]
New function num-processors
This addresses a FIXME comment in lisp/emacs-lisp/comp.el,
relating to the number of subsidiary processes used by
comp-run-async-workers in native compilation.
* admin/merge-gnulib (GNULIB_MODULES): Add nproc.
* doc/lispref/processes.texi (Process Information), etc/NEWS:
Document num-processors.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* lib/nproc.c, lib/nproc.h, m4/nproc.m4:
New files, copied from Gnulib by admin/merge-gnulib.
* lisp/emacs-lisp/comp.el (w32-get-nproc): Remove decl.
(comp-effective-async-max-jobs): Use num-processors.
* src/process.c: Include nproc.h.
(Fnum_processors): New function.
(syms_of_process): Define ‘all’, ‘current’, ‘num-processors’.
* src/w32proc.c (Fw32_get_nproc): Add FIXME comment.
* test/src/process-tests.el (process-num-processors): New test.
Juri Linkov [Sun, 10 Oct 2021 17:38:12 +0000 (20:38 +0300)]
Add symbol property 'save-some-buffers-function' (bug#46374)
* lisp/files.el (save-some-buffers-root): Put non-nil
symbol property 'save-some-buffers-function'.
(save-some-buffers): Check pred for the
symbol property 'save-some-buffers-function'.
(save-some-buffers-default-predicate): Mention
symbol property 'save-some-buffers-function'.
Juri Linkov [Sun, 10 Oct 2021 17:31:15 +0000 (20:31 +0300)]
Keep reading when typed RET in read-char-from-minibuffer and y-or-n-p
* lisp/subr.el (read-char-from-minibuffer-map):
Remap exit-minibuffer to read-char-from-minibuffer-insert-other.
(y-or-n-p-map): Remap 'exit' to y-or-n-p-insert-other.
(y-or-n-p): Don't mention RET in docstring. (Bug#51101)
João Távora [Wed, 6 Oct 2021 10:30:29 +0000 (11:30 +0100)]
Complete shorthands to longhands for symbol-completing tables
Shorthands aren't symbols, they're text forms that 'read' into
symbols. As such, shorthands aren't candidates in these tables of
symbols. But in some situations, if no other candidates match the
pattern, we can e.g. complete "x-foo" to "xavier-foo" if the shorthand
* lisp/minibuffer.el (completion-styles-alist): New 'shorthand'
style.
(completion-category-defaults): Link 'symbol-help' category with
'shorthand' style.
(minibuffer--original-buffer): New variable.
(completing-read-default): Setup minibuffer--original-buffer.
(completion-shorthand-try-completion)
(completion-shorthand-all-completions): New helpers.
Dmitry Gutov [Sun, 10 Oct 2021 01:14:35 +0000 (04:14 +0300)]
Avoid mapping file names through 'substring'
* lisp/progmodes/project.el (project--files-in-directory):
Avoid mapping file names through 'substring'. Reducing the amount
of garbage generated. Better perf by up to 20%.
Bump the package version.
Stephen Gildea [Sat, 9 Oct 2021 18:36:03 +0000 (11:36 -0700)]
Expanded testing of MH-E with multiple MH variants
* test/lisp/mh-e/mh-utils-tests.el: Environment variable TEST_MH_PATH
controls which installed MH variant to test with. Moved the commentary
about testing with different MH variants from above 'with-mh-test-env'
definition to "Commentary" section at the top of the file.
* test/lisp/mh-e/test-all-mh-variants.sh: New script to test all
installed MH variants.
Eli Zaretskii [Thu, 7 Oct 2021 15:53:25 +0000 (18:53 +0300)]
Include the refcards in the release tarball
* make-dist (possibly_non_vc_files): Include *.pdf files, to
include the produced refcards in the tarball. This was lost when
'make-dist' was rewritten for Emacs 27.