1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-04 06:31:13 -08:00
Commit graph

156819 commits

Author SHA1 Message Date
Po Lu
b2c8e8a299 ; * src/nsselect.m (ns_decode_data_to_pasteboard): Fix GNUstep build. 2022-05-28 09:21:40 +08:00
Po Lu
6d6d1adbe7 Fix build on earlier versions of Mac OS X
* src/nsselect.m (ns_decode_data_to_pasteboard): Respect
NS_USE_NSPasteboardTypeFileUrl.
2022-05-28 09:19:33 +08:00
Po Lu
ffab237cbf Add file dragging support to NS port
* lisp/dired.el (dired-mouse-drag-files): Document that
`dired-mouse-drag-files' now works on NS.

* lisp/term/ns-win.el (x-begin-drag): Handle FILE_NAME.
* src/nsselect.m (ns_decode_data_to_pasteboard): Handle file URL
type.
(ns_lisp_to_pasteboard, Fns_begin_drag): Handle new type `file'.
2022-05-28 09:18:09 +08:00
Po Lu
3c5fbfe4ac Improve DND documentation
* doc/lispref/frames.texi (Drag and Drop):
* src/xfns.c (Fx_begin_drag): Document that x-begin-drag may
return immediately if no mouse buttons are held down.
2022-05-28 09:03:29 +08:00
Po Lu
5c07aed894 Fix x_dnd_movement_frame detection on GTK builds
* src/xterm.c (x_dnd_begin_drag_and_drop): Make sure movement
frame is on the correct display.
2022-05-28 08:55:13 +08:00
Po Lu
26588e9594 ; * src/xterm.c (x_color_cache_bucket_size): Improve doc string. 2022-05-28 08:48:29 +08:00
Paul Eggert
3bbf047cd8 Remove stray decl of nonexistent var
* src/lisp.h (symbols_with_pos_enabled): Remove decl.
2022-05-27 16:34:54 -07:00
Paul Eggert
d9879e686d decoded-time-set-defaults now leaves DST alone
* lisp/calendar/time-date.el (decoded-time-set-defaults):
Don’t mess with decoded-time-dst (Bug#55635).
2022-05-27 12:19:59 -07:00
Paul Eggert
eb37e4814e Fix unlikely null pointer dereference
* src/xselect.c (Fx_get_atom_name): Fix unlikely core dump when
build_string is called on a null pointer.  Found by GCC -fanalyzer.
2022-05-27 11:45:01 -07:00
Paul Eggert
cb57db513b Add ATTRIBUTE_DEALLOC to extern functions
This can help static checking.  It’s not as important for static
functions, where GCC can figure this stuff out own its own.
* src/sysstdio.h (emacs_fopen): Add ATTRIBUTE_DEALLOC (fclose, 1).
* src/tparam.h (tparam): Add ATTRIBUTE_DEALLOC_FREE.
Include stdlib.h so that ‘free’ is declared.
* src/xterm.h (x_get_atom_name): Add ATTRIBUTE_DEALLOC_FREE.
2022-05-27 11:45:01 -07:00
Paul Eggert
7f3d781dab Pacify gcc -Wsuggest-attribute-malloc
* src/xterm.h (x_get_atom_name): Add ATTRIBUTE_MALLOC.
2022-05-27 11:45:01 -07:00
Juri Linkov
6c4d767019 Fix navigation in the *Completions* buffer and enable more tests (bug#54374)
* lisp/ido.el: Use first-completion instead of next-completion.

* lisp/minibuffer.el (completion--insert): Put completion--string
text property on prefix and suffix as well.

* lisp/simple.el (first-completion, last-completion): New commands.
(next-completion): Rewrite to fix many bugs reported in
bug#54374, bug#55289, bug#55430.
(choose-completion): Use the text property completion--string that
allows to select a completion when point is on its prefix or suffix.
(switch-to-completions): Use first-completion instead of next-completion,
and last-completion instead of previous-completion.

* test/lisp/minibuffer-tests.el (completion-auto-select-test)
(completion-auto-wrap-test, completions-header-format-test)
(completions-affixation-navigation-test): Uncomment fixed lines.
2022-05-27 19:13:09 +03:00
Eli Zaretskii
4df20e2f14 Extend 'C-x 8 =' to produce characters with macron
* lisp/international/iso-transl.el (iso-transl-char-map): Add
several new sequences for characters with macron.  (Bug#55668)
2022-05-27 18:41:12 +03:00
Stefan Monnier
f8b2a01a9e * lisp/shell.el (shell): Query shell file name from interactive
This avoids the use of the brittle `called-interactively-p`
and makes it easier to start a shell buffer running another shell than
your usual one.
2022-05-27 09:14:40 -04:00
Eli Zaretskii
8399c6a821 Improve font selection on MS-Windows
The Arial Unicode MS font claims in its USB (Unicode Subset
Bitfields) values support for several scripts for which it
doesn't actually have glyphs.  This sometimes caused Emacs to
decide to use Arial Unicode MS for some script, only to
discover later that there are no glyphs for that script's
characters.  This change fixes the USB values according to
actual font coverage, as determined by BabelMap.
* src/w32font.c (add_font_entity_to_list): Fix USB values of Arial
Unicode MS font according to its actual coverage of scripts.
2022-05-27 15:12:09 +03:00
Lars Ingebrigtsen
a83e75b207 Make make-decoded-time use -1 for dst unless given
* lisp/calendar/time-date.el (make-decoded-time): DST -1 is the
value for "doesn't know", not nil (bug#55635).
2022-05-27 12:38:02 +02:00
Lars Ingebrigtsen
fd4a0c022b Make package-update-all also refresh the list
* lisp/emacs-lisp/package.el (package-update-all): Also refresh
package list.
2022-05-27 12:17:28 +02:00
Po Lu
82b75a97ba Fix GNUstep build
* src/nsterm.h (NSPasteboardNameGeneral): Fix definition.
2022-05-27 17:11:59 +08:00
Po Lu
5d2523dcd0 Fix NS drag and drop on macOS
* lisp/term/ns-win.el (gui-backend-set-selection):
* src/nsselect.m (Fns_begin_drag): Fix deprecation warnings and
selection/value mixup.
2022-05-27 17:11:07 +08:00
Po Lu
01e3345b7b Merge remote-tracking branch 'origin/master' into x-window-xwidget 2022-05-27 16:34:28 +08:00
Po Lu
27de58af8b Implement some drag and drop functions on NS
* lisp/term/ns-win.el (ns-selection-exists-p):
(gui-backend-set-selection):
(x-begin-drag): New functions and selection types.
* src/nsfns.m (Fns_get_resource):
(Fns_set_resource):
(Fx_server_max_request_size): Fix coding style.
* src/nsselect.m (ns_decode_data_to_pasteboard):
(ns_lisp_to_pasteboard):
(ns_dnd_action_to_operation):
(ns_dnd_action_from_operation):
(Fns_begin_drag): New functions.
(syms_of_nsselect): New subrs.
* src/nsterm.h (EmacsWindow): New fields and messages.
(NSPasteboardNameGeneral): New define.
* src/nsterm.m ([EmacsView mouseDown:]): Store last mouse event.
([EmacsWindow initWithEmacsFrame:fullscreen:screen:]): Clear that event.
([EmacsWindow dealloc]): Free last mouse event.
2022-05-27 16:33:12 +08:00
Stefan Kangas
758fed537b * lisp/progmodes/asm-mode.el: Minor doc fixes. 2022-05-27 10:04:16 +02:00
Stefan Kangas
7d74b8f632 Prefer defvar-keymap in some progmodes
* lisp/progmodes/asm-mode.el (asm-mode-map):
* lisp/progmodes/bug-reference.el (bug-reference-map):
* lisp/progmodes/erts-mode.el (erts-mode-map):
* lisp/progmodes/flymake.el (flymake-mode-map)
(flymake-diagnostics-buffer-mode-map):
* lisp/progmodes/icon.el (icon-mode-map):
* lisp/progmodes/js.el (js-mode-map):
* lisp/progmodes/m4-mode.el (m4-mode-map):
* lisp/progmodes/mixal-mode.el (mixal-mode-map):
* lisp/progmodes/scheme.el (scheme-mode-map): Prefer defvar-keymap.
2022-05-27 10:00:14 +02:00
Stefan Kangas
4ed0f6e965 Silence byte-compiler warning about x-pointer-invisible
* lisp/avoid.el (x-pointer-invisible): Declare to silence
byte-compiler.
2022-05-27 09:42:12 +02:00
Eli Zaretskii
a2f7b7c803 Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2022-05-27 09:42:39 +03:00
समीर सिंह Sameer Singh
77bfc5ed7a Add support for the Javanese script (bug#55667)
* lisp/language/indonesian.el ("Javanese"): New language environment.
Add composition rules for Javanese.  Add sample text and input
method.
* lisp/international/fontset.el (script-representative-chars):
Support Javanese.
* lisp/leim/quail/indonesian.el ("javanese"): New input method.

* etc/NEWS: Announce the new language environment and its
input method.
2022-05-27 09:41:24 +03:00
Po Lu
34e4eba07e * etc/PROBLEMS: Document problems with PGTK input methods. 2022-05-27 14:40:43 +08:00
Po Lu
edd11a2c6e Update comments in some X code
* src/xterm.c (x_parse_color): Update comment.
(syms_of_xterm): Add new debugging option too.
2022-05-27 14:40:43 +08:00
Stefan Kangas
7da754015f Merge from origin/emacs-28
9283508fb2 Fix format specifiers in tramp-adb.el
a9f17ccce3 ; Fix some doc typos and minor language issues
2022-05-27 06:30:20 +02:00
Po Lu
bb0317442b Fix XI scroll valuator reset on X Toolkit builds
* src/xterm.c (handle_one_xevent): Reset valuators on XI_Leave
if leave->event is an edit widget as well.
2022-05-27 10:34:04 +08:00
Po Lu
c0807daedc Improve lookup efficiency of color cache and prevent leaking
* src/xterm.c (x_parse_color): Move recently used colors to the
start of the cache and free unused entries when there are too
many.
(x_term_init, x_delete_display): Initialize and free new fields.
* src/xterm.h (struct x_display_info): New field
`color_names_length'.
2022-05-27 09:40:40 +08:00
Po Lu
8dcebc9629 Handle allocation errors when creating menu items on Haiku
* src/haiku_support.cc (class EmacsMenuItem): Don't abort on
failed strdup.
2022-05-27 00:24:12 +00:00
Po Lu
061c2d683f Fix longjmp/siglongjmp mixup
* src/xterm.c (xm_drag_window_io_error_handler)
(x_dnd_io_error_handler): Use `siglongjmp'.  Reported by Ken
Brown <kbrown@cornell.edu>.
2022-05-27 08:13:09 +08:00
Lars Ingebrigtsen
2c76cee37c Regenerated ldefs-boot.el 2022-05-26 22:53:13 +02:00
Stefan Monnier
14cbb75455 Merge remote-tracking branch 'origin/scratch/bug-55156' 2022-05-26 16:46:11 -04:00
Stefan Monnier
fbe0d7361f package-activate-all: Use the quickstart more conservatively
* lisp/emacs-lisp/package.el (package-activate-all): Don't use the
quickstart file if some packages have already been activated.
2022-05-26 16:40:52 -04:00
Sam Steingold
3d567a5517 Avoid duplicates in `package-activated-list'
* lisp/emacs-lisp/package.el (package-quickstart-refresh): Calling
`package-activate-all' twice leads to duplicates in
`package-activated-list' - avoid that.
2022-05-26 16:18:47 -04:00
Juri Linkov
37b3624cd2 Test suite for Completions UI (bug#54374)
* test/lisp/minibuffer-tests.el (completing-read-with-minibuffer-setup):
New macro based on xdisp-tests--in-minibuffer.
(completion-auto-help-test, completion-auto-select-test)
(completion-auto-wrap-test, completions-header-format-test)
(completions-affixation-navigation-test): New tests.
2022-05-26 19:26:10 +03:00
Stefan Monnier
80ba4c1707 eval.c: New functions defvar-1 and defconst-1 (bug#55156)
The bytecode interpreter can't directly call special forms, so
the byte-compiler usually converts special forms into some sequence of
byte codes (basically, providing a duplicate definition of the special
form).  There are still two exceptions to this: `defconst` and `defvar`,
where the compiler instead generates a convoluted chunk of code like:

    (funcall '(lambda (x) (defvar <sym> x <doc>)) <value>)

where the quote makes sure we keep the function non-compiled, so as
to end up running the special form at run time.

Get rid of this workaround by introducing `defvar-1` and `defconst-1`
which provide a *functional* interface to the functionality of the
corresponding special form.

* src/eval.c (defvar, Fdefvar_1, Fdefconst_1): New functions, extracted from
`Fdefvar` and `Fdefconst`.
(Fdefvar, Fdefconst): Use them.
(syms_of_eval): `defsubr` the new functions.

* lisp/emacs-lisp/bytecomp.el (byte-compile-tmp-var): Delete const.
(byte-compile-defvar): Simplify using the new functions.

* doc/lispref/variables.texi (Defining Variables): Adjust the doc of
`defvar` to reflect the actual semantics implemented.
2022-05-26 12:21:32 -04:00
Stefan Monnier
77b5840d4a * test/lisp/files-resources/compile-utf8.el: Use lexical-binding 2022-05-26 12:16:04 -04:00
Stefan Monnier
69cd21222a * etc/themes/leuven-dark-theme.el: Use lexical-binding 2022-05-26 12:15:06 -04:00
Hayden Shenk
9283508fb2 Fix format specifiers in tramp-adb.el
* lisp/net/tramp-adb.el (tramp-adb-get-device): Fix format
specifiers for port.  (Bug#55651)

Copyright-paperwork-exempt: yes
2022-05-26 18:09:56 +02:00
समीर सिंह Sameer Singh
4677ff4361 Add support for the Balinese script (bug#55648)
* lisp/language/indonesian.el ("Balinese"): New language environment.
Add composition rules for Balinese.  Add sample text and input
method.
* lisp/international/fontset.el (script-representative-chars)
(setup-default-fontset): Support Balinese.
* lisp/leim/quail/indonesian.el ("balinese"): New input method.
* lisp/loadup.el: Preload lisp/language/indonesian.el.

* etc/HELLO: Add a Balinese greeting.
* etc/NEWS: Announce the new language environment and its
input method.
2022-05-26 18:40:37 +03:00
Mattias Engdegård
e05acb07d3 Faster and less recursive byte-compile--first-symbol-with-pos
* lisp/emacs-lisp/bytecomp.el (byte-compile--first-symbol-with-pos)
(byte-compile--warning-source-offset):
Remove recursion for cdr-traversal of lists, and optimise (bug#55414).
2022-05-26 17:28:13 +02:00
Po Lu
e490b80a10 Handle alternate actions for Motif drop targets
* src/xterm.c (xm_side_effect_from_action): Handle
`XdndActionAsk'.
(xm_operations_from_actions): New function.
(xm_send_top_level_leave_message, x_dnd_cleanup_drag_and_drop)
(x_dnd_update_state, handle_one_xevent, x_connection_closed):
Use those actions when building a side effect.
(x_dnd_begin_drag_and_drop): Keep track of the set of
alternative drag-and-drop actions.
2022-05-26 21:00:35 +08:00
Lars Ingebrigtsen
ef6059cb83 Make comp--native-compile delete the temp file it creates
* lisp/emacs-lisp/comp.el (comp--native-compile): Delete the
temporary files we create (bug#55611).
2022-05-26 14:47:16 +02:00
Lars Ingebrigtsen
06c79dcfcb Make memory-report not bug out with symbols with positions
* lisp/emacs-lisp/memory-report.el (memory-report--object-size-1):
Don't bug out when there are symbols with positions.
2022-05-26 13:04:50 +02:00
Štěpán Němec
47e0b86611 ; Fix up doc of recent elisp-eldoc-var-docstring-with-value addition 2022-05-26 10:58:22 +02:00
Štěpán Němec
a9f17ccce3 ; Fix some doc typos and minor language issues 2022-05-26 10:29:10 +02:00
Po Lu
036b72575a Fix the `x_trace_wire' option
* src/xterm.c (x_trace_wire):
(x_term_init): Fix debugging code for modern C and Xlib.
2022-05-26 14:37:27 +08:00