]> git.eshelyaron.com Git - emacs.git/log
emacs.git
3 years agoMake "emacs --script /dev/stdin work again when that's a pipe
Bryan C. Mills [Fri, 12 Nov 2021 03:26:28 +0000 (04:26 +0100)]
Make "emacs --script /dev/stdin work again when that's a pipe

* src/lread.c (Fload): Adjust callers.

* src/lread.c (safe_to_load_version): Check lseek errors
(Bug#48940).

Copyright-paperwork-exempt: yes

3 years agoAllow using /dev/stdin as a --script parameter again
Lars Ingebrigtsen [Fri, 12 Nov 2021 03:21:56 +0000 (04:21 +0100)]
Allow using /dev/stdin as a --script parameter again

* lisp/startup.el (command-line-1): Fix breakage with
(file-truename "/dev/stdin") => "/proc/227795/fd/pipe:[1381505]"
when using /dev/stdin as a --script parameter.

3 years agoFix potential NULL dereference in xwidget-webkit-uri
Po Lu [Fri, 12 Nov 2021 03:19:30 +0000 (11:19 +0800)]
Fix potential NULL dereference in xwidget-webkit-uri

* src/xwidget.c (Fxwidget_webkit_uri): Don't assume
webkit_web_view_get_uri will always return a valid string.

3 years agoCheck for WebKit xwidgets inside all xwidget-webkit functions
Po Lu [Fri, 12 Nov 2021 02:36:57 +0000 (10:36 +0800)]
Check for WebKit xwidgets inside all xwidget-webkit functions

This is done in preparation for the introduction of other
xwidgets, such as media xwidgets, even though there are
only WebKit widgets at present.

* src/xwidget.c (CHECK_WEBKIT_XWIDGET): New macro.
(WEBKIT_FN_INIT): Use CHECK_WEBKIT_XWIDGET.

(Fxwidget_webkit_search, Fxwidget_webkit_next_result)
(Fxwidget_webkit_previous_result)
(Fxwidget_webkit_finish_search)
(Fxwidget_webkit_load_html): Check that xwidget is a WebKit
widget.

3 years agoFix image-animate declaration
Lars Ingebrigtsen [Fri, 12 Nov 2021 02:31:48 +0000 (03:31 +0100)]
Fix image-animate declaration

* lisp/net/shr.el (image-animate): Fix declaration.

3 years agoMake gnus-article-stop-animations obsolete
Lars Ingebrigtsen [Fri, 12 Nov 2021 02:29:51 +0000 (03:29 +0100)]
Make gnus-article-stop-animations obsolete

* lisp/gnus/gnus-art.el (gnus-article-stop-animations): Make
obsolete now that animated images stop themselves automatically.
(gnus-article-setup-buffer):
* lisp/gnus/gnus-sum.el (gnus-summary-exit)
(gnus-summary-exit-no-update, gnus-summary-show-article): Remove
callers.

3 years agoAllow stopping animations automatically when the image disappears
Lars Ingebrigtsen [Fri, 12 Nov 2021 02:27:23 +0000 (03:27 +0100)]
Allow stopping animations automatically when the image disappears

* lisp/image.el (image-animate): Allow the animation to be stopped
automatically when the image is removed from the buffer.
(image-animate-timeout): Stop the animation if the image is
removed (and that has been requested).

* lisp/net/shr.el (shr-put-image): Stop animations if the image is
removed.

3 years agoPrevent crashes from Lisp code modifying xwidget-list
Po Lu [Fri, 12 Nov 2021 01:53:30 +0000 (09:53 +0800)]
Prevent crashes from Lisp code modifying xwidget-list

* src/xwidget.c (internal_xwidget_view_list)
(internal_xwidget_list): New variable.

(find_xwidget_for_offscreen_window)
(define_cursors, offscreen_damage_event)
(webkit_ready_to_show, xwidget_init_view)
(Fxwidget_resize, Fdelete_xwidget_view)
(Fxwidget_view_lookup, xwidget_spec_value)
(lookup_xwidget, xwidget_end_redisplay)
(kill_frame_xwidget_views, kill_buffer_xwidgets)
(Fmake_xwidget, Fget_buffer_xwidgets): Use internal list.

(syms_of_xwidget): Initialize internal xwidget lists.

3 years agoPrevent crashes in xwidgets whose buffers have been killed
Po Lu [Fri, 12 Nov 2021 00:17:41 +0000 (08:17 +0800)]
Prevent crashes in xwidgets whose buffers have been killed

* doc/lispref/display.texi (Xwidgets): Explain meaning of killed
xwidgets.
* src/xwidget.c (Fxwidget_live_p): New function.
(Fxwidget_perform_lispy_event, WEBKIT_FN_INIT)
(Fxwidget_resize, Fxwidget_size_request)
(Fxwidget_info, Fxwidget_plist)
(Fset_xwidget_buffer, Fset_xwidget_plist)
(Fset_xwidget_query_on_exit_flag)
(Fxwidget_query_on_exit_flag)
(Fxwidget_webkit_search)
(Fxwidget_webkit_next_result)
(Fxwidget_webkit_previous_result)
(Fxwidget_webkit_finish_search)
(Fxwidget_webkit_load_html): Check for live xwidgets instead of
just xwidgets.

(xwidget_button, xwidget_motion_or_crossing)
(xv_do_draw, x_draw_xwidget_glyph_string)
(Fdelete_xwidget_view): Ignore killed xwidgets.

(syms_of_xwidget): Define new symbols and subrs and define
appropriate weakness of id_to_xwidget map.
(kill_buffer_xwidgets): Check live xwidgets instead of
killed xwidgets, set xwidget buffer to nil, and rely on GC to
free the hash table for us instead.

* src/xwidget.h (XWIDGET_LIVE_P, CHECK_LIVE_XWIDGET): New
macros.

3 years agoFix compilation on MS-Windows
Eli Zaretskii [Thu, 31 Dec 2020 18:28:30 +0000 (20:28 +0200)]
Fix compilation on MS-Windows

* src/callproc.c (emacs_spawn) <fork_done>: Define the label only
if USABLE_POSIX_SPAWN is defined, to avoid a compiler warning.

3 years agoUse posix_spawn if possible.
Philipp Stephani [Wed, 30 Dec 2020 13:42:01 +0000 (14:42 +0100)]
Use posix_spawn if possible.

posix_spawn is less error-prone than vfork + execve, and can make
better use of system-specific enhancements like 'clone' on Linux.  Use
it if we don't need to configure a pseudoterminal.

* configure.ac (HAVE_SPAWN_H, HAVE_POSIX_SPAWN)
(HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR)
(HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR_NP)
(HAVE_POSIX_SPAWNATTR_SETFLAGS, HAVE_DECL_POSIX_SPAWN_SETSID): New
configuration variables.
* src/callproc.c (USABLE_POSIX_SPAWN): New configuration macro.
(emacs_posix_spawn_init_actions)
(emacs_posix_spawn_init_attributes, emacs_posix_spawn_init): New
helper functions.
(emacs_spawn): Use posix_spawn if possible.

3 years agoImprove performance of 'file-name-case-insensitive-p' for Tramp files
Jim Porter [Thu, 11 Nov 2021 18:34:17 +0000 (19:34 +0100)]
Improve performance of 'file-name-case-insensitive-p' for Tramp files

Previously, each function in 'tramp-foreign-file-name-handler-alist'
would call 'tramp-dissect-file-name', resulting in it being called
several times whenever 'tramp-find-foreign-file-name-handler' was
called.  Now, functions take the dissected file name to avoid this
duplicated effort.  (Bug#51699)

* etc/NEWS: Announce this change.

* lisp/net/tramp-adb.el (tramp-adb-file-name-p):
* lisp/net/tramp-ftp.el (tramp-ftp-file-name-p):
* lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-p):
* lisp/net/tramp-rclone.el (tramp-rclone-file-name-p):
* lisp/net/tramp-smb.el (tramp-smb-file-name-p):
* lisp/net/tramp-sshfs.el (tramp-sshfs-file-name-p):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-p):
Accept dissected file names.

* lisp/net/tramp.el (tramp-ensure-dissected-file-name): New function.
(tramp-find-foreign-file-name-handler): Pass dissected file name to
functions.
(tramp-connectable-p): Use 'tramp-ensure-dissected-file-name'.

3 years agoerc: Don't announce broken functionality in /query docstring
Stefan Kangas [Thu, 11 Nov 2021 17:39:19 +0000 (18:39 +0100)]
erc: Don't announce broken functionality in /query docstring

* lisp/erc/erc.el (erc-cmd-QUERY): Be less enthusiastic about
announcing missing/broken functionality.  The comment "except this is
broken right now" has been there since 2008, and it's not obvious to
me that we should ever re-add it.

3 years ago* lisp/subr.el (add-hook): Fix adding into hook--depth-alist (bug#51620).
Filipp Gunbin [Thu, 11 Nov 2021 16:44:27 +0000 (19:44 +0300)]
* lisp/subr.el (add-hook): Fix adding into hook--depth-alist (bug#51620).

3 years ago; * src/term.c (init_tty): Fix last change.
Eli Zaretskii [Thu, 11 Nov 2021 14:58:47 +0000 (16:58 +0200)]
; * src/term.c (init_tty): Fix last change.

3 years ago; * src/term.c (init_tty): Fix style of parentheses.
Eli Zaretskii [Thu, 11 Nov 2021 14:56:46 +0000 (16:56 +0200)]
; * src/term.c (init_tty): Fix style of parentheses.

3 years agoFix 8-color PuTTY -nw sessions broken by a recent commit
Eli Zaretskii [Thu, 11 Nov 2021 14:55:11 +0000 (16:55 +0200)]
Fix 8-color PuTTY -nw sessions broken by a recent commit

* src/term.c (init_tty): Fix the change which introduced support
for the terminfo Tc flag.  The code as installed broke colors in
PuTTY -nw sessions, because 'tigetflag' returned -1, which is
non-zero, so it was treated as the sign that true color is
supported.  But if the value returned by 'tigetflag' is -1, it means
the capability is not a boolean one, so that's not to be used as a
valid support for 24-bit color.  (Bug#44950)

3 years agoFix problem with non-absolute names
Lars Ingebrigtsen [Thu, 11 Nov 2021 12:20:34 +0000 (13:20 +0100)]
Fix problem with non-absolute names

* lisp/files.el (file-name-split): Fix problem with non-absolute
names.

3 years agoAdd a command to go the gnu.org version of the info page
Lars Ingebrigtsen [Thu, 11 Nov 2021 07:09:59 +0000 (08:09 +0100)]
Add a command to go the gnu.org version of the info page

* lisp/info.el (Info-url-for-node):
(Info-goto-node-web): New function (bug#44895).

Based on code from Drew Adams <drew.adams@oracle.com>.

3 years ago; * lisp/server.el (server-stop-automatically): Doc fix.
Eli Zaretskii [Thu, 11 Nov 2021 11:12:50 +0000 (13:12 +0200)]
; * lisp/server.el (server-stop-automatically): Doc fix.

3 years ago; * etc/NEWS: Improve a recently added entry.
Eli Zaretskii [Thu, 11 Nov 2021 10:58:58 +0000 (12:58 +0200)]
; * etc/NEWS: Improve a recently added entry.

3 years agoMerge from origin/emacs-28
Michael Albinus [Thu, 11 Nov 2021 10:55:15 +0000 (11:55 +0100)]
Merge from origin/emacs-28

6dae01ad6d Fix tramp-compat-file-name-concat (Bug#51754)

3 years agoFix tramp-compat-file-name-concat (Bug#51754)
Aleksandr Vityazev [Thu, 11 Nov 2021 10:53:41 +0000 (11:53 +0100)]
Fix tramp-compat-file-name-concat (Bug#51754)

* lisp/net/tramp-compat.el: Make `tramp-compat-file-name-concat'
work like file-name-concat.  (Bug#51754)

3 years agoAdd URI as a valid spec for xwidget-webkit-buffer-name-format
Po Lu [Thu, 11 Nov 2021 10:45:52 +0000 (18:45 +0800)]
Add URI as a valid spec for xwidget-webkit-buffer-name-format

* lisp/xwidget.el (xwidget-webkit-buffer-name-format): Update
doc string.
(xwidget-webkit-callback): Add a format spec %U, which stands
for the current URI of the widget.

3 years agoxwidget: Add xwidget-webkit-buffer-name-format.
Feng Shu [Thu, 11 Nov 2021 10:24:49 +0000 (18:24 +0800)]
xwidget: Add xwidget-webkit-buffer-name-format.

* lisp/xwidget.el (xwidget-webkit-buffer-name-prefix):
Remove variable.
(xwidget-webkit-buffer-name-format): New variable.
(xwidget-webkit-callback): Use
xwidget-webkit-buffer-name-format instead.
(format-spec): required.

* etc/NEWS: Note xwidget-webkit-buffer-name-format.

3 years ago; * admin/gitmerge.el: Fix typos.
Stefan Kangas [Thu, 11 Nov 2021 09:22:05 +0000 (10:22 +0100)]
; * admin/gitmerge.el: Fix typos.

3 years agoFix files-tests on MS-Windows
Eli Zaretskii [Thu, 11 Nov 2021 08:58:10 +0000 (10:58 +0200)]
Fix files-tests on MS-Windows

* lisp/ls-lisp.el (ls-lisp--insert-directory): Fix free disk space
calculation.  (Bug#50630)

* test/lisp/files-tests.el (files-tests-revert-buffer)
(files-tests-revert-buffer-with-fine-grain): Disable locking
files.

3 years agoFix documentation in xwidget.el
Po Lu [Thu, 11 Nov 2021 06:54:58 +0000 (14:54 +0800)]
Fix documentation in xwidget.el

* src/xwidget.el (xwidget-webkit-isearch-mode): Reword
documentation.

3 years agoSwitch to xwidget webkit buffer even if a session already exists
Po Lu [Thu, 11 Nov 2021 02:13:42 +0000 (10:13 +0800)]
Switch to xwidget webkit buffer even if a session already exists

* lisp/xwidget.el (xwidget-webkit-goto-url): Make behavior
when there is an existing session consistent.

3 years agoMerge from origin/emacs-28
Stefan Kangas [Thu, 11 Nov 2021 06:17:56 +0000 (07:17 +0100)]
Merge from origin/emacs-28

2963de6540 * lisp/vc/vc-git.el (vc-git-mergebase): More meaningful er...
a9148cdee5 ; Fix heading in etc/NEWS
9623342216 ; * etc/NEWS: Move a bookmark related item further down.

# Conflicts:
# etc/NEWS

3 years agoSupport Tc terminfo flag for 24-bit color support in terminal
Tim Ruffing [Thu, 11 Nov 2021 06:14:57 +0000 (07:14 +0100)]
Support Tc terminfo flag for 24-bit color support in terminal

* src/term.c (init_tty): Use the Tc flag (bug#44950).

Copyright-paperwork-exempt: yes

3 years agoOptions to automatically stop the Emacs server
Gregory Heytings [Thu, 11 Nov 2021 05:43:10 +0000 (06:43 +0100)]
Options to automatically stop the Emacs server

* doc/emacs/misc.texi (Emacs Server): Document the new function.
Also mention that an Emacs server can be started with emacsclient.

* etc/NEWS: Describe the new function (bug#51377).
* lisp/server.el (server-stop-automatically): New function.
(server-stop-automatically): New auxiliary variable.
(server-stop-automatically--maybe-kill-emacs)
(server-stop-automatically--handle-delete-frame): New auxiliary
functions.
(server-save-buffers-kill-terminal): Call the new auxiliary
function when necessary.

3 years agoSet `minibuffer-completion-*` variables locally in more places
Miha Rihtaršič [Thu, 11 Nov 2021 05:16:52 +0000 (06:16 +0100)]
Set `minibuffer-completion-*` variables locally in more places

* lisp/calc/calc-store.el (calc-read-var-name):
* lisp/emacs-lisp/crm.el (completing-read-multiple):
* lisp/progmodes/cc-styles.el (c-read-offset):
* lisp/window.el (read-buffer-to-switch):
Set `minibuffer-completion-*` variables buffer-locally instead of
using a global let-binding (bug#48925).

Follow-up to commit
2021-05-01 "* lisp/minibuffer.el (completing-read-default): Fix bug#45474"

3 years agoRe-fix charset issues when yanking non-plain-text elements
Lars Ingebrigtsen [Thu, 11 Nov 2021 04:22:02 +0000 (05:22 +0100)]
Re-fix charset issues when yanking non-plain-text elements

* lisp/select.el (gui-get-selection): Make (gui-get-selection
'CLIPBOARD 'text/html) get decoded correctly (bug#31149), but still
avoid the logic on Windows.

3 years agoDon't save places in literally-visited files
Lars Ingebrigtsen [Thu, 11 Nov 2021 04:04:31 +0000 (05:04 +0100)]
Don't save places in literally-visited files

* lisp/saveplace.el (save-places-to-alist): Don't save places in
literally-visited files (bug#51740).

3 years agoAdd tests for 'insert-directory'
John Cummings [Thu, 11 Nov 2021 03:37:46 +0000 (04:37 +0100)]
Add tests for 'insert-directory'

* test/lisp/files-tests.el: Add 'insert-directory' tests.
* test/lisp/files-resources/insert-directory/: Create directories and files to
use for testing 'insert-directory'.

Add tests for 'insert-directory' base functionality and regression tests for
the issue where free space was reported for the current directory instead of
the target of 'list-directory' (Bug#50630).

3 years agoNote that loaddefs.el is copied to ldefs-boot.el
Lars Ingebrigtsen [Thu, 11 Nov 2021 03:08:51 +0000 (04:08 +0100)]
Note that loaddefs.el is copied to ldefs-boot.el

* lisp/emacs-lisp/autoload.el (autoload-rubric): Add a comment to
the file noting what'll happen to it.

3 years agoRe-generated to get autoloads additions in emoji.el
Lars Ingebrigtsen [Thu, 11 Nov 2021 03:02:43 +0000 (04:02 +0100)]
Re-generated to get autoloads additions in emoji.el

3 years agoAdd `xwidget-webkit-load-html'
Po Lu [Wed, 10 Nov 2021 13:01:40 +0000 (21:01 +0800)]
Add `xwidget-webkit-load-html'

* doc/lispref/display.texi (Xwidgets): Document new function.
* etc/NEWS: Announce new function.
* src/xwidget.c (Fxwidget_webkit_load_html): New function.
(syms_of_xwidget): Define new subr.

3 years ago; Refer to Repeating from compare-windows info node
Filipp Gunbin [Wed, 10 Nov 2021 20:00:56 +0000 (23:00 +0300)]
; Refer to Repeating from compare-windows info node

* doc/emacs/files.texi (Comparing Files): C-x z (`repeat') is very
convenient to use with compare-windows, so refer to its node.

3 years ago* lisp/vc/vc-git.el (vc-git-mergebase): More meaningful error message.
Juri Linkov [Wed, 10 Nov 2021 18:41:19 +0000 (20:41 +0200)]
* lisp/vc/vc-git.el (vc-git-mergebase): More meaningful error message.

Display a readable error message instead of signaling an error on nil value.

3 years ago* etc/NEWS.28: Add changes omitted while merging from emacs-28 NEWS.
Juri Linkov [Wed, 10 Nov 2021 18:36:41 +0000 (20:36 +0200)]
* etc/NEWS.28: Add changes omitted while merging from emacs-28 NEWS.

3 years ago* etc/NEWS: Remove old news accidentally merged from emacs-28.
Juri Linkov [Wed, 10 Nov 2021 18:23:16 +0000 (20:23 +0200)]
* etc/NEWS: Remove old news accidentally merged from emacs-28.

3 years agoFix font weights on MS-Windows
Eli Zaretskii [Wed, 10 Nov 2021 18:17:33 +0000 (20:17 +0200)]
Fix font weights on MS-Windows

* src/w32font.c (w32_decode_weight, w32_encode_weight)
(w32_to_fc_weight): Adjust weight translations to match those in
font.c and gtkutil.c:xg_weight_to_symbol.  (Bug#51704)

3 years agoImprove 'ensure-empty-lines' docstring
Robert Pluim [Wed, 10 Nov 2021 16:42:30 +0000 (17:42 +0100)]
Improve 'ensure-empty-lines' docstring

* lisp/emacs-lisp/subr-x.el (ensure-empty-lines): Fix typo and improve
wording.

3 years ago; * etc/NEWS: Improve some entries.
Robert Pluim [Wed, 10 Nov 2021 15:25:55 +0000 (16:25 +0100)]
; * etc/NEWS: Improve some entries.

3 years ago; * etc/NEWS: Fix merge error
Robert Pluim [Wed, 10 Nov 2021 16:03:32 +0000 (17:03 +0100)]
; * etc/NEWS: Fix merge error

3 years ago; * etc/NEWS: Fix merge error
Robert Pluim [Wed, 10 Nov 2021 15:45:47 +0000 (16:45 +0100)]
; * etc/NEWS: Fix merge error

3 years ago* admin/update_autogen: Remove unused variables.
Stefan Kangas [Wed, 10 Nov 2021 15:37:47 +0000 (16:37 +0100)]
* admin/update_autogen: Remove unused variables.

3 years agoUse "grep -E" instead of deprecated "egrep"
Stefan Kangas [Wed, 10 Nov 2021 15:30:50 +0000 (16:30 +0100)]
Use "grep -E" instead of deprecated "egrep"

* admin/emake:
* test/lisp/so-long-tests/so-long-tests.el: Use "grep -E" instead of
deprecated "egrep".

3 years agoAvoid another byte-compiler warning in package-quickstart.el
Stefan Kangas [Wed, 10 Nov 2021 14:15:09 +0000 (15:15 +0100)]
Avoid another byte-compiler warning in package-quickstart.el

* lisp/emacs-lisp/package.el (package-quickstart-refresh): Avoid
byte-compiler warning "assignment to free variable" in
package-quickstart.el.

3 years agoAvoid spurious byte-compiler warnings in package-quickstart.el
Stefan Kangas [Wed, 10 Nov 2021 13:49:44 +0000 (14:49 +0100)]
Avoid spurious byte-compiler warnings in package-quickstart.el

* lisp/emacs-lisp/package.el (package-quickstart-refresh): Disable the
"`make-variable-buffer-local' not called at toplevel" byte-compiler
warnings.  Given that we wrap it all in a let-form, these are mostly
false positives and not helpful.

3 years ago; Fix heading in etc/NEWS
Michael Albinus [Wed, 10 Nov 2021 12:40:44 +0000 (13:40 +0100)]
; Fix heading in etc/NEWS

3 years ago; * etc/NEWS: Move a bookmark related item further down.
Stefan Kangas [Wed, 10 Nov 2021 12:17:14 +0000 (13:17 +0100)]
; * etc/NEWS: Move a bookmark related item further down.

3 years ago* admin/automerge: Fix quoting of some variables.
Stefan Kangas [Wed, 10 Nov 2021 12:06:24 +0000 (13:06 +0100)]
* admin/automerge: Fix quoting of some variables.

3 years ago* admin/automerge: Use mktemp if it exists.
Stefan Kangas [Wed, 10 Nov 2021 12:01:30 +0000 (13:01 +0100)]
* admin/automerge: Use mktemp if it exists.

3 years agoPrevent GDK warning about missing event devices in most cases
Po Lu [Wed, 10 Nov 2021 11:40:23 +0000 (19:40 +0800)]
Prevent GDK warning about missing event devices in most cases

* src/xwidget.c (synthesize_focus_in_event): Set event device to
selected frame's pointer if it's an X frame.

3 years agoAdd `xwidget-webkit-isearch-yank-kill'
Po Lu [Wed, 10 Nov 2021 10:13:22 +0000 (18:13 +0800)]
Add `xwidget-webkit-isearch-yank-kill'

* lisp/xwidget.el: Bind C-y to xwidget-webkit-yank-kill in incremental
search.
(xwidget-webkit-isearch-mode): Update doc string.
(xwidget-webkit-yank-kill): New function.

3 years agoMerge from origin/emacs-28
Stefan Kangas [Wed, 10 Nov 2021 11:12:30 +0000 (12:12 +0100)]
Merge from origin/emacs-28

8d81ab374d time-stamp: %F is "file name" not "pathname" + other doc
beaa7e14f3 ; Fix typos in CONTRIBUTE, ELisp manual, ediff
747a1ae4ac * doc/misc/eww.texi (Advanced): Fix missed variable name e...
52fe2340b8 * doc/emacs/windows.texi (Window Convenience): Use @code f...
7d3a654e2a * doc/emacs/maintaining.texi (Basic VC Editing): Mention D...
aeb19af4b5 ; * doc/emacs/building.texi (Lisp Libraries): Fix a typo. ...

# Conflicts:
# etc/NEWS

3 years ago; Merge from origin/emacs-28
Stefan Kangas [Wed, 10 Nov 2021 11:12:29 +0000 (12:12 +0100)]
; Merge from origin/emacs-28

The following commit was skipped:

a83ccc46fa * lisp/progmodes/prog-mode.el (prog-context-menu): Use "Go...

3 years agoMerge from origin/emacs-28
Stefan Kangas [Wed, 10 Nov 2021 11:12:29 +0000 (12:12 +0100)]
Merge from origin/emacs-28

2782bc113e Revert "Fix localized display of date and time in the NS p...

3 years agoPrevent skipping results while changing search direction
Po Lu [Wed, 10 Nov 2021 09:53:13 +0000 (17:53 +0800)]
Prevent skipping results while changing search direction

* lisp/xwidget.el (xwidget-webkit-isearch-forward)
(xwidget-webkit-isearch-backward): Avoid moving to the next result one
too many times.

3 years agoMake the python missing-readline warning more helpful
Benj [Wed, 10 Nov 2021 09:07:04 +0000 (10:07 +0100)]
Make the python missing-readline warning more helpful

* lisp/progmodes/python.el
(python-shell-completion-native-turn-on-maybe): Mention the "readline"
package (bug#48998).

Copyright-paperwork-exempt: yes

3 years ago; * doc/lispref/files.texi: Fix typo.
Robert Pluim [Wed, 10 Nov 2021 07:56:03 +0000 (08:56 +0100)]
; * doc/lispref/files.texi: Fix typo.

3 years agoMake `C-c C-c' in erts-mode work with Point-Char elems
Lars Ingebrigtsen [Wed, 10 Nov 2021 07:52:10 +0000 (08:52 +0100)]
Make `C-c C-c' in erts-mode work with Point-Char elems

* lisp/progmodes/erts-mode.el (erts-mode--preceding-spec):
Factor out into own function (bug#51680).
(erts-run-test): Respect Point-Char settings.

3 years agoRemove obsolete limitation
Po Lu [Wed, 10 Nov 2021 07:47:56 +0000 (15:47 +0800)]
Remove obsolete limitation

* src/xwidget.c (Fxwidget_webkit_goto_history): Accept any fixnum as
REL-POS, to be consistent with docstring.

3 years agoFix incorrect offset calculation for clipped xwidget views
Po Lu [Wed, 10 Nov 2021 06:29:54 +0000 (14:29 +0800)]
Fix incorrect offset calculation for clipped xwidget views

* src/xwidget.c (from_embedder, to_embedder): Remove incorrect
adjustment of position by view clipping.

3 years agoFix invisible content in WebKit dialogs
Po Lu [Wed, 10 Nov 2021 06:19:15 +0000 (14:19 +0800)]
Fix invisible content in WebKit dialogs

* src/xwidget.c (webkit_script_dialog_cb): Use custom label instead of
dialog box title to display message.

3 years agoSet embedder correctly to fix menus appearing in the wrong location
Po Lu [Wed, 10 Nov 2021 01:22:38 +0000 (09:22 +0800)]
Set embedder correctly to fix menus appearing in the wrong location

* src/xwidget.c (record_osr_embedder, from_embedder, to_embedder): New
functions.
(Fmake_xwidget): Attach from-embedder and to-embedder signals.
(find_widget_for_offscreen_window): New function.
(xwidget_button, xwidget_motion_or_crossing): Set embedder on event.
(Fdelete_xwidget_view): Remove embedder status if applicable.

* src/xwidget.h (struct xwidget): New fields `embedder' and
`embedder-view'.

3 years agoRevert "Fix mouse face in NS port"
Po Lu [Wed, 10 Nov 2021 06:04:26 +0000 (14:04 +0800)]
Revert "Fix mouse face in NS port"

This reverts commit 278e4fc9c6353068334dd39d45334b1df82a6cee.

3 years agoRevert "*** empty log message ***"
Po Lu [Wed, 10 Nov 2021 06:04:25 +0000 (14:04 +0800)]
Revert "*** empty log message ***"

This reverts commit 68a2a3307d1703ac8abe4b54c8e1ef9dda677c12.

3 years agoRevert "Add support for event processing via XInput 2"
Po Lu [Wed, 10 Nov 2021 06:04:24 +0000 (14:04 +0800)]
Revert "Add support for event processing via XInput 2"

This reverts commit 346cfc81247e6bf8e727a27b42f44f2389bd1269.

3 years agoRevert "Fix erasing cursor on top of raised boxes in NS port"
Po Lu [Wed, 10 Nov 2021 06:04:22 +0000 (14:04 +0800)]
Revert "Fix erasing cursor on top of raised boxes in NS port"

This reverts commit 2b5a2ab50b7817f84ae38f84b4ea36ea38cd5a3b.

3 years agoRevert "Revert "Fix erasing cursor on top of raised boxes in NS port""
Po Lu [Wed, 10 Nov 2021 06:04:21 +0000 (14:04 +0800)]
Revert "Revert "Fix erasing cursor on top of raised boxes in NS port""

This reverts commit 7117bbc7aa905ae785fa564cb24c3fc75ef1d543.

3 years agoRevert "Support opening the toolkit menu bar on NS"
Po Lu [Wed, 10 Nov 2021 06:04:05 +0000 (14:04 +0800)]
Revert "Support opening the toolkit menu bar on NS"

This reverts commit ff9cf991c1608cd2578a66cba41e654a2b5d9144.

3 years agoSupport opening the toolkit menu bar on NS
oldosfan [Wed, 20 Oct 2021 02:54:27 +0000 (10:54 +0800)]
Support opening the toolkit menu bar on NS

* src/nsmenu.m (ns_activate_menubar, Fns_open_menubar): New functions.
* src/nsterm.m (ns_create_terminal): Add activate_menubar_hook.
* lisp/menu-bar.el (menu-bar-open): Use ns-menu-bar-open on Nextstep.

3 years agoRevert "Fix erasing cursor on top of raised boxes in NS port"
oldosfan [Mon, 18 Oct 2021 00:09:40 +0000 (08:09 +0800)]
Revert "Fix erasing cursor on top of raised boxes in NS port"

This reverts commit 960f0eb9ab657af85c532574b937d8851049b178.

3 years agoFix erasing cursor on top of raised boxes in NS port
oldosfan [Sun, 17 Oct 2021 13:12:03 +0000 (21:12 +0800)]
Fix erasing cursor on top of raised boxes in NS port

* src/nsterm.m (ns_draw_relief): Clear top and bottom line areas
first, if required.

3 years agoAdd support for event processing via XInput 2
oldosfan [Mon, 1 Nov 2021 00:19:32 +0000 (08:19 +0800)]
Add support for event processing via XInput 2

* configure.ac: Add an option to use XInput 2 if available
* src/Makefile.in (XINPUT_LIBS, XINPUT_CFLAGS): New variables
(EMACS_CFLAGS): Add Xinput CFLAGS
(LIBES): Add XInput libs
* src/xmenu.c (popup_activated_flag): Expose flag if XInput 2 is
available
* src/xfns.c (x_window): Set XInput 2 event mask
* src/xterm.c (x_detect_focus_change): Handle XInput 2 GenericEvents
(handle_one_xevent): Handle XInput 2 events
(x_term_init): Ask the server for XInput 2 support and set xkb_desc if
available
(x_delete_terminal): Free XKB kb desc if it exists, and free XI2
devices if they exist
(x_free_xi_devices, x_init_master_valuators): New functions
(x_get_scroll_valuator_delta): New function
(init_xterm): Don't tell GTK to only use Core Input when built with
XInput 2 support
* src/xterm.h (struct x_display_info): Add fields for XKB and XI2
support
* src/gtkutil.c (xg_event_is_for_menubar): Handle XIDeviceEvents
(xg_is_menu_window): New function
(xg_event_is_for_scrollbar): Handle XIDeviceEvents

3 years ago*** empty log message ***
oldosfan [Fri, 15 Oct 2021 10:41:50 +0000 (18:41 +0800)]
*** empty log message ***

3 years agoFix mouse face in NS port
oldosfan [Thu, 14 Oct 2021 03:05:00 +0000 (11:05 +0800)]
Fix mouse face in NS port

* src/nsterm.m (ns_draw_glyph_string): Set s->face to the mouse face.

3 years agoFix package-tests failure on native-comp
Lars Ingebrigtsen [Wed, 10 Nov 2021 04:19:48 +0000 (05:19 +0100)]
Fix package-tests failure on native-comp

* test/lisp/emacs-lisp/package-tests.el
(package-test-macro-compilation-gz): Fix test failure on native-comp.

3 years agotime-stamp: %F is "file name" not "pathname" + other doc
Stephen Gildea [Wed, 10 Nov 2021 04:09:22 +0000 (20:09 -0800)]
time-stamp: %F is "file name" not "pathname" + other doc

* lisp/time-stamp.el (time-stamp-format): doc 'file' instead of 'path'.
* test/lisp/time-stamp-tests.el (formatz, format-time-offset):
Clarify the difference and similarity between these two test helpers.

3 years agoFix the look of the <video> elements in shr
Lars Ingebrigtsen [Wed, 10 Nov 2021 01:31:54 +0000 (02:31 +0100)]
Fix the look of the <video> elements in shr

* lisp/net/shr.el (shr-tag-video): Tweak the look of the video element.

3 years agoTry to fix intermittent build problem on Macos
Lars Ingebrigtsen [Wed, 10 Nov 2021 01:21:48 +0000 (02:21 +0100)]
Try to fix intermittent build problem on Macos

* src/Makefile.in (@): Also sign the bootstrap-emacs executable

3 years ago; Fix typos in CONTRIBUTE, ELisp manual, ediff
Tom Levy [Tue, 9 Nov 2021 12:51:48 +0000 (12:51 +0000)]
; Fix typos in CONTRIBUTE, ELisp manual, ediff

* CONTRIBUTE: Remove stray '. after git command.
* doc/lispref/functions.texi (Function Cells): Fix typo.
* lisp/vc/ediff.el (ediff-regions-wordwise): Fix typo in prompts
("Region's A buffer" => "Region A's buffer") (bug#51718).

Copyright-paperwork-exempt: yes

3 years agoRemove spurious %S from 'define-error' messages
Tom Levy [Tue, 9 Nov 2021 12:25:24 +0000 (12:25 +0000)]
Remove spurious %S from 'define-error' messages

; The MESSAGE arg of 'define-error' does not support format specifiers
; (unlike the 'error' function). The signal data is automatically
; appended to the error message.

* lisp/emacs/lisp/cl-generic.el (cl--generic-cyclic-definition):
Remove spurious %S from error message.
* lisp/emacs-lisp/gv.el (gv-invalid-place): Remove spurious %S from
error message (and rephrase) (bug#51718).

Copyright-paperwork-exempt: yes

3 years agoAllow 'undo-redo' to be called from Lisp without repeat count
Tom Levy [Tue, 9 Nov 2021 12:05:28 +0000 (12:05 +0000)]
Allow 'undo-redo' to be called from Lisp without repeat count

* lisp/simple.el (undo-redo): Default arg to 1 to avoid error when
called from Lisp without args (bug#51718).

Copyright-paperwork-exempt: yes

3 years agoPrevent BadValue errors when creating tiny xwidget views
Po Lu [Tue, 9 Nov 2021 23:52:47 +0000 (00:52 +0100)]
Prevent BadValue errors when creating tiny xwidget views

* src/xwidget.c (x_draw_glph_string): Avoid resizing xwidget views
to an invalid size (bug#51707).

3 years agoAdd new function 'file-name-split'
Lars Ingebrigtsen [Tue, 9 Nov 2021 23:26:32 +0000 (00:26 +0100)]
Add new function 'file-name-split'

* doc/lispref/files.texi (File Name Components): Document it.
* lisp/files.el (file-name-split): New function (bug#50572).

* lisp/emacs-lisp/shortdoc.el (file-name): Mention it.

3 years agoMake `dired-split' obsolete
Lars Ingebrigtsen [Tue, 9 Nov 2021 22:58:42 +0000 (23:58 +0100)]
Make `dired-split' obsolete

* lisp/dired-aux.el (dired-tree-lessp): Adjust caller.
(dired-split): Make obsolete (bug#50572).

* lisp/ffap.el (ffap-list-env): Adjust comment.

3 years ago* doc/misc/eww.texi (Advanced): Fix missed variable name eww-retrieve-command.
Juri Linkov [Tue, 9 Nov 2021 20:45:17 +0000 (22:45 +0200)]
* doc/misc/eww.texi (Advanced): Fix missed variable name eww-retrieve-command.

3 years ago* doc/emacs/windows.texi (Window Convenience): Use @code for windmove.
Juri Linkov [Tue, 9 Nov 2021 20:43:54 +0000 (22:43 +0200)]
* doc/emacs/windows.texi (Window Convenience): Use @code for windmove.

This refers to both a command and a user option.

* etc/NEWS: Add some ---.

3 years ago* doc/emacs/maintaining.texi (Basic VC Editing): Mention Dired buffer.
Juri Linkov [Tue, 9 Nov 2021 20:40:15 +0000 (22:40 +0200)]
* doc/emacs/maintaining.texi (Basic VC Editing): Mention Dired buffer.

* doc/emacs/text.texi (Outline Mode): Replace S-TAB with with S-<TAB>.

* etc/NEWS: Add some missing +++/--- and move some related items closer.

3 years ago* lisp/net/tramp-cache.el (tramp-persistency-file-name):
Michael Albinus [Tue, 9 Nov 2021 19:24:03 +0000 (20:24 +0100)]
* lisp/net/tramp-cache.el (tramp-persistency-file-name):

Skip superfluous `expand-file-name'.

3 years agoImprove performance when checking case-sensitivity of Tramp file names
Jim Porter [Tue, 9 Nov 2021 18:59:14 +0000 (19:59 +0100)]
Improve performance when checking case-sensitivity of Tramp file names

* lisp/net/tramp-sh.el (tramp-sh-handle-expand-file-name):
Dissect file name before testing for connectability to reduce
duplicated work.

* lisp/net/tramp.el (tramp-handle-file-name-case-insensitive-p):
Use `tramp-connectable-p' to test for connection.

3 years agoAdd back/forward mouse button bindings in eww
Stefan Kangas [Tue, 9 Nov 2021 17:07:30 +0000 (18:07 +0100)]
Add back/forward mouse button bindings in eww

* lisp/net/eww.el (eww-mode-map): Add mouse back/forward button
bindings.  These bindings are the same as in Firefox and other
graphical browsers.

3 years ago; * doc/emacs/building.texi (Lisp Libraries): Fix a typo. (Bug#51717)
Eli Zaretskii [Tue, 9 Nov 2021 13:51:24 +0000 (15:51 +0200)]
; * doc/emacs/building.texi (Lisp Libraries): Fix a typo.  (Bug#51717)

3 years ago* lisp/progmodes/prog-mode.el (prog-context-menu): Use "Go Back" (bug#38797)
Juri Linkov [Tue, 9 Nov 2021 08:29:37 +0000 (10:29 +0200)]
* lisp/progmodes/prog-mode.el (prog-context-menu): Use "Go Back" (bug#38797)

; Do not merge to master.

3 years ago* lisp/progmodes/prog-mode.el (prog-context-menu): Add "Go Forward".
Juri Linkov [Tue, 9 Nov 2021 08:24:44 +0000 (10:24 +0200)]
* lisp/progmodes/prog-mode.el (prog-context-menu): Add "Go Forward".

The menu item "Go Forward" is bound to xref-go-forward.
Also use "Go Back" for xref-go-back (bug#38797).