1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-13 23:10:26 -08:00
Commit graph

157008 commits

Author SHA1 Message Date
Po Lu
effbd2aeef Fix file drag-and-drop on GNUstep
* src/nsselect.m (ns_decode_data_to_pasteboard): Convert URL to
path names when we're using NSFilenamesPboardType.
* src/nsterm.m: ([EmacsView performDragOperation:]): Handle
cases where plist is a string.
2022-06-04 16:19:01 +08:00
Po Lu
2ce686c049 Support dragging multiple files on NS
This has to use a deprecated pasteboard type, since Emacs uses
the "old" (but not deprecated) dragImage: method for
drag-and-drop, which can't drop file URLs.

* lisp/term/ns-win.el (x-begin-drag): Update accordingly.
* src/nsselect.m (ns_decode_data_to_pasteboard):
(Fns_begin_drag): Allow files to be a list of filenames as well.
2022-06-04 15:45:41 +08:00
Po Lu
1289d0c3dd Fix splurious drag-mouse-1 events after NS drag-and-drop
* src/nsterm.m ([EmacsWindow beginDrag:...]): Clear
dpyinfo->grabbed.
2022-06-04 15:41:39 +08:00
Po Lu
937a011352 Clear mouse face during drag-and-drop
* src/xterm.c (handle_one_xevent): Clear mouse face during drag
and drop, since note_mouse_highlight isn't called.
2022-06-04 15:19:12 +08:00
Eli Zaretskii
3287d4e32e Another attempt to void compiler warnings on macOS (bug#55595)
* configure.ac (WERROR_CFLAGS): Use "-Wno-unknown-pragmas" with
Clang.
2022-06-04 09:05:35 +03:00
Po Lu
eaff6569e2 Improve doc of `mouse-drag-mode-line-buffer'
* doc/emacs/frames.texi (Mouse Commands): Document
`mouse-drag-mode-line-buffer'.
* etc/NEWS: Explain where that option is supported.
* lisp/mouse.el (mouse-drag-mode-line-buffer): Likewise.
2022-06-04 13:27:03 +08:00
Po Lu
c259ae909f Make XTmouse_position faster during dragging with lots of frames
* src/xterm.c (x_tooltip_window_to_frame): New function.
(XTmouse_position): Use that to find tooltip frames underneath
the pointer instead.
2022-06-04 12:27:11 +08:00
Po Lu
63b3999562 Fix leak of toplevel data
* src/xterm.c (x_dnd_compute_toplevels): Make sure to free
`data'.
2022-06-04 10:05:44 +08:00
Po Lu
d49ea6de2f Fix leak of DND toplevels when return-frame is non-nil
* src/xterm.c (x_dnd_free_toplevels): Don't leak DND toplevels
if returning a frame.
(x_dnd_begin_drag_and_drop): Make this function reentrant from
the IO error handler.
2022-06-04 09:52:24 +08:00
Dmitry Gutov
7fed00f9ba Post-review additions
* lisp/progmodes/project.el (project-vc-include-untracked):
Add :version.
(project--vc-list-files): Use 'and' instead of 'when'.
2022-06-04 03:42:00 +03:00
Jan Synáček
526971df64 Add new user option project-vc-include-untracked
* doc/emacs/maintaining.texi (Projects): Document it.
* lisp/progmodes/project.el (project--vc-list-files): Use it.
2022-06-04 03:31:10 +03:00
Dmitry Gutov
db82347269 project-query-replace-regexp: Filter out non-regular files
* lisp/progmodes/project.el (project-query-replace-regexp):
Filter out non-regular files (bug#55382).
2022-06-04 03:13:42 +03:00
Michael Albinus
6f69284ada Fix Tramp test
* test/lisp/net/tramp-tests.el (tramp-test31-signal-process):
Skip on MS Windows.
2022-06-03 19:55:30 +02:00
Michael Albinus
9ea5628b18 Add remote file functions to shortdoc
* lisp/net/tramp-integration.el (shortdoc-add-function)
(shortdoc--groups): Declare.
(shortdoc): Configure shortdoc.el to recognize file name functions
for remote access.
2022-06-03 19:54:31 +02:00
Po Lu
e4611107e5 Fix dired drag and drop actions
* lisp/dired.el (dired-mouse-drag): Make `link' values work
again.
2022-06-03 20:36:24 +08:00
Po Lu
34a681cfc7 Handle dragging multiple files on Haiku
* lisp/term/haiku-win.el (haiku-dnd-selection-converters)
(haiku-dnd-convert-file-name, x-begin-drag): Handle vector
values of selection data.
2022-06-03 12:13:55 +00:00
Eli Zaretskii
a0b2239002 ; Improve documentation of 'battery-update-functions'
* lisp/battery.el (battery-update-functions)
(display-battery-mode): Improve wording of doc strings.
(Bug#55770)
2022-06-03 15:04:42 +03:00
Eli Zaretskii
dc7623a59e ; Improve documentation of new drag-and-drop APIs
* lisp/dnd.el (dnd-begin-text-drag, dnd-begin-file-drag):
* doc/lispref/frames.texi (Drag and Drop): Improve wording of
documentation of 'dnd-begin-text-drag' and 'dnd-begin-file-drag'.
2022-06-03 14:50:11 +03:00
Po Lu
ca2e7409dc Allow dragging multiple files from a Dired buffer
* doc/lispref/frames.texi (Drag and Drop): Document new function
`dnd-begin-drag-files'.
* lisp/dired.el (dired-mouse-drag-files): Update doc string.
(dired-map-over-marks): Accept a new value of ARG `marked',
meaning to not fall back to the current file if no marks were
found.
(dired-mouse-drag): Handle marked files in an intuitive way.

* lisp/dnd.el (dnd-last-dragged-remote-file): Allow list values
as well.
(dnd-remove-last-dragged-remote-file): Handle list values.
(dnd-begin-file-drag): Fix file name expansion.
(dnd-begin-drag-files): New function.
* lisp/select.el (xselect-convert-to-filename): Handle mutiple
files
(a vector of file names):.
2022-06-03 19:46:25 +08:00
Lars Ingebrigtsen
977f3f27c5 Don't issue warnings for Unicode quotes for now
* lisp/emacs-lisp/bytecomp.el (byte-compile-docstring-style-warn):
Remove warning for "Unicode quotes" for now (bug#55780).
2022-06-03 13:09:25 +02:00
Lars Ingebrigtsen
1ed9c1c7f9 Revert the `...' documentation back to actual usage
* doc/lispref/tips.texi (Documentation Tips): Document how `...'
is really used now (bug#55780).  ‘...’ is not really used in the
Emacs sources.
2022-06-03 13:04:13 +02:00
Mattias Engdegård
28622d4dd0 Let ?\LF signal an error (bug#55738)
As suggested by Stefan Monnier.

* src/lread.c (read_escape):
Signal an error for ?\LF since it cannot reasonably be intended.
* test/src/lread-tests.el (lread-escaped-lf): Update test.
* etc/NEWS: Announce.
2022-06-03 11:23:30 +02:00
Mattias Engdegård
e48c9181b1 Fix wrong value in idlwave-comment-indent-char
* lisp/progmodes/idlwave.el (idlwave-comment-indent-char):
Use a space since that is clearly what was meant.
?\ at the end of a line (ie, ?\LF) never was well-defined and produced
-1 most of the time, but will soon raise an error (bug#55738).
This doesn't matter much becaue this variable is unused.
2022-06-03 11:10:38 +02:00
Po Lu
4f56ca6376 Add new user option `mouse-drag-mode-line-buffer'
* etc/NEWS: Announce new option.  Also add missing entries for
an earlier change.
* lisp/mouse.el (mouse-drag-mode-line-buffer): New user option.
(mouse-drag-mode-line): Implement that option.
2022-06-03 15:20:23 +08:00
Po Lu
e65647a70e Add easier-to-use interfaces for initiating drag-and-drop
The previous interface required that users know intricacies of
the data types used to transfer data on each platform Emacs
supports.

* doc/lispref/frames.texi (Drag and Drop): Document new
functions.
* lisp/dired.el (dired-last-dragged-remote-file)
(dired-remove-last-dragged-local-file): Delete functions.
(dired-mouse-drag): Use `dnd-begin-file-drag'.
* lisp/dnd.el (dnd-last-dragged-remote-file)
(dnd-remove-last-dragged-remote-file): New variables and
functions.
(dnd-begin-text-drag, dnd-begin-file-drag): New functions.
* src/xterm.c (x_dnd_begin_drag_and_drop): Add porting note.
2022-06-03 12:32:30 +08:00
Lars Ingebrigtsen
1d5eb67c6a Add a new user option battery-update-functions
* doc/emacs/display.texi (Optional Mode Line): Document it.
* lisp/battery.el (battery-update-functions): New user option
(bug#55770).
(battery-update): Use it.
2022-06-03 05:56:44 +02:00
Lars Ingebrigtsen
1e42c2c5fc Remove window-max-characters-per-line
* doc/lispref/windows.texi (Window Sizes):
* doc/lispref/display.texi (Size of Displayed Text): Remove
documentation.
* lisp/fringe.el (fringe-mode): Point to the right function.

* lisp/window.el (window-char-pixel-width)
(window-char-pixel-height, window-max-characters-per-line): Remove
functions -- this was already added as window-max-chars-per-line.

* src/window.c (Fwindow_body_width): Adjust doc string.
2022-06-03 05:20:16 +02:00
Po Lu
2340243a31 Fix GTK build
* src/xterm.c (x_dnd_begin_drag_and_drop) [USE_GTK]: Adjust call
to x_dnd_free_toplevels as well.
2022-06-03 09:43:42 +08:00
Po Lu
36af7004e2 Don't call XSelectInput on a dying display when cancelling drag-and-drop
* src/xterm.c (x_dnd_free_toplevels): New argument
`display_alive'.
(x_dnd_cleanup_drag_and_drop, x_dnd_begin_drag_and_drop)
(handle_one_xevent): Change calls to `x_dnd_free_toplevels'.
(x_connection_closed, x_delete_terminal): Set it to false.
2022-06-03 08:51:49 +08:00
Lars Ingebrigtsen
8f279c8666 Make checkdoc-file-comments-engine match more ;;;### forms
* lisp/emacs-lisp/checkdoc.el (checkdoc-file-comments-engine): Use
the more general lisp-mode-autoload-regexp instead of
generate-autoload-cookie (i.e., also match ;;;###tramp-autoload).
2022-06-02 19:14:00 +02:00
Lars Ingebrigtsen
da736c9f02 Make `M-x grep' work better with "git grep"
* lisp/progmodes/compile.el (compilation-start): Bind PAGER to ""
to avoid errors in output from "git grep" and similar commands
(bug#4359).
2022-06-02 17:21:28 +02:00
Mattias Engdegård
52e527a02f Make ?\LF generate 10, not -1 (bug#55738)
The old -1 value was an artefact of the reader implementation.

* src/lread.c (read_escape): Remove the `stringp` argument; assume
character literal syntax.  Never return -1.
(read_string_literal): Handle string-specific escape semantics here
and simplify.
* test/src/lread-tests.el (lread-escaped-lf): New test.
2022-06-02 16:57:02 +02:00
Mattias Engdegård
4bacd2a645 * src/lread.c (skip_lazy_string): Fix uninitialised variable. 2022-06-02 16:57:02 +02:00
Stefan Kangas
ba7c564bfe * lisp/play/morse.el: Doc fixes. 2022-06-02 14:55:35 +02:00
Po Lu
ed02be04ae More gracefully handle errors during Motif drag window creation
* src/xterm.c (xm_drag_window_error_handler): Store whether or
not an error happened.
(xm_get_drag_window): Handle errors during XCreateWindow and
XChangeProperty without leaking anything.
(x_error_handler): Fix coding style.
2022-06-02 19:54:40 +08:00
Lars Ingebrigtsen
43b0210f83 Fix out-of-tree build problems with loaddefs.el
* lisp/Makefile.in ($(lisp)/loaddefs.el): Use the new function.

* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate): Pass in
whether to inhibit a partial build (to make the code more general).
(loaddefs-generate--emacs-batch): Add a new function specially for
the Emacs build that has the special rules needed.  (This also
fixes out-of-tree builds.)
loaddefs-generate-batch can be used in general for packages etc.
(loaddefs-generate-batch): Remove the special code for Emacs builds.
2022-06-02 13:52:58 +02:00
Lars Ingebrigtsen
c7b7c9d40f Reinstate the Qload file name handler
* src/lread.c (Fload): Reinstate the Qload file name handler
(bug#12598).  This makes loading non-ASCII elc.gz files work.
2022-06-02 11:51:09 +02:00
Frédéric Giquel
a947c10d90 Use `read-process-output-max' when creating pipes on GNU/Linux
* src/process.c (syms_of_process): Note max size.
(create_process): Set the pipe size from `read-process-output-max'
(bug#55737).

Copyright-paperwork-exempt: yes
2022-06-02 11:38:56 +02:00
yilkalargaw
8b431382e5 Fix usage of absolute :height in manoj-dark-theme
* etc/themes/manoj-dark-theme.el (manoj-dark): Avoid using
absolute heights (bug#55759).
2022-06-02 11:30:23 +02:00
Lars Ingebrigtsen
afc0bfd380 Speed up loaddefs-generate on slow disks
* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate): Make file
update comparisons faster.
2022-06-02 11:13:20 +02:00
Po Lu
760fd43082 Fix rare crash when async input happens while creating xm drag window
* src/xterm.c (xm_get_drag_window): Work around XCloseDisplay
freezing upon being interrupted by a signal.
2022-06-02 16:36:15 +08:00
Eli Zaretskii
da274d73f9 Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2022-06-02 10:52:19 +03:00
Eli Zaretskii
835ce688e2 ; * src/emacs.c (main): Move -version output after initialization. 2022-06-02 10:51:37 +03:00
Po Lu
76ffd4427d Fix macOS build
* src/nsterm.m (ns_mouse_position): Fix typos.
2022-06-02 15:49:50 +08:00
Po Lu
f71fad50fc Fix potential NULL pointer dereference on NS
* src/nsterm.m (ns_mouse_position): Don't test f's tooltip-ness
if it's NULL.
2022-06-02 15:48:12 +08:00
Po Lu
caf8a83730 Fix flickering tooltips with mouse DND without interprogram drag
* src/haikuterm.c (haiku_read_socket):
* src/nsterm.m (ns_mouse_position):
* src/xterm.c (XTmouse_position, handle_one_xevent): Apply
special tooltip treatment to `dropping' as well as
`drag-source'.
2022-06-02 15:46:42 +08:00
Po Lu
77854b1af6 Fix tooltip frames leaking into mouse position on NS
* src/nsterm.m (ns_mouse_position): Avoid tooltip frames and
look underneath them when `drag-source'.

([EmacsView mouseDown:]):
([EmacsView mouseMoved:]): Ignore events from tip frames.
2022-06-02 15:21:35 +08:00
Po Lu
00a5bc9314 Handle dropping text/uri-list on Haiku
* lisp/term/haiku-win.el (window-system-initialization): Remove
extra whitespace.
(haiku-drag-and-drop): Handle "text/uri-list".
2022-06-02 07:05:21 +00:00
Po Lu
2244dc5ce9 Fix help-echo tooltips interfering with mouse drag-and-drop
* lisp/mouse.el (mouse-drag-and-drop-region): Disable
tooltip-mode while mouse drag-and-drop is in progress.  Also
restore state correctly in some more cases.
2022-06-02 14:27:38 +08:00
Po Lu
ce51354432 Fix flicker during mouse DND on Haiku as well
* src/haikuterm.c (haiku_read_socket): Don't clear tooltips on
crossing if track-mouse is drag-source and the display is
grabbed.
2022-06-02 05:44:46 +00:00