Commit graph

157045 commits

Author SHA1 Message Date
Lars Ingebrigtsen
9d2f4a8d5a Add convenience functions for generating Emacs Lisp files
* lisp/url/url-cookie.el (url-cookie-write-file):
* lisp/international/titdic-cnv.el (tit-process-header):
* lisp/international/ja-dic-cnv.el (skkdic-convert):
* lisp/international/emoji.el (emoji--generate-file):
* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--rubric)

* admin/unidata/unidata-gen.el (unidata-gen-file)
(unidata-gen-charprop): Use the new functions.

* lisp/emacs-lisp/generate-file.el: New file to provide
convenience functions for generated files.  It's not always
trivial to know which parts of the trailer that has to be
obfuscated to avoid not getting byte-compiled etc, and some parts
of the headers/trailers are usually forgotten when hand-coding
these.
2022-06-05 16:36:34 +02:00
Eli Zaretskii
ac6660a2d0 ; * lisp/international/fontset.el (setup-default-fontset): Fix comment. 2022-06-05 17:08:49 +03:00
समीर सिंह Sameer Singh
0e2b70b659 Add a fallback font for Tamil Supplement characters
* lisp/international/fontset.el (setup-default-fontset): Add
and entry for "Noto Sans Tamil Supplement".  (Bug#55807)
2022-06-05 17:05:35 +03:00
JD Smith
11dadfbf3b Make the Unicode tree widget prettier
* lisp/tree-widget.el (tree-widget-nohandle-guide): New widget:
"One small change is needed to accommodate this
style. `tree-widget-guide’ specifies a single vertical bar “guide”
widget. In the unicode tree, two separate vertical bars are needed
— one “plain” (│), and one which connects to the horizontal
“handle” preceding the node (├)."
(tree-widget--cursors):
(tree-widget):
(tree-widget-value-create): Use it.

Copyright-paperwork-exempt: yes
2022-06-05 15:59:37 +02:00
Lars Ingebrigtsen
408fa62148 Add new command find-sibling-file
* doc/emacs/files.texi (Visiting): Document it.
* lisp/files.el (file-expand-wildcards): Fix up the regexp expansion.
(find-sibling-rules, find-sibling-file): New user option and command.
(find-sibling-file--search): New helper function.
2022-06-05 15:49:29 +02:00
Po Lu
fcb4d836f0 Fix file name encoding of Motif drop protocol file selections
* lisp/select.el (xselect-convert-to-filename):
(xselect-convert-to-dt-netfile): Encode in the file name coding
system instead of `raw-text-unix'.
2022-06-05 21:16:38 +08:00
Lars Ingebrigtsen
d8924e179e Extend file-expand-wildcards to allow regexps
* doc/lispref/files.texi (Contents of Directories): Document it.
* lisp/files.el (file-expand-wildcards): Extend to allow regexps.

* lisp/emacs-lisp/shortdoc.el (file): Expand the
file-expand-wildcards example.
2022-06-05 14:08:31 +02:00
Po Lu
6011d39b6a Fix drag-and-drop of files with multibyte filenames
* lisp/dired.el (dired-mouse-drag): Fix re-signalling of errors.

* lisp/select.el (xselect-convert-to-filename):
(xselect-convert-to-text-uri-list):
(xselect-convert-to-dt-netfile): Encode in raw-text-unix.

* src/xgselect.c (suppress_xg_select, release_xg_select): New
functions.
(xg_select): Respect xg_select suppression by delegating to
pselect.
* src/xgselect.h: Update prototypes.

* src/xterm.c (x_dnd_begin_drag_and_drop): Suppress xg_select
during the nested event loop.
(handle_one_xevent): Handle cases where hold_quit is nil inside
a selection event handler during DND.
2022-06-05 15:38:23 +08:00
Eli Zaretskii
993853531a Fix sorting in ls-lisp.el under -v
* lisp/ls-lisp.el (ls-lisp-version-lessp): Handle correctly the
case where strings begin with numerical parts.  More faithful
implementation of the 'strverscmp' spec for fractional parts.
(Bug#55787)

* test/lisp/ls-lisp-tests.el (ls-lisp-test-bug55787): New test.
2022-06-05 09:52:09 +03:00
Po Lu
e4725ab688 Fix bug#55779
* src/xterm.c (x_update_opaque_region): Don't make GTK reset the
opaque region if F is a child frame.
2022-06-05 13:05:56 +08:00
Po Lu
7d7a6f6719 Better respect window manager stacking order
* src/xfns.c (x_frame_list_z_order, Fx_frame_list_z_order): Use
_NET_CLIENT_LIST_STACKING if supported.
* src/xterm.c (x_wm_supports_1): New function.  Accept dpyinfo
instead of frame.
(x_wm_supports): Use that function instead.

* src/xterm.h: Update prototypes.
2022-06-05 13:05:56 +08:00
Stefan Kangas
d46e94f23f Merge from origin/emacs-28
1b8719835a Update to Org 9.5.4
92c5faafd7 Clarify documentation of 'string-to-unibyte'
2848512654 ; * lisp/files.el (find-file): Avoid too short lines in do...
672f9f787f Improve keystrokes in doc strings in some find-file functions
ef5651cc77 Fix segfaults when starting on 80x26 TTY frames
bfa647972f ; Fix doc string of 'delete-selection-repeat-replace-region'
a95d46e00f Make it explicit that a couple of _s in lispref are unders...
5c74c25123 Remove from FAQ the MS-Windows info about BDF fonts
edb48646f2 Fix Display Property manual example
2022-06-05 06:30:25 +02:00
Po Lu
ddfb91c0a7 Fix positioning of non-system tooltips on GTK builds
* src/xfns.c (compute_tip_xy): Fix coding style.
* src/xterm.c (handle_one_xevent): Set tooltip size immediately
on GTK builds.
2022-06-05 10:06:00 +08:00
Po Lu
f15f9ddea1 Adjust last change for GTK+ 2.x
* src/xterm.c (x_tooltip_window_to_frame): Fix build on GTK 2.x.
2022-06-05 09:30:45 +08:00
Po Lu
3f349a08ae Make `mouse-position' work correctly with GTK tooltips
* src/xterm.c (x_tooltip_window_to_frame): New parameter
`unrelated_tooltip_p'.
(XTmouse_position): Pass that, and if it turns out to be true,
look beneath the tooltip window.
2022-06-05 09:24:20 +08:00
Kyle Meyer
1b8719835a Update to Org 9.5.4 2022-06-04 16:21:06 -04:00
Lars Ingebrigtsen
e74652386d Make loaddefs-generate--parse-file more robust
* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--parse-file):
Ensure that we don't have an autoload cookie on the first column
inside a string.
2022-06-04 18:41:10 +02:00
Lars Ingebrigtsen
0a5477b448 Make skkdic-convert replacements literal
* lisp/international/ja-dic-cnv.el (skkdic-convert): The
replacement is literal and fixed-case.  (The build on EMBA is
failing mysteriously with "Match data clobbered by buffer
modification hooks", so this is mainly a stab in the dark at
fixing that, but it's also generally correct.)
2022-06-04 15:07:01 +02:00
Lars Ingebrigtsen
54ed817eee Make vc-mtn obsolete
* lisp/obsolete/vc-mtn.el: Make obsolete (bug#6513).
2022-06-04 14:16:26 +02:00
Lars Ingebrigtsen
d37d099ad7 Fix failing shortdoc test
* lisp/emacs-lisp/shortdoc.el (string): Each example section is
supposed to contain only examples of using the function in
question (as policed by the FAILED  shortdoc-examples test).
2022-06-04 14:04:49 +02:00
Po Lu
fe6f1dfeb4 Fix error during DND from both Emacs and GTK at the same time
* src/xterm.c (x_dnd_get_target_window): Make mapping and
releasing the COW atomic.  This is to fix a rare bug when
MPX (multi-pointer X) is in use and the user tries to drag
from both GTK and Emacs at the same time using multiple seats.
2022-06-04 20:01:07 +08:00
Lars Ingebrigtsen
f76f529524 Further raise-sexp doc string improvement
* lisp/emacs-lisp/lisp.el (raise-sexp): Fix the key binding syntax
in the doc string.
2022-06-04 14:00:10 +02:00
Lars Ingebrigtsen
b3dc23dd60 Improve the raise-sexp doc string
* lisp/emacs-lisp/lisp.el (raise-sexp): Try to explain what the
command does (bug#55788).
2022-06-04 13:57:08 +02:00
Lars Ingebrigtsen
a418730a1b Fix warnings introduced by the lisp-mode-autoload-regexp change
* lisp/emacs-lisp/lisp-mode.el (lisp-fdefs): The package name bit
in ###;;;foo-autoload may be missing, so do a lax match (bug#55784).
2022-06-04 13:50:07 +02:00
Lars Ingebrigtsen
f0189819d8 Add a face to \\= doc string escapes
* lisp/emacs-lisp/lisp-mode.el (lisp-fdefs): Add a face to \\= doc
string escapes (bug#55783).
2022-06-04 13:43:58 +02:00
Lars Ingebrigtsen
01b192534a Further notes about quotation marks in the manual
* doc/lispref/tips.texi (Documentation Tips): Note that we
previously recommended using single quotation marks (bug#55780).
2022-06-04 13:29:53 +02:00
Po Lu
f1b4c0aff5 Allow keyboard modifiers to control the action taken during dired DND
* doc/emacs/dired.texi (Misc Dired Features): Update
documentation.
* lisp/dired.el (dired-mouse-drag-files): Update defcustom for
new values.
(dired-mouse-drag): Recognize more values of
`dired-mouse-drag-files' and keyboard modifiers.
(dired-mouse-drag-files-map): Add C-down-mouse-1, M-down-mouse-1
and S-down-mouse-1.
2022-06-04 18:08:28 +08:00
Michael Albinus
acf27496cb * lisp/emacs-lisp/shortdoc.el (string): Add `string-collate-lessp'. 2022-06-04 11:23:53 +02:00
समीर सिंह Sameer Singh
65dc15b722 Add support for the Grantha script (bug#55782)
* lisp/language/indian.el ("Grantha"): New language environment.
Add composition rules for Grantha. Add sample text and input method.
* lisp/international/fontset.el (script-representative-chars)
(setup-default-fontset): Support Grantha.
* lisp/leim/quail/indian.el ("grantha"): New input method.

* etc/HELLO: Add two Grantha greetings.
* etc/NEWS: Announce the new language environment.
2022-06-04 11:30:44 +03:00
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
92c5faafd7 Clarify documentation of 'string-to-unibyte'
* doc/lispref/nonascii.texi (Converting Representations): Clarify
what 'string-to-unibyte' does.  Reported by Richard Hansen
<rhansen@rhansen.org>.  (Bug#55777)
2022-06-04 10:06:43 +03: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