1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-01 18:00:40 -08:00
Commit graph

151739 commits

Author SHA1 Message Date
Lars Ingebrigtsen
dae3c4e89b Allow choosing regular-weighted fonts when medium-weighted exist
* src/ftfont.c (ftfont_pattern_entity): Allow using both regular
and medium-weighted fonts.
2021-11-12 07:19:25 +01:00
Stefan Kangas
fc00fe53e1 Merge from origin/emacs-28
a6905e90cc Fix problem with temp buffer killing in package-install-file
144ad77fda Fix Lisp Intro markup error
24b86cb4f7 Fix ACL errors with WebDAV volumes on MS-Windows
2021-11-12 07:17:11 +01:00
Po Lu
070d6297ca Fix doc string for xwidget-webkit-load-html
* src/xwidget.c (Fxwidget_webkit_load_html): Fix doc string.
2021-11-12 14:16:31 +08:00
Po Lu
ea54498f3a Add input method support for xwidget webkit isearch
* lisp/xwidget.el (xwidget-webkit-isearch--read-string-buffer):
New variable.
(xwidget-webkit-isearch-printing-char-with-input-method)
(xwidget-webkit-isearch-with-input-method): New function.

(xwidget-webkit-isearch-printing-char): Add support for Emacs
input methods.  (bug#51781)
2021-11-12 14:06:51 +08:00
Stefan Kangas
7fdac623dd image-dired: Quote function symbols as such
* lisp/image-dired.el (image-dired-thumbnail-mode-line-up-map)
(image-dired-thumbnail-mode-tag-map)
(image-dired-thumbnail-mode-map, image-dired-minor-mode-map):
Quote function symbols as such.
2021-11-12 05:04:08 +01:00
Lars Ingebrigtsen
a6905e90cc Fix problem with temp buffer killing in package-install-file
* lisp/emacs-lisp/package.el (package-install-file): Allow killing
the temporary buffer without querying (bug#51769).
2021-11-12 04:44:09 +01:00
Lars Ingebrigtsen
144ad77fda Fix Lisp Intro markup error
* doc/lispintro/emacs-lisp-intro.texi (Insert let): Fix @code
markup error (bug#51777).
2021-11-12 04:39:07 +01:00
Lars Ingebrigtsen
2d9e750881 Move Info-goto-node-web to "G"
* lisp/info.el (Info-mode-map): Change the Info-goto-node-web
binding to "G" for symmetry with "Info-goto-node".
2021-11-12 04:35:46 +01:00
Stefan Kangas
c9914ba01b Make image-dired-thumbnail-mode non-interactive
* lisp/image-dired.el (image-dired-thumbnail-mode): No longer
interactive, as it only makes sense in a specially prepared buffer.
2021-11-12 04:27:35 +01:00
Stefan Kangas
1d95cef0fe image-dired: Revamp slideshow functionality
* lisp/image-dired.el
(image-dired-slideshow-delay): New defcustom.
(image-dired--slideshow-initial): New defvar.
(image-dired-slideshow-start): Don't show any prompts when starting a
slideshow, unless user gave a negative prefix argument.  Use the value
of the above new defcustom as the default delay.
(image-dired-slideshow-stop): Don't count number of images.  Instead,
continue the slideshow until the next command.
(image-dired-slideshow-step): Use the correct buffer.
(image-dired-slideshow-count, image-dired-slideshow-times): Make
obsolete.
(image-dired--slideshow-timer): Rename from
'image-dired-slideshow-timer'.  Make the old name into an obsolete
variable alias.
(image-dired-display-image-mode-map)
(image-dired-thumbnail-mode-map): Bind 'image-dired-slideshow-start'
to "S".
(image-dired-thumbnail-mode-menu): Add 'image-dired-slideshow-start'.
2021-11-12 04:27:35 +01:00
Stefan Kangas
9ea7e7c4d4 image-dired: Improve thumbnail mode menu
* lisp/image-dired.el (image-dired-thumbnail-mode-menu): Improve menu
with more logical ordering and better naming.
2021-11-12 04:27:35 +01:00
Bryan C. Mills
31279f92ae 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
2021-11-12 04:27:16 +01:00
Lars Ingebrigtsen
cd35c1c7cf 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.
2021-11-12 04:27:16 +01:00
Po Lu
df2438d369 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.
2021-11-12 11:19:30 +08:00
Po Lu
372824a8bf 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.
2021-11-12 10:40:03 +08:00
Lars Ingebrigtsen
71bf21f58b Fix image-animate declaration
* lisp/net/shr.el (image-animate): Fix declaration.
2021-11-12 03:31:53 +01:00
Lars Ingebrigtsen
35e3d002d6 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.
2021-11-12 03:31:53 +01:00
Lars Ingebrigtsen
a204b29d5b 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.
2021-11-12 03:31:53 +01:00
Po Lu
fe0f7bddb6 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.
2021-11-12 09:53:30 +08:00
Po Lu
554a875493 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.
2021-11-12 08:17:41 +08:00
Eli Zaretskii
a8fc080851 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.
2021-11-11 22:00:03 +01:00
Philipp Stephani
a60053f836 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.
2021-11-11 22:00:03 +01:00
Eli Zaretskii
24b86cb4f7 Fix ACL errors with WebDAV volumes on MS-Windows
* src/w32.c (acl_get_file): Handle ERROR_INVALID_FUNCTION from
WebDAV.  Patch from Ioannis Kappas <ioannis.kappas@gmail.com>.
(Bug#51773)
2021-11-11 21:41:10 +02:00
Jim Porter
6c9ac53249 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'.
2021-11-11 19:34:17 +01:00
Stefan Kangas
585e2103df 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.
2021-11-11 18:43:32 +01:00
Filipp Gunbin
e30cb92db6 * lisp/subr.el (add-hook): Fix adding into hook--depth-alist (bug#51620). 2021-11-11 19:44:27 +03:00
Eli Zaretskii
2c082ce800 ; * src/term.c (init_tty): Fix last change. 2021-11-11 16:58:47 +02:00
Eli Zaretskii
4a261ce91d ; * src/term.c (init_tty): Fix style of parentheses. 2021-11-11 16:56:46 +02:00
Eli Zaretskii
386289bdc8 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)
2021-11-11 16:55:11 +02:00
Lars Ingebrigtsen
d75558f11c Fix problem with non-absolute names
* lisp/files.el (file-name-split): Fix problem with non-absolute
names.
2021-11-11 13:20:38 +01:00
Lars Ingebrigtsen
bf9364a56e 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>.
2021-11-11 13:20:38 +01:00
Eli Zaretskii
997ca88ef4 ; * lisp/server.el (server-stop-automatically): Doc fix. 2021-11-11 13:12:50 +02:00
Eli Zaretskii
51e3625dec ; * etc/NEWS: Improve a recently added entry. 2021-11-11 12:58:58 +02:00
Michael Albinus
7aad73febf Merge from origin/emacs-28
6dae01ad6d Fix tramp-compat-file-name-concat (Bug#51754)
2021-11-11 11:55:15 +01:00
Aleksandr Vityazev
6dae01ad6d 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)
2021-11-11 11:53:41 +01:00
Po Lu
9a59d9017b 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.
2021-11-11 18:45:52 +08:00
Feng Shu
f69a808ddc 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.
2021-11-11 18:26:05 +08:00
Stefan Kangas
12a638d845 ; * admin/gitmerge.el: Fix typos. 2021-11-11 10:28:31 +01:00
Eli Zaretskii
3020791e77 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.
2021-11-11 10:58:10 +02:00
Po Lu
f96380eb80 Fix documentation in xwidget.el
* src/xwidget.el (xwidget-webkit-isearch-mode): Reword
documentation.
2021-11-11 15:40:57 +08:00
Po Lu
195f5a0dfa 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.
2021-11-11 15:40:57 +08:00
Stefan Kangas
3e23494394 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
2021-11-11 07:17:56 +01:00
Tim Ruffing
f30f531159 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
2021-11-11 07:14:57 +01:00
Gregory Heytings
894dd18804 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.
2021-11-11 06:43:10 +01:00
Miha Rihtaršič
0a93fb499b 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"
2021-11-11 06:16:52 +01:00
Lars Ingebrigtsen
396355f46b 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.
2021-11-11 05:22:02 +01:00
Lars Ingebrigtsen
42037d8948 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).
2021-11-11 05:04:31 +01:00
John Cummings
9b80fe55f9 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).
2021-11-11 04:37:46 +01:00
Lars Ingebrigtsen
6c405b7a49 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.
2021-11-11 04:08:51 +01:00
Lars Ingebrigtsen
b73e904070 Re-generated to get autoloads additions in emoji.el 2021-11-11 04:02:43 +01:00